Fix bridges and trees

This commit is contained in:
Paul Chote
2010-01-31 19:59:35 +13:00
parent 69aff6e0f0
commit 1038a9a7e8
8 changed files with 349 additions and 5 deletions

View File

@@ -36,6 +36,7 @@ namespace OpenRa
if (name != null) if (name != null)
{ {
Log.Write("Loading {0}",name.ToLowerInvariant());
Info = Rules.Info[name.ToLowerInvariant()]; Info = Rules.Info[name.ToLowerInvariant()];
Health = this.GetMaxHP(); Health = this.GetMaxHP();

View File

@@ -51,12 +51,12 @@ namespace OpenRa
} }
} }
/*if (replacedTiles.Any()) if (replacedTiles.Any())
{ {
var a = w.CreateActor(template.Bridge, new int2(ni, nj), null); var a = w.CreateActor(template.Bridge, new int2(ni, nj), null);
var br = a.traits.Get<Bridge>(); var br = a.traits.Get<Bridge>();
br.SetTiles(w, template, replacedTiles); br.SetTiles(w, template, replacedTiles);
}*/ }
} }
static bool IsBridge(World w, ushort t) static bool IsBridge(World w, ushort t)

View File

@@ -77,12 +77,12 @@ namespace OpenRa
viewport = new Viewport(clientSize, Game.world.Map.Offset, Game.world.Map.Offset + Game.world.Map.Size, renderer); viewport = new Viewport(clientSize, Game.world.Map.Offset, Game.world.Map.Offset + Game.world.Map.Size, renderer);
Timer.Time( "SeqProv, viewport: {0}" ); Timer.Time( "SeqProv, viewport: {0}" );
/*
skipMakeAnims = true; skipMakeAnims = true;
foreach (var treeReference in Game.world.Map.Trees) foreach (var treeReference in Game.world.Map.Trees)
world.CreateActor(treeReference.Image, new int2(treeReference.Location), null); world.CreateActor(treeReference.Image, new int2(treeReference.Location), null);
Timer.Time( "trees: {0}" ); Timer.Time( "trees: {0}" );
*/
world.LoadMapActors(Rules.AllRules); world.LoadMapActors(Rules.AllRules);
skipMakeAnims = false; skipMakeAnims = false;
Timer.Time( "map actors: {0}" ); Timer.Time( "map actors: {0}" );

162
mods/cnc/civilian.yaml Normal file
View File

@@ -0,0 +1,162 @@
V01:
Inherits: ^Building
Building:
Footprint: xx xx
Dimensions: 2,2
Capturable: true
Repairable: false
HP: 400
Armor: wood
V02:
Inherits: ^Building
Building:
Footprint: xx xx
Dimensions: 2,2
Repairable: false
HP: 400
Armor: wood
V03:
Inherits: ^Building
Building:
Footprint: xx xx
Dimensions: 2,2
Repairable: false
HP: 400
Armor: wood
V04:
Inherits: ^Building
Building:
Footprint: xx xx
Dimensions: 2,2
Repairable: false
HP: 400
Armor: wood
V05:
Inherits: ^Building
Building:
Footprint: xx
Dimensions: 2,1
Repairable: false
HP: 400
Armor: wood
V06:
Inherits: ^Building
Building:
Footprint: xx
Dimensions: 2,1
Repairable: false
HP: 400
Armor: wood
V07:
Inherits: ^Building
Building:
Footprint: xx
Dimensions: 2,1
Repairable: false
HP: 400
Armor: wood
V08:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V09:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V10:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V11:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V12:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V13:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V14:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V15:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V16:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V17:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
V18:
Inherits: ^Building
Building:
Repairable: false
HP: 400
Armor: wood
BRIDGE1:
Bridge:
UseAlternateNames: yes
Category: Building
Selectable:
BelowUnits:
Building:
Footprint: _____ _____ _____
Dimensions: 5,3
HP: 1000
BRIDGE2:
Bridge:
UseAlternateNames: yes
Category: Building
Selectable:
BelowUnits:
Building:
Footprint: _____ _____
Dimensions: 5,2
HP: 1000

39
mods/cnc/compat.yaml Normal file
View File

@@ -0,0 +1,39 @@
BR1:
Bridge:
SouthOffset: 0,2
Category: Building
Selectable:
BelowUnits:
Building:
Footprint: ____ ____
Dimensions: 4,2
HP: 1000
BR2:
Bridge:
NorthOffset: 3,0
Category: Building
Selectable:
BelowUnits:
Building:
Footprint: ____ ____
Dimensions: 4,2
HP: 1000
BR3:
Bridge:
Long: yes
NorthOffset: 2,0
SouthOffset: 0,1
Category: Building
Selectable:
BelowUnits:
Building:
Footprint: ____ ____
Dimensions: 4,2
HP: 1000
MINE:
Inherits: ^Building
SeedsOre:
-Selectable:

View File

@@ -36,6 +36,9 @@ LegacyRules:
Rules: Rules:
mods/ra/defaults.yaml: Basic stuff mods/ra/defaults.yaml: Basic stuff
mods/cnc/rules.yaml: OpenRA actorinfos mods/cnc/rules.yaml: OpenRA actorinfos
mods/cnc/trees.yaml: Trees
mods/cnc/civilian.yaml: Civilian structures and bridges
mods/cnc/compat.yaml: Compatability tweaks for real-ra maps
Sequences: Sequences:
mods/cnc/sequences.xml: Original animation sequences mods/cnc/sequences.xml: Original animation sequences

View File

@@ -109,4 +109,3 @@ PROC:
StoresOre: StoresOre:
Pips: 17 Pips: 17
Capacity: 1000 Capacity: 1000
IronCurtainable:

140
mods/cnc/trees.yaml Normal file
View File

@@ -0,0 +1,140 @@
T01:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T02:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T03:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T05:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T06:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T07:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T08:
Inherits: ^Building
Building:
Footprint: x_
Dimensions: 2,1
-Selectable:
T10:
Inherits: ^Building
Building:
Footprint: __ xx
Dimensions: 2,2
-Selectable:
T11:
Inherits: ^Building
Building:
Footprint: __ xx
Dimensions: 2,2
-Selectable:
T12:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T13:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T14:
Inherits: ^Building
Building:
Footprint: ___ xx_
Dimensions: 3,2
-Selectable:
T15:
Inherits: ^Building
Building:
Footprint: ___ xx_
Dimensions: 3,2
-Selectable:
T16:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
T17:
Inherits: ^Building
Building:
Footprint: __ x_
Dimensions: 2,2
-Selectable:
TC01:
Inherits: ^Building
Building:
Footprint: ___ xx_
Dimensions: 3,2
-Selectable:
TC02:
Inherits: ^Building
Building:
Footprint: _x_ xx_
Dimensions: 3,2
-Selectable:
TC03:
Inherits: ^Building
Building:
Footprint: xx_ xx_
Dimensions: 3,2
-Selectable:
TC04:
Inherits: ^Building
Building:
Footprint: ____ xxx_ x___
Dimensions: 4,3
-Selectable:
TC05:
Inherits: ^Building
Building:
Footprint: __x_ xxx_ _xx_
Dimensions: 4,3
-Selectable: