From 216ea230a84a4aabfea3b2dcd2d914c05113bb44 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sun, 27 Oct 2024 13:25:13 +0100 Subject: [PATCH 1/2] #BASE - Roll back to "old" serialize method for Trace --- Moose Development/Moose/Core/Base.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Moose Development/Moose/Core/Base.lua b/Moose Development/Moose/Core/Base.lua index 94d13a9a0..76e516799 100644 --- a/Moose Development/Moose/Core/Base.lua +++ b/Moose Development/Moose/Core/Base.lua @@ -1416,7 +1416,7 @@ function BASE:E( Arguments ) env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "E", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) ) else - env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, BASE:_Serialize(Arguments) ) ) + env.info( string.format( "%1s:%30s%05d(%s)", "E", self.ClassName, self.ClassID, UTILS.BasicSerialize(Arguments) ) ) end end @@ -1443,7 +1443,7 @@ function BASE:I( Arguments ) env.info( string.format( "%6d(%6d)/%1s:%30s%05d.%s(%s)", LineCurrent, LineFrom, "I", self.ClassName, self.ClassID, Function, UTILS.BasicSerialize( Arguments ) ) ) else - env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, BASE:_Serialize(Arguments)) ) + env.info( string.format( "%1s:%30s%05d(%s)", "I", self.ClassName, self.ClassID, UTILS.BasicSerialize(Arguments)) ) end end From 2fb460c4bbdeeccbd45e6341d666e13852d02196 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Tue, 29 Oct 2024 11:37:06 +0100 Subject: [PATCH 2/2] #ATC_Ground - stop kicking players immediately for speeding --- .../Moose/Functional/ATC_Ground.lua | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Moose Development/Moose/Functional/ATC_Ground.lua b/Moose Development/Moose/Functional/ATC_Ground.lua index 8953bd13c..4703559b9 100644 --- a/Moose Development/Moose/Functional/ATC_Ground.lua +++ b/Moose Development/Moose/Functional/ATC_Ground.lua @@ -18,7 +18,7 @@ -- ### Author: FlightControl - Framework Design & Programming -- ### Refactoring to use the Runway auto-detection: Applevangelist -- @date August 2022 --- Last Update Nov 2023 +-- Last Update Oct 2024 -- -- === -- @@ -721,14 +721,18 @@ function ATC_GROUND_UNIVERSAL:_AirbaseMonitor() if NotInRunwayZone then + local Taxi = Client:GetState( self, "Taxi" ) + if IsOnGround then - local Taxi = Client:GetState( self, "Taxi" ) + self:T( Taxi ) if Taxi == false then local Velocity = VELOCITY:New( AirbaseMeta.KickSpeed or self.KickSpeed ) Client:Message( "Welcome to " .. AirbaseID .. ". The maximum taxiing speed is " .. Velocity:ToString() , 20, "ATC" ) Client:SetState( self, "Taxi", true ) + Client:SetState( self, "Speeding", false ) + Client:SetState( self, "Warnings", 0 ) end -- TODO: GetVelocityKMH function usage @@ -737,7 +741,7 @@ function ATC_GROUND_UNIVERSAL:_AirbaseMonitor() local IsAboveRunway = Client:IsAboveRunway() self:T( {IsAboveRunway, IsOnGround, Velocity:Get() }) - if IsOnGround then + if IsOnGround and not Taxi then local Speeding = false if AirbaseMeta.MaximumKickSpeed then if Velocity:Get() > AirbaseMeta.MaximumKickSpeed then @@ -749,15 +753,17 @@ function ATC_GROUND_UNIVERSAL:_AirbaseMonitor() end end if Speeding == true then - MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. - " has been kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() - Client:Destroy() - Client:SetState( self, "Speeding", false ) - Client:SetState( self, "Warnings", 0 ) + --MESSAGE:New( "Penalty! Player " .. Client:GetPlayerName() .. + -- " has been kicked, due to a severe airbase traffic rule violation ...", 10, "ATC" ):ToAll() + --Client:Destroy() + Client:SetState( self, "Speeding", true ) + local SpeedingWarnings = Client:GetState( self, "Warnings" ) + Client:SetState( self, "Warnings", SpeedingWarnings + 1 ) + Client:Message( "Warning " .. SpeedingWarnings .. "/3! Airbase traffic rule violation! Slow down now! Your speed is " .. + Velocity:ToString(), 5, "ATC" ) end end - - + if IsOnGround then local Speeding = false