forked from FAForever/fa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kirvesweapons.lua
65 lines (56 loc) · 2.54 KB
/
kirvesweapons.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
local WeaponFile = import("/lua/sim/defaultweapons.lua")
local DefaultProjectileWeapon = WeaponFile.DefaultProjectileWeapon
local DefaultBeamWeapon = WeaponFile.DefaultBeamWeapon
local OriginalEffectTemplate = import("/lua/effecttemplates.lua")
local EffectTemplate = import("/lua/kirveseffects.lua")
local CollisionBeamFile = import("/lua/kirvesbeams.lua")
---@class TargetingLaser : DefaultBeamWeapon
TargetingLaser = Class(DefaultBeamWeapon) {
BeamType = CollisionBeamFile.TargetingCollisionBeam,
FxMuzzleFlash = {'/effects/emitters/particle_cannon_muzzle_01_emit.bp'},
FxBeamEndPointScale = 0.01,
}
---@class TargetingLaserInvisible : TargetingLaser
TargetingLaserInvisible = Class(TargetingLaser) {
BeamType = CollisionBeamFile.TargetingCollisionBeamInvisible,
FxMuzzleFlash = {},
}
---@class TAAPhalanxWeapon : DefaultProjectileWeapon
TAAPhalanxWeapon = Class(DefaultProjectileWeapon) {
FxMuzzleFlash = EffectTemplate.TPhalanxGunMuzzleFlash,
FxShellEject = EffectTemplate.TPhalanxGunShells,
---@param self TAAPhalanxWeapon
---@param muzzle Bone
PlayFxMuzzleSequence = function(self, muzzle)
DefaultProjectileWeapon.PlayFxMuzzleSequence(self, muzzle)
for k, v in self.FxShellEject do
CreateAttachedEmitter(self.unit, 'Shells_Left', self.unit.Army, v)
CreateAttachedEmitter(self.unit, 'Shells_Right', self.unit.Army, v)
end
end,
}
---@class SDFUnstablePhasonBeam : DefaultBeamWeapon
SDFUnstablePhasonBeam = Class(DefaultBeamWeapon) {
BeamType = CollisionBeamFile.UnstablePhasonLaserCollisionBeam,
FxMuzzleFlash = {},
FxChargeMuzzleFlash = {}, --------OriginalEffectTemplate.SExperimentalUnstablePhasonLaserMuzzle01,
FxUpackingChargeEffects = OriginalEffectTemplate.CMicrowaveLaserCharge01,
FxUpackingChargeEffectScale = 0.2,
}
---@class SDFUnstablePhasonBeam2 : DefaultBeamWeapon
SDFUnstablePhasonBeam2 = Class(DefaultBeamWeapon) {
BeamType = CollisionBeamFile.UnstablePhasonLaserCollisionBeam2,
FxMuzzleFlash = {},
FxChargeMuzzleFlash = {}, --------OriginalEffectTemplate.SExperimentalUnstablePhasonLaserMuzzle01,
FxUpackingChargeEffects = OriginalEffectTemplate.CMicrowaveLaserCharge01,
FxUpackingChargeEffectScale = 0.1,
FxBeamEndPointScale = 0.01,
}
---@class Dummy : DefaultBeamWeapon
Dummy = Class(DefaultBeamWeapon) {
BeamType = CollisionBeamFile.TargetingCollisionBeam,
FxBeamEndPointScale = 0.01,
}
-- kept for mod backwards compatibility
local KamikazeWeapon = WeaponFile.KamikazeWeapon
local BareBonesWeapon = WeaponFile.BareBonesWeapon