]> git.lizzy.rs Git - xdecor.git/commitdiff
Turn paintings to simple nodebox models
authorjp <jeanpatrick.guerrero@gmail.com>
Fri, 4 Dec 2015 17:50:27 +0000 (18:50 +0100)
committerjp <jeanpatrick.guerrero@gmail.com>
Fri, 4 Dec 2015 17:56:23 +0000 (18:56 +0100)
nodes.lua
textures/xdecor_painting_1.png
textures/xdecor_painting_2.png
textures/xdecor_painting_3.png
textures/xdecor_painting_4.png

index 048b75e0ca11e9c161b411c2eec14557e84c6cd9..3dddd9eec4757b384a0e7d64195b6d231210aa64 100644 (file)
--- a/nodes.lua
+++ b/nodes.lua
@@ -352,16 +352,20 @@ end
 
 xdecor.register("painting_1", {
        description = "Painting",
-       drawtype = "signlike",
        tiles = {"xdecor_painting_1.png"},
-       inventory_image = "xdecor_painting_1.png",
+       inventory_image = "xdecor_painting_empty.png",
+       wield_image = "xdecor_painting_empty.png",
        paramtype2 = "wallmounted",
        legacy_wallmounted = true,
-       walkable = false,
-       on_rotate = screwdriver.rotate_simple,
        wield_image = "xdecor_painting_empty.png",
-       selection_box = {type="wallmounted"},
-       groups = {dig_immediate=3, flammable=3, attached_node=1},
+       sunlight_propagates = true,
+       groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3, attached_node=1},
+       node_box = {
+               type = "wallmounted",
+               wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
+               wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
+               wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375}
+       },
        after_place_node = function(pos, _, _, _)
                local node = minetest.get_node(pos)
                minetest.set_node(pos, {name="xdecor:painting_"..math.random(1,4), param2=node.param2})
@@ -372,15 +376,18 @@ minetest.register_alias("xdecor:painting", "xdecor:painting_1")
 
 for i = 2, 4 do
        xdecor.register("painting_"..i, {
-               drawtype = "signlike",
                tiles = {"xdecor_painting_"..i..".png"},
                paramtype2 = "wallmounted",
                legacy_wallmounted = true,
-               walkable = false,
-               on_rotate = screwdriver.rotate_simple,
                drop = "xdecor:painting_1",
-               selection_box = {type="wallmounted"},
-               groups = {dig_immediate=3, flammable=3, attached_node=1, not_in_creative_inventory=1}
+               sunlight_propagates = true,
+               groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3, attached_node=1, not_in_creative_inventory=1},
+               node_box = {
+                       type = "wallmounted",
+                       wall_top = {-0.4375, 0.4375, -0.3125, 0.4375, 0.5, 0.3125},
+                       wall_bottom = {-0.4375, -0.5, -0.3125, 0.4375, -0.4375, 0.3125},
+                       wall_side = {-0.5, -0.3125, -0.4375, -0.4375, 0.3125, 0.4375}
+               }
        })
 end
 
index 424fbd938a14c81c99336409ffe81a6d17102a0f..1792b883749ef82a663543b1eb7389537d3143ec 100644 (file)
Binary files a/textures/xdecor_painting_1.png and b/textures/xdecor_painting_1.png differ
index 0351f5290028d8b2a52639ba96f4ee19de68ae36..1d56a83dc6b5a3c84fa5f11a0f7aef351a977699 100644 (file)
Binary files a/textures/xdecor_painting_2.png and b/textures/xdecor_painting_2.png differ
index a21e9a5435dc0ab218ea5362f8692fae148e42f6..ff11682fb88f375d11180e04f3f84a1f39baa594 100644 (file)
Binary files a/textures/xdecor_painting_3.png and b/textures/xdecor_painting_3.png differ
index 855b9501fce7f55e1b76bd64b8d14316ce413208..463d7ad0ac6181faf4716130f099fecde3bfd30b 100644 (file)
Binary files a/textures/xdecor_painting_4.png and b/textures/xdecor_painting_4.png differ