Add ValidStances checks to BlocksProjectiles and Gate.

This commit is contained in:
abc013
2020-10-31 15:30:52 +01:00
committed by teinarss
parent d10c592987
commit 8fede9d6ba
9 changed files with 22 additions and 8 deletions

View File

@@ -30,6 +30,9 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Blocks bullets scaled to open value.")]
public readonly WDist BlocksProjectilesHeight = new WDist(640);
[Desc("Determines what projectiles to block based on their allegiance to the gate owner.")]
public readonly PlayerRelationship BlocksProjectilesValidRelationships = PlayerRelationship.Ally | PlayerRelationship.Neutral | PlayerRelationship.Enemy;
public override object Create(ActorInitializer init) { return new Gate(init, this); }
}
@@ -137,5 +140,7 @@ namespace OpenRA.Mods.Common.Traits
}
WDist IBlocksProjectiles.BlockingHeight => new WDist(Info.BlocksProjectilesHeight.Length * (OpenPosition - Position) / OpenPosition);
PlayerRelationship IBlocksProjectiles.ValidRelationships => Info.BlocksProjectilesValidRelationships;
}
}