diff --git a/bitmaps/loadpictures/loadscreen1.png b/bitmaps/loadpictures/loadscreen1.png index 7937d862..086f4d94 100644 Binary files a/bitmaps/loadpictures/loadscreen1.png and b/bitmaps/loadpictures/loadscreen1.png differ diff --git a/changelog.nfo b/changelog.nfo index 45d319ec..171bbd87 100644 --- a/changelog.nfo +++ b/changelog.nfo @@ -1,3 +1,8 @@ +2022/09/08 ------------------ NOTES v1.93 ---------------------- + +- fixed an issue with triggering the disable animation for buildings that are disabled due to low energy +- changed the disable energy threshold for level 1 metal extractors from 1300 to 50 energy + 2022/09/06 ------------------ NOTES v1.92 ---------------------- - fixed an issue which prevented AVEN "Valiant", GEAR "Strainer" and CLAW "Phalanx" ships from reaching full speed diff --git a/luarules/gadgets/unit_estall_disable.lua b/luarules/gadgets/unit_estall_disable.lua index 058bb56b..f7c473b5 100644 --- a/luarules/gadgets/unit_estall_disable.lua +++ b/luarules/gadgets/unit_estall_disable.lua @@ -49,7 +49,8 @@ local disabledUnits = {} local changeStateDelay = 3 -- delay in seconds before state of unit can be changed. Do not set it below 2 seconds, because it takes 2 seconds before enabled unit reaches full energy use local JAMMER_ENERGY_DISABLE_THRESHOLD = 300 local RADAR_ENERGY_DISABLE_THRESHOLD = 900 -local EXTRACTOR_ENERGY_DISABLE_THRESHOLD = 1300 +local ADV_EXTRACTOR_ENERGY_DISABLE_THRESHOLD = 1300 +local EXTRACTOR_ENERGY_DISABLE_THRESHOLD = 50 local radarDefs = { [ UnitDefNames['aven_advanced_radar_tower'].id ] = true, @@ -111,11 +112,7 @@ local jammerDefs = { [ UnitDefNames['sphere_mist'].id ] = true } -local metalDefs = { - [ UnitDefNames['aven_metal_extractor'].id ] = true, - [ UnitDefNames['gear_metal_extractor'].id ] = true, - [ UnitDefNames['claw_metal_extractor'].id ] = true, - [ UnitDefNames['sphere_metal_extractor'].id ] = true, +local advMetalDefs = { [ UnitDefNames['aven_exploiter'].id ] = true, [ UnitDefNames['gear_exploiter'].id ] = true, [ UnitDefNames['claw_exploiter'].id ] = true, @@ -126,6 +123,13 @@ local metalDefs = { [ UnitDefNames['sphere_moho_mine'].id ] = true } +local metalDefs = { + [ UnitDefNames['aven_metal_extractor'].id ] = true, + [ UnitDefNames['gear_metal_extractor'].id ] = true, + [ UnitDefNames['claw_metal_extractor'].id ] = true, + [ UnitDefNames['sphere_metal_extractor'].id ] = true +} + -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- @@ -141,9 +145,12 @@ function AddUnit(unitID, unitDefID) units[unitID] = { defID = unitDefID, changeStateTime = spGetGameSeconds(), threshold = JAMMER_ENERGY_DISABLE_THRESHOLD } elseif ( radarDefs[unitDefID]) then units[unitID] = { defID = unitDefID, changeStateTime = spGetGameSeconds(), threshold = RADAR_ENERGY_DISABLE_THRESHOLD} + elseif ( advMetalDefs[unitDefID]) then + units[unitID] = { defID = unitDefID, changeStateTime = spGetGameSeconds(), threshold = ADV_EXTRACTOR_ENERGY_DISABLE_THRESHOLD} elseif ( metalDefs[unitDefID]) then units[unitID] = { defID = unitDefID, changeStateTime = spGetGameSeconds(), threshold = EXTRACTOR_ENERGY_DISABLE_THRESHOLD} end + end function RemoveUnit(unitID) @@ -210,7 +217,7 @@ function gadget:GameFrame(n) -- disable units that aren't fully built or if they're set to "off" local _,_,_,_,bp = spGetUnitHealth(unitID) - if (bp and bp < 1) or (not unitStates.active) then + if (bp and bp < 1) or (not unitStates.active) or (disabledUnits[unitID]) then spCallCOBScript(unitID, "Deactivate", 0) --Spring.Echo("deactivating... "..unitID) else