Skip to content

Commit

Permalink
Merge pull request #170 from PowerfulBacon/Removes-the-APC
Browse files Browse the repository at this point in the history
Delete AreaPowerController.cs
  • Loading branch information
PowerfulBacon authored Mar 20, 2022
2 parents 3c9bdef + 27ce23b commit 8225754
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 184 deletions.
19 changes: 1 addition & 18 deletions GJ2022/Data/ConstructionData/BlueprintData.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@
"canister_debug",
"canister_debug_h2",
"fire",
"heavy_conduit_instant",
"apc_instant"
"heavy_conduit_instant"
]
}
],
Expand Down Expand Up @@ -195,13 +194,6 @@
"isRoom": true,
"edge": "heavy_conduit_instant",
"fill": "heavy_conduit_instant"
},
{
"id": "apc_instant",
"name": "Spawn APC",
"isRoom": false,
"edge": "apc_instant",
"fill": "apc_instant"
}
],
"blueprints": [
Expand Down Expand Up @@ -409,15 +401,6 @@
"texture": "power_cond_heavy.1-2-4-8",
"layer": 5,
"instant": true
},
{
"id": "apc_instant",
"created_type": "AreaPowerController",
"priority": 1,
"blueprintType": "BlueprintDirectional",
"texture": "power.apc0",
"layer": 5,
"instant": true
}
]
}
128 changes: 0 additions & 128 deletions GJ2022/Entities/Structures/Power/AreaPowerController.cs

This file was deleted.

38 changes: 0 additions & 38 deletions GJ2022/Game/GameWorld/World.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,6 @@ public IntegerReference(int value)
//Dictionary containing all mobs in the world
public static PositionBasedBinaryList<List<Pawn>> WorldPawns = new PositionBasedBinaryList<List<Pawn>>();

//Dictionary containing all mobs in the world
public static PositionBasedBinaryList<List<AreaPowerController>> AreaPowerControllers = new PositionBasedBinaryList<List<AreaPowerController>>();

//An integer storing the amount of atmospheric blocking things at this location
private static PositionBasedBinaryList<IntegerReference> AtmosphericBlockers = new PositionBasedBinaryList<IntegerReference>();

Expand Down Expand Up @@ -316,41 +313,6 @@ public static bool RemoveThing(string thingGroup, int x, int y, IComponentHandle
return true;
}

//======================
// APCs
//======================

public static List<AreaPowerController> GetAreaPowerControllers(int x, int y)
{
return AreaPowerControllers.Get(x, y) ?? new List<AreaPowerController>() { };
}

/// <summary>
/// Add an pawn to the world list
/// </summary>
public static void AddAreaPowerController(int x, int y, AreaPowerController apc)
{
List<AreaPowerController> located = AreaPowerControllers.Get(x, y);
if (located != null)
located.Add(apc);
else
AreaPowerControllers.Add(x, y, new List<AreaPowerController>() { apc });
}

/// <summary>
/// Remove the pawn from the world list
/// </summary>
public static bool RemoveAreaPowerController(int x, int y, AreaPowerController apc)
{
List<AreaPowerController> located = AreaPowerControllers.Get(x, y);
if (located == null)
return false;
located.Remove(apc);
if (located.Count == 0)
AreaPowerControllers.Remove(x, y);
return true;
}

//======================
// Pawns
//======================
Expand Down

0 comments on commit 8225754

Please sign in to comment.