Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local CSeaUnit = import('/lua/cybranunits.lua').CSeaUnit
- local CybranWeaponsFile = import('/lua/cybranweapons.lua')
- local CAAAutocannon = CybranWeaponsFile.CAAAutocannon
- local CDFProtonCannonWeapon = CybranWeaponsFile.CDFProtonCannonWeapon
- local CANNaniteTorpedoWeapon = CybranWeaponsFile.CANNaniteTorpedoWeapon
- local CAMZapperWeapon02 = CybranWeaponsFile.CAMZapperWeapon02
- local CWeapons = import('/lua/cybranweapons.lua')
- local CDFHeavyMicrowaveLaserGeneratorCom = CWeapons.CDFHeavyMicrowaveLaserGeneratorCom
- local WeaponFile = import('/lua/sim/DefaultWeapons.lua')
- local BareBonesWeapon = WeaponFile.BareBonesWeapon
- URS0302 = Class(CSeaUnit) {
- Weapons = {
- DummyWeapon01 = Class(BareBonesWeapon) {},
- FrontCannon01 = Class(CDFProtonCannonWeapon) {},
- BackCannon01 = Class(CDFProtonCannonWeapon) {},
- Torpedo01 = Class(CANNaniteTorpedoWeapon) {},
- Torpedo02 = Class(CANNaniteTorpedoWeapon) {},
- AAGun01 = Class(CAAAutocannon) {},
- AAGun02 = Class(CAAAutocannon) {},
- LeftZapper = Class(CAMZapperWeapon02) {},
- RightZapper = Class(CAMZapperWeapon02) {},
- WeaponLaser = Class(CDFHeavyMicrowaveLaserGeneratorCom) {},
- WeaponLaser2 = Class(CDFHeavyMicrowaveLaserGeneratorCom) {},
- },
- OnCreate = function(self)
- CSeaUnit.OnCreate(self)
- self:SetWeaponEnabledByLabel('WeaponLaser', false)
- self:SetWeaponEnabledByLabel('WeaponLaser2', false)
- end,
- CreateEnhancement = function(self, enh)
- CSeaUnit.CreateEnhancement(self, enh)
- local bp = self:GetBlueprint().Enhancements[enh]
- if not bp then return end
- if enh == 'WeaponLaser' then
- self:SetWeaponEnabledByLabel('WeaponLaser', true)
- self:SetWeaponEnabledByLabel('FrontCannon01', false)
- elseif enh == 'WeaponLaser2' then
- self:SetWeaponEnabledByLabel('WeaponLaser2', true)
- self:SetWeaponEnabledByLabel('BackCannon01', false)
- end
- end,
- }
- TypeClass = URS0302
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement