]> git.lizzy.rs Git - xdecor.git/commitdiff
more tweaking
authorkilbith <jeanpatrick.guerrero@gmail.com>
Wed, 10 Jun 2015 12:43:14 +0000 (14:43 +0200)
committerkilbith <jeanpatrick.guerrero@gmail.com>
Wed, 10 Jun 2015 16:34:53 +0000 (18:34 +0200)
crafts.lua
depends.txt
itemframes.lua
nodes.lua
textures/xdecor_brass.png [deleted file]
textures/xdecor_brass_ingot.png [deleted file]
textures/xdecor_television_top.png [deleted file]
textures/xdecor_wrought_iron.png [deleted file]

index 7430491983cec709dceabb2177f7e5732331fa8c..192dbead5418339dd0815f652cc55c15c2c49001 100644 (file)
-minetest.register_craft({
-       output = "xdecor:barrel",
-       recipe = {
-               {"group:wood", "group:wood", "group:wood"},
-               {"default:iron_lump", "", "default:iron_lump"},
-               {"group:wood", "group:wood", "group:wood"}
-       } })
-
-minetest.register_craftitem("xdecor:brass_ingot", {
-       description = "Brass ingot", inventory_image = "xdecor_brass_ingot.png" })
-
-minetest.register_craft({
-       type = "shapeless", output = "xdecor:brass_ingot",
-       recipe = {"default:copper_ingot", "moreores:tin_ingot"} })
-
-minetest.register_craft({
-       output = "xdecor:cabinet",
-       recipe = {
-               {"group:wood", "group:wood", "group:wood"},
-               {"doors:trapdoor", "", "doors:trapdoor"},
-               {"group:wood", "group:wood", "group:wood"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:cabinet_half 2", recipe = {{"xdecor:cabinet"}} })
-
-minetest.register_craft({
-       type = "shapeless", output = "xdecor:candle", recipe = {"default:torch"} })
-
-minetest.register_craft({
-       output = "xdecor:cardboard_box",
-       recipe = {
-               {"default:paper", "default:paper", "default:paper"},
-               {"default:paper", "default:paper", "default:paper"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:cauldron",
-       recipe = {
-               {"default:iron_lump", "", "default:iron_lump"},
-               {"default:iron_lump", "default:water_source", "default:iron_lump"},
-               {"default:iron_lump", "default:iron_lump", "default:iron_lump"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:chair",
-       recipe = {
-               {"group:stick", "", ""},
-               {"group:stick", "group:stick", "group:stick"},
-               {"group:stick", "", "group:stick"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:coalstone_tile 8",
-       recipe = {
-               {"default:coalblock", "default:stone"},
-               {"default:stone", "default:coalblock"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:cushion 2", recipe = {{"wool:red", "wool:red", "wool:red"}} })
-
-minetest.register_craft({
-       output = "xdecor:fence_brass 2",
-       recipe = {
-               {"xdecor:brass_ingot", "xdecor:brass_ingot", "xdecor:brass_ingot"},
-               {"xdecor:brass_ingot", "xdecor:brass_ingot", "xdecor:brass_ingot"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:fence_wrought_iron 2",
-       recipe = {
-               {"default:iron_lump", "default:iron_lump", "default:iron_lump"},
-               {"default:iron_lump", "default:iron_lump", "default:iron_lump"}
-       } })
-
-minetest.register_craft({
-       type = "shapeless", output = "xdecor:flint_steel",
-       recipe = {"default:obsidian_shard", "default:steel_ingot"} })
-
-minetest.register_craft({
-       output = "xdecor:frame",
-       recipe = {
-               {"group:stick", "group:stick", "group:stick"},
-               {"group:stick", "default:paper", "group:stick"},
-               {"group:stick", "group:stick", "group:stick"},
-       } })
-
-minetest.register_craft({
-       type = "shapeless", output = "xdecor:moonbrick",
-       recipe = {"default:brick", "default:stone"} })
-
-minetest.register_craft({
-       output = "xdecor:multishelf",
-       recipe = {
-               {"group:wood", "group:wood", "group:wood"},
-               {"group:vessel", "group:book", "group:vessel"},
-               {"group:wood", "group:wood", "group:wood"}
-       } })
-
-minetest.register_craft({
-       type = "shapeless", output = "xdecor:painting",
-       recipe = {"default:sign_wall", "dye:blue"} })
-
-minetest.register_craft({
-       output = "xdecor:plant_pot",
-       recipe = {
-               {"default:clay_lump", "", "default:clay_lump"},
-               {"default:clay_lump", "default:dirt", "default:clay_lump"},
-               {"default:clay_lump", "default:clay_lump", "default:clay_lump"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:rope 2",
-       recipe = {
-               {"farming:string"},
-               {"farming:string"},
-               {"farming:string"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:table",
-       recipe = {
-               {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
-               {"", "group:stick", ""},
-               {"", "group:stick", ""}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:tv",
-       recipe = {
-               {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
-               {"default:steel_ingot", "default:glass", "default:steel_ingot"},
-               {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:workbench",
-       recipe = {
-               {"group:wood", "group:wood", "group:wood"},
-               {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
-               {"group:wood", "group:wood", "group:wood"}
-       } })
-
-minetest.register_craft({
-       output = "xdecor:wood_tile 2",
-       recipe = {
-               {"group:wood", "group:wood"},
-               {"group:wood", "group:wood"}
-       } })
+minetest.register_craft({ output = "xdecor:candle", recipe = {{"default:torch"}} })
+minetest.register_craft({ output = "xdecor:cabinet_half 2", recipe = {{"xdecor:cabinet"}} })
+minetest.register_craft({ output = "xdecor:cushion 2", recipe = {{"wool:red", "wool:red"}} })
+minetest.register_craft({ output = "xdecor:painting", recipe = {{"default:sign_wall", "dye:blue"}} })
+minetest.register_craft({ output = "xdecor:moonbrick", recipe = {{"default:brick", "default:stone"}} })
+minetest.register_craft({ output = "xdecor:flint_steel", recipe = {{"default:obsidian_shard", "default:steel_ingot"}} })
+
+minetest.register_craft({ output = "xdecor:barrel", recipe = {
+       {"group:wood", "group:wood", "group:wood"},
+       {"default:iron_lump", "", "default:iron_lump"},
+       {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:cabinet", recipe = {
+       {"group:wood", "group:wood", "group:wood"},
+       {"doors:trapdoor", "", "doors:trapdoor"},
+       {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:cardboard_box", recipe = {
+       {"default:paper", "default:paper", "default:paper"},
+       {"default:paper", "default:paper", "default:paper"} } })
+
+minetest.register_craft({ output = "xdecor:cauldron", recipe = {
+       {"default:iron_lump", "", "default:iron_lump"},
+       {"default:iron_lump", "default:water_source", "default:iron_lump"},
+       {"default:iron_lump", "default:iron_lump", "default:iron_lump"} } })
+
+minetest.register_craft({ output = "xdecor:chair", recipe = {
+       {"group:stick", "", ""},
+       {"group:stick", "group:stick", "group:stick"},
+       {"group:stick", "", "group:stick"} } })
+
+minetest.register_craft({ output = "xdecor:coalstone_tile 8", recipe = {
+       {"default:coalblock", "default:stone"},
+       {"default:stone", "default:coalblock"} } })
+
+minetest.register_craft({ output = "xdecor:fence_wrought_iron 2", recipe = {
+       {"default:iron_lump", "default:iron_lump", "default:iron_lump"},
+       {"default:iron_lump", "default:iron_lump", "default:iron_lump"} } })
+
+minetest.register_craft({ output = "xdecor:frame", recipe = {
+       {"group:stick", "group:stick", "group:stick"},
+       {"group:stick", "default:paper", "group:stick"},
+       {"group:stick", "group:stick", "group:stick"} } })
+
+minetest.register_craft({ output = "xdecor:multishelf", recipe = {
+       {"group:wood", "group:wood", "group:wood"},
+       {"group:vessel", "group:book", "group:vessel"},
+       {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:plant_pot", recipe = {
+       {"default:clay_lump", "", "default:clay_lump"},
+       {"default:clay_lump", "default:dirt", "default:clay_lump"},
+       {"default:clay_lump", "default:clay_lump", "default:clay_lump"} } })
+
+minetest.register_craft({ output = "xdecor:rope 2", recipe = {
+       {"farming:string"},
+       {"farming:string"},
+       {"farming:string"} } })
+
+minetest.register_craft({ output = "xdecor:table", recipe = {
+       {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"},
+       {"", "group:stick", ""},
+       {"", "group:stick", ""} } })
+
+minetest.register_craft({ output = "xdecor:tv", recipe = {
+       {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"},
+       {"default:steel_ingot", "default:glass", "default:steel_ingot"},
+       {"default:steel_ingot", "default:copper_ingot", "default:steel_ingot"} } })
+
+minetest.register_craft({ output = "xdecor:workbench", recipe = {
+       {"group:wood", "group:wood", "group:wood"},
+       {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
+       {"group:wood", "group:wood", "group:wood"} } })
+
+minetest.register_craft({ output = "xdecor:wood_tile 2", recipe = {
+       {"group:wood", "group:wood"},
+       {"group:wood", "group:wood"} } })
index d0592c18eec47274cf5840af1c41242ffe0a6a70..41bb35a6a1e85a3ae5b1e9858df5bbdb2847b15e 100644 (file)
@@ -1,3 +1,2 @@
 default
 moreblocks?
-moreores?
index adcbc97047760dfcb76642c3574a328053dc8bb9..6b7b137615b0d8e85a99a19c232a20bafcbf2002 100644 (file)
@@ -1,7 +1,7 @@
 local tmp = {}
 screwdriver = screwdriver or {}
 
-minetest.register_entity("xdecor:f_item",{
+minetest.register_entity("xdecor:f_item", {
        hp_max = 1, visual="wielditem", visual_size={x=.33,y=.33},
        collisionbox = {0, 0, 0, 0, 0, 0}, physical=false, textures={"air"},
        on_activate = function(self, staticdata)
@@ -28,13 +28,12 @@ minetest.register_entity("xdecor:f_item",{
                        return self.nodename .. ';' .. self.texture
                end
                return ""
-       end,
+       end
 })
 
 local remove_item = function(pos, node)
        local objs = nil
        objs = minetest.get_objects_inside_radius(pos, .5)
-
        if objs then
                for _, obj in ipairs(objs) do
                        if obj and obj:get_luaentity() and obj:get_luaentity().name == "xdecor:f_item" then
@@ -53,7 +52,6 @@ facedir[3] = {x=-1, y=0, z=0}
 local update_item = function(pos, node)
        remove_item(pos, node)
        local meta = minetest.get_meta(pos)
-
        if meta:get_string("item") ~= "" then
                local posad = facedir[node.param2]
                if not posad then return end
@@ -62,7 +60,6 @@ local update_item = function(pos, node)
                pos.z = pos.z + posad.z*6.5/16
                tmp.nodename = node.name
                tmp.texture = ItemStack(meta:get_string("item")):get_name()
-
                local e = minetest.add_entity(pos, "xdecor:f_item")
                local yaw = math.pi*2 - node.param2 * math.pi/2
                e:setyaw(yaw)
@@ -79,12 +76,9 @@ local drop_item = function(pos, node)
 end
 
 xdecor.register("frame", {
-       description = "Item frame",
+       description = "Item frame", groups = {snappy=3}, on_rotate = screwdriver.disallow,
        node_box = { type = "fixed", fixed = {-0.5, -0.5, 7/16, 0.5, 0.5, 0.5} },
-       tiles = {"xdecor_frame.png"},
-       inventory_image = "xdecor_frame.png",
-       groups = {snappy=3},
-       on_rotate = screwdriver.disallow,
+       tiles = {"xdecor_frame.png"}, inventory_image = "xdecor_frame.png",
        after_place_node = function(pos, placer, itemstack)
                local meta = minetest.get_meta(pos)
                meta:set_string("owner", placer:get_player_name())
@@ -111,13 +105,11 @@ xdecor.register("frame", {
                local meta = minetest.get_meta(pos)
                return player:get_player_name() == meta:get_string("owner")
        end,
-       after_destruct = remove_item,
+       after_destruct = remove_item
 })
 
 minetest.register_abm({
-       nodenames = {"xdecor:frame"},
-       interval = 15,
-       chance = 1,
+       nodenames = {"xdecor:frame"}, interval = 15, chance = 1,
        action = function(pos, node, active_object_count, active_object_count_wider)
                if #minetest.get_objects_inside_radius(pos, 0.5) > 0 then return end
                update_item(pos, node)
index 534423038f037f7af56fed805a6917c13a316597..ae1d9ea1206ab2ac19f0ab17ab00c2dc0af8b41a 100644 (file)
--- a/nodes.lua
+++ b/nodes.lua
@@ -1,15 +1,15 @@
 xdecor.register("barrel", {
-       description = "Barrel", infotext = "Barrel", inventory = {size=24},
+       description = "Barrel", inventory = {size=24},
        tiles = {"xdecor_barrel_top.png", "xdecor_barrel_sides.png"},
        groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
 
 xdecor.register("cabinet", {
-       description = "Cabinet", infotext = "Cabinet", inventory = {size=24},
+       description = "Cabinet", inventory = {size=24},
        tiles = {"default_wood.png", "xdecor_cabinet_front.png"},
        groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
 
 xdecor.register("cabinet_half", {
-       description = "Cabinet half", infotext = "Cabinet (half)", inventory = {size=8},
+       description = "Half Cabinet", inventory = {size=8},
        tiles = {"default_wood.png", "xdecor_cabinet_half_front.png"},
        groups = {snappy=3}, sounds = default.node_sound_wood_defaults(),
        node_box = {type="fixed", fixed={{-0.5, 0, -0.5, 0.5, 0.5, 0.5}}} })
@@ -26,7 +26,7 @@ xdecor.register("candle", {
                wall_side={-0.5, -0.35, -0.15, -0.15, 0.4, 0.15}} })
 
 xdecor.register("cardboard_box", {
-       description = "Cardboard box", groups = {snappy=3}, inventory = {size=8},
+       description = "Cardboard Box", groups = {snappy=3}, inventory = {size=8},
        tiles = {"xdecor_cardbox_top.png", "xdecor_cardbox_top.png", "xdecor_cardbox_sides.png"},
        node_box = {type="fixed", fixed={{-0.3125, -0.5, -0.3125, 0.3125, 0, 0.3125}}} })
 
@@ -43,10 +43,10 @@ xdecor.register("chair", {
                {0.1875, -0.5, -0.3125, 0.3125, -0.125, -0.1875}, {-0.3125, -0.125, -0.3125, 0.3125, 0, 0.1875}}} })
 
 xdecor.register("coalstone_tile", {
-       description = "Coalstone tile", tiles = {"xdecor_coalstone_tile.png"},
+       description = "Coalstone Tile", tiles = {"xdecor_coalstone_tile.png"},
        groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
 
-local curtaincolors = { {"red", "#ad2323e0:175"} }
+local curtaincolors = { {"red", "#ad2323e0:175"} } -- add more curtains simply here
 for c in ipairs(curtaincolors) do
 local color = curtaincolors[c][1]
 local hue = curtaincolors[c][2]
@@ -85,22 +85,19 @@ xdecor.register("cushion", {
        groups = {snappy=3}, on_place = minetest.rotate_node,
        node_box = {type="fixed", fixed={{-0.5, -0.5, -0.5, 0.5, 0, 0.5}}} })
 
-fencematerial = {"brass", "wrought_iron"}
-for _, m in ipairs(fencematerial) do
-xdecor.register("fence_"..m, {
-       description = "Fence ("..m..")", drawtype = "fencelike", tiles = {"xdecor_"..m..".png"},
-       inventory_image = "default_fence_overlay.png^xdecor_"..m..".png^default_fence_overlay.png^[makealpha:255,126,126",
-       groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
-end
+xdecor.register("fence_wrought_iron", {
+       description = "Wrought Iron Fence", drawtype = "fencelike", tiles = {"default_stone.png^[colorize:#2a2420:180"},
+       inventory_image = "default_fence_overlay.png^default_stone.png^[colorize:#2a2420:160^default_fence_overlay.png^[makealpha:255,126,126",
+       groups = {snappy=3} })
 
 xdecor.register("fire", {
-       description = "Fake fire", light_source = 14, walkable = false,
+       description = "Fake Fire", light_source = 14, walkable = false,
        tiles = {{name="xdecor_fire_anim.png", animation={type="vertical_frames", length=1.5}}},
        drawtype = "plantlike", damage_per_second = 2, drop = "",
        groups = {dig_immediate=3, not_in_creative_inventory=1} })
 
 minetest.register_tool("xdecor:flint_steel", {
-       description = "Flint and steel", stack_max = 1, inventory_image = "xdecor_flint_steel.png",
+       description = "Flint & Steel", stack_max = 1, inventory_image = "xdecor_flint_steel.png",
        tool_capabilities = {groupcaps={flamable={uses=65, maxlevel=1}}},
        on_use = function(itemstack, user, pointed_thing)
                if pointed_thing.type == "node" and minetest.get_node(pointed_thing.above).name == "air" then
@@ -116,7 +113,7 @@ minetest.register_tool("xdecor:flint_steel", {
 flowerstype = {"dandelion_white", "dandelion_yellow", "geranium", "rose", "tulip", "viola"}
 for _, f in ipairs(flowerstype) do
 xdecor.register("potted_"..f, {
-       description = "Potted flowers ("..f..")", walkable = false,
+       description = "Potted Flowers ("..f..")", walkable = false,
        tiles = {"xdecor_"..f.."_pot.png"}, inventory_image = "xdecor_"..f.."_pot.png",
        drawtype = "plantlike", groups = {dig_immediate=3}, sounds = default.node_sound_leaves_defaults() })
 
@@ -132,7 +129,7 @@ xdecor.register("painting", {
        groups = {dig_immediate=3, attached_node=1}, sounds = default.node_sound_wood_defaults() })
 
 xdecor.register("plant_pot", {
-       description = "Plant pot", groups = {snappy=3},
+       description = "Plant Pot", groups = {snappy=3},
        tiles = {"xdecor_plant_pot_top.png", "xdecor_plant_pot_sides.png"} })
 
 xdecor.register("moonbrick", {
@@ -140,13 +137,13 @@ xdecor.register("moonbrick", {
        groups = {snappy=3}, sounds = default.node_sound_stone_defaults() })
 
 xdecor.register("multishelf", {
-       description = "Multishelf", infotext = "Multishelf", inventory = {size=24},
+       description = "Multishelf", inventory = {size=24},
        tiles = {"default_wood.png", "xdecor_multishelf.png"},
        groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
 
 local rope_sbox = {type="fixed", fixed={-0.15, -0.5, -0.15, 0.15, 0.5, 0.15}}
 xdecor.register("rope", {
-       description = "Hanging rope", walkable = false, climbable = true,
+       description = "Rope", walkable = false, climbable = true,
        tiles = {"xdecor_rope.png"}, inventory_image = "xdecor_rope_inv.png",
        drawtype = "plantlike", groups = {dig_immediate=3}, selection_box = rope_sbox })
 
@@ -158,17 +155,17 @@ xdecor.register("table", {
 
 xdecor.register("tv", {
        description = "Television", light_source = 11, groups = {snappy=3},
-       tiles = {"xdecor_television_top.png", "xdecor_television_left.png^[transformR90",
+       tiles = {"xdecor_television_left.png^[transformR270", "xdecor_television_left.png^[transformR90",
                "xdecor_television_left.png^[transformFX", "xdecor_television_left.png",
                "xdecor_television_back.png", {name="xdecor_television_front_animated.png",
                animation = {type="vertical_frames", length=80.0}}} })
 
 xdecor.register("wood_tile", {
-       description = "Wood tile", tiles = {"xdecor_wood_tile.png"},
+       description = "Wood Tile", tiles = {"xdecor_wood_tile.png"},
        groups = {snappy=3}, sounds = default.node_sound_wood_defaults() })
 
 xdecor.register("workbench", {
-       description = "Work table", infotext = "Work bench", inventory = {size=24},
+       description = "Work Bench", inventory = {size=24},
        groups = {snappy=3}, sounds = default.node_sound_wood_defaults(),
        tiles = {"xdecor_workbench_top.png", "xdecor_workbench_top.png",
                "xdecor_workbench_sides.png", "xdecor_workbench_sides.png",
diff --git a/textures/xdecor_brass.png b/textures/xdecor_brass.png
deleted file mode 100644 (file)
index 822d49e..0000000
Binary files a/textures/xdecor_brass.png and /dev/null differ
diff --git a/textures/xdecor_brass_ingot.png b/textures/xdecor_brass_ingot.png
deleted file mode 100644 (file)
index d6761c9..0000000
Binary files a/textures/xdecor_brass_ingot.png and /dev/null differ
diff --git a/textures/xdecor_television_top.png b/textures/xdecor_television_top.png
deleted file mode 100644 (file)
index 28d9fda..0000000
Binary files a/textures/xdecor_television_top.png and /dev/null differ
diff --git a/textures/xdecor_wrought_iron.png b/textures/xdecor_wrought_iron.png
deleted file mode 100644 (file)
index 8a58948..0000000
Binary files a/textures/xdecor_wrought_iron.png and /dev/null differ