From 240b26a265abd69da2b262d9d9001861f6922f8b Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sun, 28 Nov 2010 09:54:29 +1300 Subject: [PATCH] Remove bogus WorldGameOver trait. --- OpenRA.Mods.RA/OpenRA.Mods.RA.csproj | 1 - OpenRA.Mods.RA/World/WorldGameOver.cs | 50 --------------------------- mods/ra/rules/system.yaml | 4 --- 3 files changed, 55 deletions(-) delete mode 100644 OpenRA.Mods.RA/World/WorldGameOver.cs diff --git a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj index c54f30db40..7478c5b857 100644 --- a/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj +++ b/OpenRA.Mods.RA/OpenRA.Mods.RA.csproj @@ -305,7 +305,6 @@ - diff --git a/OpenRA.Mods.RA/World/WorldGameOver.cs b/OpenRA.Mods.RA/World/WorldGameOver.cs deleted file mode 100644 index de2b99e30d..0000000000 --- a/OpenRA.Mods.RA/World/WorldGameOver.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Linq; -using System.Text; -using OpenRA.Traits; - -namespace OpenRA.Mods.RA -{ - class WorldGameOverInfo : TraitInfo - { - public readonly bool ReturnToLobby = false; - public readonly int Delay = 30; - public readonly string EndMessage = "The game will end in {0} seconds."; - } - - class WorldGameOver : ITick - { - public WorldGameOverInfo Info = null; - int? _delayLeft = null; - - public void Tick(Actor self) - { - if (Info == null) - Info = self.Info.Traits.GetOrDefault(); - - if (Info == null || !Info.ReturnToLobby) - return; - - // See if there is anyone left who hasnt won / lost (if not, means game over) - if (!self.World.players.Any(p => !p.Value.NonCombatant && p.Value.WinState == WinState.Undefined)) - { - if (_delayLeft == null) - { - _delayLeft = Info.Delay * 25; - if (Info.EndMessage.Trim() != "" && Info.EndMessage.Contains("{0}")) - Game.AddChatLine(Color.Green, "", - Info.EndMessage.Trim().F( ((int)(_delayLeft / 25)) + "")); - else if (Info.EndMessage.Trim() != "") - Game.AddChatLine(Color.Green, "",Info.EndMessage.Trim()); - } - - _delayLeft--; - - if (_delayLeft <= 0 ) - Game.RejoinLobby(self.World); - } - } - } -} diff --git a/mods/ra/rules/system.yaml b/mods/ra/rules/system.yaml index 027a8b6a34..8da8eb8d56 100644 --- a/mods/ra/rules/system.yaml +++ b/mods/ra/rules/system.yaml @@ -224,10 +224,6 @@ World: BinSize: 4 Shroud: PathFinder: - WorldGameOver: - Delay: 10 - ReturnToLobby: yes - EndMessage: The game will end in {0} seconds. ValidateOrder: GotoNextBase: