MNLY immune to own mines
This commit is contained in:
@@ -16,6 +16,9 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
public void OnCrush(Actor crusher)
|
||||
{
|
||||
if (crusher.traits.Contains<MineImmune>() && crusher.Owner == self.Owner)
|
||||
return;
|
||||
|
||||
Game.world.AddFrameEndTask(_ =>
|
||||
{
|
||||
Game.world.Remove(self);
|
||||
@@ -34,7 +37,11 @@ namespace OpenRa.Game.Traits
|
||||
// Mines should explode indiscriminantly of player
|
||||
switch (umt)
|
||||
{
|
||||
case UnitMovementType.Foot: return true;
|
||||
case UnitMovementType.Foot:
|
||||
case UnitMovementType.Wheel:
|
||||
case UnitMovementType.Track:
|
||||
return true;
|
||||
|
||||
default: return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,9 @@ namespace OpenRa.Game.Traits
|
||||
|
||||
public void OnCrush(Actor crusher)
|
||||
{
|
||||
if (crusher.traits.Contains<MineImmune>() && crusher.Owner == self.Owner)
|
||||
return;
|
||||
|
||||
Game.world.AddFrameEndTask(_ =>
|
||||
{
|
||||
Game.world.Remove(self);
|
||||
|
||||
@@ -92,13 +92,13 @@ LongDesc=Deploys into another Construction Yard.\n Unarmed
|
||||
|
||||
[MNLY.AP]
|
||||
Description=Minelayer (Anti-Personnel)
|
||||
Traits=Unit, Mobile, RenderUnit, Minelayer
|
||||
Traits=Unit, Mobile, RenderUnit, Minelayer, MineImmune
|
||||
Voice=VehicleVoice
|
||||
LongDesc=Lays mines to destroy unwary enemy units.\n Unarmed
|
||||
Primary=MINP ;; temporary hack
|
||||
[MNLY.AT]
|
||||
Description=Minelayer (Anti-Tank)
|
||||
Traits=Unit, Mobile, RenderUnit, Minelayer
|
||||
Traits=Unit, Mobile, RenderUnit, Minelayer, MineImmune
|
||||
Voice=VehicleVoice
|
||||
LongDesc=Lays mines to destroy unwary enemy units.\n Unarmed
|
||||
Primary=MINV ;; temporary hack
|
||||
|
||||
Reference in New Issue
Block a user