forked from mtcontrib/bakedclay
		
	remove 0.4.x support for better 5.x mod compatibility
This commit is contained in:
		| @@ -8,6 +8,7 @@ https://forum.minetest.net/viewtopic.php?id=8890 | |||||||
|  |  | ||||||
| Changelog: | Changelog: | ||||||
|  |  | ||||||
|  | - 1.1 - Remove 0.4.x compatibility to better support 5.x mods | ||||||
| - 1.0 - Re-Added glazed terracotta blocks when you cook baked clay in furnace (thanks Amara2_MK), added support for sofar's flowerpot mod, missing glazed textures re-coloured by firefox. | - 1.0 - Re-Added glazed terracotta blocks when you cook baked clay in furnace (thanks Amara2_MK), added support for sofar's flowerpot mod, missing glazed textures re-coloured by firefox. | ||||||
| - 0.9 - Baked clay now works in the technic cnc machine | - 0.9 - Baked clay now works in the technic cnc machine | ||||||
| - 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye | - 0.8 - Cooking clay block in furnace gives natural baked clay which you can dye | ||||||
|   | |||||||
| @@ -1,5 +0,0 @@ | |||||||
| default |  | ||||||
| stairs |  | ||||||
| moreblocks? |  | ||||||
| lucky_block? |  | ||||||
| flowerpot? |  | ||||||
| @@ -1 +0,0 @@ | |||||||
| Adds the ability to bake clay into blocks and colour them with dye. |  | ||||||
| @@ -1,3 +1,6 @@ | |||||||
|  | -- 5.x translation | ||||||
|  | S = minetest.get_translator("bakedclay") | ||||||
|  |  | ||||||
| local flowers = { | local flowers = { | ||||||
| 	{"delphinium", "Blue Delphinium", | 	{"delphinium", "Blue Delphinium", | ||||||
| 	{-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}}, | 	{-0.15, -0.5, -0.15, 0.15, 0.3, 0.15}, {color_cyan = 1}}, | ||||||
| @@ -22,7 +25,7 @@ local function add_simple_flower(name, desc, box, f_groups) | |||||||
| 	f_groups.attached_node = 1 | 	f_groups.attached_node = 1 | ||||||
|  |  | ||||||
| 	minetest.register_node("bakedclay:" .. name, { | 	minetest.register_node("bakedclay:" .. name, { | ||||||
| 		description = desc, | 		description = S(desc), | ||||||
| 		drawtype = "plantlike", | 		drawtype = "plantlike", | ||||||
| 		waving = 1, | 		waving = 1, | ||||||
| 		tiles = {"baked_clay_" .. name .. ".png"}, | 		tiles = {"baked_clay_" .. name .. ".png"}, | ||||||
|   | |||||||
							
								
								
									
										19
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										19
									
								
								init.lua
									
									
									
									
									
								
							| @@ -1,6 +1,7 @@ | |||||||
|  | -- 5.x translation | ||||||
|  | S = minetest.get_translator("bakedclay") | ||||||
|  |  | ||||||
| -- Baked Clay by TenPlus1 | -- list of clay colours | ||||||
|  |  | ||||||
| local clay = { | local clay = { | ||||||
| 	{"natural", "Natural"}, | 	{"natural", "Natural"}, | ||||||
| 	{"white", "White"}, | 	{"white", "White"}, | ||||||
| @@ -20,22 +21,24 @@ local clay = { | |||||||
| 	{"dark_green", "Dark Green"} | 	{"dark_green", "Dark Green"} | ||||||
| } | } | ||||||
|  |  | ||||||
|  | -- check mod support | ||||||
| local techcnc_mod = minetest.get_modpath("technic_cnc") | local techcnc_mod = minetest.get_modpath("technic_cnc") | ||||||
| local stairs_mod = minetest.get_modpath("stairs") | local stairs_mod = minetest.get_modpath("stairs") | ||||||
| local stairsplus_mod = minetest.get_modpath("moreblocks") | local stairsplus_mod = minetest.get_modpath("moreblocks") | ||||||
| 		and minetest.global_exists("stairsplus") | 		and minetest.global_exists("stairsplus") | ||||||
|  |  | ||||||
|  | -- scroll through colours | ||||||
| for _, clay in pairs(clay) do | for _, clay in pairs(clay) do | ||||||
|  |  | ||||||
| 	-- node | 	-- register node | ||||||
| 	minetest.register_node("bakedclay:" .. clay[1], { | 	minetest.register_node("bakedclay:" .. clay[1], { | ||||||
| 		description = clay[2] .. " Baked Clay", | 		description = S(clay[2] .. " Baked Clay"), | ||||||
| 		tiles = {"baked_clay_" .. clay[1] ..".png"}, | 		tiles = {"baked_clay_" .. clay[1] ..".png"}, | ||||||
| 		groups = {cracky = 3, bakedclay = 1}, | 		groups = {cracky = 3, bakedclay = 1}, | ||||||
| 		sounds = default.node_sound_stone_defaults() | 		sounds = default.node_sound_stone_defaults() | ||||||
| 	}) | 	}) | ||||||
|  |  | ||||||
| 	-- craft recipe | 	-- register craft recipe | ||||||
| 	if clay[1] ~= "natural" then | 	if clay[1] ~= "natural" then | ||||||
|  |  | ||||||
| 		minetest.register_craft({ | 		minetest.register_craft({ | ||||||
| @@ -88,10 +91,10 @@ for _, clay in pairs(clay) do | |||||||
| 			default.node_sound_stone_defaults()) | 			default.node_sound_stone_defaults()) | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
| 	-- register bakedclay for use in technic_cnc mod | 	-- register bakedclay for use in technic_cnc mod after all mods loaded | ||||||
| 	if techcnc_mod then | 	if techcnc_mod then | ||||||
|  |  | ||||||
| 		minetest.after(0.1, function() | 		core.register_on_mods_loaded(function() | ||||||
|  |  | ||||||
| 			technic_cnc.register_all("bakedclay:" .. clay[1], | 			technic_cnc.register_all("bakedclay:" .. clay[1], | ||||||
| 				{cracky = 3, not_in_creative_inventory = 1}, | 				{cracky = 3, not_in_creative_inventory = 1}, | ||||||
| @@ -109,7 +112,7 @@ for _, clay in pairs(clay) do | |||||||
| 		local texture = "baked_clay_terracotta_" .. clay[1] ..".png" | 		local texture = "baked_clay_terracotta_" .. clay[1] ..".png" | ||||||
|  |  | ||||||
| 		minetest.register_node("bakedclay:terracotta_" .. clay[1], { | 		minetest.register_node("bakedclay:terracotta_" .. clay[1], { | ||||||
| 			description = clay[2] .. " Glazed Terracotta", | 			description = S(clay[2] .. " Glazed Terracotta"), | ||||||
| 			tiles = { | 			tiles = { | ||||||
| 				texture .. "", | 				texture .. "", | ||||||
| 				texture .. "", | 				texture .. "", | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user