]> git.lizzy.rs Git - xdecor.git/blobdiff - nodes.lua
Add some helpers (just in case)
[xdecor.git] / nodes.lua
index 5153996645e772e112a2398360de2ef9225f3363..53537c4256036d0f7c76d0e8239c4668ea57de3c 100644 (file)
--- a/nodes.lua
+++ b/nodes.lua
@@ -172,6 +172,12 @@ xdecor.register("crate", {
        sounds = default.node_sound_wood_defaults()
 })
 
+xdecor.register("cushion_block", {
+       tiles = {"xdecor_cushion.png"},
+       groups = {snappy=3, flammable=3, fall_damage_add_percent=-75, not_in_creative_inventory=1},
+       drop = "xdecor:cushion 2"
+})
+
 local function door_access(door)
        return door:find("prison")
 end
@@ -420,11 +426,11 @@ xdecor.register("stonepath", {
        on_rotate = screwdriver.rotate_simple,
        sounds = default.node_sound_stone_defaults(),
        sunlight_propagates = true,
-       node_box = xdecor.pixelnodebox(16, {
-               {8,  0,  8, 6, 0.5, 6},
-               {1,  0,  1, 6, 0.5, 6},
-               {1,  0, 10, 5, 0.5, 5},
-               {10, 0,  2, 4, 0.5, 4}
+       node_box = xdecor.pixelbox(16, {
+               {8,  0,  8, 6, .5, 6},
+               {1,  0,  1, 6, .5, 6},
+               {1,  0, 10, 5, .5, 5},
+               {10, 0,  2, 4, .5, 4}
        }),
        selection_box = xdecor.nodebox.slab_y(0.05)
 })
@@ -447,7 +453,7 @@ xdecor.register("table", {
        tiles = {"xdecor_wood.png"},
        groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3},
        sounds = default.node_sound_wood_defaults(),
-       node_box = xdecor.pixelnodebox(16, {
+       node_box = xdecor.pixelbox(16, {
                {0, 14, 0, 16, 2, 16}, {5.5, 0, 5.5, 5, 14, 6}
        })
 })