Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #****************************************************************************
- #**
- #** File : /cdimage/units/UAB0301/UAB0301_script.lua
- #** Author(s): David Tomandl
- #**
- #** Summary : Aeon Land Factory Tier 3 Script
- #**
- #** Copyright © 2005 Gas Powered Games, Inc. All rights reserved.
- #****************************************************************************
- local CWalkingLandUnit = import('/lua/cybranunits.lua').CWalkingLandUnit
- local URL0001OLD = URL0001
- URL0001 = Class(URL0001OLD) {
- OnScriptBitSet = function(self, bit)
- if bit == 0 then # shield toggle
- self:EnableShield()
- elseif bit == 8 then # cloak toggle
- self:StopUnitAmbientSound( 'ActiveLoop' )
- self:SetMaintenanceConsumptionInactive()
- self:DisableUnitIntel('Cloak')
- self:DisableUnitIntel('RadarStealth')
- self:DisableUnitIntel('RadarStealthField')
- self:DisableUnitIntel('SonarStealth')
- self:DisableUnitIntel('SonarStealthField')
- end
- end,
- OnScriptBitClear = function(self, bit)
- if bit == 0 then # shield toggle
- self:DisableShield()
- elseif bit == 8 then # cloak toggle
- self:PlayUnitAmbientSound( 'ActiveLoop' )
- self:SetMaintenanceConsumptionActive()
- self:EnableUnitIntel('Cloak')
- self:EnableUnitIntel('RadarStealth')
- self:EnableUnitIntel('RadarStealthField')
- self:EnableUnitIntel('SonarStealth')
- self:EnableUnitIntel('SonarStealthField')
- end
- end,
- CreateEnhancement = function(self, enh)
- CWalkingLandUnit.CreateEnhancement(self, enh)
- local bp = self:GetBlueprint().Enhancements[enh]
- if enh == 'Shield' then
- self:AddToggleCap('RULEUTC_ShieldToggle')
- self:SetEnergyMaintenanceConsumptionOverride(bp.MaintenanceConsumptionPerSecondEnergy or 0)
- self:SetMaintenanceConsumptionActive()
- self:CreatePersonalShield(bp)
- elseif enh == 'ShieldRemove' then
- self:DestroyShield()
- self:SetMaintenanceConsumptionInactive()
- self:RemoveToggleCap('RULEUTC_ShieldToggle')
- end
- end,
- }
- TypeClass = URL0001
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement