From 9f0600efe49eb2499b232671960136af451fba11 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Fri, 9 Oct 2009 23:34:20 +1300 Subject: [PATCH] tent works, gun is a bit broken --- OpenRa.Game/Game.cs | 5 +++-- OpenRa.Game/GameRules/UnitInfo.cs | 3 ++- sequences.xml | 8 ++++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/OpenRa.Game/Game.cs b/OpenRa.Game/Game.cs index 670fca01d1..b51db16203 100644 --- a/OpenRa.Game/Game.cs +++ b/OpenRa.Game/Game.cs @@ -4,6 +4,7 @@ using OpenRa.FileFormats; using System.Linq; using OpenRa.Game.Graphics; +using OpenRa.TechTree; namespace OpenRa.Game { @@ -33,7 +34,7 @@ namespace OpenRa.Game Rules.LoadRules(); for( int i = 0 ; i < 8 ; i++ ) - players.Add(i, new Player(i, string.Format("Multi{0}", i), OpenRa.TechTree.Race.Soviet)); + players.Add(i, new Player(i, string.Format("Multi{0}", i), Race.Allies)); map = new Map(new IniFile(FileSystem.Open(mapName))); FileSystem.Mount(new Package(map.Theater + ".mix")); @@ -51,7 +52,7 @@ namespace OpenRa.Game network = new Network(); - var buildings = new[] { "fact", "powr", "apwr", "barr", "atek", "stek", "dome" }; + var buildings = new[] { "fact", "powr", "apwr", "barr", "atek", "stek", "dome", "tent", "gun" }; buildingCreation = buildings.ToDictionary(s => s, s => (Func)( (l, o) => new Building(s, l, o, this))); diff --git a/OpenRa.Game/GameRules/UnitInfo.cs b/OpenRa.Game/GameRules/UnitInfo.cs index 7a4c2ded55..0821e2b99c 100755 --- a/OpenRa.Game/GameRules/UnitInfo.cs +++ b/OpenRa.Game/GameRules/UnitInfo.cs @@ -4,6 +4,7 @@ using System.Linq; using System.IO; using OpenRa.FileFormats; using OpenRa.Game.Graphics; +using IjwFramework.Types; namespace OpenRa.Game.GameRules { @@ -98,7 +99,7 @@ namespace OpenRa.Game.GameRules field.SetValue( this, x.Value ); else if( field.FieldType == typeof( ArmorType ) ) - field.SetValue( this, Enum.Parse( typeof( ArmorType ), x.Value ) ); + field.SetValue( this, Enum.Parse(x.Value) ); else if( field.FieldType == typeof( bool ) ) field.SetValue( this, ParseYesNo( x.Value ) ); diff --git a/sequences.xml b/sequences.xml index 0564c14b4c..346a5b4f6b 100644 --- a/sequences.xml +++ b/sequences.xml @@ -72,6 +72,14 @@ + + + + + + + +