From 3d41d35226df72f26cc1aae578a0499b9515c45f Mon Sep 17 00:00:00 2001 From: pchote Date: Fri, 18 Dec 2009 16:41:28 -0800 Subject: [PATCH] Load [Aftermath] setttings from aftrmath.ini; use ChronoTankDuration in ChronoshiftDeploy --- OpenRa.Game/GameRules/Rules.cs | 4 ++++ OpenRa.Game/OpenRa.Game.csproj | 7 +++++-- OpenRa.Game/Traits/ChronoshiftDeploy.cs | 4 ++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/OpenRa.Game/GameRules/Rules.cs b/OpenRa.Game/GameRules/Rules.cs index d4778bdf35..a61cff9937 100755 --- a/OpenRa.Game/GameRules/Rules.cs +++ b/OpenRa.Game/GameRules/Rules.cs @@ -18,6 +18,7 @@ namespace OpenRa.Game public static InfoLoader ProjectileInfo; public static InfoLoader VoiceInfo; public static GeneralInfo General; + public static AftermathInfo Aftermath; public static TechTree TechTree; public static Map Map; public static TileSet TileSet; @@ -46,6 +47,9 @@ namespace OpenRa.Game General = new GeneralInfo(); FieldLoader.Load(General, AllRules.GetSection("General")); + Aftermath = new AftermathInfo(); + FieldLoader.Load(Aftermath, AllRules.GetSection("Aftermath")); + LoadCategories( "Building", "Defense", diff --git a/OpenRa.Game/OpenRa.Game.csproj b/OpenRa.Game/OpenRa.Game.csproj index 292381043d..044d6542c6 100644 --- a/OpenRa.Game/OpenRa.Game.csproj +++ b/OpenRa.Game/OpenRa.Game.csproj @@ -2,7 +2,7 @@ Debug AnyCPU - 9.0.30729 + 9.0.21022 2.0 {0DFB103F-2962-400F-8C6D-E2C28CCBA633} WinExe @@ -85,6 +85,7 @@ + @@ -163,7 +164,9 @@ - + + + diff --git a/OpenRa.Game/Traits/ChronoshiftDeploy.cs b/OpenRa.Game/Traits/ChronoshiftDeploy.cs index 38c542401b..5bfb9f3ad5 100644 --- a/OpenRa.Game/Traits/ChronoshiftDeploy.cs +++ b/OpenRa.Game/Traits/ChronoshiftDeploy.cs @@ -6,8 +6,8 @@ namespace OpenRa.Game.Traits { public ChronoshiftDeploy(Actor self) { } bool chronoshiftActive = false; // Is the chronoshift engine active? - const int chargeTime = 100; // How many frames between uses? - int remainingChargeTime = 0; + int remainingChargeTime = 0; // How long until we can chronoshift again? + int chargeTime = (int)(Rules.Aftermath.ChronoTankDuration * 60 * 25); // How long between shifts? public void Tick(Actor self) {