mirror of
https://github.com/joe7575/lumberjack.git
synced 2024-10-04 00:33:03 +02:00
fake player bugfix
This commit is contained in:
parent
558e69dbfb
commit
8e94e6a2cb
@ -39,6 +39,7 @@ v0.2 - 08/Apr/2018 - Priv 'lumberjack' added, digging of trees from the top only
|
|||||||
v0.3 - 09/Apr/2018 - Harvesting points for placing saplings and destroying tree blocks added to reach lumberjack privs
|
v0.3 - 09/Apr/2018 - Harvesting points for placing saplings and destroying tree blocks added to reach lumberjack privs
|
||||||
v0.4 - 16/Apr/2018 - Stem steps added
|
v0.4 - 16/Apr/2018 - Stem steps added
|
||||||
v0.5 - 17/Apr/2018 - protection bug fixed, further improvements
|
v0.5 - 17/Apr/2018 - protection bug fixed, further improvements
|
||||||
v0.6 - 07/Jan/2020 - screwdriver bugfix
|
v0.6 - 07/Jan/2020 - screwdriver bugfix
|
||||||
v0.7 - 27/May/2020 - ethereal bugfix
|
v0.7 - 27/May/2020 - ethereal bugfix
|
||||||
|
v0.8 - 29/Jul/2020 - fake player bugfix
|
||||||
|
|
||||||
|
14
init.lua
14
init.lua
@ -156,12 +156,14 @@ end
|
|||||||
-- Decrement sapling points
|
-- Decrement sapling points
|
||||||
--
|
--
|
||||||
local function after_place_sapling(pos, placer)
|
local function after_place_sapling(pos, placer)
|
||||||
local points = tonumber(placer:get_attribute("lumberjack_sapl_points") or LUMBERJACK_SAPL_POINTS)
|
if placer and placer:is_player and placer:is_player() and placer:get_attribute then
|
||||||
if points > 0 then
|
local points = tonumber(placer:get_attribute("lumberjack_sapl_points") or LUMBERJACK_SAPL_POINTS)
|
||||||
placer:set_attribute("lumberjack_sapl_points", tostring(points - 1))
|
if points > 0 then
|
||||||
end
|
placer:set_attribute("lumberjack_sapl_points", tostring(points - 1))
|
||||||
if points == 0 then
|
end
|
||||||
check_points(placer)
|
if points == 0 then
|
||||||
|
check_points(placer)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user