From b513b2a049bb0a7935a70b804d763666ffc484a6 Mon Sep 17 00:00:00 2001 From: Frank Date: Tue, 14 Jan 2020 16:52:32 +0100 Subject: [PATCH] Rat2 --- .../Moose/Functional/RatCraft.lua | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Functional/RatCraft.lua b/Moose Development/Moose/Functional/RatCraft.lua index bdef075dd..619593987 100644 --- a/Moose Development/Moose/Functional/RatCraft.lua +++ b/Moose Development/Moose/Functional/RatCraft.lua @@ -379,7 +379,7 @@ function RATCRAFT:GetDeparture() end else - self:E("ERROR: Could not find airbase!") + self:E("ERROR: Could not find departure airbase!") end else @@ -388,6 +388,19 @@ function RATCRAFT:GetDeparture() -- Zone --- + -- Departure airbase. + local zone=ZONE:New(departure.name) + + if zone then + + -- TODO: check if in range. + + return departure + + else + self:E("ERROR: Could not find departure zone!") + end + end end @@ -539,6 +552,19 @@ function RATCRAFT:GetDestination(departure) --- -- Zone --- + + -- Departure airbase. + local zone=ZONE:New(destination.name) + + if zone then + + -- TODO: check if in range. + return destination + + else + self:E("ERROR: Could not find destination zone!") + end + end