From 17d1cf673d62482f6992679615b2180adb19ee07 Mon Sep 17 00:00:00 2001 From: Shafik Date: Thu, 6 Nov 2025 12:23:13 +0200 Subject: [PATCH] [ADDED] IsRed, IsBlue and IsNeutral to IDENTIFIABLE --- .../Moose/Wrapper/Identifiable.lua | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Moose Development/Moose/Wrapper/Identifiable.lua b/Moose Development/Moose/Wrapper/Identifiable.lua index 8561d5b2b..4f2928cb5 100644 --- a/Moose Development/Moose/Wrapper/Identifiable.lua +++ b/Moose Development/Moose/Wrapper/Identifiable.lua @@ -170,6 +170,27 @@ function IDENTIFIABLE:GetCoalition() return nil end +--- Returns true if identifiable is of RED coalition. +-- @param #IDENTIFIABLE self +-- @return #boolean If the identifiable is red. +function IDENTIFIABLE:IsRed() + return self:GetCoalition() == coalition.side.RED +end + +--- Returns true if identifiable is of BLUE coalition. +-- @param #IDENTIFIABLE self +-- @return #boolean If the identifiable is blue. +function IDENTIFIABLE:IsBlue() + return self:GetCoalition() == coalition.side.BLUE +end + +--- Returns true if identifiable is of NEUTRAL coalition. +-- @param #IDENTIFIABLE self +-- @return #boolean If the identifiable is neutral. +function IDENTIFIABLE:IsNeutral() + return self:GetCoalition() == coalition.side.NEUTRAL +end + --- Returns the name of the coalition of the Identifiable. -- @param #IDENTIFIABLE self -- @return #string The name of the coalition.