From be7403b0d0493bd4e7335e064254409fcc80098f Mon Sep 17 00:00:00 2001 From: ramon-bernardo Date: Sun, 17 Nov 2024 15:09:56 -0300 Subject: [PATCH 1/2] Move players record to lua --- data/cpplinter.lua | 1 - data/globalevents/globalevents.xml | 1 - data/globalevents/scripts/record.lua | 4 -- data/lib/core/game/lib.lua | 1 + data/lib/core/game/players_record.lua | 11 ++++ .../creaturescripts/player/players_record.lua | 13 +++++ data/scripts/globalevents/players_record.lua | 28 ++++++++++ src/game.cpp | 51 ++++++------------- src/game.h | 10 ++-- src/globalevent.cpp | 24 --------- src/globalevent.h | 2 - src/luascript.cpp | 5 +- src/player.cpp | 1 - 13 files changed, 72 insertions(+), 80 deletions(-) delete mode 100644 data/globalevents/scripts/record.lua create mode 100644 data/lib/core/game/players_record.lua create mode 100644 data/scripts/creaturescripts/player/players_record.lua create mode 100644 data/scripts/globalevents/players_record.lua diff --git a/data/cpplinter.lua b/data/cpplinter.lua index 17624824de..946a6571e2 100644 --- a/data/cpplinter.lua +++ b/data/cpplinter.lua @@ -1048,7 +1048,6 @@ MoveEvent = {} ---@field interval fun(self:GlobalEvent, interval:integer):boolean ---@field onStartup fun():boolean ---@field onShutdown fun():boolean ----@field onRecord fun(current:integer, old:integer):boolean ---@field onThink fun(interval:integer):boolean ---@field onTime fun(interval:integer):boolean ---@operator call(string):GlobalEvent diff --git a/data/globalevents/globalevents.xml b/data/globalevents/globalevents.xml index 58df782580..27ff48924e 100644 --- a/data/globalevents/globalevents.xml +++ b/data/globalevents/globalevents.xml @@ -1,7 +1,6 @@ -