Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
bacc7f3
Changed HullClassifier to MyRadioAntenna instead of MyBeacon
drNovikov Sep 6, 2015
66ddb81
Changed HullClassifier mount points so they cover the whole surface
drNovikov Sep 6, 2015
eaa9d07
Bacon surfaces made fully mountable
drNovikov Sep 7, 2015
36137ad
Beacon and Hull Classifiers mount points reverted to vanilla
drNovikov Sep 8, 2015
7b42980
Fixed a typo in a comment
drNovikov Sep 8, 2015
9820af1
Removed my *.bak from .gitignore
drNovikov Sep 9, 2015
5b0d57b
"/gc fleet stop" enables thrusters, enables gyroscopes, sets gyro pow…
drNovikov Sep 20, 2015
dd2d4d1
Added ResourceSinkGroup to hull classifier definitions
drNovikov Oct 8, 2015
e6d5a38
cp round reward imprvs and fixes
zrisher Jul 21, 2015
444b575
add ability to show/hide CP GPS markers
zrisher Aug 7, 2015
eb49dc6
Changed HullClassifier to MyRadioAntenna instead of MyBeacon
drNovikov Sep 6, 2015
37b4173
Changed HullClassifier mount points so they cover the whole surface
drNovikov Sep 6, 2015
7c473fe
Bacon surfaces made fully mountable
drNovikov Sep 7, 2015
28a15f9
Beacon and Hull Classifiers mount points reverted to vanilla
drNovikov Sep 8, 2015
0bca8bc
Fixed a typo in a comment
drNovikov Sep 8, 2015
5edd8b5
Removed my *.bak from .gitignore
drNovikov Sep 9, 2015
327dbc4
"/gc fleet stop" enables thrusters, enables gyroscopes, sets gyro pow…
drNovikov Sep 20, 2015
f67dfb1
Added ResourceSinkGroup to hull classifier definitions
drNovikov Oct 8, 2015
04a0f5c
Merge remote-tracking branch 'origin/dev-drnovikov' into dev-drnovikov
drNovikov Oct 8, 2015
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions Data/BlockCategories.sbc
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
<DisplayName>Hull Classifiers</DisplayName>
<Name>Hull Classifiers</Name>
<ItemIds>
<string>Beacon/GCUnlicensedHullClassifier</string>
<string>Beacon/GCWorkerHullClassifier</string>
<string>Beacon/GCFoundryHullClassifier</string>
<string>Beacon/GCScoutHullClassifier</string>
<string>Beacon/GCFighterHullClassifier</string>
<string>Beacon/GCGunshipHullClassifier</string>
<string>Beacon/GCCorvetteHullClassifier</string>
<string>Beacon/GCFrigateHullClassifier</string>
<string>Beacon/GCDestroyerHullClassifier</string>
<string>Beacon/GCCruiserHullClassifier</string>
<string>Beacon/GCHeavyCruiserHullClassifier</string>
<string>Beacon/GCBattleshipHullClassifier</string>
<string>Beacon/GCOutpostHullClassifier</string>
<string>Beacon/GCInstallationHullClassifier</string>
<string>Beacon/GCFortressHullClassifier</string>
<string>RadioAntenna/GCUnlicensedHullClassifier</string>
<string>RadioAntenna/GCWorkerHullClassifier</string>
<string>RadioAntenna/GCFoundryHullClassifier</string>
<string>RadioAntenna/GCScoutHullClassifier</string>
<string>RadioAntenna/GCFighterHullClassifier</string>
<string>RadioAntenna/GCGunshipHullClassifier</string>
<string>RadioAntenna/GCCorvetteHullClassifier</string>
<string>RadioAntenna/GCFrigateHullClassifier</string>
<string>RadioAntenna/GCDestroyerHullClassifier</string>
<string>RadioAntenna/GCCruiserHullClassifier</string>
<string>RadioAntenna/GCHeavyCruiserHullClassifier</string>
<string>RadioAntenna/GCBattleshipHullClassifier</string>
<string>RadioAntenna/GCOutpostHullClassifier</string>
<string>RadioAntenna/GCInstallationHullClassifier</string>
<string>RadioAntenna/GCFortressHullClassifier</string>
</ItemIds>
</Category>
</CategoryClasses>
Expand Down
51 changes: 34 additions & 17 deletions Data/CubeBlocks.sbc
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCUnlicensedHullClassifier</SubtypeId>
</Id>
<DisplayName>Unlicensed Hull Classifier</DisplayName>
<Icon>Textures\Icons\unlicensed-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -47,11 +48,12 @@
</Definition>
<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCUnlicensedHullClassifierSmall</SubtypeId>
</Id>
<DisplayName>Unlicensed Hull Classifier</DisplayName>
<Icon>Textures\Icons\unlicensed-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Small</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="2" />
Expand Down Expand Up @@ -82,11 +84,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCWorkerHullClassifier</SubtypeId>
</Id>
<DisplayName>Worker Hull Classifier</DisplayName>
<Icon>Textures\Icons\utility-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -124,11 +127,12 @@
</Definition>
<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCWorkerHullClassifierSmall</SubtypeId>
</Id>
<DisplayName>Worker Hull Classifier</DisplayName>
<Icon>Textures\Icons\utility-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Small</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="2" />
Expand Down Expand Up @@ -156,11 +160,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCFoundryHullClassifier</SubtypeId>
</Id>
<DisplayName>Foundry Hull Classifier</DisplayName>
<Icon>Textures\Icons\utility-2-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -203,11 +208,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCScoutHullClassifier</SubtypeId>
</Id>
<DisplayName>Scout Hull Classifier</DisplayName>
<Icon>Textures\Icons\strikecraft-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Small</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="2" />
Expand Down Expand Up @@ -235,11 +241,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCFighterHullClassifier</SubtypeId>
</Id>
<DisplayName>Fighter Hull Classifier</DisplayName>
<Icon>Textures\Icons\strikecraft-2-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Small</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="2" />
Expand Down Expand Up @@ -267,11 +274,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCGunshipHullClassifier</SubtypeId>
</Id>
<DisplayName>Gunship Hull Classifier</DisplayName>
<Icon>Textures\Icons\strikecraft-3-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Small</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="1" z="2" />
Expand Down Expand Up @@ -303,11 +311,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCCorvetteHullClassifier</SubtypeId>
</Id>
<DisplayName>Corvette Hull Classifier</DisplayName>
<Icon>Textures\Icons\corvette-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -346,11 +355,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCFrigateHullClassifier</SubtypeId>
</Id>
<DisplayName>Frigate Hull Classifier</DisplayName>
<Icon>Textures\Icons\frigate-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -389,11 +399,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCDestroyerHullClassifier</SubtypeId>
</Id>
<DisplayName>Destroyer Hull Classifier</DisplayName>
<Icon>Textures\Icons\capital-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -432,11 +443,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCCruiserHullClassifier</SubtypeId>
</Id>
<DisplayName>Cruiser Hull Classifier</DisplayName>
<Icon>Textures\Icons\capital-2-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -475,11 +487,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCHeavyCruiserHullClassifier</SubtypeId>
</Id>
<DisplayName>Heavy Cruiser Hull Classifier</DisplayName>
<Icon>Textures\Icons\supercapital-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -518,11 +531,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCBattleshipHullClassifier</SubtypeId>
</Id>
<DisplayName>Battleship Hull Classifier</DisplayName>
<Icon>Textures\Icons\supercapital-2-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -565,11 +579,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCOutpostHullClassifier</SubtypeId>
</Id>
<DisplayName>Outpost Hull Classifier</DisplayName>
<Icon>Textures\Icons\station-1-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -608,11 +623,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCInstallationHullClassifier</SubtypeId>
</Id>
<DisplayName>Installation Hull Classifier</DisplayName>
<Icon>Textures\Icons\station-2-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down Expand Up @@ -651,11 +667,12 @@

