diff --git a/mods/lord/lord_classes/init.lua b/mods/lord/lord_classes/init.lua index 984a8b505..764efd47e 100644 --- a/mods/lord/lord_classes/init.lua +++ b/mods/lord/lord_classes/init.lua @@ -604,6 +604,32 @@ function races.revoke_second_chance(name) pmeta:set_string("classes:has_second_chance", "false") end +function races.print_player_race(name) + local race = races.get_race(name) + local gender = races.get_gender(name) + local skin = races.get_skin(name) + local can_change = races.has_second_chance(name) + local granted_privs = races.get_granted_privs(name) + local revoked_privs = races.get_revoked_privs(name) + + minetest.log("Player "..name.." : race="..race.." gender="..gender.." skin="..skin) + if can_change then + minetest.log("Has second chance") + else + minetest.log("Dosn't have second chance") + end + + minetest.log("Granted privs:") + for _, v in ipairs(granted_privs) do + minetest.log(" "..v) + end + + minetest.log("Revoked privs:") + for _, v in ipairs(revoked_privs) do + minetest.log(" "..v) + end + +end minetest.register_on_joinplayer(function(player) local name = player:get_player_name() @@ -612,6 +638,8 @@ minetest.register_on_joinplayer(function(player) local gender local skin + races.print_player_race(name) + if races.player_is_known(name) then -- Player is registered already race = races.get_race(name) if races.list[race].cannot_be_selected then