chrono uses traitinfo rather than general rules
This commit is contained in:
@@ -18,17 +18,7 @@ namespace OpenRa.GameRules
|
||||
public readonly string WoodCrate = null;
|
||||
|
||||
/* Special Weapons */
|
||||
public readonly int ChronoDuration = 0;
|
||||
public readonly bool ChronoKillCargo = true;
|
||||
[Obsolete] public readonly int ChronoTechLevel = -1;
|
||||
[Obsolete] public readonly int GPSTechLevel = -1;
|
||||
public readonly int GapRadius = 0;
|
||||
public readonly float GapRegenInterval =0;
|
||||
public readonly float IronCurtain = 0; /* minutes */
|
||||
[Obsolete] public readonly int ParaTech = -1;
|
||||
[Obsolete] public readonly int ParabombTech = -1;
|
||||
public readonly int RadarJamRadius = 1;
|
||||
[Obsolete] public readonly int SpyPlaneTech = -1;
|
||||
public readonly int BadgerBombCount = 1;
|
||||
|
||||
/* Chrono Side Effects */
|
||||
@@ -54,9 +44,7 @@ namespace OpenRa.GameRules
|
||||
public readonly int AVMineDamage = 0;
|
||||
public readonly int AtomDamage = 0;
|
||||
public readonly float BallisticScatter = 0;
|
||||
public readonly int BridgeStrength = 0;
|
||||
public readonly float C4Delay = 0;
|
||||
public readonly float Crush = 0;
|
||||
public readonly float ExpSpread = 0;
|
||||
public readonly int FireSupress = 0;
|
||||
public readonly float HomingScatter = 0;
|
||||
@@ -66,7 +54,6 @@ namespace OpenRa.GameRules
|
||||
public readonly bool PlayerAutoCrush = false;
|
||||
public readonly bool PlayerReturnFire = false;
|
||||
public readonly bool PlayerScatter = false;
|
||||
public readonly float ProneDamage = 0;
|
||||
public readonly bool TreeTargeting = false;
|
||||
public readonly int Incoming = 0;
|
||||
|
||||
|
||||
@@ -45,13 +45,15 @@ namespace OpenRa.Traits
|
||||
// Cannot chronoshift into unexplored location
|
||||
if (!self.Owner.Shroud.IsExplored(order.TargetLocation))
|
||||
return;
|
||||
|
||||
var info = self.Owner.PlayerActor.Info.Traits.Get<ChronoshiftPowerInfo>();
|
||||
|
||||
// Set up return-to-sender info
|
||||
chronoshiftOrigin = self.Location;
|
||||
chronoshiftReturnTicks = (int)(Rules.General.ChronoDuration * 60 * 25);
|
||||
chronoshiftReturnTicks = (int)(info.Duration * 60 * 25);
|
||||
|
||||
// Kill cargo
|
||||
if (Rules.General.ChronoKillCargo && self.traits.Contains<Cargo>())
|
||||
if (info.KillCargo && self.traits.Contains<Cargo>())
|
||||
{
|
||||
var cargo = self.traits.Get<Cargo>();
|
||||
while (!cargo.IsEmpty(self))
|
||||
|
||||
Reference in New Issue
Block a user