oops i broke it
This commit is contained in:
parent
bc036b4551
commit
a3e43cc09a
@ -8,6 +8,7 @@ local function cmd_repair(name, params, splitparams)
|
|||||||
splitparams[1] = "all"
|
splitparams[1] = "all"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if #splitparams > 0 then
|
||||||
if splitparams[1] == "all" then
|
if splitparams[1] == "all" then
|
||||||
if not ess.priv_match(name, "ess.tools.repairall") then
|
if not ess.priv_match(name, "ess.tools.repairall") then
|
||||||
return ess.reject_permission()
|
return ess.reject_permission()
|
||||||
@ -28,11 +29,13 @@ local function cmd_repair(name, params, splitparams)
|
|||||||
player = minetest.get_player_by_name(splitparams[1])
|
player = minetest.get_player_by_name(splitparams[1])
|
||||||
-- Repair a player's held tool
|
-- Repair a player's held tool
|
||||||
commit = 1
|
commit = 1
|
||||||
|
end
|
||||||
else
|
else
|
||||||
-- Repair my own tool
|
-- Repair my own tool
|
||||||
commit = 1
|
commit = 1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
if commit == 1 and player then
|
if commit == 1 and player then
|
||||||
local held = player:get_wielded_item()
|
local held = player:get_wielded_item()
|
||||||
if held:get_wear() > 0 then
|
if held:get_wear() > 0 then
|
||||||
|
Loading…
Reference in New Issue
Block a user