From 8091b1ebc0c07bfd05ab826e5468130e669ba7af Mon Sep 17 00:00:00 2001 From: mckaygerhard Date: Mon, 10 Jan 2022 16:21:27 -0500 Subject: [PATCH 1/2] compatibilit with minetest 0.4.17 and 5.0.0 for player object bug * minetest/minetest#8452 --- init.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 3a0d0ca..b25fa3a 100644 --- a/init.lua +++ b/init.lua @@ -73,21 +73,27 @@ armor_monoid.monoid = player_monoids.make_monoid({ join_handled[player:get_player_name()] = true - player:set_armor_groups(final) + if player then + player:set_armor_groups(final) + end end, }) -- If the monoid has not fired yet (or won't fire) minetest.register_on_joinplayer(function(player) - if not join_handled[player:get_player_name()] then - player:set_armor_groups(armor_groups) + if player then + if not join_handled[player:get_player_name()] then + player:set_armor_groups(armor_groups) + end end end) minetest.register_on_leaveplayer(function(player) + if player then join_handled[player:get_player_name()] = nil + end end) From adbbe639d794e7a4a236a0088b1a02f657b96e1e Mon Sep 17 00:00:00 2001 From: sys4 Date: Sun, 26 Jun 2022 12:20:55 +0200 Subject: [PATCH 2/2] Delete depends.txt, description.txt and update mod.conf --- depends.txt | 1 - description.txt | 1 - mod.conf | 4 +++- 3 files changed, 3 insertions(+), 3 deletions(-) delete mode 100644 depends.txt delete mode 100644 description.txt diff --git a/depends.txt b/depends.txt deleted file mode 100644 index 61bc671..0000000 --- a/depends.txt +++ /dev/null @@ -1 +0,0 @@ -player_monoids diff --git a/description.txt b/description.txt deleted file mode 100644 index d0eee6f..0000000 --- a/description.txt +++ /dev/null @@ -1 +0,0 @@ -A player_monoids monoid for armor diff --git a/mod.conf b/mod.conf index a0aa1d2..9bd8fea 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,3 @@ -name=armor_monoid \ No newline at end of file +name=armor_monoid +description = A player_monoids monoid for armor +depends = player_monoids