From b38c1c582775630a3e000d4e9f1607e7f59ffd7d Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Mon, 30 Dec 2024 14:42:03 +0100 Subject: [PATCH] xx --- Moose Development/Moose/Functional/Warehouse.lua | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Moose Development/Moose/Functional/Warehouse.lua b/Moose Development/Moose/Functional/Warehouse.lua index 92de822ec..3c812686d 100644 --- a/Moose Development/Moose/Functional/Warehouse.lua +++ b/Moose Development/Moose/Functional/Warehouse.lua @@ -6089,7 +6089,7 @@ function WAREHOUSE:_SpawnAssetAircraft(alias, asset, request, parking, uncontrol terminal=parking[i].TerminalID end - if self.Debug then + if self.Debug and terminal then local text=string.format("Spawnplace unit %s terminal %d.", unit.name, terminal) coord:MarkToAll(text) env.info(text) @@ -8122,9 +8122,11 @@ function WAREHOUSE:_FindParkingForAssets(airbase, assets) -- Debug output for occupied spots. if self.Debug then local coord=problem.coord --Core.Point#COORDINATE - local text=string.format("Obstacle %s [type=%s] blocking spot=%d! Size=%.1f m and distance=%.1f m.", problem.name, problem.type, _termid, problem.size, problem.dist) - self:I(self.lid..text) - coord:MarkToAll(string.format(text)) + if coord then + local text=string.format("Obstacle %s [type=%s] blocking spot=%d! Size=%.1f m and distance=%.1f m.", problem.name, problem.type, _termid, problem.size, problem.dist) + self:I(self.lid..text) + coord:MarkToAll(text) + end else self:T(self.lid..string.format("Parking spot %d is occupied or not big enough!", _termid)) end