mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-01-11 18:40:25 +01:00
Added globalstep to assign classes
- 3d_armor doesn't depend anymore on pclasses (#159)
This commit is contained in:
parent
06e0aab31f
commit
0f00140d6c
@ -452,13 +452,11 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
player:get_inventory():set_stack(listname, index, stack)
|
player:get_inventory():set_stack(listname, index, stack)
|
||||||
armor:set_player_armor(player)
|
armor:set_player_armor(player)
|
||||||
armor:update_inventory(player)
|
armor:update_inventory(player)
|
||||||
pclasses.api.assign_class(player) -- //MFF (Mg|07/18/2015)
|
|
||||||
end,
|
end,
|
||||||
on_take = function(inv, listname, index, stack, player)
|
on_take = function(inv, listname, index, stack, player)
|
||||||
player:get_inventory():set_stack(listname, index, nil)
|
player:get_inventory():set_stack(listname, index, nil)
|
||||||
armor:set_player_armor(player)
|
armor:set_player_armor(player)
|
||||||
armor:update_inventory(player)
|
armor:update_inventory(player)
|
||||||
pclasses.api.assign_class(player) -- //MFF (Mg|07/18/2015)
|
|
||||||
end,
|
end,
|
||||||
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
on_move = function(inv, from_list, from_index, to_list, to_index, count, player)
|
||||||
local plaver_inv = player:get_inventory()
|
local plaver_inv = player:get_inventory()
|
||||||
@ -467,7 +465,6 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
player_inv:set_stack(from_list, from_index, nil)
|
player_inv:set_stack(from_list, from_index, nil)
|
||||||
armor:set_player_armor(player)
|
armor:set_player_armor(player)
|
||||||
armor:update_inventory(player)
|
armor:update_inventory(player)
|
||||||
pclasses.api.assign_class(player) -- //MFF (Mg|07/18/2015)
|
|
||||||
end,
|
end,
|
||||||
allow_put = function(inv, listname, index, stack, player)
|
allow_put = function(inv, listname, index, stack, player)
|
||||||
--DEBUT modif MFF (crabman/24/06/2015)
|
--DEBUT modif MFF (crabman/24/06/2015)
|
||||||
|
@ -120,9 +120,13 @@ function pclasses.api.assign_class(player)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_respawnplayer(pclasses.api.assign_class)
|
minetest.register_globalstep(function(dtime)
|
||||||
minetest.register_on_joinplayer(function(player) minetest.after(1, pclasses.api.assign_class, player) end)
|
for id, ref in ipairs(minetest.get_connected_players()) do
|
||||||
minetest.register_on_leaveplayer(pclasses.api.assign_class)
|
pclasses.api.assign_class(ref)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-------------------
|
-------------------
|
||||||
-- Reserved items
|
-- Reserved items
|
||||||
|
Loading…
Reference in New Issue
Block a user