mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #1262 from FlightControl-Master/#1258-WAREHOUSE-onafterChangeCountry(From,-Event,-To,-Country)
#1258 warehouse onafter change country(from, event, to, country)
This commit is contained in:
commit
0da0b025b5
4
.gitignore
vendored
4
.gitignore
vendored
@ -222,3 +222,7 @@ _gsdata_/
|
|||||||
.gitignore
|
.gitignore
|
||||||
Moose Test Missions/MOOSE_Test_Template.miz
|
Moose Test Missions/MOOSE_Test_Template.miz
|
||||||
Moose Development/Moose/.vscode/launch.json
|
Moose Development/Moose/.vscode/launch.json
|
||||||
|
MooseCodeWS.code-workspace
|
||||||
|
.gitignore
|
||||||
|
.gitignore
|
||||||
|
/.gitignore
|
||||||
|
|||||||
@ -4894,8 +4894,14 @@ function WAREHOUSE:onafterChangeCountry(From, Event, To, Country)
|
|||||||
self.queue={}
|
self.queue={}
|
||||||
|
|
||||||
-- Airbase could have been captured before and already belongs to the new coalition.
|
-- Airbase could have been captured before and already belongs to the new coalition.
|
||||||
|
-- Check if Warehouse has a arbiase atthached
|
||||||
|
local airbasecoaltion
|
||||||
|
if self.airbase ~= nil then
|
||||||
local airbase=AIRBASE:FindByName(self.airbasename)
|
local airbase=AIRBASE:FindByName(self.airbasename)
|
||||||
local airbasecoaltion=airbase:GetCoalition()
|
airbasecoaltion=airbase:GetCoalition()
|
||||||
|
else -- Warehouse has no airbase attached so just keep whatever, self.airbase will still be nil since CoalitionNew will not be nil if Warehouse have a airbse attacjed.
|
||||||
|
airbasecoaltion = nil
|
||||||
|
end
|
||||||
|
|
||||||
if CoalitionNew==airbasecoaltion then
|
if CoalitionNew==airbasecoaltion then
|
||||||
-- Airbase already owned by the coalition that captured the warehouse. Airbase can be used by this warehouse.
|
-- Airbase already owned by the coalition that captured the warehouse. Airbase can be used by this warehouse.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user