mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
CHIEF - Added catch if coalition us given as string
This commit is contained in:
parent
c482f1dccd
commit
f8b9128d8e
@ -214,7 +214,18 @@ function CHIEF:New(Coalition, AgentSet, Alias)
|
||||
|
||||
-- Set alias.
|
||||
Alias=Alias or "CHIEF"
|
||||
|
||||
|
||||
-- coalition
|
||||
if type(Coalition) == "string" then
|
||||
if string.lower(Coalition) == "blue" then
|
||||
Coalition = coalition.side.BLUE
|
||||
elseif string.lower(Coalition) == "red" then
|
||||
Coalition = coalition.side.RED
|
||||
else
|
||||
Coalition = coalition.side.NEUTRAL
|
||||
end
|
||||
end
|
||||
|
||||
-- Inherit everything from INTEL class.
|
||||
local self=BASE:Inherit(self, INTEL:New(AgentSet, Coalition, Alias)) --#CHIEF
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user