diff options
Diffstat (limited to 'castle_tapestries')
-rw-r--r-- | castle_tapestries/init.lua | 103 |
1 files changed, 68 insertions, 35 deletions
diff --git a/castle_tapestries/init.lua b/castle_tapestries/init.lua index c4e5983..8d703d6 100644 --- a/castle_tapestries/init.lua +++ b/castle_tapestries/init.lua @@ -69,27 +69,14 @@ minetest.register_node("castle_tapestries:tapestry", { paramtype = "light", paramtype2 = "colorwallmounted", palette = "unifieddyes_palette_colorwallmounted.png", - walkable = false, selection_box = { type = "wallmounted", wall_side = {-0.5,-0.5,0.4375,0.5,1.5,0.5}, }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) - unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) - end, - after_dig_node = unifieddyes.after_dig_node, + after_place_node = unifieddyes.fix_rotation_nsew, on_rotate = unifieddyes.fix_after_screwdriver_nsew }) --- Crafting from wool and a stick - -minetest.register_craft({ - type = "shapeless", - output = 'castle_tapestries:tapestry', - recipe = {'wool:white', 'default:stick'}, -}) - -- Long tapestry minetest.register_node("castle_tapestries:tapestry_long", { @@ -103,27 +90,14 @@ minetest.register_node("castle_tapestries:tapestry_long", { paramtype = "light", paramtype2 = "colorwallmounted", palette = "unifieddyes_palette_colorwallmounted.png", - walkable = false, selection_box = { type = "wallmounted", wall_side = {-0.5,-0.5,0.4375,0.5,2.5,0.5}, }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) - unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) - end, - after_dig_node = unifieddyes.after_dig_node, + after_place_node = unifieddyes.fix_rotation_nsew, on_rotate = unifieddyes.fix_after_screwdriver_nsew }) --- Crafting from normal tapestry and wool - -minetest.register_craft({ - type = "shapeless", - output = 'castle_tapestries:tapestry_long', - recipe = {'wool:white', 'castle_tapestries:tapestry'}, -}) - -- Very long tapestry minetest.register_node("castle_tapestries:tapestry_very_long", { @@ -137,20 +111,39 @@ minetest.register_node("castle_tapestries:tapestry_very_long", { paramtype = "light", paramtype2 = "colorwallmounted", palette = "unifieddyes_palette_colorwallmounted.png", - walkable = false, selection_box = { type = "wallmounted", wall_side = {-0.5,-0.5,0.4375,0.5,3.5,0.5}, }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - unifieddyes.fix_rotation_nsew(pos, placer, itemstack, pointed_thing) - unifieddyes.recolor_on_place(pos, placer, itemstack, pointed_thing) - end, - after_dig_node = unifieddyes.after_dig_node, + after_place_node = unifieddyes.fix_rotation_nsew, on_rotate = unifieddyes.fix_after_screwdriver_nsew }) --- Crafting from long tapestry and wool +-- Crafting + +minetest.register_craft({ + type = "shapeless", + output = 'castle_tapestries:tapestry', + recipe = {'wool:white', 'default:stick'}, +}) + +minetest.register_craft({ + type = "shapeless", + output = 'castle_tapestries:tapestry', + recipe = {'cottages:wool', 'default:stick'}, +}) + +minetest.register_craft({ + type = "shapeless", + output = 'castle_tapestries:tapestry_long', + recipe = {'wool:white', 'castle_tapestries:tapestry'}, +}) + +minetest.register_craft({ + type = "shapeless", + output = 'castle_tapestries:tapestry_long', + recipe = {'cottages:wool', 'castle_tapestries:tapestry'}, +}) minetest.register_craft({ type = "shapeless", @@ -158,6 +151,46 @@ minetest.register_craft({ recipe = {'wool:white', 'castle_tapestries:tapestry_long'}, }) +minetest.register_craft({ + type = "shapeless", + output = 'castle_tapestries:tapestry_very_long', + recipe = {'cottages:wool', 'castle_tapestries:tapestry_long'}, +}) + + +unifieddyes.register_color_craft({ + output = "castle_tapestries:tapestry", + palette = "wallmounted", + type = "shapeless", + neutral_node = "castle_tapestries:tapestry", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE", + } +}) + +unifieddyes.register_color_craft({ + output = "castle_tapestries:tapestry_long", + palette = "wallmounted", + type = "shapeless", + neutral_node = "castle_tapestries:tapestry_long", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE", + } +}) + +unifieddyes.register_color_craft({ + output = "castle_tapestries:tapestry_very_long", + palette = "wallmounted", + type = "shapeless", + neutral_node = "castle_tapestries:tapestry_very_long", + recipe = { + "NEUTRAL_NODE", + "MAIN_DYE", + } +}) + -- Convert static tapestries to param2 color local old_static_tapestries = {} |