Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix UEF Navy UI things #2980

Merged
merged 7 commits into from Feb 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions units/UES0202/UES0202_unit.bp
Expand Up @@ -213,8 +213,8 @@ UnitBlueprint {
HelpText = '<LOC ues0202_help>Cruiser',
},
LifeBarHeight = 0.075,
LifeBarOffset = 3.45,
LifeBarSize = 1.75,
LifeBarOffset = 2.45,
LifeBarSize = 1.5,
Physics = {
BackUpDistance = 5,
BankingSlope = 0,
Expand Down
51 changes: 51 additions & 0 deletions units/XES0205/XES0205_script.lua
@@ -0,0 +1,51 @@
--#****************************************************************************
--#**
--#** File : /data/units/XES0205/XES0205_script.lua
--#** Author(s): Jessica St. Croix
--#**
--#** Summary : UEF Mobile Shield Boat Script
--#**
--#** Copyright � 2007 Gas Powered Games, Inc. All rights reserved.
--#****************************************************************************
local TShieldSeaUnit = import('/lua/terranunits.lua').TShieldSeaUnit

XES0205 = Class(TShieldSeaUnit) {
ShieldEffects = {
'/effects/emitters/terran_shield_generator_shipmobile_01_emit.bp',
'/effects/emitters/terran_shield_generator_shipmobile_02_emit.bp',
},

OnStopBeingBuilt = function(self, builder, layer)
TShieldSeaUnit.OnStopBeingBuilt(self, builder, layer)
self.ShieldEffectsBag = {}
end,

OnShieldEnabled = function(self)
TShieldSeaUnit.OnShieldEnabled(self)

if self.ShieldEffectsBag then
for _, v in self.ShieldEffectsBag do
v:Destroy()
end
self.ShieldEffectsBag = {}
end
for _, v in self.ShieldEffects do
local emitter = CreateAttachedEmitter(self, 'XES0205', self:GetArmy(), v)
emitter:OffsetEmitter(0, -0.15, 0.35)
table.insert(self.ShieldEffectsBag, emitter)
end
end,

OnShieldDisabled = function(self)
TShieldSeaUnit.OnShieldDisabled(self)

if self.ShieldEffectsBag then
for _, v in self.ShieldEffectsBag do
v:Destroy()
end
self.ShieldEffectsBag = {}
end
end,
}

TypeClass = XES0205
6 changes: 3 additions & 3 deletions units/XES0205/XES0205_unit.bp
Expand Up @@ -110,7 +110,7 @@ UnitBlueprint {
Bones = {
'XES0205',
},
Scale = 0.35,
Scale = 1,
Type = 'SeaIdle01',
},
},
Expand Down Expand Up @@ -203,7 +203,7 @@ UnitBlueprint {
HelpText = '<LOC xes0205_help>Shield Boat',
},
LifeBarHeight = 0.075,
LifeBarOffset = 1.1,
LifeBarOffset = 1.7,
LifeBarSize = 1.1,
Physics = {
BackUpDistance = 5,
Expand Down Expand Up @@ -233,7 +233,7 @@ UnitBlueprint {
},
SelectionSizeX = 0.9,
SelectionSizeZ = 2.7,
SelectionThickness = 0.55,
SelectionThickness = 0.2,
SizeX = 1.575,
SizeY = 1.2,
SizeZ = 4.125,
Expand Down