From 2c14ee74b020bdca6cb1c3145b198e88120e0efb Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 8 Jun 2023 13:58:22 +0200 Subject: [PATCH 1/3] #SCORING * Can leave text empty on some instances --- .../Moose/Functional/Scoring.lua | 45 ++++++++++--------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/Moose Development/Moose/Functional/Scoring.lua b/Moose Development/Moose/Functional/Scoring.lua index 3dda306a3..950ccd3c0 100644 --- a/Moose Development/Moose/Functional/Scoring.lua +++ b/Moose Development/Moose/Functional/Scoring.lua @@ -715,11 +715,11 @@ function SCORING:AddGoalScorePlayer( PlayerName, GoalTag, Text, Score ) PlayerData.Goals[GoalTag] = PlayerData.Goals[GoalTag] or { Score = 0 } PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score PlayerData.Score = PlayerData.Score + Score - - MESSAGE:NewType( self.DisplayMessagePrefix .. Text, - MESSAGE.Type.Information ) - :ToAll() - + if Text then + MESSAGE:NewType( self.DisplayMessagePrefix .. Text, + MESSAGE.Type.Information ) + :ToAll() + end self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, nil ) end end @@ -738,7 +738,7 @@ function SCORING:AddGoalScore( PlayerUnit, GoalTag, Text, Score ) local PlayerName = PlayerUnit:GetPlayerName() - self:F( { PlayerUnit.UnitName, PlayerName, GoalTag, Text, Score } ) + self:T2( { PlayerUnit.UnitName, PlayerName, GoalTag, Text, Score } ) -- PlayerName can be nil, if the Unit with the player crashed or due to another reason. if PlayerName then @@ -747,11 +747,12 @@ function SCORING:AddGoalScore( PlayerUnit, GoalTag, Text, Score ) PlayerData.Goals[GoalTag] = PlayerData.Goals[GoalTag] or { Score = 0 } PlayerData.Goals[GoalTag].Score = PlayerData.Goals[GoalTag].Score + Score PlayerData.Score = PlayerData.Score + Score - - MESSAGE:NewType( self.DisplayMessagePrefix .. Text, + + if Text then + MESSAGE:NewType( self.DisplayMessagePrefix .. Text, MESSAGE.Type.Information ) :ToAll() - + end self:ScoreCSV( PlayerName, "", "GOAL_" .. string.upper( GoalTag ), 1, Score, PlayerUnit:GetName() ) end end @@ -784,11 +785,12 @@ function SCORING:_AddMissionTaskScore( Mission, PlayerUnit, Text, Score ) PlayerData.Score = self.Players[PlayerName].Score + Score PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score - - MESSAGE:NewType( self.DisplayMessagePrefix .. Mission:GetText() .. " : " .. Text .. " Score: " .. Score, - MESSAGE.Type.Information ) - :ToAll() - + + if Text then + MESSAGE:NewType( self.DisplayMessagePrefix .. Mission:GetText() .. " : " .. Text .. " Score: " .. Score, + MESSAGE.Type.Information ) + :ToAll() + end self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score, PlayerUnit:GetName() ) end end @@ -820,9 +822,11 @@ function SCORING:_AddMissionGoalScore( Mission, PlayerName, Text, Score ) PlayerData.Score = self.Players[PlayerName].Score + Score PlayerData.Mission[MissionName].ScoreTask = self.Players[PlayerName].Mission[MissionName].ScoreTask + Score - - MESSAGE:NewType( string.format( "%s%s: %s! Player %s receives %d score!", self.DisplayMessagePrefix, Mission:GetText(), Text, PlayerName, Score ), MESSAGE.Type.Information ):ToAll() - + + if Text then + MESSAGE:NewType( string.format( "%s%s: %s! Player %s receives %d score!", self.DisplayMessagePrefix, Mission:GetText(), Text, PlayerName, Score ), MESSAGE.Type.Information ):ToAll() + end + self:ScoreCSV( PlayerName, "", "TASK_" .. MissionName:gsub( ' ', '_' ), 1, Score ) end end @@ -847,11 +851,12 @@ function SCORING:_AddMissionScore( Mission, Text, Score ) PlayerData.Score = PlayerData.Score + Score PlayerData.Mission[MissionName].ScoreMission = PlayerData.Mission[MissionName].ScoreMission + Score - - MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in " .. Mission:GetText() .. ". " .. Score .. " mission score!", + + if Text then + MESSAGE:NewType( self.DisplayMessagePrefix .. "Player '" .. PlayerName .. "' has " .. Text .. " in " .. Mission:GetText() .. ". " .. Score .. " mission score!", MESSAGE.Type.Information ) :ToAll() - + end self:ScoreCSV( PlayerName, "", "MISSION_" .. MissionName:gsub( ' ', '_' ), 1, Score ) end end From afe2b675e52abe0bbb0c4343777ab4905c3b7a61 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Thu, 8 Jun 2023 13:59:59 +0200 Subject: [PATCH 2/3] #RAT * Fixes from dev --- Moose Development/Moose/Functional/RAT.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Moose Development/Moose/Functional/RAT.lua b/Moose Development/Moose/Functional/RAT.lua index 98e295167..6875875ea 100644 --- a/Moose Development/Moose/Functional/RAT.lua +++ b/Moose Development/Moose/Functional/RAT.lua @@ -5490,7 +5490,7 @@ function RAT:_ATCInit(airports_map) if not RAT.ATC.init then local text text="Starting RAT ATC.\nSimultanious = "..RAT.ATC.Nclearance.."\n".."Delay = "..RAT.ATC.delay - BASE:T(RAT.id..text) + BASE:T(RAT.id..text) RAT.ATC.init=true for _,ap in pairs(airports_map) do local name=ap:GetName() @@ -5671,9 +5671,9 @@ function RAT:_ATCClearForLanding(airport, flight) -- Debug message. local text1=string.format("ATC %s: Flight %s cleared for landing (flag=%d).", airport, flight, flagvalue) - if string.find(flight,"#") then - flight = string.match(flight,"^(.+)#") - end + if string.find(flight,"#") then + flight = string.match(flight,"^(.+)#") + end local text2=string.format("ATC %s: Flight %s you are cleared for landing.", airport, flight) BASE:T( RAT.id..text1) MESSAGE:New(text2, 10):ToAllIf(RAT.ATC.messages) @@ -5716,9 +5716,9 @@ function RAT:_ATCFlightLanded(name) local text1=string.format("ATC %s: Flight %s landed. Tholding = %i:%02d, Tfinal = %i:%02d.", dest, name, Thold/60, Thold%60, Tfinal/60, Tfinal%60) local text2=string.format("ATC %s: Number of flights still on final %d.", dest, RAT.ATC.airport[dest].Nonfinal) local text3=string.format("ATC %s: Traffic report: Number of planes landed in total %d. Flights/hour = %3.2f.", dest, RAT.ATC.airport[dest].traffic, TrafficPerHour) - if string.find(name,"#") then - name = string.match(name,"^(.+)#") - end + if string.find(name,"#") then + name = string.match(name,"^(.+)#") + end local text4=string.format("ATC %s: Flight %s landed. Welcome to %s.", dest, name, dest) BASE:T(RAT.id..text1) BASE:T(RAT.id..text2) From e9adcb0dd5f7588f325ff05e1b59164283d8304c Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Fri, 9 Jun 2023 15:13:45 +0200 Subject: [PATCH 3/3] #AIRBASE * Sinai airfield enumerator --- Moose Development/Moose/Wrapper/Airbase.lua | 67 ++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/Moose Development/Moose/Wrapper/Airbase.lua b/Moose Development/Moose/Wrapper/Airbase.lua index 0930f88ed..4aeb5b21b 100644 --- a/Moose Development/Moose/Wrapper/Airbase.lua +++ b/Moose Development/Moose/Wrapper/Airbase.lua @@ -490,7 +490,6 @@ AIRBASE.Syria={ ["Wujah_Al_Hajar"]="Wujah Al Hajar", ["Al_Dumayr"]="Al-Dumayr", ["Gazipasa"]="Gazipasa", - --["Ru_Convoy_4"]="Ru Convoy-4", ["Hatay"]="Hatay", ["Nicosia"]="Nicosia", ["Pinarbashi"]="Pinarbashi", @@ -619,6 +618,72 @@ AIRBASE.SouthAtlantic={ ["Gull_Point"] = "Gull Point", } +--- Airbases of the Sinai map: +-- +-- * AIRBASE.Sinai.Abu_Suwayr +-- * AIRBASE.Sinai.Sde_Dov +-- * AIRBASE.Sinai.AzZaqaziq +-- * AIRBASE.Sinai.Hatzor +-- * AIRBASE.Sinai.Kedem +-- * AIRBASE.Sinai.Nevatim +-- * AIRBASE.Sinai.Cairo_International_Airport +-- * AIRBASE.Sinai.Al_Ismailiyah +-- * AIRBASE.Sinai.As_Salihiyah +-- * AIRBASE.Sinai.Fayed +-- * AIRBASE.Sinai.Bilbeis_Air_Base +-- * AIRBASE.Sinai.Ramon_Airbase +-- * AIRBASE.Sinai.Kibrit_Air_Base +-- * AIRBASE.Sinai.El_Arish +-- * AIRBASE.Sinai.Ovda +-- * AIRBASE.Sinai.Melez +-- * AIRBASE.Sinai.Al_Mansurah +-- * AIRBASE.Sinai.Palmahim +-- * AIRBASE.Sinai.Baluza +-- * AIRBASE.Sinai.El_Gora +-- * AIRBASE.Sinai.Difarsuwar_Airfield +-- * AIRBASE.Sinai.Wadi_al_Jandali +-- * AIRBASE.Sinai.St_Catherine +-- * AIRBASE.Sinai.Tel_Nof +-- * AIRBASE.Sinai.Abu_Rudeis +-- * AIRBASE.Sinai.Inshas_Airbase +-- * AIRBASE.Sinai.Ben-Gurion +-- * AIRBASE.Sinai.Bir_Hasanah +-- * AIRBASE.Sinai.Cairo_West +-- +-- @field Sinai +AIRBASE.Sinai = { + ["Hatzerim"] = "Hatzerim", + ["Abu_Suwayr"] = "Abu Suwayr", + ["Sde_Dov"] = "Sde Dov", + ["AzZaqaziq"] = "AzZaqaziq", + ["Hatzor"] = "Hatzor", + ["Kedem"] = "Kedem", + ["Nevatim"] = "Nevatim", + ["Cairo_International_Airport"] = "Cairo International Airport", + ["Al_Ismailiyah"] = "Al Ismailiyah", + ["As_Salihiyah"] = "As Salihiyah", + ["Fayed"] = "Fayed", + ["Bilbeis_Air_Base"] = "Bilbeis Air Base", + ["Ramon_Airbase"] = "Ramon Airbase", + ["Kibrit_Air_Base"] = "Kibrit Air Base", + ["El_Arish"] = "El Arish", + ["Ovda"] = "Ovda", + ["Melez"] = "Melez", + ["Al_Mansurah"] = "Al Mansurah", + ["Palmahim"] = "Palmahim", + ["Baluza"] = "Baluza", + ["El_Gora"] = "El Gora", + ["Difarsuwar_Airfield"] = "Difarsuwar Airfield", + ["Wadi_al_Jandali"] = "Wadi al Jandali", + ["St_Catherine"] = "St Catherine", + ["Tel_Nof"] = "Tel Nof", + ["Abu_Rudeis"] = "Abu Rudeis", + ["Inshas_Airbase"] = "Inshas Airbase", + ["Ben-Gurion"] = "Ben-Gurion", + ["Bir_Hasanah"] = "Bir Hasanah", + ["Cairo_West"] = "Cairo West", +} + --- AIRBASE.ParkingSpot ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy". -- @type AIRBASE.ParkingSpot -- @field Core.Point#COORDINATE Coordinate Coordinate of the parking spot.