57 lines
2.4 KiB
Lua
57 lines
2.4 KiB
Lua
--#****************************************************************************
|
|
--#**
|
|
--#** File : /Supreme Mech Commander/units/LAVNLK65N/LAVNLK65N_script.lua
|
|
--#** Author(s): John Comes, David Tomandl, Jessica St. Croix, Kami, FuegoTigre
|
|
--#**
|
|
--#** Summary : Steiner Gurteltier MBT
|
|
--#**
|
|
--#** Copyright � 2005 Gas Powered Games, Inc. All rights reserved.
|
|
--#****************************************************************************
|
|
local TLandUnit = import('/lua/terranunits.lua').TLandUnit
|
|
local ADFCannonQuantumWeapon = import('/lua/aeonweapons.lua').ADFCannonQuantumWeapon
|
|
local ADFCannonOblivionWeapon = import('/lua/aeonweapons.lua').ADFCannonOblivionWeapon
|
|
local TSAMLauncher = import('/lua/terranweapons.lua').TSAMLauncher
|
|
|
|
---@class LAGURTELTIERMBT : TLandUnit
|
|
LAGURTELTIERMBT = Class(TLandUnit) {
|
|
Weapons = {
|
|
GR = Class(ADFCannonQuantumWeapon) {},
|
|
MML7_LRM = Class(TSAMLauncher) -- Modeled weapon swapping off Cybran T2 Cruiser URS0202
|
|
{
|
|
-- ---@param self TSAMLauncher
|
|
-- OnGotTarget = function(self)
|
|
-- TSAMLauncher.OnGotTarget(self)
|
|
-- local targetPos = self:GetCurrentTargetPos() --[[@as Vector]]
|
|
|
|
-- -- copy over heading / pitch from ground gun to aa gun
|
|
-- local unit = self.unit
|
|
-- local long = unit:GetWeaponManipulatorByLabel('MML7_LRM') --[[@as moho.AimManipulator]]
|
|
-- local short = unit:GetWeaponManipulatorByLabel('MML7_SRM') --[[@as moho.AimManipulator]]
|
|
-- long:SetHeadingPitch(short:GetHeadingPitch())
|
|
|
|
-- unit:SetWeaponEnabledByLabel('MML7_SRM', false)
|
|
-- end,
|
|
|
|
-- ---@param self TSAMLauncher
|
|
-- OnLostTarget = function(self)
|
|
-- TSAMLauncher.OnLostTarget(self)
|
|
|
|
-- -- copy over heading / pitch from aa gun to ground gun
|
|
-- local unit = self.unit
|
|
-- local long = unit:GetWeaponManipulatorByLabel('MML7_LRM') --[[@as moho.AimManipulator]]
|
|
-- local short = unit:GetWeaponManipulatorByLabel('MML7_SRM') --[[@as moho.AimManipulator]]
|
|
-- short:SetHeadingPitch(long:GetHeadingPitch())
|
|
|
|
-- -- reset heading / pitch of aa gun to prevent twitching
|
|
-- long:SetHeadingPitch(0, 0)
|
|
|
|
-- unit:SetWeaponEnabledByLabel('MML7_SRM', true)
|
|
-- end,
|
|
},
|
|
MML7_SRM = Class(TSAMLauncher) {},
|
|
ERPPC = Class(ADFCannonOblivionWeapon) {},
|
|
},
|
|
}
|
|
|
|
TypeClass = LAGURTELTIERMBT
|