This commit is contained in:
Frank
2026-08-17 18:08:43 +02:00
parent 049aca91aa
commit d711172984
5 changed files with 184 additions and 26 deletions
+5 -2
View File
@@ -50,7 +50,7 @@ _SCENERY = {}
--@param Core.Zone#ZONE_POLYGON SceneryZone (optional) The zone object.
--@return #SCENERY Scenery object.
function SCENERY:Register( SceneryName, SceneryObject, SceneryZone )
local ID = (SceneryObject and SceneryObject.getID) and SceneryObject:getID() or SceneryName
if _SCENERY[ID] and _SCENERY[ID].SceneryObject == nil then
@@ -322,7 +322,10 @@ function SCENERY:FindByName(Name, Coordinate, Radius, Role, Zone)
scenery = SceneryScan(Coordinate, radius, name)
end
if not scenery then scenery = SCENERY:Register(Name,nil,Zone) end
if not scenery then
self:I(string.format("No scenery object %s found ==> Registering MOOSE SCENERY Object without DCS object", tostring(Name)))
scenery = SCENERY:Register(Name,nil,Zone)
end
return scenery
end