Add MPSpawnUnits>BaseActorOffset
This commit is contained in:
committed by
reaperrr
parent
d46e47d16d
commit
5a0c1459b2
@@ -26,9 +26,12 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Only available when selecting one of these factions.", "Leave empty for no restrictions.")]
|
[Desc("Only available when selecting one of these factions.", "Leave empty for no restrictions.")]
|
||||||
public readonly HashSet<string> Factions = new HashSet<string>();
|
public readonly HashSet<string> Factions = new HashSet<string>();
|
||||||
|
|
||||||
[Desc("The mobile construction vehicle.")]
|
[Desc("The actor at the center, usually the mobile construction vehicle.")]
|
||||||
public readonly string BaseActor = null;
|
public readonly string BaseActor = null;
|
||||||
|
|
||||||
|
[Desc("Offset from the spawn point, BaseActor will spawn at.")]
|
||||||
|
public readonly CVec BaseActorOffset = CVec.Zero;
|
||||||
|
|
||||||
[Desc("A group of units ready to defend or scout.")]
|
[Desc("A group of units ready to defend or scout.")]
|
||||||
public readonly string[] SupportActors = { };
|
public readonly string[] SupportActors = { };
|
||||||
|
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
{
|
{
|
||||||
w.CreateActor(unitGroup.BaseActor.ToLowerInvariant(), new TypeDictionary
|
w.CreateActor(unitGroup.BaseActor.ToLowerInvariant(), new TypeDictionary
|
||||||
{
|
{
|
||||||
new LocationInit(sp),
|
new LocationInit(sp + unitGroup.BaseActorOffset),
|
||||||
new OwnerInit(p),
|
new OwnerInit(p),
|
||||||
new SkipMakeAnimsInit(),
|
new SkipMakeAnimsInit(),
|
||||||
new FacingInit(unitGroup.BaseActorFacing < 0 ? w.SharedRandom.Next(256) : unitGroup.BaseActorFacing),
|
new FacingInit(unitGroup.BaseActorFacing < 0 ? w.SharedRandom.Next(256) : unitGroup.BaseActorFacing),
|
||||||
|
|||||||
Reference in New Issue
Block a user