Correction de bugs et ajout de plusieurs choses
@@ -83,7 +83,7 @@ minetest.register_craft({
 | 
				
			|||||||
	output = "christmas_craft:snowman",
 | 
						output = "christmas_craft:snowman",
 | 
				
			||||||
	recipe = {
 | 
						recipe = {
 | 
				
			||||||
		{"default:coal_lump","default:snow","default:coal_lump"},
 | 
							{"default:coal_lump","default:snow","default:coal_lump"},
 | 
				
			||||||
		{"default:snow","christmas_craft:snowball","default:snow"},
 | 
							{"default:snow","default:snow","default:snow"},
 | 
				
			||||||
		{"default:coal_lump","default:coal_lump","default:coal_lump"},
 | 
							{"default:coal_lump","default:coal_lump","default:coal_lump"},
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -21,9 +21,26 @@ minetest.register_node("christmas_craft:present_box", {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
-- coloured Present --
 | 
					-- coloured Present --
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local function register_present(name, description, colorCode, dye)
 | 
					local function register_present(name, description, colorCode, dye)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_node("christmas_craft:Christmas_present_"..name, {
 | 
					minetest.register_node("christmas_craft:christmas_present_"..name, {
 | 
				
			||||||
  description = description .." Christmas Present",
 | 
					  description = description .." Christmas Present",
 | 
				
			||||||
  tiles = {
 | 
					  tiles = {
 | 
				
			||||||
    "christmas_present.png^[colorize:#" ..colorCode.. "^christmas_bow_top.png",
 | 
					    "christmas_present.png^[colorize:#" ..colorCode.. "^christmas_bow_top.png",
 | 
				
			||||||
@@ -154,23 +171,6 @@ local function register_baubles(name, description, colorCode, dye)
 | 
				
			|||||||
  })
 | 
					  })
 | 
				
			||||||
end
 | 
					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 = {
 | 
					colours = {
 | 
				
			||||||
	-- RGB Prime Colours --
 | 
						-- RGB Prime Colours --
 | 
				
			||||||
	{name="red", code="FF000099", description="Red", dye="red"},
 | 
						{name="red", code="FF000099", description="Red", dye="red"},
 | 
				
			||||||
@@ -183,7 +183,7 @@ colours = {
 | 
				
			|||||||
	-- RGB Other Colours --
 | 
						-- RGB Other Colours --
 | 
				
			||||||
	{name="orange", code="E5940099", description="Orange", dye="orange"},
 | 
						{name="orange", code="E5940099", description="Orange", dye="orange"},
 | 
				
			||||||
	{name="darkgreen", code="004C0099", description="Dark Green", dye="dark_green"},
 | 
						{name="darkgreen", code="004C0099", description="Dark Green", dye="dark_green"},
 | 
				
			||||||
	{name="violet", code="80008099", description="Violet", dye="purple"},
 | 
						{name="violet", code="80008099", description="Violet", dye="violet"},
 | 
				
			||||||
	{name="pink", code="FFC0CB99", description="Pink", dye="pink"},
 | 
						{name="pink", code="FFC0CB99", description="Pink", dye="pink"},
 | 
				
			||||||
	{name="brown", code="732c0b99", description="Brown", dye="brown"},
 | 
						{name="brown", code="732c0b99", description="Brown", dye="brown"},
 | 
				
			||||||
	-- MonoChrome --
 | 
						-- MonoChrome --
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -6,7 +6,7 @@ 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:silver_baubles", "christmas_craft:white_baubles")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_alias("christmas_craft:Christmas_present", "christmas_craft:Christmas_present_white")
 | 
					minetest.register_alias("christmas_craft:Christmas_present", "christmas_craft:christmas_present_white")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- ========== --
 | 
					-- ========== --
 | 
				
			||||||
-- misk nodes --
 | 
					-- misk nodes --
 | 
				
			||||||
@@ -329,33 +329,11 @@ minetest.register_node("christmas_craft:candy_cane_tree", {
 | 
				
			|||||||
	on_place = minetest.rotate_node
 | 
						on_place = minetest.rotate_node
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
minetest.register_node(":default:snow", {
 | 
					minetest.override_item("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 = {
 | 
						node_box = {
 | 
				
			||||||
		type = "fixed",
 | 
							type = "fixed",
 | 
				
			||||||
		fixed = {
 | 
							fixed = {
 | 
				
			||||||
			{-0.5, -0.5, -0.5, 0.5, -0.125, 0.5},
 | 
								{-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,
 | 
					 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										23
									
								
								snow.lua
									
									
									
									
									
								
							
							
						
						@@ -38,6 +38,26 @@ minetest.override_item(
 | 
				
			|||||||
		sounds = data.sounds,
 | 
							sounds = data.sounds,
 | 
				
			||||||
})
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					minetest.override_item(
 | 
				
			||||||
 | 
						"default:dry_dirt_with_dry_grass", {
 | 
				
			||||||
 | 
							tiles = {"default_snow.png", "default_dry_dirt.png",
 | 
				
			||||||
 | 
							{name = "default_dry_dirt.png^default_snow_side.png",
 | 
				
			||||||
 | 
								tileable_vertical = false}},
 | 
				
			||||||
 | 
							sounds = data.sounds,
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					minetest.override_item(
 | 
				
			||||||
 | 
						"default:dirt_with_rainforest_litter", {
 | 
				
			||||||
 | 
							tiles = data.tiles,
 | 
				
			||||||
 | 
							sounds = data.sounds,
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					minetest.override_item(
 | 
				
			||||||
 | 
						"default:dirt_with_coniferous_litter", {
 | 
				
			||||||
 | 
							tiles = data.tiles,
 | 
				
			||||||
 | 
							sounds = data.sounds,
 | 
				
			||||||
 | 
					})
 | 
				
			||||||
 | 
					
 | 
				
			||||||
local nodebox = {
 | 
					local nodebox = {
 | 
				
			||||||
	type = "fixed",
 | 
						type = "fixed",
 | 
				
			||||||
	fixed = {
 | 
						fixed = {
 | 
				
			||||||
@@ -62,6 +82,7 @@ minetest.override_item("default:bush_leaves", leavesoverride)
 | 
				
			|||||||
-- replace grass
 | 
					-- replace grass
 | 
				
			||||||
for i=1,5 do
 | 
					for i=1,5 do
 | 
				
			||||||
	minetest.override_item("default:grass_" .. i, {tiles = {"christmas_grass_"..i..".png"}})
 | 
						minetest.override_item("default:grass_" .. i, {tiles = {"christmas_grass_"..i..".png"}})
 | 
				
			||||||
 | 
						minetest.override_item("default:dry_grass_" .. i, {tiles = {"christmas_dry_grass_"..i..".png"}})
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- Replace junglegrass
 | 
					-- Replace junglegrass
 | 
				
			||||||
@@ -95,7 +116,7 @@ if minetest.registered_items["woodsoils:dirt_with_leaves_2"] then
 | 
				
			|||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- replace flowers
 | 
					-- replace flowers
 | 
				
			||||||
for _,name in pairs({"dandelion_yellow", "geranium", "rose", "tulip", "dandelion_white", "viola"}) do
 | 
					for _,name in pairs({"dandelion_yellow", "geranium", "rose", "tulip", "dandelion_white", "viola", "chrysanthemum_green", "tulip_black"}) do
 | 
				
			||||||
	local flowername = "flowers:"..name
 | 
						local flowername = "flowers:"..name
 | 
				
			||||||
	local tiles = { "snow_" .. name .. ".png" }
 | 
						local tiles = { "snow_" .. name .. ".png" }
 | 
				
			||||||
	minetest.override_item(flowername, { tiles = tiles })
 | 
						minetest.override_item(flowername, { tiles = tiles })
 | 
				
			||||||
 
 | 
				
			|||||||
| 
		 Before Width: | Height: | Size: 304 B After Width: | Height: | Size: 219 B  | 
| 
		 Before Width: | Height: | Size: 238 B After Width: | Height: | Size: 208 B  | 
| 
		 Before Width: | Height: | Size: 440 B After Width: | Height: | Size: 235 B  | 
| 
		 Before Width: | Height: | Size: 755 B After Width: | Height: | Size: 271 B  | 
| 
		 Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 295 B  | 
| 
		 Before Width: | Height: | Size: 380 B After Width: | Height: | Size: 187 B  | 
| 
		 Before Width: | Height: | Size: 209 B After Width: | Height: | Size: 205 B  | 
| 
		 Before Width: | Height: | Size: 311 B After Width: | Height: | Size: 187 B  | 
| 
		 Before Width: | Height: | Size: 309 B After Width: | Height: | Size: 187 B  | 
| 
		 Before Width: | Height: | Size: 495 B After Width: | Height: | Size: 261 B  | 
| 
		 Before Width: | Height: | Size: 338 B After Width: | Height: | Size: 261 B  | 
| 
		 Before Width: | Height: | Size: 332 B After Width: | Height: | Size: 177 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/christmas_dry_grass_1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 156 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/christmas_dry_grass_2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 194 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/christmas_dry_grass_3.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 222 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/christmas_dry_grass_4.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 249 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/christmas_dry_grass_5.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 271 B  | 
| 
		 Before Width: | Height: | Size: 262 B After Width: | Height: | Size: 210 B  | 
| 
		 Before Width: | Height: | Size: 434 B After Width: | Height: | Size: 261 B  | 
| 
		 Before Width: | Height: | Size: 602 B After Width: | Height: | Size: 261 B  | 
| 
		 Before Width: | Height: | Size: 355 B After Width: | Height: | Size: 222 B  | 
| 
		 Before Width: | Height: | Size: 181 B After Width: | Height: | Size: 165 B  | 
| 
		 Before Width: | Height: | Size: 403 B After Width: | Height: | Size: 186 B  | 
| 
		 Before Width: | Height: | Size: 264 B After Width: | Height: | Size: 201 B  | 
| 
		 Before Width: | Height: | Size: 407 B After Width: | Height: | Size: 178 B  | 
| 
		 Before Width: | Height: | Size: 382 B After Width: | Height: | Size: 173 B  | 
| 
		 Before Width: | Height: | Size: 464 B After Width: | Height: | Size: 186 B  | 
| 
		 Before Width: | Height: | Size: 343 B After Width: | Height: | Size: 172 B  | 
| 
		 Before Width: | Height: | Size: 808 B After Width: | Height: | Size: 205 B  | 
| 
		 Before Width: | Height: | Size: 344 B After Width: | Height: | Size: 227 B  | 
| 
		 Before Width: | Height: | Size: 548 B After Width: | Height: | Size: 210 B  | 
| 
		 Before Width: | Height: | Size: 536 B After Width: | Height: | Size: 242 B  | 
| 
		 Before Width: | Height: | Size: 635 B After Width: | Height: | Size: 214 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/snow.png
									
									
									
									
									
										
										
										Executable file → Normal file
									
								
							
							
						
						| 
		 Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 200 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/snow_chrysanthemum_green.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 178 B  | 
| 
		 Before Width: | Height: | Size: 342 B After Width: | Height: | Size: 203 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/snow_tulip_black.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 180 B  |