CHIEF - Added catch if coalition us given as string

This commit is contained in:
Applevangelist 2021-11-26 15:36:09 +01:00
parent c482f1dccd
commit f8b9128d8e

View File

@ -215,6 +215,17 @@ 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