made silos more flexible for d2k mod
This commit is contained in:
committed by
Chris Forbes
parent
bda4bfa4f3
commit
85678de9f0
@@ -14,24 +14,27 @@ namespace OpenRA.Mods.RA.Render
|
||||
{
|
||||
class RenderBuildingSiloInfo : RenderBuildingInfo
|
||||
{
|
||||
public readonly int FillSteps = 49;
|
||||
public override object Create(ActorInitializer init) { return new RenderBuildingSilo(init, this); }
|
||||
}
|
||||
|
||||
class RenderBuildingSilo : RenderBuilding, INotifyBuildComplete, INotifyCapture
|
||||
{
|
||||
PlayerResources playerResources;
|
||||
readonly RenderBuildingSiloInfo Info;
|
||||
|
||||
public RenderBuildingSilo( ActorInitializer init, RenderBuildingInfo info )
|
||||
public RenderBuildingSilo( ActorInitializer init, RenderBuildingSiloInfo info )
|
||||
: base(init, info)
|
||||
{
|
||||
playerResources = init.self.Owner.PlayerActor.Trait<PlayerResources>();
|
||||
Info = info;
|
||||
}
|
||||
|
||||
public void BuildingComplete( Actor self )
|
||||
{
|
||||
anim.PlayFetchIndex("idle",
|
||||
() => playerResources.OreCapacity != 0
|
||||
? (49 * playerResources.Ore) / (10 * playerResources.OreCapacity)
|
||||
? (Info.FillSteps * playerResources.Ore) / (10 * playerResources.OreCapacity)
|
||||
: 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -22,5 +22,4 @@
|
||||
# put TilesetBuilder.Export into OpenRA.Utility to call the functions directly when extracting game-files (instead of opening a GUI)
|
||||
# group number metrics are off
|
||||
# building offsets wrong (worst for towers)
|
||||
# spice blooms should explode and create new spice field instead of growing spice
|
||||
# completely full spice silo looks like the empty one
|
||||
# spice blooms should explode and create new spice field instead of growing spice
|
||||
@@ -197,7 +197,7 @@
|
||||
Name: Silo
|
||||
Description: Stores excess harvested Spice
|
||||
Building:
|
||||
Power: -10
|
||||
Power: 0
|
||||
-GivesBuildableArea:
|
||||
Health:
|
||||
HP: 300
|
||||
@@ -207,6 +207,7 @@
|
||||
Range: 4
|
||||
-RenderBuilding:
|
||||
RenderBuildingSilo:
|
||||
FillSteps: 39
|
||||
StoresOre:
|
||||
PipColor: Green
|
||||
PipCount: 5
|
||||
|
||||
Reference in New Issue
Block a user