diff options
author | Joachim Stolberg <joe.stolberg@gmx.de> | 2017-12-17 18:26:16 +0100 |
---|---|---|
committer | Joachim Stolberg <joe.stolberg@gmx.de> | 2017-12-17 18:26:16 +0100 |
commit | d0af5b3c13de521006e623dfc9ad1509c4b4d82e (patch) | |
tree | b34833020cc7591548205f7bdf428ec87ec0133b | |
parent | 8b76fcd33d334a1c0a734073bb3f7d49e47659dd (diff) |
player with creative privs can now dig the crane
-rw-r--r-- | init.lua | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -433,7 +433,7 @@ minetest.register_node("towercrane:base", { if height ~= 0 then meta:set_int("height", height) meta:set_int("width", width) - meta:set_string("infotext", "Crane size: " .. height .. "," .. width) + meta:set_string("infotext", "Owner: ".. owner ..", Crane size: " .. height .. "," .. width) if no_area_violation(owner, pos) then if dir ~= nil then if check_space(table.copy(pos), dir, height, width, owner) then @@ -456,7 +456,8 @@ minetest.register_node("towercrane:base", { local switch_pos = {x=pos.x, y=pos.y+1, z=pos.z} local meta = minetest.get_meta(pos) local owner = meta:get_string("owner") - if player:get_player_name() ~= owner then + if player:get_player_name() ~= owner and + not minetest.check_player_privs(player:get_player_name(), "creative") then return false end meta = minetest.get_meta(switch_pos) |