* Small fixes

This commit is contained in:
Applevangelist
2022-12-02 16:36:33 +01:00
parent 7c689d0f5c
commit b7413f1dff
3 changed files with 14 additions and 2 deletions

View File

@@ -443,3 +443,15 @@ function MESSAGE:ToLog()
return self
end
--- Sends a MESSAGE to DCS log file if the given Condition is true.
-- @param #MESSAGE self
-- @return #MESSAGE self
function MESSAGE:ToLogIf( Condition )
if Condition and Condition == true then
env.info(self.MessageCategory .. self.MessageText:gsub( "\n$", "" ):gsub( "\n$", "" ))
end
return self
end