From 8e7b71c96ce3159fc605363e5b133e147df8c48f Mon Sep 17 00:00:00 2001 From: kilbith Date: Wed, 10 Jun 2015 14:43:14 +0200 Subject: [PATCH] more tweaking --- crafts.lua | 197 +++++++++-------------------- depends.txt | 1 - itemframes.lua | 20 +-- nodes.lua | 41 +++--- textures/xdecor_brass.png | Bin 199 -> 0 bytes textures/xdecor_brass_ingot.png | Bin 242 -> 0 bytes textures/xdecor_television_top.png | Bin 120 -> 0 bytes textures/xdecor_wrought_iron.png | Bin 192 -> 0 bytes 8 files changed, 87 insertions(+), 172 deletions(-) delete mode 100644 textures/xdecor_brass.png delete mode 100644 textures/xdecor_brass_ingot.png delete mode 100644 textures/xdecor_television_top.png delete mode 100644 textures/xdecor_wrought_iron.png diff --git a/crafts.lua b/crafts.lua index 7430491..192dbea 100644 --- a/crafts.lua +++ b/crafts.lua @@ -1,150 +1,77 @@ -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: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_craftitem("xdecor:brass_ingot", { - description = "Brass ingot", inventory_image = "xdecor_brass_ingot.png" }) +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({ - 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", - 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:cabinet_half 2", recipe = {{"xdecor:cabinet"}} }) +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({ - type = "shapeless", output = "xdecor:candle", recipe = {"default:torch"} }) +minetest.register_craft({ output = "xdecor:chair", recipe = { + {"group:stick", "", ""}, + {"group:stick", "group:stick", "group:stick"}, + {"group:stick", "", "group:stick"} } }) -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:coalstone_tile 8", recipe = { + {"default:coalblock", "default:stone"}, + {"default:stone", "default:coalblock"} } }) -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: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:chair", - recipe = { - {"group:stick", "", ""}, - {"group:stick", "group:stick", "group:stick"}, - {"group:stick", "", "group:stick"} - } }) +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:coalstone_tile 8", - recipe = { - {"default:coalblock", "default:stone"}, - {"default:stone", "default:coalblock"} - } }) +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:cushion 2", recipe = {{"wool:red", "wool:red", "wool:red"}} }) +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: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:rope 2", recipe = { + {"farming:string"}, + {"farming:string"}, + {"farming:string"} } }) -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:table", recipe = { + {"stairs:slab_wood", "stairs:slab_wood", "stairs:slab_wood"}, + {"", "group:stick", ""}, + {"", "group:stick", ""} } }) -minetest.register_craft({ - type = "shapeless", output = "xdecor:flint_steel", - recipe = {"default:obsidian_shard", "default:steel_ingot"} }) +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: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: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({ - 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:wood_tile 2", recipe = { + {"group:wood", "group:wood"}, + {"group:wood", "group:wood"} } }) diff --git a/depends.txt b/depends.txt index d0592c1..41bb35a 100644 --- a/depends.txt +++ b/depends.txt @@ -1,3 +1,2 @@ default moreblocks? -moreores? diff --git a/itemframes.lua b/itemframes.lua index adcbc97..6b7b137 100644 --- a/itemframes.lua +++ b/itemframes.lua @@ -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) diff --git a/nodes.lua b/nodes.lua index 5344230..ae1d9ea 100644 --- 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 index 822d49ef14b723ff1a5a5cd8f26ed53a008b742b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 199 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPHF3h)VWy}Tj*{L;Xavz(sYSn~Mt z%tz;^+&$KK>pH9!k5uPrNAsp9r&l>U`P!M5z zn4F|)@#2Ooufz&Yo|5D2VqJ`GDj|XK@&CSh>$$(JJfj@9rC^=;T~^1V3DPE?D(YTv wFg5k4PkYq4ltZkkGvRT9W>bqo(3bxU>Zi1Q+2Y=B0ouXf>FVdQ&MBb@0N)KwMgRZ+ diff --git a/textures/xdecor_brass_ingot.png b/textures/xdecor_brass_ingot.png deleted file mode 100644 index d6761c9bbafc329265ece9ed26e08aa45d9d250c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 242 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbL!eSlAhE0CU%C$qRxerCSxw0xP# zS<;`MAANRl&bd|5N2jSjIM(&y-qyQ^nlEllzP_vU#A2@leahcHTzhq8*@<~pKwamG z{we{DU?~am3uc%#YpxsnwW~mWoTrOph{WZ&Cp?836nI!K>Z`RFaPWP%Up?j6qC1h_ z-kI)uKI86ePrkC|i|bd5CnbNgy%?6k))N@2@~&rQQ1D6d=|UV+wol12y~M(`P+!+A nVbQ*%jIV0*Qf0c&)>|?1KW1LGzIjR?&?W{?S3j3^P6mdKI;Vst02-VgPXGV_ diff --git a/textures/xdecor_wrought_iron.png b/textures/xdecor_wrought_iron.png deleted file mode 100644 index 8a589482454b3a78412de990c6f6dbf9fd876ba3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 192 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPGa4)6(a)lyL~(NT9WGq5(&akViE z^Yid_vz#j2^JSF9BLJl nirR6($(dU}N@B}}3%?kJj)*RFbU(EWXcvR0tDnm{r-UW|wHZPF