destructible trees for both CnC and RA mod

- move DeadBuildingState to OpenRA.Mods.RA
- don't loop sequences with length > 1
This commit is contained in:
Matthias Mailänder
2013-03-10 10:08:59 +01:00
parent 19e6a588b8
commit 17d032b190
7 changed files with 246 additions and 93 deletions

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -76,7 +76,6 @@
<Compile Include="Activities\HarvesterDockSequence.cs" /> <Compile Include="Activities\HarvesterDockSequence.cs" />
<Compile Include="CncLoadScreen.cs" /> <Compile Include="CncLoadScreen.cs" />
<Compile Include="CncMenuPaletteEffect.cs" /> <Compile Include="CncMenuPaletteEffect.cs" />
<Compile Include="DeadBuildingState.cs" />
<Compile Include="Effects\IonCannon.cs" /> <Compile Include="Effects\IonCannon.cs" />
<Compile Include="IonCannonPower.cs" /> <Compile Include="IonCannonPower.cs" />
<Compile Include="Missions\CncShellmapScript.cs" /> <Compile Include="Missions\CncShellmapScript.cs" />

View File

@@ -35,7 +35,12 @@ namespace OpenRA.Mods.Cnc
public void Killed(Actor self, AttackInfo e) public void Killed(Actor self, AttackInfo e)
{ {
if (!rs.anim.HasSequence("dead")) return; if (!rs.anim.HasSequence("dead")) return;
if (rs.anim.GetSequence("dead").Length > 1)
rs.anim.Play("dead");
else
rs.anim.PlayRepeating("dead"); rs.anim.PlayRepeating("dead");
self.World.AddFrameEndTask( self.World.AddFrameEndTask(
w => w.Add( w => w.Add(
new DelayedAction(info.LingerTime, new DelayedAction(info.LingerTime,

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -155,6 +155,7 @@
<Compile Include="Buildings\CanPowerDown.cs" /> <Compile Include="Buildings\CanPowerDown.cs" />
<Compile Include="Buildings\CustomSellValue.cs" /> <Compile Include="Buildings\CustomSellValue.cs" />
<Compile Include="Buildings\CustomBuildTimeValue.cs" /> <Compile Include="Buildings\CustomBuildTimeValue.cs" />
<Compile Include="Buildings\DeadBuildingState.cs" />
<Compile Include="Buildings\FootprintUtils.cs" /> <Compile Include="Buildings\FootprintUtils.cs" />
<Compile Include="Buildings\LineBuild.cs" /> <Compile Include="Buildings\LineBuild.cs" />
<Compile Include="Buildings\PowerManager.cs" /> <Compile Include="Buildings\PowerManager.cs" />

View File

@@ -355,6 +355,14 @@
Terrain: Tree Terrain: Tree
EditorAppearance: EditorAppearance:
RelativeToTopLeft: yes RelativeToTopLeft: yes
Health:
HP: 500
DeadBuildingState:
Armor:
Type: Wood
TargetableBuilding:
TargetTypes: Ground
AutoTargetIgnore:
^Rock: ^Rock:
Tooltip: Tooltip:

View File

@@ -49,163 +49,232 @@ rock7:
tc04: tc04:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc05: tc05:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc03: tc03:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc02: tc02:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc01: tc01:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t18: t18:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t17: t17:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t16: t16:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t15: t15:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t14: t14:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t13: t13:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t12: t12:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t11: t11:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t10: t10:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t09: t09:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t08: t08:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t07: t07:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t06: t06:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t05: t05:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t04: t04:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t03: t03:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t02: t02:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t01: t01:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
v01: v01:
idle: idle:

View File

@@ -329,6 +329,14 @@
UseTerrainPalette: true UseTerrainPalette: true
ProximityCaptor: ProximityCaptor:
Types:Tree Types:Tree
Health:
HP: 500
DeadBuildingState:
Armor:
Type: Wood
TargetableBuilding:
TargetTypes: Ground
AutoTargetIgnore:
^Husk: ^Husk:
Husk: Husk:

View File

@@ -1131,128 +1131,182 @@ smoke_m:
tc04: tc04:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc05: tc05:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc03: tc03:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc02: tc02:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
tc01: tc01:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t17: t17:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t16: t16:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t15: t15:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t14: t14:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t13: t13:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t12: t12:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t11: t11:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t10: t10:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t08: t08:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t07: t07:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t06: t06:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t05: t05:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t03: t03:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
ice01: ice01:
idle: idle:
@@ -1282,16 +1336,22 @@ ice05:
t02: t02:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
t01: t01:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
mine: mine:
idle: idle:
@@ -2605,9 +2665,12 @@ rock7:
t04: t04:
idle: idle:
Start: 0 Start: 0
burn: damaged-idle:
Start: 1 Start: 1
Length: 9 dead:
Start: 2
Length: 8
Tick: 80
v20: v20:
idle: idle: