diff --git a/mod_files/crafts.lua b/mod_files/crafts.lua new file mode 100644 index 0000000..f47c417 --- /dev/null +++ b/mod_files/crafts.lua @@ -0,0 +1,183 @@ +-- =============== -- +-- christmas nodes -- +-- =============== -- + +-- decorations -- + +minetest.register_craft({ + output = "christmas_craft:christmas_lights 4", + recipe = { + {"farming:string","default:mese_crystal", "farming:string"}, + {"default:glass","default:glass", "default:glass"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:christmas_wall_lights 4", + recipe = { + {"","default:mese_crystal", ""}, + {"default:glass","default:glass", "default:glass"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:christmas_leaves 4", + recipe = { + {"default:leaves","default:leaves"}, + {"default:leaves","default:leaves"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:christmas_star ", + recipe = { + {"","default:gold_ingot",""}, + {"default:gold_ingot","default:gold_ingot","default:gold_ingot"}, + {"default:gold_ingot","","default:gold_ingot"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:christmas_wreath ", + recipe = { + {"christmas_craft:christmas_leaves","christmas_craft:christmas_leaves","christmas_craft:christmas_leaves"}, + {"christmas_craft:christmas_leaves","","christmas_craft:christmas_leaves"}, + {"christmas_craft:christmas_leaves","christmas_craft:red_ribbon","christmas_craft:christmas_leaves"}, + } +}) + +-- snow node -- + +minetest.register_craft({ + output = "christmas_craft:snow_slab 3", + recipe = { + {"default:snow","default:snow","default:snow"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:snow_steps 3", + recipe = { + {"default:snow","",""}, + {"default:snow","default:snow",""}, + {"default:snow","default:snow","default:snow"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:snow_steps_1 3", + recipe = { + {"christmas_craft:snow_steps","christmas_craft:snow_steps",""}, + {"christmas_craft:snow_steps","",""}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:snow_steps_2", + recipe = { + {"christmas_craft:snow_steps"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:snowman", + recipe = { + {"default:coal_lump","default:snow","default:coal_lump"}, + {"default:snow","christmas_craft:snowball","default:snow"}, + {"default:coal_lump","default:coal_lump","default:coal_lump"}, + } +}) + +-- food -- + +minetest.register_craft({ + output = "christmas_craft:ginger_mix", + recipe = { + {"christmas_craft:sugar","christmas_craft:sugar"}, + {"farming:flour","farming:flour"}, + } +}) + +minetest.register_craft({ + type = "cooking", + output = "christmas_craft:ginger_bread_man", + recipe = "christmas_craft:ginger_mix", +}) + +minetest.register_craft({ + output = "christmas_craft:christmas_pudding_mix", + recipe = { + {"christmas_craft:sugar","christmas_craft:sugar","christmas_craft:sugar"}, + {"default:apple","farming:flour","default:apple"}, + {"farming:flour","default:apple","farming:flour"}, + } +}) + +minetest.register_craft({ + type = "cooking", + output = "christmas_craft:christmas_pudding", + recipe = "christmas_craft:christmas_pudding_mix", +}) + +minetest.register_craft({ + type = "cooking", + output = "christmas_craft:sugar", + recipe = "group:flower", +}) + +-- candy cain + +minetest.register_craft({ + output = "christmas_craft:candy_cane", + recipe = { + {"","christmas_craft:sugar","christmas_craft:sugar"}, + {"","christmas_craft:sugar",""}, + {"christmas_craft:sugar","",""}, + } +}) + + +minetest.register_craft({ + output = "christmas_craft:candy_cane_node", + recipe = { + {"christmas_craft:candy_cane","christmas_craft:candy_cane","christmas_craft:candy_cane"}, + {"christmas_craft:candy_cane","","christmas_craft:candy_cane"}, + {"christmas_craft:candy_cane","christmas_craft:candy_cane","christmas_craft:candy_cane"}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:candy_cane_tree", + recipe = { + {"christmas_craft:candy_cane","christmas_craft:candy_cane","christmas_craft:candy_cane"}, + {"christmas_craft:candy_cane","group:tree","christmas_craft:candy_cane"}, + {"christmas_craft:candy_cane","christmas_craft:candy_cane","christmas_craft:candy_cane"}, + } +}) + +-- ribbon craft -- + +minetest.register_craft({ + type = "shapeless", + output = 'christmas_craft:red_ribbon', + recipe = {'dye:red','farming:string'}, +}) + +-- wish list craft -- + +minetest.register_craft({ + type = "shapeless", + output = 'christmas_craft:wish_list', + recipe = {'default:stick','default:mese_crystal','default:paper','dye:black'}, +}) + +-- present box -- + +minetest.register_craft({ + output = "christmas_craft:present_box", + recipe = { + {"default:paper","default:paper", "default:paper"}, + {"default:paper","christmas_craft:wish_list", "default:paper"}, + {"default:paper","default:paper", "default:paper"}, + } +}) diff --git a/mod_files/items.lua b/mod_files/items.lua new file mode 100644 index 0000000..1f9c807 --- /dev/null +++ b/mod_files/items.lua @@ -0,0 +1,47 @@ +minetest.register_craftitem("christmas_craft:red_ribbon", { +description = "Red Ribbon", +inventory_image = "christmas_craft_red_ribbon.png", +stack_max = 99, +liquids_pointable = false, +}) + +-- wish list -- + +minetest.register_craftitem("christmas_craft:wish_list", { +description = "Wish list", +inventory_image = "christmas_craft_which_list.png", +stack_max = 99, +liquids_pointable = false, +}) + +minetest.register_craftitem("christmas_craft:christmas_pudding_mix", { + description = "Christmas Pudding Mix", + inventory_image = "christmas_pud-mix.png", +}) + +minetest.register_craftitem("christmas_craft:ginger_mix", { + description = "Christmas Ginger Mix", + inventory_image = "christmas_ginger-mix.png", +}) + +minetest.register_craftitem("christmas_craft:sugar", { + description = "Christmas sugar", + inventory_image = "christmas_sugar.png", +}) + +minetest.register_node("christmas_craft:ginger_bread_man", { + description = "Ginger Bread Man", + drawtype = "signlike", + walkable = false, + tiles = + {name="ginger_bread_man.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + inventory_image = "ginger_bread_man.png", + wield_image = "ginger_bread_man.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, + on_use = minetest.item_eat(4), +}) diff --git a/mod_files/multi-node.lua b/mod_files/multi-node.lua new file mode 100644 index 0000000..426dacd --- /dev/null +++ b/mod_files/multi-node.lua @@ -0,0 +1,200 @@ +-- ===================== -- +-- Christmas Craft Nodes -- +-- ===================== -- + +print("scaffolding: Loading 'functions.lua'") + +-- ============ -- +-- Node Present -- +-- ============ -- + +-- Present boxs -- + +minetest.register_node("christmas_craft:present_box", { + description = "Present Box", + tiles = {"christmas_present_box.png"}, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +-- coloured Present -- + +local function register_present(name, description, colorCode, dye) + +minetest.register_node("christmas_craft:Christmas_present_"..name, { + description = description .." Christmas Present", + tiles = { + "christmas_present.png^[colorize:#" ..colorCode.. "^christmas_bow_top.png", + "christmas_present.png^[colorize:#" ..colorCode.. "^christmas_bow_bottom.png", + "christmas_present.png^[colorize:#" ..colorCode.. "^christmas_bow_side.png"}, + is_ground_content = true, + groups = {crumbly=3}, + drop = { + max_items = 1, min_items = 1, items = { + {items = {'default:bookshelf'}, rarity = 90,}, + {items = {'default:pick_mese'}, rarity = 80,}, + {items = {'default:shovel_steel'}, rarity = 90,}, + {items = {'default:axe_steel'}, rarity = 90,}, + {items = {'default:pick_steel'}, rarity = 90,}, + {items = {'default:sign_wall'}, rarity = 80,}, + {items = {'default:chest'}, rarity = 80,}, + {items = {'default:furnace'}, rarity = 80,}, + {items = {'default:steelblock'}, rarity = 80,}, + {items = {'default:coal_lump'}, rarity = 80,}, + {items = {'default:pick_diamond'}, rarity = 75,}, + {items = {'default:shovel_diamond'}, rarity = 75,}, + {items = {'default:axe_diamond'}, rarity = 75,}, + {items = {'default:diamondblock'}, rarity = 75}, + {items = {'fake_fire:flint_and_steel'}, rarity = 90,}, + {items = {'default:chest_locked'}, rarity = 80,}, + {items = {'default:brick'}, rarity = 80,}, + {items = {'default:dirt_with_grass'}, rarity = 80,}, + }}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_grass_footstep", gain=0.4}, + }), +}) + +minetest.register_craft({ + output = "christmas_craft:christmas_present"..name , + recipe = { + {"christmas_craft:paper_".. name,"christmas_craft:red_ribbon", "christmas_craft:paper_".. name}, + {"christmas_craft:paper_".. name,"christmas_craft:present_box", "christmas_craft:paper_".. name}, + {"christmas_craft:paper_".. name,"christmas_craft:red_ribbon", "christmas_craft:paper_".. name}, + } +}) + +end + +-- ============ -- +-- Node Baubles -- +-- ============ -- + +-- Glass Baunles -- + +minetest.register_node("christmas_craft:glass_bauble",{ + description = "Bauble", + drawtype = "nodebox", + tiles = { + "christmas_baubles-top.png^christmas_baubles_top.png", + "christmas_baubles-top.png^christmas_baubles_side.png", + "christmas_baubles-side.png^christmas_baubles_side.png", + }, + is_ground_content = true, + paramtype = "light", + use_texture_alpha = true, + groups = {crumbly=3}, + sounds = default.node_sound_glass_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1 + {-0.25, -0.0625, -0.25, 0.25, 0.4375, 0.25}, -- NodeBox2 + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.0625, 0, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1 + {-0.25, -0.0625, -0.25, 0.25, 0.4375, 0.25}, -- NodeBox2 + }, + }, +}) + +minetest.register_craft({ + output = "christmas_craft:glass_bauble 8", + recipe = { + {"default:glass","default:gold_ingot", "default:glass"}, + {"default:glass","", "default:glass"}, + {"default:glass","default:glass", "default:glass"}, + } +}) + +-- Colour Baunles -- + +local function register_baubles(name, description, colorCode, dye) + + minetest.register_node("christmas_craft:" .. name .. "_baubles",{ + description = description.. " Baubles", + drawtype = "nodebox", + tiles = { + "christmas_baubles.png^[colorize:#" ..colorCode.. "^christmas_baubles_top.png", + "christmas_baubles.png^[colorize:#" ..colorCode.. "^christmas_baubles_side.png", + "christmas_baubles.png^[colorize:#" ..colorCode.. "^christmas_baubles_side.png", + }, + is_ground_content = true, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_glass_defaults(), + node_box = { + type = "fixed", + fixed = { + {-0.0625, 0.375, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1 + {-0.25, -0.0625, -0.25, 0.25, 0.4375, 0.25}, -- NodeBox2 + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.0625, 0, -0.0625, 0.0625, 0.5, 0.0625}, -- NodeBox1 + {-0.25, -0.0625, -0.25, 0.25, 0.4375, 0.25}, -- NodeBox2 + }, + }, + }) + + minetest.register_craft({ + output = "christmas_craft:" .. name .. "_baubles 8", + recipe = { + {"default:glass","default:gold_ingot", "default:glass"}, + {"default:glass","dye:"..dye, "default:glass"}, + {"default:glass","default:glass", "default:glass"}, + } + }) +end + +local function register_paper(name, description, colorCode, dye) + + minetest.register_craftitem("christmas_craft:paper_".. name, { + description = description .."paper", + inventory_image = "default_paper.png^[colorize:#" .. colorCode, + stack_max = 99, + liquids_pointable = false, + }) + + minetest.register_craft({ + type = "shapeless", + output = 'christmas_craft:paper_'.. name, + recipe = {'dye:'..dye,'default:paper'}, + }) + +end + +colours = { + -- RGB Prime Colours -- + {name="red", code="FF000099", description="Red", dye="red"}, + {name="green", code="00FF0099", description="Green", dye="green"}, + {name="blue", code="0000FF99", description="Blue", dye="blue"}, + -- RGB Secondary Colour -- + {name="yellow", code="FFFF0099", description="Yellow", dye="yellow"}, + {name="magenta", code="FF00FF99", description="Magenta", dye="magenta"}, + {name="cyan", code="00FFFF99", description="Cyan", dye="cyan"}, + -- RGB Other Colours -- + {name="orange", code="E5940099", description="Orange", dye="orange"}, + {name="darkgreen", code="004C0099", description="Dark Green", dye="dark_green"}, + {name="violet", code="80008099", description="Violet", dye="purple"}, + {name="pink", code="FFC0CB99", description="Pink", dye="pink"}, + {name="brown", code="732c0b99", description="Brown", dye="brown"}, + -- MonoChrome -- + {name="white", code="FFFFFF99", description="White", dye="white"}, + {name="grey", code="80808099", description="Grey", dye="grey"}, + {name="darkgrey", code="14141499", description="Dark Grey", dye="dark_grey"} +} + +for i,colour in ipairs(colours) do + register_present(colour.name, colour.description, colour.code, colour.dye) + register_baubles(colour.name, colour.description, colour.code, colour.dye) + register_paper(colour.name, colour.description, colour.code, colour.dye) + -- register whatever here +end diff --git a/mod_files/node.lua b/mod_files/node.lua new file mode 100644 index 0000000..2261057 --- /dev/null +++ b/mod_files/node.lua @@ -0,0 +1,361 @@ +-- ============== -- +-- legacy support -- +-- ============== -- + +minetest.register_alias("christmas_craft:snow_block", "default:snowblock") + +minetest.register_alias("christmas_craft:silver_baubles", "christmas_craft:white_baubles") + +minetest.register_alias("christmas_craft:Christmas_present", "christmas_craft:Christmas_present_white") + +-- ========== -- +-- misk nodes -- +-- ========== -- +minetest.register_node("christmas_craft:christmas_wreath", { + description = "Christmas Wreath", + drawtype = "signlike", + walkable = false, + tiles = { + {name="christmas_wreath.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "christmas_wreath.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, +}) + +minetest.register_node("christmas_craft:christmas_star", { + description = "christmas Star", + drawtype = "plantlike", + light_source = 10, + tiles = {"christmas_star.png"}, + is_ground_content = true, + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +minetest.register_node("christmas_craft:christmas_leaves", { + description = "Christmas leaves", + drawtype = "allfaces_optional", + tiles = {"christmas_leaves.png"}, + is_ground_content = false, + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + + +-- =========== -- +-- Snow Block -- +-- =========== -- + +-- snowman + +minetest.register_node("christmas_craft:snowman", { + description = "Snowman", + tiles = {"default_snow.png", "default_snow.png", "default_snow.png", + "default_snow.png", "default_snow.png", "Snowman_F.png"}, + is_ground_content = true, + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), +}) + +-- snow steps -- + +minetest.register_node("christmas_craft:snow_slab",{ + description = "Snow Slab", + drawtype = "nodebox", + tiles = {"default_snow.png"}, + is_ground_content = true, + walkable = false, + paramtype = "light", + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.15}, + dug = {name = "default_snow_footstep", gain = 0.2}, + dig = {name = "default_snow_footstep", gain = 0.2} + }), + drop = 'default:snow', + node_box = { + type = "fixed", + fixed = { + {-0.5, -1, -0.5, 0.5, -0.625, 0.5}, -- NodeBox2 + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -1, -0.5, 0.5, -0.4375, 0.5}, -- NodeBox2 + }, + }, +}) + +minetest.register_node("christmas_craft:snow_steps",{ + description = "Snow Stairs", + drawtype = "nodebox", + tiles = {"default_snow.png"}, + is_ground_content = true, + walkable = false, + paramtype = "light", + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.15}, + dug = {name = "default_snow_footstep", gain = 0.2}, + dig = {name = "default_snow_footstep", gain = 0.2} + }), + drop = 'default:snow 2', + node_box = { + type = "fixed", + fixed = { + {-0.5, -1, -0.5, 0.5, -0.625, 0}, -- NodeBox2 + {-0.5, -0.5, 0, 0.5, -0.125, 0.5}, -- NodeBox3 + } + }, +}) + +minetest.register_node("christmas_craft:snow_steps_1",{ + description = "Snow Stairs", + drawtype = "nodebox", + tiles = {"default_snow.png"}, + is_ground_content = true, + walkable = false, + paramtype = "light", + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.15}, + dug = {name = "default_snow_footstep", gain = 0.2}, + dig = {name = "default_snow_footstep", gain = 0.2} + }), + drop = 'default:snow 2', + node_box = { + type = "fixed", + fixed = { + {0, -1, -0.5, 0.5, -0.625, 0}, -- NodeBox2 + {-0.5, -0.5, 0, 0.5, -0.125, 0.5}, -- NodeBox3 + {-0.5, -0.5, -0.5, 0, -0.125, 0.0625}, -- NodeBox4 + } + }, +}) + +minetest.register_node("christmas_craft:snow_steps_2",{ + description = "Snow Stairs", + drawtype = "nodebox", + tiles = {"default_snow.png"}, + is_ground_content = true, + walkable = false, + paramtype = "light", + paramtype2 = "facedir", + groups = {crumbly=3}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.15}, + dug = {name = "default_snow_footstep", gain = 0.2}, + dig = {name = "default_snow_footstep", gain = 0.2} + }), + drop = 'default:snow 2', + node_box = { + type = "fixed", + fixed = { + {-0.5, -1, -0.5, 0.5, -0.625, 0}, -- NodeBox2 + {-0.5, -0.5, 0, 0, -0.125, 0.5}, -- NodeBox3 + {0, -1, 0, 0.5, -0.625, 0.5}, -- NodeBox5 + } + }, +}) + +minetest.register_node("christmas_craft:christmas_pudding", { + description = "Christmas Pudding", + tiles = { + "christmas_pud-top.png", + "christmas_pud-bot.png", + "christmas_pud-side.png", + }, + drawtype = "nodebox", + paramtype = "light", + groups = {crumbly=3}, + sounds = default.node_sound_sand_defaults(), + on_use = minetest.item_eat(8), + node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, -0.3125, 0.3125, 0.0625, 0.3125}, -- NodeBox2 + {-0.0625, 0.0625, 0, 0, 0.125, 0.0625}, -- NodeBox4 + {0, 0.0625, -0.0625, 0.0625, 0.125, 0}, -- NodeBox5 + } + } +}) + +local stocking_formspec = [[ +size[8,9] +list[context;main;0,0.3;8,4;] +list[current_player;main;0,4.85;8,1;] +list[current_player;main;0,6.08;8,3;8] +listring[context;main] +listring[current_player;main] +]] + +minetest.register_node("christmas_craft:stocking", { + description = "Christmas Stocking", + drawtype = "signlike", + walkable = false, + tiles = + {name="christmas_stocking.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + inventory_image = "christmas_stocking.png", + wield_image = "christmas_stocking.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, + on_construct = function(pos) + local meta = minetest.get_meta(pos) + meta:set_string("formspec", stocking_formspec ) + meta:set_string("infotext", "Christmas Stocking") + local inv = meta:get_inventory() + inv:set_size("main", 16) + end, + can_dig = function(pos,player) + local meta = minetest.get_meta(pos); + local inv = meta:get_inventory() + return inv:is_empty("main") + end, + on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) + minetest.log("action", player:get_player_name().. + " moves stuff in box at "..minetest.pos_to_string(pos)) + end, + on_metadata_inventory_put = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name().. + " moves stuff to box at "..minetest.pos_to_string(pos)) + end, + on_metadata_inventory_take = function(pos, listname, index, stack, player) + minetest.log("action", player:get_player_name().. + " takes stuff from box at "..minetest.pos_to_string(pos)) + end, +}) +-- lights -- + +minetest.register_node("christmas_craft:christmas_wall_lights", { + description = "christmas Wall lights", + drawtype = "signlike", + light_source = 10, + walkable = false, + tiles = { + {name="christmas_lights_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "christmas_lights.png", + wield_image = "christmas_lights.png", + paramtype = "light", + paramtype2 = "wallmounted", + selection_box = { + type = "wallmounted", + }, + groups = {oddly_breakable_by_hand = 3}, +}) + +minetest.register_node("christmas_craft:christmas_lights", { + description = "Christmas Lights", + tiles = { + {name="christmas_lights_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}}, + }, + inventory_image = "christmas_lights.png", + wield_image = "christmas_lights.png", + drawtype = "nodebox", + walkable = false, + light_source = 10, + paramtype = "light", + paramtype2 = "facedir", + groups = {crumbly=3}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.25, 0, 0.5, 0.5, 0}, -- NodeBox7 + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0.25, -0.125, 0.5, 0.5, 0.125}, -- NodeBox13 + }, + }, +}) + +-- candy cain -- +minetest.register_node("christmas_craft:candy_cane", { + description = "Candy Cane", + drawtype = "torchlike", + --tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"}, + tiles = {"christmas_candy_cain_stick_wall.png"}, + inventory_image = "christmas_candy_cain_stick.png", + wield_image = "christmas_candy_cain_stick.png", + paramtype = "light", + paramtype2 = "wallmounted", + sunlight_propagates = true, + walkable = false, + on_use = minetest.item_eat(1), + selection_box = { + type = "wallmounted", + wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1}, + }, + groups = {choppy=2,dig_immediate=3,flammable=1,stick=1}, + legacy_wallmounted = true, + sounds = default.node_sound_defaults(), +}) + +minetest.register_node("christmas_craft:candy_cane_node", { + description = "Giant Candy Cane", + tiles = {"christmas-candy_cabe.png",}, + is_ground_content = true, + paramtype2 = "facedir", + groups = { choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), +}) + +minetest.register_node("christmas_craft:candy_cane_tree", { + description = "Candy Cane Tree", + tiles = {"christmas-candy_cabe_top.png", "christmas-candy_cabe_top.png", + "christmas-candy_cabe.png"}, + paramtype2 = "facedir", + is_ground_content = false, + groups = { choppy = 2, oddly_breakable_by_hand = 1, flammable = 2}, + sounds = default.node_sound_wood_defaults(), + + on_place = minetest.rotate_node +}) + +minetest.register_node(":default:snow", { + description = "Snow", + tiles = {"default_snow.png"}, + inventory_image = "default_snowball.png", + wield_image = "default_snowball.png", + paramtype = "light", + buildable_to = true, + walkable = false, + floodable = true, + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}, + }, + }, + groups = {crumbly = 3, falling_node = 1, puts_out_fire = 1}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_snow_footstep", gain = 0.15}, + dug = {name = "default_snow_footstep", gain = 0.2}, + dig = {name = "default_snow_footstep", gain = 0.2} + }), + + on_construct = function(pos) + pos.y = pos.y - 1 + if minetest.get_node(pos).name == "default:dirt_with_grass" then + minetest.set_node(pos, {name = "default:dirt_with_snow"}) + end + end, +}) diff --git a/mod_support/mtfoods.lua b/mod_support/mtfoods.lua new file mode 100644 index 0000000..81b4b65 --- /dev/null +++ b/mod_support/mtfoods.lua @@ -0,0 +1,28 @@ + +minetest.register_craft({ + output = "christmas_craft:christmas_pudding_mix", + recipe = { + {"mtfoods:sugar","mtfoods:sugar","mtfoods:sugar"}, + {"default:apple","farming:flour","default:apple"}, + {"farming:flour","default:apple","farming:flour"}, + } +}) + +-- candy cain + +minetest.register_craft({ + output = "christmas_craft:candy_cane", + recipe = { + {"","mtfoods:sugar","mtfoods:sugar"}, + {"","mtfoods:sugar",""}, + {"mtfoods:sugar","",""}, + } +}) + +minetest.register_craft({ + output = "christmas_craft:ginger_mix", + recipe = { + {"mtfoods:sugar","mtfoods:sugar"}, + {"farming:flour","farming:flour"}, + } +}) diff --git a/textures/christmas-candy_cabe.png b/textures/christmas-candy_cabe.png new file mode 100644 index 0000000..6b1ba85 Binary files /dev/null and b/textures/christmas-candy_cabe.png differ diff --git a/textures/christmas-candy_cabe_top.png b/textures/christmas-candy_cabe_top.png new file mode 100644 index 0000000..46402e3 Binary files /dev/null and b/textures/christmas-candy_cabe_top.png differ diff --git a/textures/christmas_aspen_leaves.png b/textures/christmas_aspen_leaves.png new file mode 100644 index 0000000..7e8a576 Binary files /dev/null and b/textures/christmas_aspen_leaves.png differ diff --git a/textures/christmas_baubles-side.png b/textures/christmas_baubles-side.png new file mode 100644 index 0000000..1acc944 Binary files /dev/null and b/textures/christmas_baubles-side.png differ diff --git a/textures/christmas_baubles-top.png b/textures/christmas_baubles-top.png new file mode 100644 index 0000000..43793b2 Binary files /dev/null and b/textures/christmas_baubles-top.png differ diff --git a/textures/christmas_baubles.png b/textures/christmas_baubles.png new file mode 100644 index 0000000..b663fa9 Binary files /dev/null and b/textures/christmas_baubles.png differ diff --git a/textures/christmas_baubles_side.png b/textures/christmas_baubles_side.png new file mode 100644 index 0000000..5124cb2 Binary files /dev/null and b/textures/christmas_baubles_side.png differ diff --git a/textures/christmas_baubles_top.png b/textures/christmas_baubles_top.png new file mode 100644 index 0000000..db0a605 Binary files /dev/null and b/textures/christmas_baubles_top.png differ diff --git a/textures/christmas_bow_bottom.png b/textures/christmas_bow_bottom.png new file mode 100644 index 0000000..4d8247c Binary files /dev/null and b/textures/christmas_bow_bottom.png differ diff --git a/textures/christmas_bow_side.png b/textures/christmas_bow_side.png new file mode 100644 index 0000000..82ae351 Binary files /dev/null and b/textures/christmas_bow_side.png differ diff --git a/textures/christmas_bow_top.png b/textures/christmas_bow_top.png new file mode 100644 index 0000000..79db866 Binary files /dev/null and b/textures/christmas_bow_top.png differ diff --git a/textures/christmas_candy_cain_stick.png b/textures/christmas_candy_cain_stick.png new file mode 100644 index 0000000..ad86f23 Binary files /dev/null and b/textures/christmas_candy_cain_stick.png differ diff --git a/textures/christmas_candy_cain_stick_wall.png b/textures/christmas_candy_cain_stick_wall.png new file mode 100644 index 0000000..c82c450 Binary files /dev/null and b/textures/christmas_candy_cain_stick_wall.png differ diff --git a/textures/christmas_craft_pud-top.png b/textures/christmas_craft_pud-top.png new file mode 100644 index 0000000..d7613a5 Binary files /dev/null and b/textures/christmas_craft_pud-top.png differ diff --git a/textures/christmas_ginger-mix.png b/textures/christmas_ginger-mix.png new file mode 100644 index 0000000..cdff429 Binary files /dev/null and b/textures/christmas_ginger-mix.png differ diff --git a/textures/christmas_leaves_bot.png b/textures/christmas_leaves_bot.png new file mode 100644 index 0000000..47a7544 Binary files /dev/null and b/textures/christmas_leaves_bot.png differ diff --git a/textures/christmas_leaves_side.png b/textures/christmas_leaves_side.png new file mode 100644 index 0000000..821ca93 Binary files /dev/null and b/textures/christmas_leaves_side.png differ diff --git a/textures/christmas_lights.png b/textures/christmas_lights.png new file mode 100644 index 0000000..bcee076 Binary files /dev/null and b/textures/christmas_lights.png differ diff --git a/textures/christmas_lights_animated.png b/textures/christmas_lights_animated.png new file mode 100644 index 0000000..7143061 Binary files /dev/null and b/textures/christmas_lights_animated.png differ diff --git a/textures/christmas_present.png b/textures/christmas_present.png new file mode 100644 index 0000000..6b403f2 Binary files /dev/null and b/textures/christmas_present.png differ diff --git a/textures/christmas_present_box.png b/textures/christmas_present_box.png new file mode 100644 index 0000000..401b733 Binary files /dev/null and b/textures/christmas_present_box.png differ diff --git a/textures/christmas_pud-bot.png b/textures/christmas_pud-bot.png new file mode 100644 index 0000000..b93e49e Binary files /dev/null and b/textures/christmas_pud-bot.png differ diff --git a/textures/christmas_pud-mix.png b/textures/christmas_pud-mix.png new file mode 100644 index 0000000..9606d86 Binary files /dev/null and b/textures/christmas_pud-mix.png differ diff --git a/textures/christmas_pud-side.png b/textures/christmas_pud-side.png new file mode 100644 index 0000000..3e1d21f Binary files /dev/null and b/textures/christmas_pud-side.png differ diff --git a/textures/christmas_pud-top.png b/textures/christmas_pud-top.png new file mode 100644 index 0000000..ae544c7 Binary files /dev/null and b/textures/christmas_pud-top.png differ diff --git a/textures/christmas_star.png b/textures/christmas_star.png new file mode 100644 index 0000000..1eb5291 Binary files /dev/null and b/textures/christmas_star.png differ diff --git a/textures/christmas_stocking.png b/textures/christmas_stocking.png new file mode 100644 index 0000000..e486de7 Binary files /dev/null and b/textures/christmas_stocking.png differ diff --git a/textures/christmas_sugar.png b/textures/christmas_sugar.png new file mode 100644 index 0000000..8c1d9e4 Binary files /dev/null and b/textures/christmas_sugar.png differ diff --git a/textures/christmas_wreath.png b/textures/christmas_wreath.png new file mode 100644 index 0000000..6103e91 Binary files /dev/null and b/textures/christmas_wreath.png differ diff --git a/textures/farming_flour.png b/textures/farming_flour.png new file mode 100644 index 0000000..b1a9783 Binary files /dev/null and b/textures/farming_flour.png differ diff --git a/textures/ginger_bread_man.png b/textures/ginger_bread_man.png new file mode 100644 index 0000000..0c23cca Binary files /dev/null and b/textures/ginger_bread_man.png differ