Fix bad indents in wielditem mod
This commit is contained in:
parent
5ceecc4e1f
commit
ab2a67fa91
@ -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()
|
||||
@ -57,7 +54,7 @@ minetest.register_entity(
|
||||
self.object:set_properties({is_visible=false})
|
||||
end
|
||||
end
|
||||
})
|
||||
})
|
||||
|
||||
local function attach_wielditem(player)
|
||||
local name = player:get_player_name()
|
||||
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user