<Definition>
<Id>
<TypeId>Beacon</TypeId>
<TypeId>RadioAntenna</TypeId>
<SubtypeId>GCFortressHullClassifier</SubtypeId>
</Id>
<DisplayName>Fortress Hull Classifier</DisplayName>
<Icon>Textures\Icons\station-3-128.dds</Icon>
<ResourceSinkGroup>Utility</ResourceSinkGroup>
<CubeSize>Large</CubeSize>
<BlockTopology>TriangleMesh</BlockTopology>
<Size x="1" y="2" z="1" />
Expand Down
2 changes: 1 addition & 1 deletion Data/Prefabs/GCSpawnShip.sbc
Original file line number Diff line number Diff line change
Expand Up @@ -1180,7 +1180,7 @@ people will try to kill you.
<BlinkLenght>10</BlinkLenght>
<BlinkOffset>0</BlinkOffset>
</MyObjectBuilder_CubeBlock>
<MyObjectBuilder_CubeBlock xsi:type="MyObjectBuilder_Beacon">
<MyObjectBuilder_CubeBlock xsi:type="MyObjectBuilder_RadioAntenna">
<SubtypeName>GCUnlicensedHullClassifier</SubtypeName>
<EntityId>200619511763221591</EntityId>
<Min x="2" y="-1" z="9" />
Expand Down
4 changes: 2 additions & 2 deletions Data/Scripts/GardenConquest/Blocks/GridEnforcer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ public override void Init(MyObjectBuilder_EntityBase objectBuilder) {
}

// We need to only turn on our rule checking after startup. Otherwise, if
// a beacon is destroyed and then the server restarts, all but the first
// an antenna is destroyed and then the server restarts, all but the first
// 25 blocks will be deleted on startup.
m_Grid.NeedsUpdate |= MyEntityUpdateEnum.EACH_100TH_FRAME;

