From 85678de9f0a585b6920de9a79b0ce07a666ae333 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Mail=C3=A4nder?= Date: Mon, 23 Jul 2012 22:11:32 +0200 Subject: [PATCH] made silos more flexible for d2k mod --- OpenRA.Mods.RA/Render/RenderBuildingSilo.cs | 7 +++++-- mods/d2k/TODO | 3 +-- mods/d2k/rules/structures.yaml | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs b/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs index 89552d3221..e586242ecb 100755 --- a/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs +++ b/OpenRA.Mods.RA/Render/RenderBuildingSilo.cs @@ -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(); + 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); } diff --git a/mods/d2k/TODO b/mods/d2k/TODO index 791a104cb2..82b65b01a6 100644 --- a/mods/d2k/TODO +++ b/mods/d2k/TODO @@ -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 \ No newline at end of file +# spice blooms should explode and create new spice field instead of growing spice \ No newline at end of file diff --git a/mods/d2k/rules/structures.yaml b/mods/d2k/rules/structures.yaml index 70e3d11275..496dcfad6d 100644 --- a/mods/d2k/rules/structures.yaml +++ b/mods/d2k/rules/structures.yaml @@ -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