Move the TraitInfo stuff into rules.lua
This commit is contained in:
@@ -2,7 +2,7 @@ SupportPowers = { }
|
||||
|
||||
SupportPowers.Airstrike = function(owner, planeName, enterLocation, bombLocation)
|
||||
local facing = { Map.GetFacing(CPos.op_Subtraction(bombLocation, enterLocation), 0), "Int32" }
|
||||
local altitude = { Actor.TraitInfo(planeName, "AircraftInfo").CruiseAltitude, "Int32" }
|
||||
local altitude = { Rules.TraitInfo(planeName, "AircraftInfo").CruiseAltitude, "Int32" }
|
||||
local plane = Actor.Create(planeName, { Location = enterLocation, Owner = owner, Facing = facing, Altitude = altitude })
|
||||
Actor.Trait(plane, "AttackBomber"):SetTarget(bombLocation.CenterPosition)
|
||||
Actor.Fly(plane, bombLocation.CenterPosition)
|
||||
@@ -13,7 +13,7 @@ end
|
||||
|
||||
SupportPowers.Paradrop = function(owner, planeName, passengerNames, enterLocation, dropLocation)
|
||||
local facing = { Map.GetFacing(CPos.op_Subtraction(dropLocation, enterLocation), 0), "Int32" }
|
||||
local altitude = { Actor.TraitInfo(planeName, "AircraftInfo").CruiseAltitude, "Int32" }
|
||||
local altitude = { Rules.TraitInfo(planeName, "AircraftInfo").CruiseAltitude, "Int32" }
|
||||
local plane = Actor.Create(planeName, { Location = enterLocation, Owner = owner, Facing = facing, Altitude = altitude })
|
||||
Actor.FlyAttackCell(plane, dropLocation)
|
||||
Actor.Trait(plane, "ParaDrop"):SetLZ(dropLocation)
|
||||
|
||||
Reference in New Issue
Block a user