Merge branch 'master' of git://github.com/chrisforbes/OpenRA into cpu-independent
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace OpenRa.Traits.Activities
|
||||
{
|
||||
class Rearm : IActivity
|
||||
public class Rearm : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
|
||||
@@ -5,12 +5,15 @@ using System.Text;
|
||||
|
||||
namespace OpenRa.Traits.Activities
|
||||
{
|
||||
class Repair : IActivity
|
||||
public class Repair : IActivity
|
||||
{
|
||||
public IActivity NextActivity { get; set; }
|
||||
bool isCanceled;
|
||||
bool playHostAnim;
|
||||
int remainingTicks;
|
||||
|
||||
public Repair(bool playHostAnim) { this.playHostAnim = playHostAnim; }
|
||||
|
||||
public IActivity Tick(Actor self)
|
||||
{
|
||||
if (isCanceled) return NextActivity;
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace OpenRa.Traits
|
||||
return null;
|
||||
}
|
||||
|
||||
public void ResolveOrder( Actor self, Order order )
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (reservation != null)
|
||||
{
|
||||
@@ -49,7 +49,7 @@ namespace OpenRa.Traits
|
||||
{
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new HeliFly(Util.CenterOfCell(order.TargetLocation)));
|
||||
self.QueueActivity( new Turn( self.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing ) );
|
||||
self.QueueActivity(new Turn(self.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing));
|
||||
self.QueueActivity(new HeliLand(true));
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ namespace OpenRa.Traits
|
||||
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new HeliFly(order.TargetActor.CenterLocation + offsetVec));
|
||||
self.QueueActivity( new Turn( self.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing ) );
|
||||
self.QueueActivity(new Turn(self.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing));
|
||||
self.QueueActivity(new HeliLand(false));
|
||||
self.QueueActivity(order.TargetActor.Info.Name == "hpad"
|
||||
? (IActivity)new Rearm() : new Repair());
|
||||
? (IActivity)new Rearm() : new Repair(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace OpenRa.Traits
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new ReturnToBase(self, order.TargetActor));
|
||||
self.QueueActivity(order.TargetActor.Info.Name == "afld"
|
||||
? (IActivity)new Rearm() : new Repair());
|
||||
? (IActivity)new Rearm() : new Repair(true));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace OpenRa.Traits
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new Move(((1 / 24f) * order.TargetActor.CenterLocation).ToInt2(), order.TargetActor));
|
||||
self.QueueActivity(new Rearm());
|
||||
self.QueueActivity(new Repair());
|
||||
self.QueueActivity(new Repair(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
<Compile Include="Minelayer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RenderSpy.cs" />
|
||||
<Compile Include="RepairableNear.cs" />
|
||||
<Compile Include="Spy.cs" />
|
||||
<Compile Include="Thief.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
37
OpenRa.Mods.RA/RepairableNear.cs
Normal file
37
OpenRa.Mods.RA/RepairableNear.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRa.Traits;
|
||||
using OpenRa.Traits.Activities;
|
||||
|
||||
namespace OpenRa.Mods.RA
|
||||
{
|
||||
class RepairableNearInfo : StatelessTraitInfo<RepairableNear> { }
|
||||
|
||||
class RepairableNear : IIssueOrder, IResolveOrder
|
||||
{
|
||||
public Order IssueOrder(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
{
|
||||
if (mi.Button != MouseButton.Right) return null;
|
||||
if (underCursor == null) return null;
|
||||
|
||||
if (underCursor.Owner == self.Owner &&
|
||||
(underCursor.Info.Name == "spen" || underCursor.Info.Name == "syrd") &&
|
||||
self.Health < self.GetMaxHP())
|
||||
return new Order("Enter", self, underCursor, int2.Zero, null);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void ResolveOrder(Actor self, Order order)
|
||||
{
|
||||
if (order.OrderString == "Enter")
|
||||
{
|
||||
self.CancelActivity();
|
||||
self.QueueActivity(new Move(order.TargetActor, 1));
|
||||
self.QueueActivity(new Repair(false));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
BIN
artsrc/website-mockup.psd
Normal file
BIN
artsrc/website-mockup.psd
Normal file
Binary file not shown.
@@ -15,3 +15,6 @@
|
||||
@copy SequenceEditor\bin\x86\debug\SequenceEditor.exe ..\openra-bin\
|
||||
@copy OpenRA.Game\bin\x86\debug\*.dll ..\openra-bin\
|
||||
@copy OpenRA.Game\bin\x86\debug\OpenRa.Game.exe ..\openra-bin\
|
||||
@xcopy /E mods ..\openra-bin\mods\
|
||||
@copy *.yaml ..\openra-bin\
|
||||
@copy bogus.* ..\openra-bin\
|
||||
5
ra.yaml
5
ra.yaml
@@ -491,6 +491,7 @@ SS:
|
||||
FireDelay: 2
|
||||
Chronoshiftable:
|
||||
IronCurtainable:
|
||||
RepairableNear:
|
||||
|
||||
DD:
|
||||
Inherits: ^Ship
|
||||
@@ -519,6 +520,7 @@ DD:
|
||||
AutoTarget:
|
||||
Chronoshiftable:
|
||||
IronCurtainable:
|
||||
RepairableNear:
|
||||
|
||||
CA:
|
||||
Inherits: ^Ship
|
||||
@@ -549,6 +551,7 @@ CA:
|
||||
AutoTarget:
|
||||
Chronoshiftable:
|
||||
IronCurtainable:
|
||||
RepairableNear:
|
||||
|
||||
LST:
|
||||
Inherits: ^Ship
|
||||
@@ -570,6 +573,7 @@ LST:
|
||||
PassengerTypes: Foot,Wheel,Track
|
||||
Passengers: 5
|
||||
IronCurtainable:
|
||||
RepairableNear:
|
||||
|
||||
PT:
|
||||
Inherits: ^Ship
|
||||
@@ -598,6 +602,7 @@ PT:
|
||||
AutoTarget:
|
||||
Chronoshiftable:
|
||||
IronCurtainable:
|
||||
RepairableNear:
|
||||
|
||||
MIG:
|
||||
Inherits: ^Plane
|
||||
|
||||
10
units.ini
10
units.ini
@@ -121,21 +121,21 @@ PT
|
||||
Description=Submarine
|
||||
WaterBound=yes
|
||||
BuiltAt=spen
|
||||
Traits=Unit, Mobile, RenderUnit, Submarine, AttackBase, Chronoshiftable, IronCurtainable
|
||||
Traits=Unit, Mobile, RenderUnit, Submarine, AttackBase, Chronoshiftable, IronCurtainable, RepairableNear
|
||||
FireDelay=2
|
||||
LongDesc=Submerged anti-ship unit armed with \ntorpedoes.\n Strong vs Ships\n Weak vs Everything\n Special Ability: Submerge
|
||||
[DD]
|
||||
Description=Destroyer
|
||||
WaterBound=yes
|
||||
BuiltAt=syrd
|
||||
Traits=Unit, Mobile, Turreted, AttackTurreted, RenderUnitTurreted, AutoTarget, Chronoshiftable, IronCurtainable
|
||||
Traits=Unit, Mobile, Turreted, AttackTurreted, RenderUnitTurreted, AutoTarget, Chronoshiftable, IronCurtainable, RepairableNear
|
||||
PrimaryOffset=0,-8,0,-3
|
||||
LongDesc=Fast multi-role ship. \n Strong vs Submarines, Aircraft\n Weak vs Infantry, Tanks
|
||||
[CA]
|
||||
Description=Cruiser
|
||||
WaterBound=yes
|
||||
BuiltAt=syrd
|
||||
Traits=Unit, Mobile, Turreted, AttackTurreted, RenderUnitTurreted, AutoTarget, Chronoshiftable, IronCurtainable
|
||||
Traits=Unit, Mobile, Turreted, AttackTurreted, RenderUnitTurreted, AutoTarget, Chronoshiftable, IronCurtainable, RepairableNear
|
||||
PrimaryOffset=0,17,0,-2
|
||||
SecondaryOffset=0,-17,0,-2
|
||||
LongDesc=Very slow long-range ship. \n Strong vs Buildings\n Weak vs Ships, Submarines
|
||||
@@ -143,14 +143,14 @@ Recoil=3
|
||||
[LST]
|
||||
Description=Transport
|
||||
WaterBound=yes
|
||||
Traits=Unit, Mobile, RenderUnit, Cargo, IronCurtainable
|
||||
Traits=Unit, Mobile, RenderUnit, Cargo, IronCurtainable, RepairableNear
|
||||
LongDesc=General-purpose naval transport.\nCan carry infantry and tanks.\n Unarmed
|
||||
PassengerTypes=Foot,Wheel,Track
|
||||
[PT]
|
||||
Description=Gunboat
|
||||
WaterBound=yes
|
||||
BuiltAt=syrd
|
||||
Traits=Unit, Mobile, Turreted, AttackTurreted, RenderUnitTurreted, AutoTarget, Chronoshiftable, IronCurtainable
|
||||
Traits=Unit, Mobile, Turreted, AttackTurreted, RenderUnitTurreted, AutoTarget, Chronoshiftable, IronCurtainable, RepairableNear
|
||||
PrimaryOffset=0,-6,0,-1
|
||||
LongDesc=Light scout & support ship. \n Strong vs Ships, Submarines\n Weak vs Aircraft
|
||||
|
||||
|
||||
Reference in New Issue
Block a user