Replace DomainIndex passability hack with Locomotor boolean
This commit is contained in:
@@ -44,8 +44,7 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
if (p1.Layer != 0 || p2.Layer != 0)
|
if (p1.Layer != 0 || p2.Layer != 0)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// HACK: Workaround until we can generalize movement classes
|
if (li.DisableDomainPassabilityCheck)
|
||||||
if (li is SubterraneanLocomotorInfo || li is JumpjetLocomotorInfo)
|
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
var movementClass = li.GetMovementClass(tileSet);
|
var movementClass = li.GetMovementClass(tileSet);
|
||||||
|
|||||||
@@ -25,6 +25,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Can this actor transition on slopes?")]
|
[Desc("Can this actor transition on slopes?")]
|
||||||
public readonly bool JumpjetTransitionOnRamps = true;
|
public readonly bool JumpjetTransitionOnRamps = true;
|
||||||
|
|
||||||
|
public override bool DisableDomainPassabilityCheck { get { return true; } }
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new JumpjetLocomotor(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new JumpjetLocomotor(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -287,6 +287,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public virtual bool DisableDomainPassabilityCheck { get { return false; } }
|
||||||
|
|
||||||
public virtual object Create(ActorInitializer init) { return new Locomotor(init.Self, this); }
|
public virtual object Create(ActorInitializer init) { return new Locomotor(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ namespace OpenRA.Mods.Common.Traits
|
|||||||
[Desc("Depth at which the subterranian condition is applied.")]
|
[Desc("Depth at which the subterranian condition is applied.")]
|
||||||
public readonly WDist SubterraneanTransitionDepth = new WDist(-1024);
|
public readonly WDist SubterraneanTransitionDepth = new WDist(-1024);
|
||||||
|
|
||||||
|
public override bool DisableDomainPassabilityCheck { get { return true; } }
|
||||||
|
|
||||||
public override object Create(ActorInitializer init) { return new SubterraneanLocomotor(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new SubterraneanLocomotor(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user