This commit is contained in:
Chris Forbes
2009-12-28 14:25:36 +13:00
10 changed files with 97 additions and 98 deletions

1
.gitignore vendored
View File

@@ -9,6 +9,7 @@ obj
# Red Alert binary files # Red Alert binary files
*.[mM][iI][xX] *.[mM][iI][xX]
*.[aA][uU][dD]
# Crap generated by OpenRa # Crap generated by OpenRa
sheet-*.png sheet-*.png

View File

@@ -68,7 +68,6 @@ namespace OpenRa.Game.GameRules
public class InfantryInfo : MobileInfo public class InfantryInfo : MobileInfo
{ {
public readonly bool Crushable = true; // also on VehicleInfo, but with a different default
public readonly bool C4 = false; public readonly bool C4 = false;
public readonly bool FraidyCat = false; public readonly bool FraidyCat = false;
public readonly bool Infiltrate = false; public readonly bool Infiltrate = false;
@@ -80,7 +79,6 @@ namespace OpenRa.Game.GameRules
public class VehicleInfo : MobileInfo public class VehicleInfo : MobileInfo
{ {
public readonly bool Crushable = false;
public readonly bool Tracked = false; public readonly bool Tracked = false;
public VehicleInfo(string name) : base(name) { } public VehicleInfo(string name) : base(name) { }

View File

@@ -1,4 +1,4 @@
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5"> <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
@@ -181,9 +181,9 @@
<Compile Include="Traits\Fake.cs" /> <Compile Include="Traits\Fake.cs" />
<Compile Include="Traits\Harvester.cs" /> <Compile Include="Traits\Harvester.cs" />
<Compile Include="Traits\Helicopter.cs" /> <Compile Include="Traits\Helicopter.cs" />
<Compile Include="Traits\Infantry.cs" />
<Compile Include="Traits\InvisibleToOthers.cs" /> <Compile Include="Traits\InvisibleToOthers.cs" />
<Compile Include="Traits\Minelayer.cs" /> <Compile Include="Traits\Minelayer.cs" />
<Compile Include="Traits\SquishByTank.cs" />
<Compile Include="Traits\Plane.cs" /> <Compile Include="Traits\Plane.cs" />
<Compile Include="Traits\ProductionQueue.cs" /> <Compile Include="Traits\ProductionQueue.cs" />
<Compile Include="Traits\ProductionSurround.cs" /> <Compile Include="Traits\ProductionSurround.cs" />
@@ -258,11 +258,11 @@
<None Include="Graphics\Graphics.cd" /> <None Include="Graphics\Graphics.cd" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild"> <Target Name="BeforeBuild">
</Target> </Target>
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

View File

@@ -81,7 +81,7 @@ namespace OpenRa.Game.Traits.Activities
var nextCell = PopPath( self, mobile ); var nextCell = PopPath( self, mobile );
if( nextCell == null ) if( nextCell == null )
return NextActivity; return this;
int2 dir = nextCell.Value - mobile.fromCell; int2 dir = nextCell.Value - mobile.fromCell;
var firstFacing = Util.GetFacing( dir, unit.Facing ); var firstFacing = Util.GetFacing( dir, unit.Facing );

View File

@@ -5,10 +5,10 @@ using OpenRa.Game.GameRules;
namespace OpenRa.Game.Traits namespace OpenRa.Game.Traits
{ {
class Infantry : ICrushable class SquishByTank : ICrushable
{ {
readonly Actor self; readonly Actor self;
public Infantry(Actor self) public SquishByTank(Actor self)
{ {
this.self = self; this.self = self;
} }
@@ -26,7 +26,6 @@ namespace OpenRa.Game.Traits
public bool IsCrushableBy(UnitMovementType umt, Player player) public bool IsCrushableBy(UnitMovementType umt, Player player)
{ {
if (player == Game.LocalPlayer) return false; if (player == Game.LocalPlayer) return false;
if (!(self.Info as InfantryInfo).Crushable) return false;
switch (umt) switch (umt)
{ {
case UnitMovementType.Track: return true; case UnitMovementType.Track: return true;

View File

@@ -25,7 +25,7 @@ namespace SequenceEditor
{ {
if (Shps.ContainsKey(shp)) return; if (Shps.ContainsKey(shp)) return;
var reader = new ShpReader(FileSystem.OpenWithExts(shp, ".shp", ".tem", ".sno", ".int")); var reader = new ShpReader(FileSystem.OpenWithExts(shp, ".tem", ".sno", ".int", ".shp"));
Shps[shp] = reader.Select(ih => Shps[shp] = reader.Select(ih =>
{ {
var bmp = new Bitmap(reader.Width, reader.Height); var bmp = new Bitmap(reader.Width, reader.Height);
@@ -74,6 +74,7 @@ namespace SequenceEditor
try try
{ {
FileSystem.MountDefault( true ); FileSystem.MountDefault( true );
FileSystem.MountTemporary(new Package("temperat.mix"));
} }
catch( FileNotFoundException fnf ) catch( FileNotFoundException fnf )
{ {

View File

@@ -54,13 +54,13 @@ MECH
[SHOK] [SHOK]
Description=Tesla Trooper Description=Tesla Trooper
Traits=Unit, Mobile, AttackBase, RenderInfantry Traits=Unit, Mobile, AttackBase, RenderInfantry, TakeCover
SquadSize=1 SquadSize=1
Voice=ShokVoice Voice=ShokVoice
[MECH] [MECH]
Description=Mechanic Description=Mechanic
Traits=Unit, Mobile, AttackBase, RenderInfantry Traits=Unit, Mobile, AttackBase, RenderInfantry, TakeCover, SquishByTank
SquadSize=1 SquadSize=1
Voice=MechVoice Voice=MechVoice
@@ -99,7 +99,7 @@ MechVoice
[ShokVoice] [ShokVoice]
Select=jchrge1,jjuice1,jjump1,jpower1 Select=jchrge1,jjuice1,jjump1,jpower1
Move=jdance1,jyes1 Move=jdance1,jyes1
Attack=jburn,jcrisp1,jshock1,jlight1 Attack=jburn1,jcrisp1,jshock1,jlight1
[MechVoice] [MechVoice]
Select=mhowdy1,mhotdig1,mhuh1 Select=mhowdy1,mhotdig1,mhuh1

View File

@@ -134,7 +134,6 @@ Cost=900
Points=15 Points=15
Explodes=no Explodes=no
NoMovingFire=yes NoMovingFire=yes
Crushable=no
; field mechanic ; field mechanic
[MECH] [MECH]

View File

@@ -1,25 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<sequences> <sequences>
<!-- aftermath units --> <!-- aftermath units -->
<unit name="qtnk"> <unit name="qtnk">
<sequence name="idle" start="0" length="32" /> <sequence name="idle" start="0" length="32" />
<sequence name="charge-0" start="32" length="3" /> <sequence name="charge-0" start="32" length="3" />
sequence name="deploy-0" start="35" length="5" /> sequence name="deploy-0" start="35" length="5" /&gt;
<sequence name="charge-1" start="40" length="3" /> <sequence name="charge-1" start="40" length="3" /><sequence name="deploy-1" start="43" length="5" /><sequence name="charge-2" start="48" length="3" /><sequence name="deploy-2" start="51" length="5" /><sequence name="charge-3" start="56" length="3" /><sequence name="deploy-3" start="59" length="5" /><sequence name="charge-4" start="64" length="3" /><sequence name="deploy-4" start="67" length="5" /><sequence name="charge-5" start="72" length="3" /><sequence name="deploy-5" start="75" length="5" /><sequence name="charge-6" start="80" length="3" /><sequence name="deploy-6" start="83" length="5" /><sequence name="charge-7" start="88" length="3" /><sequence name="deploy-7" start="91" length="5" /></unit>
<sequence name="deploy-1" start="43" length="5" />
<sequence name="charge-2" start="48" length="3" />
<sequence name="deploy-2" start="51" length="5" />
<sequence name="charge-3" start="56" length="3" />
<sequence name="deploy-3" start="59" length="5" />
<sequence name="charge-4" start="64" length="3" />
<sequence name="deploy-4" start="67" length="5" />
<sequence name="charge-5" start="72" length="3" />
<sequence name="deploy-5" start="75" length="5" />
<sequence name="charge-6" start="80" length="3" />
<sequence name="deploy-6" start="83" length="5" />
<sequence name="charge-7" start="88" length="3" />
<sequence name="deploy-7" start="91" length="5" />
</unit>
<unit name="ctnk"> <unit name="ctnk">
<sequence name="idle" start="0" length="32" /> <sequence name="idle" start="0" length="32" />
</unit> </unit>
@@ -39,56 +25,57 @@
<sequence name="load-1" start="35" length="3" /> <sequence name="load-1" start="35" length="3" />
<sequence name="turret" start="38" length="32" /> <sequence name="turret" start="38" length="32" />
</unit> </unit>
<unit name="shok"> <unit name="shok">
<sequence name="stand" start="0" length="8" /> <sequence name="stand" start="0" length="8" />
<sequence name="stand2" start="8" length="8" /> <sequence name="stand2" start="8" length="8" />
<sequence name="run-0" start="16" length="6" /> <sequence name="run-0" start="16" length="6" />
<sequence name="run-1" start="22" length="6" /> <sequence name="run-1" start="22" length="6" />
<sequence name="run-2" start="28" length="6" /> <sequence name="run-2" start="28" length="6" />
<sequence name="run-3" start="34" length="6" /> <sequence name="run-3" start="34" length="6" />
<sequence name="run-4" start="40" length="6" /> <sequence name="run-4" start="40" length="6" />
<sequence name="run-5" start="46" length="6" /> <sequence name="run-5" start="46" length="6" />
<sequence name="run-6" start="52" length="6" /> <sequence name="run-6" start="52" length="6" />
<sequence name="run-7" start="58" length="6" /> <sequence name="run-7" start="58" length="6" />
<sequence name="shoot-0" start="64" length="16" /> <sequence name="shoot-0" start="64" length="16" />
<sequence name="shoot-1" start="80" length="16" /> <sequence name="shoot-1" start="80" length="16" />
<sequence name="shoot-2" start="96" length="16" /> <sequence name="shoot-2" start="96" length="16" />
<sequence name="shoot-3" start="112" length="16" /> <sequence name="shoot-3" start="112" length="16" />
<sequence name="shoot-4" start="128" length="16" /> <sequence name="shoot-4" start="128" length="16" />
<sequence name="shoot-5" start="144" length="16" /> <sequence name="shoot-5" start="144" length="16" />
<sequence name="shoot-6" start="160" length="16" /> <sequence name="shoot-6" start="160" length="16" />
<sequence name="shoot-7" start="176" length="16" /> <sequence name="shoot-7" start="176" length="16" />
<sequence name="stand3" start="192" length="16" /> <sequence name="stand3" start="192" length="16" />
<sequence name="crawl-0" start="208" length="4" /> <sequence name="crawl-0" start="208" length="4" />
<sequence name="crawl-1" start="212" length="4" /> <sequence name="crawl-1" start="212" length="4" />
<sequence name="crawl-2" start="216" length="4" /> <sequence name="crawl-2" start="216" length="4" />
<sequence name="crawl-3" start="220" length="4" /> <sequence name="crawl-3" start="220" length="4" />
<sequence name="crawl-4" start="224" length="4" /> <sequence name="crawl-4" start="224" length="4" />
<sequence name="crawl-5" start="228" length="4" /> <sequence name="crawl-5" start="228" length="4" />
<sequence name="crawl-6" start="232" length="4" /> <sequence name="crawl-6" start="232" length="4" />
<sequence name="crawl-7" start="236" length="4" /> <sequence name="crawl-7" start="236" length="4" />
<sequence name="standup-0" start="240" length="2" /> <sequence name="standup-0" start="240" length="2" />
<sequence name="standup-1" start="242" length="2" /> <sequence name="standup-1" start="242" length="2" />
<sequence name="standup-2" start="244" length="2" /> <sequence name="standup-2" start="244" length="2" />
<sequence name="standup-3" start="246" length="2" /> <sequence name="standup-3" start="246" length="2" />
<sequence name="standup-4" start="248" length="2" /> <sequence name="standup-4" start="248" length="2" />
<sequence name="standup-5" start="250" length="2" /> <sequence name="standup-5" start="250" length="2" />
<sequence name="standup-6" start="252" length="2" /> <sequence name="standup-6" start="252" length="2" />
<sequence name="standup-7" start="254" length="2" /> <sequence name="standup-7" start="254" length="2" />
<sequence name="prone-shoot-0" start="256" length="16" /> <sequence name="prone-shoot-0" start="256" length="16" />
<sequence name="prone-shoot-1" start="272" length="16" /> <sequence name="prone-shoot-1" start="272" length="16" />
<sequence name="prone-shoot-2" start="288" length="16" /> <sequence name="prone-shoot-2" start="288" length="16" />
<sequence name="prone-shoot-3" start="304" length="16" /> <sequence name="prone-shoot-3" start="304" length="16" />
<sequence name="prone-shoot-4" start="320" length="16" /> <sequence name="prone-shoot-4" start="320" length="16" />
<sequence name="prone-shoot-5" start="336" length="16" /> <sequence name="prone-shoot-5" start="336" length="16" />
<sequence name="prone-shoot-6" start="352" length="16" /> <sequence name="prone-shoot-6" start="352" length="16" />
<sequence name="prone-shoot-7" start="368" length="16" /> <sequence name="prone-shoot-7" start="368" length="16" />
<sequence name="die1" start="416" length="8" /> <sequence name="die1" start="416" length="8" />
<sequence name="die2" start="424" length="8" /> <sequence name="die2" start="424" length="8" />
<sequence name="die3" start="432" length="8" /> <sequence name="die3" start="432" length="8" />
<sequence name="die4" start="440" length="12" /> <sequence name="die4" start="440" length="12" />
<sequence name="die5" start="452" length="18" /> <sequence name="die5" start="452" length="18" />
</unit> <sequence name="die6" start="0" length="14" src="electro" />
</unit>
<unit name="mech"> <unit name="mech">
<sequence name="stand" start="0" length="8" /> <sequence name="stand" start="0" length="8" />
<sequence name="run-0" start="8" length="6" /> <sequence name="run-0" start="8" length="6" />
@@ -99,5 +86,19 @@
<sequence name="run-5" start="38" length="6" /> <sequence name="run-5" start="38" length="6" />
<sequence name="run-6" start="44" length="6" /> <sequence name="run-6" start="44" length="6" />
<sequence name="run-7" start="50" length="6" /> <sequence name="run-7" start="50" length="6" />
<sequence name="crawl-0" start="130" length="4" />
<sequence name="crawl-1" start="134" length="4" />
<sequence name="crawl-2" start="138" length="4" />
<sequence name="crawl-3" start="142" length="4" />
<sequence name="crawl-4" start="146" length="4" />
<sequence name="crawl-5" start="150" length="4" />
<sequence name="crawl-6" start="154" length="4" />
<sequence name="crawl-7" start="158" length="4" />
<sequence name="die1" start="193" length="8" />
<sequence name="die2" start="201" length="8" />
<sequence name="die3" start="209" length="8" />
<sequence name="die4" start="217" length="12" />
<sequence name="die5" start="229" length="18" />
<sequence name="die6" start="0" length="14" src="electro" />
</unit> </unit>
</sequences> </sequences>

View File

@@ -537,48 +537,48 @@ Traits=Unit, Mobile, RenderInfantry, Infantry, AutoTarget
LongDesc=Anti-infantry unit. Not fooled by the \nSpy's disguise.\n Strong vs Infantry\n Weak vs Vehicles LongDesc=Anti-infantry unit. Not fooled by the \nSpy's disguise.\n Strong vs Infantry\n Weak vs Vehicles
[E1] [E1]
Description=Rifle Infantry Description=Rifle Infantry
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget
LongDesc=General-purpose infantry. Strong vs Infantry\n Weak vs Vehicles LongDesc=General-purpose infantry. Strong vs Infantry\n Weak vs Vehicles
[E2] [E2]
Description=Grenadier Description=Grenadier
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget
FireDelay=15 FireDelay=15
PrimaryOffset=0,0,0,-13 PrimaryOffset=0,0,0,-13
LongDesc=Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles LongDesc=Infantry armed with grenades. \n Strong vs Buildings, Infantry\n Weak vs Vehicles
[E3] [E3]
Description=Rocket Soldier Description=Rocket Soldier
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget
PrimaryOffset=0,0,0,-13 PrimaryOffset=0,0,0,-13
LongDesc=Anti-tank/Anti-aircraft infantry.\n Strong vs Tanks, Aircraft\n Weak vs Infantry LongDesc=Anti-tank/Anti-aircraft infantry.\n Strong vs Tanks, Aircraft\n Weak vs Infantry
[E4] [E4]
Description=Flamethrower Description=Flamethrower
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget
FireDelay=8 FireDelay=8
LongDesc=Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles LongDesc=Advanced Anti-infantry unit.\n Strong vs Infantry, Buildings\n Weak vs Vehicles
[E6] [E6]
Description=Engineer Description=Engineer
Traits=Unit, Mobile, RenderInfantry, TakeCover, Infantry Traits=Unit, Mobile, RenderInfantry, TakeCover, SquishByTank
Voice=EngineerVoice Voice=EngineerVoice
LongDesc=Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything LongDesc=Infiltrates and captures enemy structures.\n Strong vs Nothing\n Weak vs Everything
[SPY] [SPY]
Description=Spy Description=Spy
Voice=SpyVoice Voice=SpyVoice
Traits=Unit, Mobile, RenderInfantry, TakeCover, Infantry Traits=Unit, Mobile, RenderInfantry, TakeCover, SquishByTank
LongDesc=Infiltrates enemy structures to gather \nintelligence. Exact effect depends on the \nbuilding infiltrated.\n Strong vs Nothing\n Weak vs Everything\n Special Ability: Disguised LongDesc=Infiltrates enemy structures to gather \nintelligence. Exact effect depends on the \nbuilding infiltrated.\n Strong vs Nothing\n Weak vs Everything\n Special Ability: Disguised
[THF] [THF]
Description=Thief Description=Thief
Voice=ThiefVoice Voice=ThiefVoice
Traits=Unit, Mobile, RenderInfantry, TakeCover, Infantry Traits=Unit, Mobile, RenderInfantry, TakeCover, SquishByTank
LongDesc=Infiltrates enemy refineries & \nsilos, and steals money stored there.\n Unarmed LongDesc=Infiltrates enemy refineries & \nsilos, and steals money stored there.\n Unarmed
[E7] [E7]
Description=Tanya Description=Tanya
Voice=TanyaVoice Voice=TanyaVoice
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoTarget Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoTarget
LongDesc=Elite commando infantry, armed with \ndual pistols and C4.\n Strong vs Infantry, Buildings\n Weak vs Vehicles\n Special Ability: Destroy Building with C4 LongDesc=Elite commando infantry, armed with \ndual pistols and C4.\n Strong vs Infantry, Buildings\n Weak vs Vehicles\n Special Ability: Destroy Building with C4
[MEDI] [MEDI]
Description=Medic Description=Medic
Voice=MedicVoice Voice=MedicVoice
Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, Infantry, AutoHeal Traits=Unit, Mobile, RenderInfantry, AttackBase, TakeCover, SquishByTank, AutoHeal
LongDesc=Heals nearby infantry.\n Strong vs Nothing\n Weak vs Everything LongDesc=Heals nearby infantry.\n Strong vs Nothing\n Weak vs Everything