Statistics: Posted by Dudekahedron — 30 Nov 2016, 22:05
Statistics: Posted by Sprouto — 30 Nov 2016, 20:51
CreateEnhancement = function(self, enh)
TShieldStructureUnit.CreateEnhancement(self,enh)
local bp = self:GetBlueprint().Enhancements[enh]
if not bp then return end
# Restraining order
if enh == 'RestrainingOrder' then
local blueprint = self:GetBlueprint()
CreateSlider(self,'muzzle', blueprint.Defense.Shield.ShieldSize, 0, 0, 1000, true)
self:SetWeaponEnabledByLabel('PhasonBeam',true)
elseif enh == 'RestrainingOrderRemove' then
local blueprint = self:GetBlueprint()
CreateSlider(self,'muzzle', -blueprint.Defense.Shield.ShieldSize, 0, 0, 1000, true)
self:SetWeaponEnabledByLabel('PhasonBeam',false)
end
end,
Enhancements = {
RestrainingOrder = {
BuildCostEnergy = 10000,
BuildCostMass = 1000,
BuildTime = 1000,
Icon = 'cd',
Name = 'Restraining Order',
Slot = 'Back',
},
RestrainingOrderRemove = {
BuildCostEnergy = 1,
BuildCostMass = 1,
BuildTime = 0.1,
Icon = 'cd',
Name = 'Remove Restraining Order',
Prerequisite = 'RestrainingOrder',
RemoveEnhancements = {
'RestrainingOrder',
'RestrainingOrderRemove',
},
Slot = 'Back',
},
},
WARNING: Error running '/lua/ui/game/gamemain.lua:OnSelectionChanged': ...nce\gamedata\lua.scd\lua\ui\controls\specialgrid.lua(143): attempt to call method `Hide' (a nil value)
stack traceback:
...nce\gamedata\lua.scd\lua\ui\controls\specialgrid.lua(143): in function `CalcVisible'
...nce\gamedata\lua.scd\lua\ui\controls\specialgrid.lua(167): in function `Refresh'
...orever\gamedata\lua.nx2\lua\ui\game\construction.lua(367): in function `OnCheck'
...alliance\gamedata\mohodata.scd\lua\maui\checkbox.lua(45): in function `SetCheck'
...orever\gamedata\lua.nx2\lua\ui\game\construction.lua(475): in function `CreateTabs'
...orever\gamedata\lua.nx2\lua\ui\game\construction.lua(357): in function `OnCheck'
...alliance\gamedata\mohodata.scd\lua\maui\checkbox.lua(45): in function `SetCheck'
...orever\gamedata\lua.nx2\lua\ui\game\construction.lua(2210): in function `OnSelection'
...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua(491): in function <...\faforever\gamedata\lua.nx2\lua\ui\game\gamemain.lua:465>
Statistics: Posted by Dudekahedron — 30 Nov 2016, 19:25