Refactor player system and API

Large refactor of server/player.lua to modernize the player system and public API. Introduces a Player metatable with cleaner Player.Functions interface, offline player support, and centralized data validation/merge logic (CheckPlayerData, applyDynamicDefaults, merge/prune helpers). Adds unique ID generators, improved money logging/notifications, and safer save/delete flows (including ForceDeleteCharacter). Replaces old Login/Logout/CreatePlayer flows, exposes exports (GetPlayer, GetPlayerByCitizenId, GetOfflinePlayerByCitizenId, GetPlayerByLicense, GetOfflinePlayerByLicense, AddPlayerMethod, AddPlayerField) for runtime integration, and improves inventory and job/gang handling. Overall aims: clearer runtime API, offline lookups, and more maintainable player persistence and event synchronization.
This commit is contained in:
Kakarot
2026-05-12 23:40:29 -05:00
parent 7536889ccc
commit 02397cfc5a
+616 -441
View File
File diff suppressed because it is too large Load Diff