1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00:00

Add persistent unique identifiers for objects (#14135)

This commit is contained in:
sfence 2025-07-09 10:40:26 +02:00 committed by GitHub
parent e0f8243629
commit 4f42b4308c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 257 additions and 19 deletions

View file

@ -204,3 +204,12 @@ local function run_player_hotbar_clamp_tests(player)
player:hud_set_hotbar_itemcount(old_bar_size)
end
unittests.register("test_player_hotbar_clamp", run_player_hotbar_clamp_tests, {player=true})
--
-- Player GUID
--
local function test_player_guid(player)
assert(player:get_guid() == player:get_player_name())
assert(core.objects_by_guid[player:get_guid()] == player)
end
unittests.register("test_player_guid", test_player_guid, {player=true})