do
#****************************************************************************
#**
#**  File     :  /cdimage/units/UEB4202/UEB4202_script.lua
#**  Author(s):  David Tomandl
#**
#**  Summary  :  UEF Shield Generator Script
#**
#**  Copyright © 20010 Gas Powered Games, Inc.  All rights reserved.
#****************************************************************************

local TShieldStructureUnit = import('/lua/terranunits.lua').TShieldStructureUnit

local OldUEB4202 = UEB4202
UEB4202 = Class(OldUEB4202) {
      
    -----------------------------------------------------------------------------
	--ENHANCEMENT
	
	CreateEnhancement = function(self, enh)
		OldUEB4202.CreateEnhancement(self, enh)
		local bp = self:GetBlueprint().Enhancements[enh]
		if not bp then return end
		
		if enh == 'InstantShield' then
				self:CreateShield(bp)				
		elseif enh == 'InstantShieldRemove' then
			--remove auto shield.
			self:DestroyShield()
		end
	end,
    
}

TypeClass = UEB4202

end