diff --git a/mods/give_initial_stuff/init.lua b/mods/ctf_inventory/give_inital_stuff.lua similarity index 89% rename from mods/give_initial_stuff/init.lua rename to mods/ctf_inventory/give_inital_stuff.lua index 304b3db..ca37588 100644 --- a/mods/give_initial_stuff/init.lua +++ b/mods/ctf_inventory/give_inital_stuff.lua @@ -10,5 +10,5 @@ function give_initial_stuff(player) end end -minetest.register_on_newplayer(give_initial_stuff) +minetest.register_on_joinplayer(give_initial_stuff) minetest.register_on_respawnplayer(give_initial_stuff) diff --git a/mods/ctf_inventory/init.lua b/mods/ctf_inventory/init.lua index 4baa0df..41fbbd3 100644 --- a/mods/ctf_inventory/init.lua +++ b/mods/ctf_inventory/init.lua @@ -47,3 +47,5 @@ minetest.register_on_joinplayer(function(player) player:set_inventory_formspec(fs) end end) + +dofile(minetest.get_modpath("ctf_inventory") .. "/give_initial_stuff.lua") diff --git a/mods/dropondie/init.lua b/mods/dropondie/init.lua index fbe01c4..0f3b5f9 100644 --- a/mods/dropondie/init.lua +++ b/mods/dropondie/init.lua @@ -4,14 +4,12 @@ local drop = function(pos, itemstack) local obj = core.add_item(pos, it) if obj then + obj:setvelocity({x=math.random(-1,1), y=5, z=math.random(-1,1)}) - obj:setvelocity({x=math.random(-1,1), y=5, z=math.random(-1,1)}) - - local remi = minetest.setting_get("remove_items") - - if remi and remi == "true" then - obj:remove() - end + local remi = minetest.setting_get("remove_items") + if minetest.is_yes(remi) then + obj:remove() + end end return itemstack @@ -26,8 +24,6 @@ minetest.register_on_dieplayer(function(player) local pos = player:getpos() pos.y = math.floor(pos.y + 0.5) - minetest.chat_send_player(player:get_player_name(), 'at '..math.floor(pos.x)..','..math.floor(pos.y)..','..math.floor(pos.z)) - local player_inv = player:get_inventory() for i=1,player_inv:get_size("main") do diff --git a/mods/give_initial_stuff/depends.txt b/mods/give_initial_stuff/depends.txt deleted file mode 100644 index 3a7daa1..0000000 --- a/mods/give_initial_stuff/depends.txt +++ /dev/null @@ -1,2 +0,0 @@ -default -