Compare commits

6 Commits

117 changed files with 1112 additions and 1200 deletions

41
License.txt Normal file
View File

@ -0,0 +1,41 @@
CHRISTMAS CRAFT MOD FOR MINETEST
==================================
License
------------------------------------------
This work is licensed under a
Creative Commons Attribution-ShareAlike 4.0 International License.
Version 2, December 2013
------------------------------------------
YOU ARE FREE TO:
------------------------------------------
1. Share — copy and redistribute the material in any medium or format
2. Adapt — remix, transform, and build upon the material for any purpose, even commercially.
The licensor cannot revoke these freedoms as long as you follow the license terms.
UNDER THE FOLLOWING TERMS:
------------------------------------------
ATTRIBUTION
You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
SHARE ALIKE
If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
No additional restrictions — You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits.
OTHER INFOMATION:
------------------------------------------
More infomation can be found here;
https://creativecommons.org/licenses/by-sa/4.0/
This is a human-readable summary of (and not a substitute for) the license.
https://creativecommons.org/licenses/by-sa/4.0/legalcode

View File

@ -1,297 +0,0 @@
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_leaves 4",
recipe = {
{"default:leaves","default:leaves"},
{"default:leaves","default:leaves"},
}
})
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"},
}
})
--[[minetest.register_craft({
output = "christmas_craft:snow_block",
recipe = {
{"default:snow","default:snow","default:snow"},
{"default:snow","default:snow","default:snow"},
{"default:snow","default:snow","default:snow"},
}
})]]
minetest.register_craft({
output = "christmas_craft:snowman",
recipe = {
{"default:coal_lump","default:snow","default:coal_lump"},
{"default:snow","default:snow","default:snow"},
{"default:coal_lump","default:coal_lump","default:coal_lump"},
}
})
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 = "default:snow 9",
recipe = {
{"christmas_craft:snow_block"},
}
})]]
--------------------------
-- baubles -
--------------------------
minetest.register_craft({
output = "christmas_craft:red_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:red", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:yellow_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:yellow", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:green_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:green", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:blue_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:blue", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:orange_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:orange", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:pink_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:pink", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:violet_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","dye:violet", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
minetest.register_craft({
output = "christmas_craft:silver_baubles 8",
recipe = {
{"default:glass","default:gold_ingot", "default:glass"},
{"default:glass","", "default:glass"},
{"default:glass","default:glass", "default:glass"},
}
})
--------------------------
-- presents -
--------------------------
-- paper colour craft --
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_red',
recipe = {'dye:red','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_blue',
recipe = {'dye:blue','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_green',
recipe = {'dye:green','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_yellow',
recipe = {'dye:yellow','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_yellow',
recipe = {'dye:yellow','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_violet',
recipe = {'dye:violet','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_orange',
recipe = {'dye:orange','default:paper'},
})
minetest.register_craft({
type = "shapeless",
output = 'christmas_craft:paper_pink',
recipe = {'dye:pink','default:paper'},
})
-- 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 = {'group: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"},
}
})
-- present craft --
minetest.register_craft({
output = "christmas_craft:Christmas_present",
recipe = {
{"default:paper","christmas_craft:red_ribbon", "default:paper"},
{"default:paper","christmas_craft:present_box", "default:paper"},
{"default:paper","christmas_craft:red_ribbon", "default:paper"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_red",
recipe = {
{"christmas_craft:paper_red","christmas_craft:red_ribbon", "christmas_craft:paper_red"},
{"christmas_craft:paper_red","christmas_craft:present_box", "christmas_craft:paper_red"},
{"christmas_craft:paper_red","christmas_craft:red_ribbon", "christmas_craft:paper_red"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_blue",
recipe = {
{"christmas_craft:paper_blue","christmas_craft:red_ribbon", "christmas_craft:paper_blue"},
{"christmas_craft:paper_blue","christmas_craft:present_box", "christmas_craft:paper_blue"},
{"christmas_craft:paper_blue","christmas_craft:red_ribbon", "christmas_craft:paper_blue"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_green",
recipe = {
{"christmas_craft:paper_green","christmas_craft:red_ribbon", "christmas_craft:paper_green"},
{"christmas_craft:paper_green","christmas_craft:present_box", "christmas_craft:paper_green"},
{"christmas_craft:paper_green","christmas_craft:red_ribbon", "christmas_craft:paper_green"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_yellow",
recipe = {
{"christmas_craft:paper_yellow","christmas_craft:red_ribbon", "christmas_craft:paper_yellow"},
{"christmas_craft:paper_yellow","christmas_craft:present_box", "christmas_craft:paper_yellow"},
{"christmas_craft:paper_yellow","christmas_craft:red_ribbon", "christmas_craft:paper_yellow"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_orange",
recipe = {
{"christmas_craft:paper_orange","christmas_craft:red_ribbon", "christmas_craft:paper_orange"},
{"christmas_craft:paper_orange","christmas_craft:present_box", "christmas_craft:paper_orange"},
{"christmas_craft:paper_orange","christmas_craft:red_ribbon", "christmas_craft:paper_orange"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_pink",
recipe = {
{"christmas_craft:paper_pink","christmas_craft:red_ribbon", "christmas_craft:paper_pink"},
{"christmas_craft:paper_pink","christmas_craft:present_box", "christmas_craft:paper_pink"},
{"christmas_craft:paper_pink","christmas_craft:red_ribbon", "christmas_craft:paper_pink"},
}
})
minetest.register_craft({
output = "christmas_craft:Christmas_present_violet",
recipe = {
{"christmas_craft:paper_violet","christmas_craft:red_ribbon", "christmas_craft:paper_violet"},
{"christmas_craft:paper_violet","christmas_craft:present_box", "christmas_craft:paper_violet"},
{"christmas_craft:paper_violet","christmas_craft:red_ribbon", "christmas_craft:paper_violet"},
}
})

2
depends.txt Executable file → Normal file
View File

@ -1,3 +1 @@
default
youngtrees?
woodsoils?

762
init.lua Executable file → Normal file
View File

@ -1,709 +1,63 @@
--dofile(minetest.get_modpath("christmas_craft").."/mods.lua")--disabled because 4seasons is not installed
dofile(minetest.get_modpath("christmas_craft").."/crafts.lua") --temporary disabled because cristmas is over--
if minetest.setting_getbool("is_winter") then
dofile(minetest.get_modpath("christmas_craft").."/settings.lua") -- makes it snow
dofile(minetest.get_modpath("christmas_craft").."/mod_files/multi-node.lua")
dofile(minetest.get_modpath("christmas_craft").."/mod_files/node.lua")
dofile(minetest.get_modpath("christmas_craft").."/mod_files/items.lua")
--load configuration file from world folder
local MODPATH = minetest.get_modpath("christmas_craft")
local worldpath = minetest.get_worldpath()
local config = Settings(worldpath.."/christmas_craft.conf")
local conf_table = config:to_table()
--look into readme.md how to change settings
local defaults = {
enable_snowing = "true",
enable_crafts = "true",
}
--if not in conf file, create it.
for k, v in pairs(defaults) do
if conf_table[k] == nil then
config:set(k, v)
config:write();
end
end
-- blocks --
-- if mtfood is installed
if minetest.get_modpath("mtfoods") ~=nil then
minetest.log("info", "found mtfoods mod. execute mtfoods.lua")
dofile(MODPATH .."/mod_support/mtfoods.lua")--if the 4seasons mod is installed execute this file
end
minetest.register_node("christmas_craft:snowman", {
description = "Snowman",
tiles = {"snow.png", "snow.png", "snow.png",
"snow.png", "snow.png", "Snowman_F.png"},
is_ground_content = true,
paramtype2 = "facedir",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
})
--if snow enabled, let it snow
if config:get("enable_snowing") == "true" then
minetest.log("info","let it snow, let it snow, let it snow.")
dofile(MODPATH .."/snow.lua")--if snow enabled, execute this file
end
--if crafts enabled, register the craft recieps
if config:get("enable_crafts") == "true" then
minetest.log("info","registering craft rezieps for snow mod")
dofile(MODPATH .."/mod_files/crafts.lua")--if snow enabled, execute this file
end
minetest.register_node("christmas_craft:christmas_lights", {
description = "christmas lights",
drawtype = "signlike",
light_source = 10,
walkable = false,
tiles = {
{name="lights_animated.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}},
},
inventory_image = "c_lights.png",
wield_image = "c_lights.png",
paramtype = "light",
paramtype2 = "wallmounted",
selection_box = {
type = "wallmounted",
},
groups = {oddly_breakable_by_hand = 3},
})
--overwrite the default stick
minetest.register_node("christmas_craft:christmas_wreath", {
description = "Christmas Wreath",
drawtype = "signlike",
walkable = false,
tiles = {
{name="Wreath.png", animation={type="vertical_frames", aspect_w=32, aspect_h=32, length=3.0}},
},
inventory_image = "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 = {"star.png"},
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
})
--[[minetest.register_node("christmas_craft:snow_block", {
description = "snow block",
tiles = {"snow.png"},
is_ground_content = true,
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
})]]
minetest.register_alias("christmas_craft:snow_block", "default:snowblock")
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(),
})
minetest.register_node("christmas_craft:red_baubles", {
description = "Red Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_re.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_re.png","christmas_craft_baubles_side_re.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:yellow_baubles", {
description = "Yellow Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_ye.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_ye.png","christmas_craft_baubles_side_ye.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:green_baubles", {
description = "Green Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_gr.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_gr.png","christmas_craft_baubles_side_gr.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:blue_baubles", {
description = "Blue Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_bl.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_bl.png","christmas_craft_baubles_side_bl.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:orange_baubles", {
description = "Orange Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_or.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_or.png","christmas_craft_baubles_side_or.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:violet_baubles", {
description = "Violet Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_vi.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_vi.png","christmas_craft_baubles_side_vi.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:pink_baubles", {
description = "Pink Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_pi.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_pi.png","christmas_craft_baubles_side_pi.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
minetest.register_node("christmas_craft:silver_baubles", {
description = "Silver Baubles",
drawtype = "nodebox",
tiles = {"christmas_craft_baubles_top_si.png^christmas_craft_baubles_top.png","christmas_craft_baubles_top_si.png","christmas_craft_baubles_side_si.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
-- side , top , side , side , bottom, side,
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.25, 0.438, -0.25, 0.25, -0.05, 0.25},
{-0.08, 0.5, -0.08, 0.08, -0.0, 0.08},
},
},
})
------------
--nodes--
-- presents --
minetest.register_node("christmas_craft:present_box", {
description = "Present Box",
tiles = {"christmas_craft_present_box.png"},
is_ground_content = true,
paramtype = "light",
groups = {crumbly=3},
sounds = default.node_sound_sand_defaults(),
})
minetest.register_node("christmas_craft:Christmas_present", {
description = "Christmas Present",
tiles = {"christmas_craft_present_wh.png^christmas_craft_bow_top.png", "christmas_craft_present_wh.png^christmas_craft_bow_bottom.png", "christmas_craft_present_wh.png^christmas_craft_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 = {'fire:flint_and_steel'}, rarity = 90,},
{items = {'default:chest_locked'}, rarity = 80,},
{items = {'default:brick'}, rarity = 80,},
{items = {'default:dirt_with_grass'}, rarity = 80,},
{items = {'christmas_craft:Christmas_present'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_green", {
description = "Christmas Present Green ",
tiles = {"christmas_craft_present_gr.png^christmas_craft_bow_top.png", "christmas_craft_present_gr.png^christmas_craft_bow_bottom.png", "christmas_craft_present_gr.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_green'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_red", {
description = "Christmas Present Red ",
tiles = {"christmas_craft_present_re.png^christmas_craft_bow_top.png", "christmas_craft_present_re.png^christmas_craft_bow_bottom.png", "christmas_craft_present_re.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_red'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_blue", {
description = "Christmas Present Blue ",
tiles = {"christmas_craft_present_bl.png^christmas_craft_bow_top.png", "christmas_craft_present_bl.png^christmas_craft_bow_bottom.png", "christmas_craft_present_bl.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_blue'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_yellow", {
description = "Christmas Present Yellow ",
tiles = {"christmas_craft_present_ye.png^christmas_craft_bow_top.png", "christmas_craft_present_ye.png^christmas_craft_bow_bottom.png", "christmas_craft_present_ye.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_yellow'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_red", {
description = "Christmas Present Red ",
tiles = {"christmas_craft_present_re.png^christmas_craft_bow_top.png", "christmas_craft_present_re.png^christmas_craft_bow_bottom.png", "christmas_craft_present_re.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_red'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_violet", {
description = "Christmas Present Violet ",
tiles = {"christmas_craft_present_vi.png^christmas_craft_bow_top.png", "christmas_craft_present_vi.png^christmas_craft_bow_bottom.png", "christmas_craft_present_vi.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_violet'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_orange", {
description = "Christmas Present Orange ",
tiles = {"christmas_craft_present_or.png^christmas_craft_bow_top.png", "christmas_craft_present_or.png^christmas_craft_bow_bottom.png", "christmas_craft_present_or.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_orange'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node("christmas_craft:Christmas_present_pink", {
description = "Christmas Present Pink ",
tiles = {"christmas_craft_present_pi.png^christmas_craft_bow_top.png", "christmas_craft_present_pi.png^christmas_craft_bow_bottom.png", "christmas_craft_present_pi.png^christmas_craft_bow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:bookshelf'}, rarity = 15,},
{items = {'default:pick_mese'}, rarity = 20,},
{items = {'default:shovel_steel'}, rarity = 15,},
{items = {'default:axe_steel'}, rarity = 15,},
{items = {'default:pick_steel'}, rarity = 15,},
{items = {'default:sign_wall'}, rarity = 20,},
{items = {'default:chest'}, rarity = 20,},
{items = {'default:furnace'}, rarity = 20,},
{items = {'default:steelblock'}, rarity = 25,},
{items = {'default:coal_lump'}, rarity = 25,},
{items = {'default:pick_diamond'}, rarity = 30,},
{items = {'default:shovel_diamond'}, rarity = 30,},
{items = {'default:axe_diamond'}, rarity = 30,},
{items = {'default:diamondblock'}, rarity = 30,},
{items = {'fire:flint_and_steel'}, rarity = 15,},
{items = {'default:chest_locked'}, rarity = 20,},
{items = {'default:brick'}, rarity = 25,},
{items = {'default:dirt_with_grass'}, rarity = 30,},
{items = {'christmas_craft:Christmas_present_pink'}, rarity = 1,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
------------
------------
--Items--
-- paper --
minetest.register_craftitem("christmas_craft:paper_blue", {
description = "Blue paper",
inventory_image = "christmas_craft_paper_bl.png",
stack_max = 99,
liquids_pointable = false,
})
minetest.register_craftitem("christmas_craft:paper_yellow", {
description = "Yellow paper",
inventory_image = "christmas_craft_paper_ye.png",
stack_max = 99,
liquids_pointable = false,
})
minetest.register_craftitem("christmas_craft:paper_green", {
description = "Green paper",
inventory_image = "christmas_craft_paper_gr.png",
stack_max = 99,
liquids_pointable = false,
})
minetest.register_craftitem("christmas_craft:paper_red", {
description = "Red paper",
inventory_image = "christmas_craft_paper_re.png",
stack_max = 99,
liquids_pointable = false,
})
minetest.register_craftitem("christmas_craft:paper_violet", {
description = "Violet paper",
inventory_image = "christmas_craft_paper_vi.png",
stack_max = 99,
liquids_pointable = false,
})
minetest.register_craftitem("christmas_craft:paper_orange", {
description = "Orange paper",
inventory_image = "christmas_craft_paper_or.png",
stack_max = 99,
liquids_pointable = false,
})
minetest.register_craftitem("christmas_craft:paper_pink", {
description = "Pink paper",
inventory_image = "christmas_craft_paper_pi.png",
stack_max = 99,
liquids_pointable = false,
})
-- string --
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:snow_ball", {
-- description = "Snow ball",
-- inventory_image = "snow_ball.png",
-- stack_max = 16,
-- liquids_pointable = false,
--})
-- crafts --
--for craft see in craft.lua
-- override --
--minetest.registered_nodes["default:stick"].drawtype="torchlike";
--minetest.registered_nodes["default:stick"].selection_box = {
-- type = "wallmounted",
-- wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
-- }
--OMG pourquoi override le stick normal !!!
--[[minetest.register_node(":default:stick", {
minetest.register_node(":default:stick", {
description = "stick",
drawtype = "torchlike",
--tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"},
tiles = {"side_stick.png"},
inventory_image = "default_stick.png",
wield_image = "default_stick.png",
inventory_image = "side_stick.png",
wield_image = "side_stick.png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
@ -712,16 +66,11 @@ minetest.register_node("christmas_craft:silver_baubles", {
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},
groups = {choppy=2,dig_immediate=3,flammable=1,stick=1},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
})
--]]
-- complex node --
-- disable christmas_craft:snowball and make alias to default:snow
minetest.register_alias("christmas_craft:snowball", "default:snow")
--[[
snowball_DAMAGE=0.5
snowball_GRAVITY=9
@ -730,7 +79,7 @@ snowball_VELOCITY=19
--Shoot snowball.
local snow_shoot_snowball=function (item, player, pointed_thing)
local playerpos=player:getpos()
local obj=minetest.add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, "christmas_craft:snowball_entity")
local obj=minetest.env:add_entity({x=playerpos.x,y=playerpos.y+1.5,z=playerpos.z}, "christmas_craft:snowball_entity")
local dir=player:get_look_dir()
obj:setvelocity({x=dir.x*snowball_VELOCITY, y=dir.y*snowball_VELOCITY, z=dir.z*snowball_VELOCITY})
obj:setacceleration({x=dir.x*-3, y=-snowball_GRAVITY, z=dir.z*-3})
@ -755,10 +104,11 @@ snow_snowball_ENTITY={
--Snowball_entity.on_step()--> called when snowball is moving.
snow_snowball_ENTITY.on_step = function(self, dtime)
self.timer=self.timer+dtime
local pos = self.object:getpos()
local node = minetest.get_node(pos)
local node = minetest.env:get_node(pos)
--Become item when hitting a node.
if self.lastpos.x~=nil then --If there is no lastpos for some reason.
@ -766,7 +116,7 @@ snow_snowball_ENTITY.on_step = function(self, dtime)
self.object:remove()
end
if node.name == "default:water_source" then
minetest.sound_play("cannons_splash",
minetest.sound_play("snowball_splash",
{pos = pos, gain = 1.0, max_hear_distance = 32,})
self.object:remove()
end
@ -784,7 +134,6 @@ minetest.register_craftitem("christmas_craft:snowball", {
inventory_image = "snowball.png",
on_use = snow_shoot_snowball,
})
--]]
--Snow.
minetest.register_node("christmas_craft:snow", {
@ -798,7 +147,7 @@ minetest.register_node("christmas_craft:snow", {
--1 = Moss
groups = {crumbly=3,melts=1,falling_node=1},
buildable_to = true,
drop = 'default:snow',
drop = 'christmas_craft:snowball',
node_box = {
type = "fixed",
fixed = {
@ -815,3 +164,4 @@ minetest.register_node("christmas_craft:snow", {
footstep = {name="default_gravel_footstep", gain=0.45},
}),
})
]]--

3
mod.conf Normal file
View File

@ -0,0 +1,3 @@
name = christmas_craft
description = Bring the joy of Christmas to Minetest. This mod adds Christmas related things such as presents, baubles , decorations and more, also the mod can also allows you to cover the grass with snow, and make things such as snowmen. You can even have a snowball fight!
depends = default

183
mod_files/crafts.lua Normal file
View File

@ -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"},
}
})

47
mod_files/items.lua Normal file
View File

@ -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),
})

200
mod_files/multi-node.lua Normal file
View File

@ -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 = "blend",
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

361
mod_files/node.lua Normal file
View File

@ -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,
})

28
mod_support/mtfoods.lua Normal file
View File

@ -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"},
}
})

View File

@ -1,84 +0,0 @@
print (" ---- mods override is Loading! ---- ")
-- leaves --
--minetest.register_node(":4seasons:leaves_winter", {
-- description = "Leaves",
-- drawtype = "allfaces_optional",
-- visual_scale = 1.3,
-- tiles = {"4seasons_leaves_with_snow.png"},
-- paramtype = "light",
-- groups = {snappy=3, leafdecay=3, flammable=2},
-- drop = {
-- max_items = 1, items = {
-- {items = {'default:sapling'}, rarity = 20,},
-- {items = {'4seasons:leaves_winter'},}
-- }},
-- sounds = default.node_sound_leaves_defaults(),
--})
-- why are u overwriting that? its just the normal 4 season leaves.
-- grass --
minetest.register_node(":4seasons:grass_winter", {
description = "Dirt with snow",
tiles = {"4seasons_snow.png", "default_dirt.png", "default_dirt.png^4seasons_grass_w_snow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {
max_items = 2, items = {
{items = {'default:dirt'}, rarity = 0,},
{items = {'default:snow'}, rarity = 0,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
--normal sand
minetest.register_node(":4seasons:sand_winter", {
description = "Sand with snow",
tiles = {"4seasons_snow.png", "default_sand.png", "default_sand.png^4seasons_sand_w_snow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {'default:sand',
max_items = 2, items = {
{items = {'default:sand'}, rarity = 0,},
{items = {'default:snow'}, rarity = 0,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
--desert sand
minetest.register_node(":4seasons:desertsand_winter", {
description = "Desert Sand with snow",
tiles = {"4seasons_snow.png", "default_desert_sand.png", "default_desert_sand.png^4seasons_desertsand_w_snow_side.png"},
is_ground_content = true,
groups = {crumbly=3},
drop = {'default:desert_sand',
max_items = 2, items = {
{items = {'default:desert_sand'}, rarity = 0,},
{items = {'default:snow'}, rarity = 0,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
--cactus winter
minetest.register_node(":4seasons:cactus_winter", {
description = "Cactus",
tiles = {"4seasons_cactus_wsnow_top.png", "4seasons_cactus_wsnow_top.png", "4seasons_cactus_wsnow_side.png"},
is_ground_content = true,
groups = {snappy=2,choppy=3,flammable=2},
drop = {'default:cactus',
max_items = 2, items = {
{items = {'default:cactus'}, rarity = 0,},
{items = {'default:snow'}, rarity = 0,},
}},
sounds = default.node_sound_wood_defaults(),
})

74
readme.md Normal file
View File

@ -0,0 +1,74 @@
CHRISTMAS CRAFT MOD FOR MINETEST
==================================
version 1.0
**This Mod has been tested my myself and needs more testing for bugs**
(though the likely bugs are crafting errors)
ABOUT THE MOD
------------------------------------------
Bring the joy of Christmas to Minetest. This mod adds
Christmas related things such as presents, baubles ,
decorations and more, also the mod can also allows you
to cover the grass with snow, and make things such as
snowmen. You can even have a snowball fight!
WHATS NEW?
------------------------------------------
* New food for the mod
* New snow nodes which can be placed on-top of step
* New Nodes such as candy cane
* New crafts for the items
* More coloured Baubles
* More coloured presents
* bug fixes
* Some more stuff
HOW TO INSTALL?
------------------------------------------
1. extract the "christmas_craft_0.2" folder
2. Move the "christmas_craft" to the mod folder in your mintest game files
3. Start Minetest
4. under the "Singleplayer" tab press the Configure tab
5. enable "christmas_craft" then press Save
6. enjoy the mod
Configuration
------------------------------------------
Look into the world dir. there should be a file caled `christmas_craft.conf`.
The file contains the 2 folowing lines:
enable_crafts = true
enable_snowing = true
if you want to disable the craft recieps, because christmas is over, than you must just change the line `enable_crafts = true` into `enable_crafts = true`.
and if you dont like the snowy landscape just change `enable_snowing = true` to `enable_snowing = false`
thats all :)
OTHER STUFF
------------------------------------------
CHRISTMAS CRAFT MOD FOR MINETEST BY INFINATUM
thankyou for useing the mod
If you find any bugs post on the minetest forum;
https://forum.minetest.net/viewtopic.php?pid=118855#p118855
Find out more about the mod on our wiki;
https://bitbucket.org/kingarthursteam/christmas-craft/wiki/Home
Find newer devs of the mod on my site;
http://thatrspiserver.co.uk/Infinatum_Minetest/christmas_craft

View File

@ -1,96 +0,0 @@
print (" ---- Overrider christmas_craft = true! ---- ")
local dirttiles = {"snow.png", "default_dirt.png", {name = "default_dirt.png^grass_w_snow_side.png", tileable_vertical = false}}
local snowballdrop = {items = {'default:snow'}, rarity = 0}
local add_drop = function (def)
if type(def.drop) == "table" then
if def.drop.max_items then
def.drop.max_items = def.drop.max_items + 1
end
table.insert(def.drop.items, snowballdrop)
elseif type(def.drop) == "string" then
def.drop = {
items = {
{items = {def.drop}, rarity = 0},
snowballdrop
}
}
else
def.drop = {
items = {
snowballdrop
}
}
end
end
local dirt_with_grass = minetest.registered_items["default:dirt_with_grass"]
minetest.override_item("default:dirt_with_grass", {tiles = dirttiles})
add_drop(dirt_with_grass)
local dirt_with_dry_grass = minetest.registered_items["default:dirt_with_dry_grass"]
minetest.override_item("default:dirt_with_dry_grass", {tiles = dirttiles})
add_drop(dirt_with_dry_grass)
local nodebox = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}
}
}
local leavesoverride = {
drawtype = "nodebox",
visual_scale = 1,
tiles = {"snow.png", "christmas_craft_leaves_top.png", "christmas_craft_leaves_side.png"},
paramtype = "light",
node_box = nodebox,
selection_box = nodebox
}
-- Replace leaves
minetest.override_item("default:leaves", leavesoverride)
-- Replace jungleleaves
minetest.override_item("default:jungleleaves", leavesoverride)
-- Replace grass
for i=1,5 do
minetest.override_item("default:grass_" .. i, {tiles = {"christmas_grass_"..i..".png"}})
end
-- Replace junglegrass
minetest.override_item("default:junglegrass", {tiles = {"christmas_junglegrass.png"}})
-- Replace youngtrees
if minetest.registered_items["youngtrees:youngtree_top"] then
minetest.override_item("youngtrees:youngtree_top", {tiles = {"christmas_youngtree16xa.png"}})
minetest.override_item("youngtrees:youngtree_middle", {tiles = {"christmas_youngtree16xb.png"}})
end
-- Replace woodsoils
if minetest.registered_items["woodsoils:grass_with_leaves_1"] then
minetest.override_item("woodsoils:grass_with_leaves_1", {tiles = {"snow.png", "default_dirt.png", "default_dirt.png^grass_w_snow_side.png"}})
add_drop(minetest.registered_items["woodsoils:grass_with_leaves_1"])
end
if minetest.registered_items["woodsoils:grass_with_leaves_2"] then
minetest.override_item("woodsoils:grass_with_leaves_2", {tiles = {"snow.png", "default_dirt.png", "default_dirt.png^grass_w_snow_side.png"}})
add_drop(minetest.registered_items["woodsoils:grass_with_leaves_2"])
end
if minetest.registered_items["woodsoils:dirt_with_leaves_1"] then
minetest.override_item("woodsoils:dirt_with_leaves_1", {tiles = {"snow.png", "default_dirt.png", "default_dirt.png^grass_w_snow_side.png^woodsoils_ground_cover_side.png"}})
add_drop(minetest.registered_items["woodsoils:dirt_with_leaves_1"])
end
if minetest.registered_items["woodsoils:dirt_with_leaves_2"] then
minetest.override_item("woodsoils:dirt_with_leaves_2", {tiles = {"snow.png", "default_dirt.png", "default_dirt.png^grass_w_snow_side.png^woodsoils_ground_cover_side.png"}})
add_drop(minetest.registered_items["woodsoils:dirt_with_leaves_2"])
end
print (" ---- Overrider christmas_craft [OK] ---- ")

View File

@ -1,14 +0,0 @@
--------------------------------------------------
-- CONFIGURATION ---------------------------------
--------------------------------------------------
-------------------------------------------------------------
-- Change settings by changing the values after the "=". ----
-------------------------------------------------------------
-- enabels mod support --
dofile.enable_4seasons = false

118
snow.lua Normal file
View File

@ -0,0 +1,118 @@
print (" ---- Overrider christmas_craft = true! ---- ")
minetest.register_node(":default:dirt_with_grass", {
description = "Dirt with Grass",
tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
is_ground_content = true,
groups = {crumbly=3,soil=1},
drop = {
max_items = 2, items = {
{items = {'default:dirt'}, rarity = 0,},
{items = {'christmas_craft:snowball'}, rarity = 0,},
}},
sounds = default.node_sound_dirt_defaults({
footstep = {name="default_grass_footstep", gain=0.4},
}),
})
minetest.register_node(":default:leaves", {
description = "Leaves",
drawtype = "allfaces_optional",
waving = 1,
visual_scale = 1.3,
tiles = {"christmas_leaves_side.png"},
special_tiles = {"default_leaves_simple.png"},
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'default:sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = {'default:leaves'},
}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
minetest.register_node(":default:aspen_leaves", {
description = "Aspen Leaves",
drawtype = "allfaces_optional",
visual_scale = 1.3,
tiles = {"christmas_aspen_leaves.png"},
waving = 1,
paramtype = "light",
is_ground_content = false,
groups = {snappy = 3, leafdecay = 3, flammable = 2, leaves = 1},
drop = {
max_items = 1,
items = {
{items = {"default:aspen_sapling"}, rarity = 20},
{items = {"default:aspen_leaves"}}
}
},
sounds = default.node_sound_leaves_defaults(),
after_place_node = default.after_place_leaves,
})
-- old code
--[[
minetest.register_node(":default:leaves", {
description = "Leaves",
drawtype = "nodebox",
visual_scale = 1.3,
tiles = {"default_snow.png", "christmas_leaves_bot.png", "christmas_leaves_side.png"},
paramtype = "light",
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
drop = {
max_items = 1,
items = {
{
-- player will get sapling with 1/20 chance
items = {'default:sapling'},
rarity = 20,
},
{
-- player will get leaves only if he get no saplings,
-- this is because max_items is 1
items = {'default:leaves'},
}
}
},
sounds = default.node_sound_leaves_defaults(),
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
})
]]
print (" ---- Overrider christmas_craft [OK] ---- ")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
sounds/snowball_splash.ogg Normal file

Binary file not shown.

BIN
textures/Snowman_F.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 354 B

After

Width:  |  Height:  |  Size: 243 B

BIN
textures/blue_baubles.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 304 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 102 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 121 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 332 B

BIN
textures/christmas_craft_red_ribbon.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 241 B

BIN
textures/christmas_craft_which_list.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 149 B

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

BIN
textures/christmas_leaves.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 602 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 403 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 382 B

BIN
textures/christmas_star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 464 B

Some files were not shown because too many files have changed in this diff Show More