mirror of
https://github.com/weyne85/MIST.git
synced 2025-10-29 16:56:32 +00:00
Fix for dynAddStatic
Fixed minor bug with dynAddStatic where it would always assign a generated name if the entry lacked the alternate name entry of unitName.
This commit is contained in:
6
mist.lua
6
mist.lua
@@ -35,7 +35,7 @@ mist = {}
|
||||
-- don't change these
|
||||
mist.majorVersion = 4
|
||||
mist.minorVersion = 4
|
||||
mist.build = 85
|
||||
mist.build = 86
|
||||
|
||||
-- forward declaration of log shorthand
|
||||
local log
|
||||
@@ -1271,8 +1271,10 @@ do -- the main scope
|
||||
mistUnitId = mistUnitId + 1
|
||||
newObj.unitId = mistUnitId
|
||||
end
|
||||
|
||||
|
||||
newObj.name = newObj.name or newObj.unitName
|
||||
|
||||
newObj.name = newObj.unitName
|
||||
if newObj.clone or not newObj.name then
|
||||
mistDynAddIndex[' static '] = mistDynAddIndex[' static '] + 1
|
||||
newObj.name = (newCountry .. ' static ' .. mistDynAddIndex[' static '])
|
||||
|
||||
Reference in New Issue
Block a user