Expand Down Expand Up @@ -975,7 +975,7 @@ private void removeExtraClassifiers(int removeCount = 100) {
/// The cleanest way to do that would be making Hull Classifiers a logic component
/// so we can track isWorking there and make sure it's closed when they are
/// This would require the ge to be able to find the HullClassifier component on
/// an added beacon, which seems like it might be possible, but also might not
/// an added antenna, which seems like it might be possible, but also might not
/// </remarks>
private List<HullClassifier> findWorstClassifiers(uint removeCount = 0) {
List<HullClassifier> worstClassifiers = new List<HullClassifier>();
Expand Down
2 changes: 1 addition & 1 deletion Data/Scripts/GardenConquest/Blocks/HullClassifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private static HullClass.CLASS HullClassFromSubTypeString(String subTypeString)
/// </summary>
public static bool isClassifierBlock(IMySlimBlock block) {
IMyCubeBlock fatblock = block.FatBlock;
if (fatblock != null && fatblock is Ingame.IMyBeacon) {
if (fatblock != null && fatblock is Ingame.IMyRadioAntenna) {
String subTypeName = fatblock.BlockDefinition.SubtypeName;
if (subTypeName.Contains(SHARED_SUBTYPE))
return true;
Expand Down
2 changes: 1 addition & 1 deletion Data/Scripts/GardenConquest/Core/CommandProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ private String helpCPsText() {

"In order to control the CP, your fleet must " +
"have the most ships in that area that:\n" +
"* have a powered, broadcasting Hull Classifier beacon\n" +
"* have a powered, broadcasting Hull Classifier antenna\n" +
"* have a broadcast range on the classifier at least as large " +
" as the ship's distance to the CP. (This is to prevent players " +
"from hiding while capturing a CP. If someone stands in the " +
Expand Down
11 changes: 9 additions & 2 deletions Data/Scripts/GardenConquest/Messaging/RequestProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ private void processStopGridRequest(StopGridRequest req) {

// Get all thrusters, spaceballs, artificial masses, and cockpits
Func<IMySlimBlock, bool> selectBlocks = b =>
b.FatBlock != null && (b.FatBlock is IMyThrust || b.FatBlock is IMySpaceBall || b.FatBlock is InGame.IMyVirtualMass || b.FatBlock is InGame.IMyShipController);
b.FatBlock != null && (b.FatBlock is IMyThrust || b.FatBlock is IMyGyro || b.FatBlock is IMySpaceBall || b.FatBlock is InGame.IMyVirtualMass || b.FatBlock is InGame.IMyShipController);
gridToStop.GetBlocks(fatBlocks, selectBlocks);

// Can the player interact with this grid? If they can, stop the ship by enabling dampeners, turning off
Expand All @@ -146,7 +146,14 @@ private void processStopGridRequest(StopGridRequest req) {
foreach (IMySlimBlock block in fatBlocks) {
// Thruster
if (block.FatBlock is IMyThrust) {
Interfaces.TerminalPropertyExtensions.SetValueFloat(block.FatBlock as IMyTerminalBlock, "Override", 0);
(block.FatBlock as InGame.IMyFunctionalBlock).RequestEnable(true);
Interfaces.TerminalPropertyExtensions.SetValueFloat(block.FatBlock as IMyTerminalBlock, "Override", 0);
}
// Gyroscope
if (block.FatBlock is IMyGyro) {
(block.FatBlock as InGame.IMyFunctionalBlock).RequestEnable(true);
Interfaces.TerminalPropertyExtensions.SetValueFloat(block.FatBlock as IMyTerminalBlock, "Power", 1);
Interfaces.TerminalPropertyExtensions.SetValueBool(block.FatBlock as InGame.IMyGyro, "Override", false);
}
// Spaceball
else if (block.FatBlock is IMySpaceBall) {
Expand Down
12 changes: 6 additions & 6 deletions Data/Scripts/GardenConquest/Records/ControlPoint.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,19 @@ private Dictionary<long, Subfleet> nearbySubfleets() {
"nearbySubfleets", Logger.severity.ERROR);
continue;
}
InGame.IMyBeacon beacon = classifier.FatBlock as InGame.IMyBeacon;
if (beacon == null) {
log("Classifier could not be referenced as beacon",
InGame.IMyRadioAntenna antenna = classifier.FatBlock as InGame.IMyRadioAntenna;
if (antenna == null) {
log("Classifier could not be referenced as antenna",
"nearbySubfleets", Logger.severity.ERROR);
continue;
}
if (!beacon.IsWorking) {
log("Classifier beacon not working but grid was classified",
if (!antenna.IsWorking) {
log("Classifier antenna not working but grid was classified",
"nearbySubfleets", Logger.severity.ERROR);
continue;
}

if (beacon.Radius < VRageMath.Vector3.Distance(Position, grid.GetPosition())) {
if (antenna.Radius < VRageMath.Vector3.Distance(Position, grid.GetPosition())) {
log("Classifier range too small, skipping", "nearbySubfleets");
// TODO notify pilot
continue;
Expand Down