Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. local CSeaUnit = import('/lua/cybranunits.lua').CSeaUnit
  2. local CybranWeaponsFile = import('/lua/cybranweapons.lua')
  3. local CAAAutocannon = CybranWeaponsFile.CAAAutocannon
  4. local CDFProtonCannonWeapon = CybranWeaponsFile.CDFProtonCannonWeapon
  5. local CANNaniteTorpedoWeapon = CybranWeaponsFile.CANNaniteTorpedoWeapon
  6. local CAMZapperWeapon02 = CybranWeaponsFile.CAMZapperWeapon02
  7. local CWeapons = import('/lua/cybranweapons.lua')
  8. local CDFHeavyMicrowaveLaserGeneratorCom = CWeapons.CDFHeavyMicrowaveLaserGeneratorCom
  9. local WeaponFile = import('/lua/sim/DefaultWeapons.lua')
  10. local BareBonesWeapon = WeaponFile.BareBonesWeapon
  11.  
  12. URS0302 = Class(CSeaUnit) {
  13. Weapons = {
  14. DummyWeapon01 = Class(BareBonesWeapon) {},
  15. FrontCannon01 = Class(CDFProtonCannonWeapon) {},
  16. BackCannon01 = Class(CDFProtonCannonWeapon) {},
  17. Torpedo01 = Class(CANNaniteTorpedoWeapon) {},
  18. Torpedo02 = Class(CANNaniteTorpedoWeapon) {},
  19. AAGun01 = Class(CAAAutocannon) {},
  20. AAGun02 = Class(CAAAutocannon) {},
  21. LeftZapper = Class(CAMZapperWeapon02) {},
  22. RightZapper = Class(CAMZapperWeapon02) {},
  23. WeaponLaser = Class(CDFHeavyMicrowaveLaserGeneratorCom) {},
  24. WeaponLaser2 = Class(CDFHeavyMicrowaveLaserGeneratorCom) {},
  25. },
  26.  
  27. OnCreate = function(self)
  28. CSeaUnit.OnCreate(self)
  29. self:SetWeaponEnabledByLabel('WeaponLaser', false)
  30. self:SetWeaponEnabledByLabel('WeaponLaser2', false)
  31. end,
  32.  
  33. CreateEnhancement = function(self, enh)
  34. CSeaUnit.CreateEnhancement(self, enh)
  35. local bp = self:GetBlueprint().Enhancements[enh]
  36. if not bp then return end
  37. if enh == 'WeaponLaser' then
  38. self:SetWeaponEnabledByLabel('WeaponLaser', true)
  39. self:SetWeaponEnabledByLabel('FrontCannon01', false)
  40. elseif enh == 'WeaponLaser2' then
  41. self:SetWeaponEnabledByLabel('WeaponLaser2', true)
  42. self:SetWeaponEnabledByLabel('BackCannon01', false)
  43. end
  44. end,
  45. }
  46. TypeClass = URS0302
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement