Fix bad indents in wielditem mod

This commit is contained in:
Wuzzy 2021-08-08 01:16:49 +02:00
parent 5ceecc4e1f
commit ab2a67fa91

View File

@ -4,14 +4,12 @@
-- By Kaadmy, for Pixture
--
wielditem = {}
local wielditem = {}
local update_time = 1
local timer = 10 -- needs to be more than update_time
minetest.register_entity(
"wielditem:wielditem",
{
minetest.register_entity("wielditem:wielditem", {
is_visible = false,
visual = "wielditem",
@ -42,7 +40,6 @@ minetest.register_entity(
end,
on_step = function(self, dtime)
local player = self._wielder
-- Remove orphan wielditem
if player == nil or (minetest.get_player_by_name(player:get_player_name()) == nil) then
self.object:remove()
@ -76,4 +73,8 @@ minetest.register_on_joinplayer(function(player)
end, player)
end)
minetest.register_on_leaveplayer(function(player)
wielditem[name] = nil
end)
default.log("mod:wielditem", "loaded")