forked from minetest-mods/armor_monoid
Compare commits
2 Commits
0f912aca2c
...
master
Author | SHA1 | Date | |
---|---|---|---|
08f41c1ce3 | |||
79cf7737c1 |
6
init.lua
6
init.lua
@ -73,27 +73,21 @@ armor_monoid.monoid = player_monoids.make_monoid({
|
|||||||
|
|
||||||
join_handled[player:get_player_name()] = true
|
join_handled[player:get_player_name()] = true
|
||||||
|
|
||||||
if player then
|
|
||||||
player:set_armor_groups(final)
|
player:set_armor_groups(final)
|
||||||
end
|
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
-- If the monoid has not fired yet (or won't fire)
|
-- If the monoid has not fired yet (or won't fire)
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
if player then
|
|
||||||
if not join_handled[player:get_player_name()] then
|
if not join_handled[player:get_player_name()] then
|
||||||
player:set_armor_groups(armor_groups)
|
player:set_armor_groups(armor_groups)
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
if player then
|
|
||||||
join_handled[player:get_player_name()] = nil
|
join_handled[player:get_player_name()] = nil
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user