moved InitialFacing from OwnedActor to Unit
This commit is contained in:
@@ -24,7 +24,7 @@ namespace OpenRa.Game.Traits.Activities
|
|||||||
if (isCanceled) return NextActivity;
|
if (isCanceled) return NextActivity;
|
||||||
var dest = ChooseHelipad(self);
|
var dest = ChooseHelipad(self);
|
||||||
|
|
||||||
var initialFacing = self.Info.Traits.Get<OwnedActorInfo>().InitialFacing;
|
var initialFacing = self.Info.Traits.Get<UnitInfo>().InitialFacing;
|
||||||
|
|
||||||
if (dest == null)
|
if (dest == null)
|
||||||
return Util.SequenceActivities(
|
return Util.SequenceActivities(
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ namespace OpenRa.Game.Traits
|
|||||||
public readonly int HP = 0;
|
public readonly int HP = 0;
|
||||||
public readonly ArmorType Armor = ArmorType.none;
|
public readonly ArmorType Armor = ArmorType.none;
|
||||||
public readonly bool Crewed = false; // replace with trait?
|
public readonly bool Crewed = false; // replace with trait?
|
||||||
public readonly int InitialFacing = 128;
|
|
||||||
public readonly int Sight = 0;
|
public readonly int Sight = 0;
|
||||||
public readonly bool WaterBound = false;
|
public readonly bool WaterBound = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ namespace OpenRa.Game.Traits
|
|||||||
{
|
{
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
self.QueueActivity(new HeliFly(Util.CenterOfCell(order.TargetLocation)));
|
self.QueueActivity(new HeliFly(Util.CenterOfCell(order.TargetLocation)));
|
||||||
self.QueueActivity( new Turn( self.Info.Traits.GetOrDefault<OwnedActorInfo>().InitialFacing ) );
|
self.QueueActivity( new Turn( self.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing ) );
|
||||||
self.QueueActivity(new HeliLand(true));
|
self.QueueActivity(new HeliLand(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -66,7 +66,7 @@ namespace OpenRa.Game.Traits
|
|||||||
|
|
||||||
self.CancelActivity();
|
self.CancelActivity();
|
||||||
self.QueueActivity(new HeliFly(order.TargetActor.CenterLocation + offsetVec));
|
self.QueueActivity(new HeliFly(order.TargetActor.CenterLocation + offsetVec));
|
||||||
self.QueueActivity( new Turn( self.Info.Traits.GetOrDefault<OwnedActorInfo>().InitialFacing ) );
|
self.QueueActivity( new Turn( self.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing ) );
|
||||||
self.QueueActivity(new HeliLand(false));
|
self.QueueActivity(new HeliLand(false));
|
||||||
self.QueueActivity(order.TargetActor.Info.Name == "hpad"
|
self.QueueActivity(order.TargetActor.Info.Name == "hpad"
|
||||||
? (IActivity)new Rearm() : new Repair());
|
? (IActivity)new Rearm() : new Repair());
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ namespace OpenRa.Game.Traits
|
|||||||
|
|
||||||
public virtual int CreationFacing( Actor self, Actor newUnit )
|
public virtual int CreationFacing( Actor self, Actor newUnit )
|
||||||
{
|
{
|
||||||
return newUnit.Info.Traits.GetOrDefault<OwnedActorInfo>().InitialFacing;
|
return newUnit.Info.Traits.GetOrDefault<UnitInfo>().InitialFacing;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool Produce( Actor self, NewUnitInfo producee )
|
public bool Produce( Actor self, NewUnitInfo producee )
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace OpenRa.Game.Traits
|
|||||||
{
|
{
|
||||||
class UnitInfo : OwnedActorInfo, ITraitInfo
|
class UnitInfo : OwnedActorInfo, ITraitInfo
|
||||||
{
|
{
|
||||||
|
public readonly int InitialFacing = 128;
|
||||||
public readonly int ROT = 0;
|
public readonly int ROT = 0;
|
||||||
public readonly int Speed = 0;
|
public readonly int Speed = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -109,7 +109,6 @@ namespace RulesConverter
|
|||||||
{ "Armor", "Armor" },
|
{ "Armor", "Armor" },
|
||||||
{ "Crewed", "Crewed" },
|
{ "Crewed", "Crewed" },
|
||||||
{ "WaterBound", "WaterBound" },
|
{ "WaterBound", "WaterBound" },
|
||||||
{ "InitialFacing", "InitialFacing" },
|
|
||||||
{ "Sight", "Sight" },
|
{ "Sight", "Sight" },
|
||||||
{ "Unsellable", "Unsellable" } }
|
{ "Unsellable", "Unsellable" } }
|
||||||
},
|
},
|
||||||
|
|||||||
2
ra.yaml
2
ra.yaml
@@ -789,7 +789,6 @@ GUN:
|
|||||||
HP: 400
|
HP: 400
|
||||||
Armor: heavy
|
Armor: heavy
|
||||||
Crewed: yes
|
Crewed: yes
|
||||||
InitialFacing: 50
|
|
||||||
Sight: 6
|
Sight: 6
|
||||||
Turreted:
|
Turreted:
|
||||||
ROT: 12
|
ROT: 12
|
||||||
@@ -820,7 +819,6 @@ AGUN:
|
|||||||
HP: 400
|
HP: 400
|
||||||
Armor: heavy
|
Armor: heavy
|
||||||
Crewed: yes
|
Crewed: yes
|
||||||
InitialFacing: 224
|
|
||||||
Sight: 6
|
Sight: 6
|
||||||
Turreted:
|
Turreted:
|
||||||
ROT: 15
|
ROT: 15
|
||||||
|
|||||||
Reference in New Issue
Block a user