Skip to content

Commit

Permalink
Merge pull request OpenRA#2612 from Mailaender/burning-trees
Browse files Browse the repository at this point in the history
Destructible trees for both CnC and RA mod
  • Loading branch information
chrisforbes committed Mar 11, 2013
2 parents 623fce3 + 17d032b commit 2dd53e6
Show file tree
Hide file tree
Showing 7 changed files with 247 additions and 94 deletions.
3 changes: 1 addition & 2 deletions OpenRA.Mods.Cnc/OpenRA.Mods.Cnc.csproj
@@ -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">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -76,7 +76,6 @@
<Compile Include="Activities\HarvesterDockSequence.cs" />
<Compile Include="CncLoadScreen.cs" />
<Compile Include="CncMenuPaletteEffect.cs" />
<Compile Include="DeadBuildingState.cs" />
<Compile Include="Effects\IonCannon.cs" />
<Compile Include="IonCannonPower.cs" />
<Compile Include="Missions\CncShellmapScript.cs" />
Expand Down
Expand Up @@ -35,7 +35,12 @@ public DeadBuildingState(Actor self, DeadBuildingStateInfo info)
public void Killed(Actor self, AttackInfo e)
{
if (!rs.anim.HasSequence("dead")) return;
rs.anim.PlayRepeating("dead");

if (rs.anim.GetSequence("dead").Length > 1)
rs.anim.Play("dead");
else
rs.anim.PlayRepeating("dead");

self.World.AddFrameEndTask(
w => w.Add(
new DelayedAction(info.LingerTime,
Expand Down
5 changes: 3 additions & 2 deletions OpenRA.Mods.RA/OpenRA.Mods.RA.csproj
@@ -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">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -155,6 +155,7 @@
<Compile Include="Buildings\CanPowerDown.cs" />
<Compile Include="Buildings\CustomSellValue.cs" />
<Compile Include="Buildings\CustomBuildTimeValue.cs" />
<Compile Include="Buildings\DeadBuildingState.cs" />
<Compile Include="Buildings\FootprintUtils.cs" />
<Compile Include="Buildings\LineBuild.cs" />
<Compile Include="Buildings\PowerManager.cs" />
Expand Down Expand Up @@ -464,4 +465,4 @@ cd "$(SolutionDir)thirdparty/"
copy "FuzzyLogicLibrary.dll" "$(SolutionDir)"
cd "$(SolutionDir)"</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>
10 changes: 9 additions & 1 deletion mods/cnc/rules/defaults.yaml
Expand Up @@ -355,7 +355,15 @@
Terrain: Tree
EditorAppearance:
RelativeToTopLeft: yes

Health:
HP: 500
DeadBuildingState:
Armor:
Type: Wood
TargetableBuilding:
TargetTypes: Ground
AutoTargetIgnore:

^Rock:
Tooltip:
Name: Rock
Expand Down
161 changes: 115 additions & 46 deletions mods/cnc/sequences/map.yaml
Expand Up @@ -59,163 +59,232 @@ rock7:
tc04:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

tc05:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

tc03:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

tc02:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

tc01:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t18:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t17:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t16:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t15:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t14:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t13:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t12:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t11:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t10:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t09:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t08:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t07:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t06:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t05:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t04:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t03:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t02:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

t01:
idle:
Start: 0
burn:
damaged-idle:
Start: 1
Length: 9
dead:
Start: 2
Length: 8
Tick: 80

v01:
idle:
Expand Down
8 changes: 8 additions & 0 deletions mods/ra/rules/defaults.yaml
Expand Up @@ -329,6 +329,14 @@
UseTerrainPalette: true
ProximityCaptor:
Types:Tree
Health:
HP: 500
DeadBuildingState:
Armor:
Type: Wood
TargetableBuilding:
TargetTypes: Ground
AutoTargetIgnore:

^Husk:
Husk:
Expand Down

0 comments on commit 2dd53e6

Please sign in to comment.