summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorroot <root@mirzakhani.gpcf.eu>2018-06-10 22:38:21 +0200
committerroot <root@mirzakhani.gpcf.eu>2018-06-10 22:38:21 +0200
commite82f404d97816d33033ebb981afd638ab2feaad5 (patch)
tree919ad9228e79305e753d3918a55ef1fd9eb53570
parent482a3b4f340c3a307a292271a1291b065e92bee8 (diff)
parent7029fecfbb33b9a2c786ce783605ddf26ad30536 (diff)
Merge https://github.com/h-v-smacker/technic
-rw-r--r--technic/textures/technic_paint.pngbin182 -> 174 bytes
-rw-r--r--technic/tools/spray_painter.lua13
2 files changed, 7 insertions, 6 deletions
diff --git a/technic/textures/technic_paint.png b/technic/textures/technic_paint.png
index b052757..4210991 100644
--- a/technic/textures/technic_paint.png
+++ b/technic/textures/technic_paint.png
Binary files differ
diff --git a/technic/tools/spray_painter.lua b/technic/tools/spray_painter.lua
index cea42b4..41b8a6a 100644
--- a/technic/tools/spray_painter.lua
+++ b/technic/tools/spray_painter.lua
@@ -28,9 +28,9 @@ minetest.register_node ("technic:paint_layer", {
tiles = {"technic_paint.png"},
node_box = {
type = "wallmounted",
- wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.499, 0.5},
- wall_top = {-0.5, 0.499, -0.5, 0.5, 0.5, 0.5},
- wall_side = {-0.5, -0.5, -0.5, -0.499, 0.5, 0.5},
+ wall_bottom = {-0.5, -0.5, -0.5, 0.5, -0.49, 0.5},
+ wall_top = {-0.5, 0.49, -0.5, 0.5, 0.5, 0.5},
+ wall_side = {-0.5, -0.5, -0.5, -0.49, 0.5, 0.5},
},
drop = "",
groups = {attached_node = 1, dig_immediate = 2, not_in_creative_inventory = 1},
@@ -90,9 +90,10 @@ local function spray_paint(itemstack, user, pointed_thing)
})
-- player needs to own both the wall and its surface
- if minetest.is_protected(pointed_thing.under, user:get_player_name()) or
- minetest.is_protected(pointed_thing.above, user:get_player_name()) then
- minetest.record_protection_violation(pointed_thing.under, name)
+ local pname = user:get_player_name()
+ if minetest.is_protected(pointed_thing.under, pname) or
+ minetest.is_protected(pointed_thing.above, pname) then
+ minetest.record_protection_violation(pointed_thing.under, pname)
return itemstack
end