forked from FAForever/fa-total-mayhem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
BRNT1MTT3_Script.lua
37 lines (34 loc) · 1.28 KB
/
BRNT1MTT3_Script.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
----------------------------------------------------------------------------
--
-- File : /cdimage/units/UEL0201/UEL0201_script.lua
-- Author(s): John Comes, David Tomandl, Jessica St. Croix
--
-- Summary : BRN Tiger Light Tank
--
-- Copyright � 2005 Gas Powered Games, Inc. All rights reserved.
----------------------------------------------------------------------------
local TLandUnit = import('/lua/terranunits.lua').TLandUnit
local WeaponsFile = import('/lua/terranweapons.lua')
local TDFGaussCannonWeapon = WeaponsFile.TDFLandGaussCannonWeapon
BRNT1MTT3 = Class(TLandUnit){
Weapons = {
autoattack = Class(TDFGaussCannonWeapon){ FxMuzzleFlashScale = 0.0 },
MainGun = Class(TDFGaussCannonWeapon){ FxMuzzleFlashScale = 1.5 },
},
OnStopBeingBuilt = function(self, builder, layer)
TLandUnit.OnStopBeingBuilt(self, builder, layer)
self.SetAIAutoattackWeapon(self)
end,
OnDetachedFromTransport = function(self, transport, bone)
TLandUnit.OnDetachedFromTransport(self, transport, bone)
self.SetAIAutoattackWeapon(self)
end,
SetAIAutoattackWeapon = function(self)
if self:GetAIBrain().BrainType == 'Human' and IsUnit(self) then
self:SetWeaponEnabledByLabel('autoattack', false)
else
self:SetWeaponEnabledByLabel('autoattack', true)
end
end,
}
TypeClass = BRNT1MTT3