Skip to content

Commit

Permalink
Add advanced flight controls to aircraft
Browse files Browse the repository at this point in the history
Add nil check for tooltip
  • Loading branch information
ForbodingAngel committed Apr 18, 2021
1 parent 5ee7ba8 commit ca925bf
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
5 changes: 4 additions & 1 deletion LuaUI/Widgets_Evo/gui_evo_tooltip.lua
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function GetTooltipWeaponData(ud)
local range = weap.range * rangeMod
local damagetype = weap.customParams.damagetype
if damagetype == nil then
damagetype = "Default"
damagetype = "default"
end

if damagetype == "light" then damagetype = "Light" end
Expand Down Expand Up @@ -587,6 +587,9 @@ local function GetTooltipUnit(id)
if ( Game.armorTypes[ud.armorType] == "armor_heavy" ) then armorTypeStr = "H"
elseif ( Game.armorTypes[ud.armorType] == "armor_medium" ) then armorTypeStr = "M" end]]
local armorTypeStr = ud.customParams.armortype
if armorTypeStr == nil then
armorTypeStr = "None"
end

local hasShield, ShieldPower=Spring.GetUnitShieldState(id)
local maxShieldPower = ud.shieldPower
Expand Down
6 changes: 6 additions & 0 deletions Units-Configs-Basedefs/basedefs/air/eairemp_basedef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ unitDef = {
idleTime = 2200,
loopbackattack = true,
maxAcc = 1,

maxAileron = 0.01,
maxElevator = 0.01,
maxRudder = 0.01,
maxBank = 0.01,

maxDamage = 640,
maxSlope = 90,
maxVelocity = 10,
Expand Down
6 changes: 6 additions & 0 deletions Units-Configs-Basedefs/basedefs/air/efighter_basedef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ unitDef = {
idleTime = 2200,
maxacc = 1,
maxDamage = 812,

maxAileron = 0.01,
maxElevator = 0.01,
maxRudder = 0.01,
maxBank = 0.01,

maxSlope = 90,
maxVelocity = 12,
maxWaterDepth = 255,
Expand Down
6 changes: 6 additions & 0 deletions Units-Configs-Basedefs/basedefs/air/egunship2_basedef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ unitDef = {
idleAutoHeal = .5,
idleTime = 2200,
maxacc = 1,

maxAileron = 0.01,
maxElevator = 0.01,
maxRudder = 0.01,
maxBank = 0.01,

maxDamage = 940,
maxSlope = 90,
maxVelocity = 15,
Expand Down
6 changes: 6 additions & 0 deletions Units-Configs-Basedefs/basedefs/air/escout_basedef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ unitDef = {
idleAutoHeal = .5,
idleTime = 2200,
isTargetingUpgrade = false,

maxAileron = 0.01,
maxElevator = 0.01,
maxRudder = 0.01,
maxBank = 0.01,

maxDamage = 160,
maxSlope = 90,
maxVelocity = 10,
Expand Down
6 changes: 6 additions & 0 deletions Units-Configs-Basedefs/basedefs/air/etransport_basedef.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ unitDef = {
maxDamage = 500,
maxSlope = 90,
maxVelocity = 7,

maxAileron = 0.01,
maxElevator = 0.01,
maxRudder = 0.01,
maxBank = 0.01,

verticalSpeed = 30,
name = humanName,
objectName = objectName,
Expand Down

0 comments on commit ca925bf

Please sign in to comment.