Compare commits
	
		
			20 Commits
		
	
	
		
			0.4.dev-20
			...
			0.4.1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|  | 6ba4f01d0b | ||
|  | a9da19c590 | ||
|  | b1dcbe72aa | ||
|  | 8c8b4b005e | ||
|  | 537344bc62 | ||
|  | 274f280e10 | ||
|  | 3c8d4879a1 | ||
|  | d05002ecc0 | ||
|  | d817c9babe | ||
|  | 4e996ffa35 | ||
|  | 1dd62938c1 | ||
|  | 9a624d85d0 | ||
|  | a93527dfb6 | ||
|  | fcaacdb4ad | ||
|  | dd9b33db67 | ||
|  | 894f98d878 | ||
|  | 3a1a7d511d | ||
|  | 53e9b0e107 | ||
|  | 216227bac3 | ||
|  | 1a62348e44 | 
| @@ -27,16 +27,16 @@ Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | |||||||
| See README.txt in each mod directory for information about other authors. | See README.txt in each mod directory for information about other authors. | ||||||
|  |  | ||||||
| This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU Lesser General Public License as published by | ||||||
| the Free Software Foundation; either version 2 of the License, or | the Free Software Foundation; either version 2.1 of the License, or | ||||||
| (at your option) any later version. | (at your option) any later version. | ||||||
|  |  | ||||||
| This program is distributed in the hope that it will be useful, | This program is distributed in the hope that it will be useful, | ||||||
| but WITHOUT ANY WARRANTY; without even the implied warranty of | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||||||
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | ||||||
| GNU General Public License for more details. | GNU Lesser General Public License for more details. | ||||||
|  |  | ||||||
| You should have received a copy of the GNU General Public License along | You should have received a copy of the GNU Lesser General Public License along | ||||||
| with this program; if not, write to the Free Software Foundation, Inc., | with this program; if not, write to the Free Software Foundation, Inc., | ||||||
| 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||||||
|  |  | ||||||
|   | |||||||
| @@ -7,11 +7,11 @@ Copyright (C) 2011-2012 Kahrl <kahrl@gmx.net> | |||||||
| Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | ||||||
|  |  | ||||||
| This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU Lesser General Public License as published by | ||||||
| the Free Software Foundation; either version 2 of the License, or | the Free Software Foundation; either version 2 of the License, or | ||||||
| (at your option) any later version. | (at your option) any later version. | ||||||
|  |  | ||||||
| http://www.gnu.org/licenses/gpl-2.0.html | http://www.gnu.org/licenses/lgpl-2.1.html | ||||||
|  |  | ||||||
| License of media (textures and sounds) | License of media (textures and sounds) | ||||||
| -------------------------------------- | -------------------------------------- | ||||||
|   | |||||||
| @@ -90,6 +90,6 @@ bucket.register_liquid( | |||||||
|  |  | ||||||
| minetest.register_craft({ | minetest.register_craft({ | ||||||
| 	type = "fuel", | 	type = "fuel", | ||||||
| 	recipe = "default:bucket_lava", | 	recipe = "bucket:bucket_lava", | ||||||
| 	burntime = 60, | 	burntime = 60, | ||||||
| }) | }) | ||||||
|   | |||||||
| @@ -6,11 +6,11 @@ License of source code: | |||||||
| Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | ||||||
|  |  | ||||||
| This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU Lesser General Public License as published by | ||||||
| the Free Software Foundation; either version 2 of the License, or | the Free Software Foundation; either version 2.1 of the License, or | ||||||
| (at your option) any later version. | (at your option) any later version. | ||||||
|  |  | ||||||
| http://www.gnu.org/licenses/gpl-2.0.html | http://www.gnu.org/licenses/lgpl-2.1.html | ||||||
|  |  | ||||||
| License of media (textures and sounds) | License of media (textures and sounds) | ||||||
| -------------------------------------- | -------------------------------------- | ||||||
|   | |||||||
| @@ -62,7 +62,7 @@ minetest.register_tool("default:pick_steel", { | |||||||
| 	tool_capabilities = { | 	tool_capabilities = { | ||||||
| 		max_drop_level=1, | 		max_drop_level=1, | ||||||
| 		groupcaps={ | 		groupcaps={ | ||||||
| 			cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=10, maxlevel=2} | 			cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2} | ||||||
| 		} | 		} | ||||||
| 	}, | 	}, | ||||||
| }) | }) | ||||||
| @@ -105,7 +105,7 @@ minetest.register_tool("default:shovel_steel", { | |||||||
| 	tool_capabilities = { | 	tool_capabilities = { | ||||||
| 		max_drop_level=1, | 		max_drop_level=1, | ||||||
| 		groupcaps={ | 		groupcaps={ | ||||||
| 			crumbly={times={[1]=1.50, [2]=0.70, [3]=0.60}, uses=10, maxlevel=2} | 			crumbly={times={[1]=1.50, [2]=0.70, [3]=0.60}, uses=30, maxlevel=2} | ||||||
| 		} | 		} | ||||||
| 	}, | 	}, | ||||||
| }) | }) | ||||||
| @@ -137,7 +137,7 @@ minetest.register_tool("default:axe_steel", { | |||||||
| 	tool_capabilities = { | 	tool_capabilities = { | ||||||
| 		max_drop_level=1, | 		max_drop_level=1, | ||||||
| 		groupcaps={ | 		groupcaps={ | ||||||
| 			choppy={times={[1]=3.00, [2]=1.60, [3]=1.00}, uses=10, maxlevel=2}, | 			choppy={times={[1]=3.00, [2]=1.60, [3]=1.00}, uses=30, maxlevel=2}, | ||||||
| 			fleshy={times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1} | 			fleshy={times={[2]=1.10, [3]=0.60}, uses=40, maxlevel=1} | ||||||
| 		} | 		} | ||||||
| 	}, | 	}, | ||||||
| @@ -696,7 +696,7 @@ end | |||||||
|  |  | ||||||
| minetest.register_node("default:stone", { | minetest.register_node("default:stone", { | ||||||
| 	description = "Stone", | 	description = "Stone", | ||||||
| 	tile_images = {"default_stone.png"}, | 	tiles = {"default_stone.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	drop = 'default:cobble', | 	drop = 'default:cobble', | ||||||
| @@ -705,8 +705,8 @@ minetest.register_node("default:stone", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:desert_stone", { | minetest.register_node("default:desert_stone", { | ||||||
| 	description = "Desert stone", | 	description = "Desert Stone", | ||||||
| 	tile_images = {"default_desert_stone.png"}, | 	tiles = {"default_desert_stone.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	drop = 'default:desert_stone', | 	drop = 'default:desert_stone', | ||||||
| @@ -715,8 +715,8 @@ minetest.register_node("default:desert_stone", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:stone_with_coal", { | minetest.register_node("default:stone_with_coal", { | ||||||
| 	description = "Stone with coal", | 	description = "Coal Ore", | ||||||
| 	tile_images = {"default_stone.png^default_mineral_coal.png"}, | 	tiles = {"default_stone.png^default_mineral_coal.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	drop = 'default:coal_lump', | 	drop = 'default:coal_lump', | ||||||
| @@ -724,8 +724,8 @@ minetest.register_node("default:stone_with_coal", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:stone_with_iron", { | minetest.register_node("default:stone_with_iron", { | ||||||
| 	description = "Stone with iron", | 	description = "Iron Ore", | ||||||
| 	tile_images = {"default_stone.png^default_mineral_iron.png"}, | 	tiles = {"default_stone.png^default_mineral_iron.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	drop = 'default:iron_lump', | 	drop = 'default:iron_lump', | ||||||
| @@ -733,8 +733,8 @@ minetest.register_node("default:stone_with_iron", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:dirt_with_grass", { | minetest.register_node("default:dirt_with_grass", { | ||||||
| 	description = "Dirt with grass", | 	description = "Dirt with Grass", | ||||||
| 	tile_images = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, | 	tiles = {"default_grass.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=3}, | 	groups = {crumbly=3}, | ||||||
| 	drop = 'default:dirt', | 	drop = 'default:dirt', | ||||||
| @@ -744,8 +744,8 @@ minetest.register_node("default:dirt_with_grass", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:dirt_with_grass_footsteps", { | minetest.register_node("default:dirt_with_grass_footsteps", { | ||||||
| 	description = "Dirt with grass and footsteps", | 	description = "Dirt with Grass and Footsteps", | ||||||
| 	tile_images = {"default_grass_footsteps.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, | 	tiles = {"default_grass_footsteps.png", "default_dirt.png", "default_dirt.png^default_grass_side.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=3}, | 	groups = {crumbly=3}, | ||||||
| 	drop = 'default:dirt', | 	drop = 'default:dirt', | ||||||
| @@ -756,7 +756,7 @@ minetest.register_node("default:dirt_with_grass_footsteps", { | |||||||
|  |  | ||||||
| minetest.register_node("default:dirt", { | minetest.register_node("default:dirt", { | ||||||
| 	description = "Dirt", | 	description = "Dirt", | ||||||
| 	tile_images = {"default_dirt.png"}, | 	tiles = {"default_dirt.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=3}, | 	groups = {crumbly=3}, | ||||||
| 	sounds = default.node_sound_dirt_defaults(), | 	sounds = default.node_sound_dirt_defaults(), | ||||||
| @@ -764,15 +764,15 @@ minetest.register_node("default:dirt", { | |||||||
|  |  | ||||||
| minetest.register_node("default:sand", { | minetest.register_node("default:sand", { | ||||||
| 	description = "Sand", | 	description = "Sand", | ||||||
| 	tile_images = {"default_sand.png"}, | 	tiles = {"default_sand.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=3, falling_node=1}, | 	groups = {crumbly=3, falling_node=1}, | ||||||
| 	sounds = default.node_sound_sand_defaults(), | 	sounds = default.node_sound_sand_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:desert_sand", { | minetest.register_node("default:desert_sand", { | ||||||
| 	description = "Desert sand", | 	description = "Desert Sand", | ||||||
| 	tile_images = {"default_desert_sand.png"}, | 	tiles = {"default_desert_sand.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {sand=1, crumbly=3, falling_node=1}, | 	groups = {sand=1, crumbly=3, falling_node=1}, | ||||||
| 	sounds = default.node_sound_sand_defaults(), | 	sounds = default.node_sound_sand_defaults(), | ||||||
| @@ -780,7 +780,7 @@ minetest.register_node("default:desert_sand", { | |||||||
|  |  | ||||||
| minetest.register_node("default:gravel", { | minetest.register_node("default:gravel", { | ||||||
| 	description = "Gravel", | 	description = "Gravel", | ||||||
| 	tile_images = {"default_gravel.png"}, | 	tiles = {"default_gravel.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=2, falling_node=1}, | 	groups = {crumbly=2, falling_node=1}, | ||||||
| 	sounds = default.node_sound_dirt_defaults({ | 	sounds = default.node_sound_dirt_defaults({ | ||||||
| @@ -790,7 +790,7 @@ minetest.register_node("default:gravel", { | |||||||
|  |  | ||||||
| minetest.register_node("default:sandstone", { | minetest.register_node("default:sandstone", { | ||||||
| 	description = "Sandstone", | 	description = "Sandstone", | ||||||
| 	tile_images = {"default_sandstone.png"}, | 	tiles = {"default_sandstone.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=2,cracky=2}, | 	groups = {crumbly=2,cracky=2}, | ||||||
| 	drop = 'default:sand', | 	drop = 'default:sand', | ||||||
| @@ -799,7 +799,7 @@ minetest.register_node("default:sandstone", { | |||||||
|  |  | ||||||
| minetest.register_node("default:clay", { | minetest.register_node("default:clay", { | ||||||
| 	description = "Clay", | 	description = "Clay", | ||||||
| 	tile_images = {"default_clay.png"}, | 	tiles = {"default_clay.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {crumbly=3}, | 	groups = {crumbly=3}, | ||||||
| 	drop = 'default:clay_lump 4', | 	drop = 'default:clay_lump 4', | ||||||
| @@ -809,8 +809,8 @@ minetest.register_node("default:clay", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:brick", { | minetest.register_node("default:brick", { | ||||||
| 	description = "Brick", | 	description = "Brick Block", | ||||||
| 	tile_images = {"default_brick.png"}, | 	tiles = {"default_brick.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	drop = 'default:clay_brick 4', | 	drop = 'default:clay_brick 4', | ||||||
| @@ -819,17 +819,17 @@ minetest.register_node("default:brick", { | |||||||
|  |  | ||||||
| minetest.register_node("default:tree", { | minetest.register_node("default:tree", { | ||||||
| 	description = "Tree", | 	description = "Tree", | ||||||
| 	tile_images = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, | 	tiles = {"default_tree_top.png", "default_tree_top.png", "default_tree.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {tree=1,snappy=2,choppy=2,oddly_breakable_by_hand=1,flammable=2}, | 	groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:jungletree", { | minetest.register_node("default:jungletree", { | ||||||
| 	description = "Jungle Tree", | 	description = "Jungle Tree", | ||||||
| 	tile_images = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"}, | 	tiles = {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {tree=1,snappy=2,choppy=2,oddly_breakable_by_hand=1,flammable=2}, | 	groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2}, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| @@ -837,7 +837,7 @@ minetest.register_node("default:junglegrass", { | |||||||
| 	description = "Jungle Grass", | 	description = "Jungle Grass", | ||||||
| 	drawtype = "plantlike", | 	drawtype = "plantlike", | ||||||
| 	visual_scale = 1.3, | 	visual_scale = 1.3, | ||||||
| 	tile_images = {"default_junglegrass.png"}, | 	tiles = {"default_junglegrass.png"}, | ||||||
| 	inventory_image = "default_junglegrass.png", | 	inventory_image = "default_junglegrass.png", | ||||||
| 	wield_image = "default_junglegrass.png", | 	wield_image = "default_junglegrass.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -850,7 +850,7 @@ minetest.register_node("default:leaves", { | |||||||
| 	description = "Leaves", | 	description = "Leaves", | ||||||
| 	drawtype = "allfaces_optional", | 	drawtype = "allfaces_optional", | ||||||
| 	visual_scale = 1.3, | 	visual_scale = 1.3, | ||||||
| 	tile_images = {"default_leaves.png"}, | 	tiles = {"default_leaves.png"}, | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	groups = {snappy=3, leafdecay=3, flammable=2}, | 	groups = {snappy=3, leafdecay=3, flammable=2}, | ||||||
| 	drop = { | 	drop = { | ||||||
| @@ -873,7 +873,7 @@ minetest.register_node("default:leaves", { | |||||||
|  |  | ||||||
| minetest.register_node("default:cactus", { | minetest.register_node("default:cactus", { | ||||||
| 	description = "Cactus", | 	description = "Cactus", | ||||||
| 	tile_images = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"}, | 	tiles = {"default_cactus_top.png", "default_cactus_top.png", "default_cactus_side.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {snappy=2,choppy=3,flammable=2}, | 	groups = {snappy=2,choppy=3,flammable=2}, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| @@ -882,7 +882,7 @@ minetest.register_node("default:cactus", { | |||||||
| minetest.register_node("default:papyrus", { | minetest.register_node("default:papyrus", { | ||||||
| 	description = "Papyrus", | 	description = "Papyrus", | ||||||
| 	drawtype = "plantlike", | 	drawtype = "plantlike", | ||||||
| 	tile_images = {"default_papyrus.png"}, | 	tiles = {"default_papyrus.png"}, | ||||||
| 	inventory_image = "default_papyrus.png", | 	inventory_image = "default_papyrus.png", | ||||||
| 	wield_image = "default_papyrus.png", | 	wield_image = "default_papyrus.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -894,7 +894,7 @@ minetest.register_node("default:papyrus", { | |||||||
|  |  | ||||||
| minetest.register_node("default:bookshelf", { | minetest.register_node("default:bookshelf", { | ||||||
| 	description = "Bookshelf", | 	description = "Bookshelf", | ||||||
| 	tile_images = {"default_wood.png", "default_wood.png", "default_bookshelf.png"}, | 	tiles = {"default_wood.png", "default_wood.png", "default_bookshelf.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3}, | 	groups = {snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3}, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| @@ -903,7 +903,7 @@ minetest.register_node("default:bookshelf", { | |||||||
| minetest.register_node("default:glass", { | minetest.register_node("default:glass", { | ||||||
| 	description = "Glass", | 	description = "Glass", | ||||||
| 	drawtype = "glasslike", | 	drawtype = "glasslike", | ||||||
| 	tile_images = {"default_glass.png"}, | 	tiles = {"default_glass.png"}, | ||||||
| 	inventory_image = minetest.inventorycube("default_glass.png"), | 	inventory_image = minetest.inventorycube("default_glass.png"), | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	sunlight_propagates = true, | 	sunlight_propagates = true, | ||||||
| @@ -915,7 +915,7 @@ minetest.register_node("default:glass", { | |||||||
| minetest.register_node("default:fence_wood", { | minetest.register_node("default:fence_wood", { | ||||||
| 	description = "Wooden Fence", | 	description = "Wooden Fence", | ||||||
| 	drawtype = "fencelike", | 	drawtype = "fencelike", | ||||||
| 	tile_images = {"default_wood.png"}, | 	tiles = {"default_wood.png"}, | ||||||
| 	inventory_image = "default_fence.png", | 	inventory_image = "default_fence.png", | ||||||
| 	wield_image = "default_fence.png", | 	wield_image = "default_fence.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -924,14 +924,14 @@ minetest.register_node("default:fence_wood", { | |||||||
| 		type = "fixed", | 		type = "fixed", | ||||||
| 		fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, | 		fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7}, | ||||||
| 	}, | 	}, | ||||||
| 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=2}, | 	groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2}, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:rail", { | minetest.register_node("default:rail", { | ||||||
| 	description = "Rail", | 	description = "Rail", | ||||||
| 	drawtype = "raillike", | 	drawtype = "raillike", | ||||||
| 	tile_images = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"}, | 	tiles = {"default_rail.png", "default_rail_curved.png", "default_rail_t_junction.png", "default_rail_crossing.png"}, | ||||||
| 	inventory_image = "default_rail.png", | 	inventory_image = "default_rail.png", | ||||||
| 	wield_image = "default_rail.png", | 	wield_image = "default_rail.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -939,7 +939,8 @@ minetest.register_node("default:rail", { | |||||||
| 	walkable = false, | 	walkable = false, | ||||||
| 	selection_box = { | 	selection_box = { | ||||||
| 		type = "fixed", | 		type = "fixed", | ||||||
| 		--fixed = <default> |                 -- but how to specify the dimensions for curved and sideways rails? | ||||||
|  |                 fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, | ||||||
| 	}, | 	}, | ||||||
| 	groups = {bendy=2,snappy=1,dig_immediate=2}, | 	groups = {bendy=2,snappy=1,dig_immediate=2}, | ||||||
| }) | }) | ||||||
| @@ -947,7 +948,7 @@ minetest.register_node("default:rail", { | |||||||
| minetest.register_node("default:ladder", { | minetest.register_node("default:ladder", { | ||||||
| 	description = "Ladder", | 	description = "Ladder", | ||||||
| 	drawtype = "signlike", | 	drawtype = "signlike", | ||||||
| 	tile_images = {"default_ladder.png"}, | 	tiles = {"default_ladder.png"}, | ||||||
| 	inventory_image = "default_ladder.png", | 	inventory_image = "default_ladder.png", | ||||||
| 	wield_image = "default_ladder.png", | 	wield_image = "default_ladder.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -961,22 +962,22 @@ minetest.register_node("default:ladder", { | |||||||
| 		--wall_bottom = = <default> | 		--wall_bottom = = <default> | ||||||
| 		--wall_side = = <default> | 		--wall_side = = <default> | ||||||
| 	}, | 	}, | ||||||
| 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=2}, | 	groups = {snappy=1,choppy=2,oddly_breakable_by_hand=3,flammable=2}, | ||||||
| 	legacy_wallmounted = true, | 	legacy_wallmounted = true, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:wood", { | minetest.register_node("default:wood", { | ||||||
| 	description = "Wood", | 	description = "Wooden Planks", | ||||||
| 	tile_images = {"default_wood.png"}, | 	tiles = {"default_wood.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3}, | 	groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3}, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:mese", { | minetest.register_node("default:mese", { | ||||||
| 	description = "Mese", | 	description = "Mese", | ||||||
| 	tile_images = {"default_mese.png"}, | 	tiles = {"default_mese.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=1}, | 	groups = {cracky=1}, | ||||||
| 	sounds = default.node_sound_defaults(), | 	sounds = default.node_sound_defaults(), | ||||||
| @@ -984,16 +985,20 @@ minetest.register_node("default:mese", { | |||||||
|  |  | ||||||
| minetest.register_node("default:cloud", { | minetest.register_node("default:cloud", { | ||||||
| 	description = "Cloud", | 	description = "Cloud", | ||||||
| 	tile_images = {"default_cloud.png"}, | 	tiles = {"default_cloud.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	sounds = default.node_sound_defaults(), | 	sounds = default.node_sound_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:water_flowing", { | minetest.register_node("default:water_flowing", { | ||||||
| 	description = "Water (flowing)", | 	description = "Flowing Water", | ||||||
| 	inventory_image = minetest.inventorycube("default_water.png"), | 	inventory_image = minetest.inventorycube("default_water.png"), | ||||||
| 	drawtype = "flowingliquid", | 	drawtype = "flowingliquid", | ||||||
| 	tile_images = {"default_water.png"}, | 	tiles = {"default_water.png"}, | ||||||
|  | 	special_tiles = { | ||||||
|  | 		{name="default_water.png", backface_culling=false}, | ||||||
|  | 		{name="default_water.png", backface_culling=true}, | ||||||
|  | 	}, | ||||||
| 	alpha = WATER_ALPHA, | 	alpha = WATER_ALPHA, | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	walkable = false, | 	walkable = false, | ||||||
| @@ -1005,18 +1010,18 @@ minetest.register_node("default:water_flowing", { | |||||||
| 	liquid_alternative_source = "default:water_source", | 	liquid_alternative_source = "default:water_source", | ||||||
| 	liquid_viscosity = WATER_VISC, | 	liquid_viscosity = WATER_VISC, | ||||||
| 	post_effect_color = {a=64, r=100, g=100, b=200}, | 	post_effect_color = {a=64, r=100, g=100, b=200}, | ||||||
| 	special_materials = { |  | ||||||
| 		{image="default_water.png", backface_culling=false}, |  | ||||||
| 		{image="default_water.png", backface_culling=true}, |  | ||||||
| 	}, |  | ||||||
| 	groups = {water=3, liquid=3, puts_out_fire=1}, | 	groups = {water=3, liquid=3, puts_out_fire=1}, | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:water_source", { | minetest.register_node("default:water_source", { | ||||||
| 	description = "Water", | 	description = "Water Source", | ||||||
| 	inventory_image = minetest.inventorycube("default_water.png"), | 	inventory_image = minetest.inventorycube("default_water.png"), | ||||||
| 	drawtype = "liquid", | 	drawtype = "liquid", | ||||||
| 	tile_images = {"default_water.png"}, | 	tiles = {"default_water.png"}, | ||||||
|  | 	special_tiles = { | ||||||
|  | 		-- New-style water source material (mostly unused) | ||||||
|  | 		{name="default_water.png", backface_culling=false}, | ||||||
|  | 	}, | ||||||
| 	alpha = WATER_ALPHA, | 	alpha = WATER_ALPHA, | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	walkable = false, | 	walkable = false, | ||||||
| @@ -1028,18 +1033,26 @@ minetest.register_node("default:water_source", { | |||||||
| 	liquid_alternative_source = "default:water_source", | 	liquid_alternative_source = "default:water_source", | ||||||
| 	liquid_viscosity = WATER_VISC, | 	liquid_viscosity = WATER_VISC, | ||||||
| 	post_effect_color = {a=64, r=100, g=100, b=200}, | 	post_effect_color = {a=64, r=100, g=100, b=200}, | ||||||
| 	special_materials = { |  | ||||||
| 		-- New-style water source material (mostly unused) |  | ||||||
| 		{image="default_water.png", backface_culling=false}, |  | ||||||
| 	}, |  | ||||||
| 	groups = {water=3, liquid=3, puts_out_fire=1}, | 	groups = {water=3, liquid=3, puts_out_fire=1}, | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:lava_flowing", { | minetest.register_node("default:lava_flowing", { | ||||||
| 	description = "Lava (flowing)", | 	description = "Flowing Lava", | ||||||
| 	inventory_image = minetest.inventorycube("default_lava.png"), | 	inventory_image = minetest.inventorycube("default_lava.png"), | ||||||
| 	drawtype = "flowingliquid", | 	drawtype = "flowingliquid", | ||||||
| 	tile_images = {"default_lava.png"}, | 	tiles = {"default_lava.png"}, | ||||||
|  | 	special_tiles = { | ||||||
|  | 		{ | ||||||
|  | 			image="default_lava_flowing_animated.png", | ||||||
|  | 			backface_culling=false, | ||||||
|  | 			animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.3} | ||||||
|  | 		}, | ||||||
|  | 		{ | ||||||
|  | 			image="default_lava_flowing_animated.png", | ||||||
|  | 			backface_culling=true, | ||||||
|  | 			animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.3} | ||||||
|  | 		}, | ||||||
|  | 	}, | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	light_source = LIGHT_MAX - 1, | 	light_source = LIGHT_MAX - 1, | ||||||
| 	walkable = false, | 	walkable = false, | ||||||
| @@ -1052,18 +1065,20 @@ minetest.register_node("default:lava_flowing", { | |||||||
| 	liquid_viscosity = LAVA_VISC, | 	liquid_viscosity = LAVA_VISC, | ||||||
| 	damage_per_second = 4*2, | 	damage_per_second = 4*2, | ||||||
| 	post_effect_color = {a=192, r=255, g=64, b=0}, | 	post_effect_color = {a=192, r=255, g=64, b=0}, | ||||||
| 	special_materials = { | 	groups = {lava=3, liquid=2, hot=3, igniter=1}, | ||||||
| 		{image="default_lava.png", backface_culling=false}, |  | ||||||
| 		{image="default_lava.png", backface_culling=true}, |  | ||||||
| 	}, |  | ||||||
| 	groups = {lava=3, liquid=2, hot=3, igniter=2}, |  | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:lava_source", { | minetest.register_node("default:lava_source", { | ||||||
| 	description = "Lava", | 	description = "Lava Source", | ||||||
| 	inventory_image = minetest.inventorycube("default_lava.png"), | 	inventory_image = minetest.inventorycube("default_lava.png"), | ||||||
| 	drawtype = "liquid", | 	drawtype = "liquid", | ||||||
| 	tile_images = {"default_lava.png"}, | 	tiles = { | ||||||
|  | 		{name="default_lava_source_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}} | ||||||
|  | 	}, | ||||||
|  | 	special_tiles = { | ||||||
|  | 		-- New-style lava source material (mostly unused) | ||||||
|  | 		{name="default_lava.png", backface_culling=false}, | ||||||
|  | 	}, | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	light_source = LIGHT_MAX - 1, | 	light_source = LIGHT_MAX - 1, | ||||||
| 	walkable = false, | 	walkable = false, | ||||||
| @@ -1076,17 +1091,13 @@ minetest.register_node("default:lava_source", { | |||||||
| 	liquid_viscosity = LAVA_VISC, | 	liquid_viscosity = LAVA_VISC, | ||||||
| 	damage_per_second = 4*2, | 	damage_per_second = 4*2, | ||||||
| 	post_effect_color = {a=192, r=255, g=64, b=0}, | 	post_effect_color = {a=192, r=255, g=64, b=0}, | ||||||
| 	special_materials = { | 	groups = {lava=3, liquid=2, hot=3, igniter=1}, | ||||||
| 		-- New-style lava source material (mostly unused) |  | ||||||
| 		{image="default_lava.png", backface_culling=false}, |  | ||||||
| 	}, |  | ||||||
| 	groups = {lava=3, liquid=2, hot=3, igniter=2}, |  | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:torch", { | minetest.register_node("default:torch", { | ||||||
| 	description = "Torch", | 	description = "Torch", | ||||||
| 	drawtype = "torchlike", | 	drawtype = "torchlike", | ||||||
| 	tile_images = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"}, | 	tiles = {"default_torch_on_floor.png", "default_torch_on_ceiling.png", "default_torch.png"}, | ||||||
| 	inventory_image = "default_torch_on_floor.png", | 	inventory_image = "default_torch_on_floor.png", | ||||||
| 	wield_image = "default_torch_on_floor.png", | 	wield_image = "default_torch_on_floor.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -1108,7 +1119,7 @@ minetest.register_node("default:torch", { | |||||||
| minetest.register_node("default:sign_wall", { | minetest.register_node("default:sign_wall", { | ||||||
| 	description = "Sign", | 	description = "Sign", | ||||||
| 	drawtype = "signlike", | 	drawtype = "signlike", | ||||||
| 	tile_images = {"default_sign_wall.png"}, | 	tiles = {"default_sign_wall.png"}, | ||||||
| 	inventory_image = "default_sign_wall.png", | 	inventory_image = "default_sign_wall.png", | ||||||
| 	wield_image = "default_sign_wall.png", | 	wield_image = "default_sign_wall.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -1122,55 +1133,350 @@ minetest.register_node("default:sign_wall", { | |||||||
| 		--wall_bottom = <default> | 		--wall_bottom = <default> | ||||||
| 		--wall_side = <default> | 		--wall_side = <default> | ||||||
| 	}, | 	}, | ||||||
| 	groups = {choppy=2,dig_immediate=2,flammable=2}, | 	groups = {choppy=2,dig_immediate=2}, | ||||||
| 	legacy_wallmounted = true, | 	legacy_wallmounted = true, | ||||||
| 	sounds = default.node_sound_defaults(), | 	sounds = default.node_sound_defaults(), | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		--local n = minetest.env:get_node(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", "hack:sign_text_input") | ||||||
|  | 		meta:set_string("infotext", "\"\"") | ||||||
|  | 	end, | ||||||
|  | 	on_receive_fields = function(pos, formname, fields, sender) | ||||||
|  | 		--print("Sign at "..minetest.pos_to_string(pos).." got "..dump(fields)) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		fields.text = fields.text or "" | ||||||
|  | 		print((sender:get_player_name() or "").." wrote \""..fields.text.. | ||||||
|  | 				"\" to sign at "..minetest.pos_to_string(pos)) | ||||||
|  | 		meta:set_string("text", fields.text) | ||||||
|  | 		meta:set_string("infotext", '"'..fields.text..'"') | ||||||
|  | 	end, | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:chest", { | minetest.register_node("default:chest", { | ||||||
| 	description = "Chest", | 	description = "Chest", | ||||||
| 	tile_images = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", | 	tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", | ||||||
| 		"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, | 		"default_chest_side.png", "default_chest_side.png", "default_chest_front.png"}, | ||||||
| 	paramtype2 = "facedir", | 	paramtype2 = "facedir", | ||||||
| 	metadata_name = "chest", |  | ||||||
| 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, | 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, | ||||||
| 	legacy_facedir_simple = true, | 	legacy_facedir_simple = true, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", | ||||||
|  | 				"invsize[8,9;]".. | ||||||
|  | 				"list[current_name;main;0,0;8,4;]".. | ||||||
|  | 				"list[current_player;main;0,5;8,4;]") | ||||||
|  | 		meta:set_string("infotext", "Chest") | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		inv:set_size("main", 8*4) | ||||||
|  | 	end, | ||||||
|  | 	can_dig = function(pos,player) | ||||||
|  | 		local meta = minetest.env: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 chest at "..minetest.pos_to_string(pos)) | ||||||
|  | 		return minetest.node_metadata_inventory_move_allow_all( | ||||||
|  | 				pos, from_list, from_index, to_list, to_index, count, player) | ||||||
|  | 	end, | ||||||
|  |     on_metadata_inventory_offer = function(pos, listname, index, stack, player) | ||||||
|  | 		minetest.log("action", player:get_player_name().. | ||||||
|  | 				" moves stuff to chest at "..minetest.pos_to_string(pos)) | ||||||
|  | 		return minetest.node_metadata_inventory_offer_allow_all( | ||||||
|  | 				pos, listname, index, stack, player) | ||||||
|  | 	end, | ||||||
|  |     on_metadata_inventory_take = function(pos, listname, index, count, player) | ||||||
|  | 		minetest.log("action", player:get_player_name().. | ||||||
|  | 				" takes stuff from chest at "..minetest.pos_to_string(pos)) | ||||||
|  | 		return minetest.node_metadata_inventory_take_allow_all( | ||||||
|  | 				pos, listname, index, count, player) | ||||||
|  | 	end, | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | local function has_locked_chest_privilege(meta, player) | ||||||
|  | 	if player:get_player_name() ~= meta:get_string("owner") then | ||||||
|  | 		return false | ||||||
|  | 	end | ||||||
|  | 	return true | ||||||
|  | end | ||||||
|  |  | ||||||
| minetest.register_node("default:chest_locked", { | minetest.register_node("default:chest_locked", { | ||||||
| 	description = "Locked Chest", | 	description = "Locked Chest", | ||||||
| 	tile_images = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", | 	tiles = {"default_chest_top.png", "default_chest_top.png", "default_chest_side.png", | ||||||
| 		"default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"}, | 		"default_chest_side.png", "default_chest_side.png", "default_chest_lock.png"}, | ||||||
| 	paramtype2 = "facedir", | 	paramtype2 = "facedir", | ||||||
| 	metadata_name = "locked_chest", |  | ||||||
| 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, | 	groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2}, | ||||||
| 	legacy_facedir_simple = true, | 	legacy_facedir_simple = true, | ||||||
| 	sounds = default.node_sound_wood_defaults(), | 	sounds = default.node_sound_wood_defaults(), | ||||||
|  | 	after_place_node = function(pos, placer) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("owner", placer:get_player_name() or "") | ||||||
|  | 		meta:set_string("infotext", "Locked Chest (owned by ".. | ||||||
|  | 				meta:get_string("owner")..")") | ||||||
|  | 	end, | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", | ||||||
|  | 				"invsize[8,9;]".. | ||||||
|  | 				"list[current_name;main;0,0;8,4;]".. | ||||||
|  | 				"list[current_player;main;0,5;8,4;]") | ||||||
|  | 		meta:set_string("infotext", "Locked Chest") | ||||||
|  | 		meta:set_string("owner", "") | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		inv:set_size("main", 8*4) | ||||||
|  | 	end, | ||||||
|  | 	can_dig = function(pos,player) | ||||||
|  | 		local meta = minetest.env: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) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		if not has_locked_chest_privilege(meta, player) then | ||||||
|  | 			minetest.log("action", player:get_player_name().. | ||||||
|  | 					" tried to access a locked chest belonging to ".. | ||||||
|  | 					meta:get_string("owner").." at ".. | ||||||
|  | 					minetest.pos_to_string(pos)) | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  | 		minetest.log("action", player:get_player_name().. | ||||||
|  | 				" moves stuff in locked chest at "..minetest.pos_to_string(pos)) | ||||||
|  | 		return minetest.node_metadata_inventory_move_allow_all( | ||||||
|  | 				pos, from_list, from_index, to_list, to_index, count, player) | ||||||
|  | 	end, | ||||||
|  |     on_metadata_inventory_offer = function(pos, listname, index, stack, player) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		if not has_locked_chest_privilege(meta, player) then | ||||||
|  | 			minetest.log("action", player:get_player_name().. | ||||||
|  | 					" tried to access a locked chest belonging to ".. | ||||||
|  | 					meta:get_string("owner").." at ".. | ||||||
|  | 					minetest.pos_to_string(pos)) | ||||||
|  | 			return stack | ||||||
|  | 		end | ||||||
|  | 		minetest.log("action", player:get_player_name().. | ||||||
|  | 				" moves stuff to locked chest at "..minetest.pos_to_string(pos)) | ||||||
|  | 		return minetest.node_metadata_inventory_offer_allow_all( | ||||||
|  | 				pos, listname, index, stack, player) | ||||||
|  | 	end, | ||||||
|  |     on_metadata_inventory_take = function(pos, listname, index, count, player) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		if not has_locked_chest_privilege(meta, player) then | ||||||
|  | 			minetest.log("action", player:get_player_name().. | ||||||
|  | 					" tried to access a locked chest belonging to ".. | ||||||
|  | 					meta:get_string("owner").." at ".. | ||||||
|  | 					minetest.pos_to_string(pos)) | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  | 		minetest.log("action", player:get_player_name().. | ||||||
|  | 				" takes stuff from locked chest at "..minetest.pos_to_string(pos)) | ||||||
|  | 		return minetest.node_metadata_inventory_take_allow_all( | ||||||
|  | 				pos, listname, index, count, player) | ||||||
|  | 	end, | ||||||
| }) | }) | ||||||
|  |  | ||||||
|  | default.furnace_inactive_formspec = | ||||||
|  | 	"invsize[8,9;]".. | ||||||
|  | 	"image[2,2;1,1;default_furnace_fire_bg.png]".. | ||||||
|  | 	"list[current_name;fuel;2,3;1,1;]".. | ||||||
|  | 	"list[current_name;src;2,1;1,1;]".. | ||||||
|  | 	"list[current_name;dst;5,1;2,2;]".. | ||||||
|  | 	"list[current_player;main;0,5;8,4;]" | ||||||
|  |  | ||||||
| minetest.register_node("default:furnace", { | minetest.register_node("default:furnace", { | ||||||
| 	description = "Furnace", | 	description = "Furnace", | ||||||
| 	tile_images = {"default_furnace_side.png", "default_furnace_side.png", "default_furnace_side.png", | 	tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png", | ||||||
| 		"default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"}, | 		"default_furnace_side.png", "default_furnace_side.png", "default_furnace_front.png"}, | ||||||
| 	paramtype2 = "facedir", | 	paramtype2 = "facedir", | ||||||
| 	metadata_name = "furnace", |  | ||||||
| 	groups = {cracky=2}, | 	groups = {cracky=2}, | ||||||
| 	legacy_facedir_simple = true, | 	legacy_facedir_simple = true, | ||||||
| 	sounds = default.node_sound_stone_defaults(), | 	sounds = default.node_sound_stone_defaults(), | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", default.furnace_inactive_formspec) | ||||||
|  | 		meta:set_string("infotext", "Furnace") | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		inv:set_size("fuel", 1) | ||||||
|  | 		inv:set_size("src", 1) | ||||||
|  | 		inv:set_size("dst", 4) | ||||||
|  | 	end, | ||||||
|  | 	can_dig = function(pos,player) | ||||||
|  | 		local meta = minetest.env:get_meta(pos); | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		if not inv:is_empty("fuel") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("dst") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("src") then | ||||||
|  | 			return false | ||||||
|  | 		end | ||||||
|  | 		return true | ||||||
|  | 	end, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | minetest.register_node("default:furnace_active", { | ||||||
|  | 	description = "Furnace", | ||||||
|  | 	tiles = {"default_furnace_top.png", "default_furnace_bottom.png", "default_furnace_side.png", | ||||||
|  | 		"default_furnace_side.png", "default_furnace_side.png", "default_furnace_front_active.png"}, | ||||||
|  | 	paramtype2 = "facedir", | ||||||
|  | 	light_source = 8, | ||||||
|  | 	drop = "default:furnace", | ||||||
|  | 	groups = {cracky=2}, | ||||||
|  | 	legacy_facedir_simple = true, | ||||||
|  | 	sounds = default.node_sound_stone_defaults(), | ||||||
|  | 	on_construct = function(pos) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		meta:set_string("formspec", default.furnace_inactive_formspec) | ||||||
|  | 		meta:set_string("infotext", "Furnace"); | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		inv:set_size("fuel", 1) | ||||||
|  | 		inv:set_size("src", 1) | ||||||
|  | 		inv:set_size("dst", 4) | ||||||
|  | 	end, | ||||||
|  | 	can_dig = function(pos,player) | ||||||
|  | 		local meta = minetest.env:get_meta(pos); | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  | 		if not inv:is_empty("fuel") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("dst") then | ||||||
|  | 			return false | ||||||
|  | 		elseif not inv:is_empty("src") then | ||||||
|  | 			return false | ||||||
|  | 		end | ||||||
|  | 		return true | ||||||
|  | 	end, | ||||||
|  | }) | ||||||
|  |  | ||||||
|  | function hacky_swap_node(pos,name) | ||||||
|  | 	local node = minetest.env:get_node(pos) | ||||||
|  | 	local meta = minetest.env:get_meta(pos) | ||||||
|  | 	local meta0 = meta:to_table() | ||||||
|  | 	if node.name == name then | ||||||
|  | 		return | ||||||
|  | 	end | ||||||
|  | 	node.name = name | ||||||
|  | 	local meta0 = meta:to_table() | ||||||
|  | 	minetest.env:set_node(pos,node) | ||||||
|  | 	meta = minetest.env:get_meta(pos) | ||||||
|  | 	meta:from_table(meta0) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | minetest.register_abm({ | ||||||
|  | 	nodenames = {"default:furnace","default:furnace_active"}, | ||||||
|  | 	interval = 1.0, | ||||||
|  | 	chance = 1, | ||||||
|  | 	action = function(pos, node, active_object_count, active_object_count_wider) | ||||||
|  | 		local meta = minetest.env:get_meta(pos) | ||||||
|  | 		for i, name in ipairs({ | ||||||
|  | 				"fuel_totaltime", | ||||||
|  | 				"fuel_time", | ||||||
|  | 				"src_totaltime", | ||||||
|  | 				"src_time" | ||||||
|  | 		}) do | ||||||
|  | 			if meta:get_string(name) == "" then | ||||||
|  | 				meta:set_float(name, 0.0) | ||||||
|  | 			end | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		local inv = meta:get_inventory() | ||||||
|  |  | ||||||
|  | 		local srclist = inv:get_list("src") | ||||||
|  | 		local cooked = nil | ||||||
|  | 		 | ||||||
|  | 		if srclist then | ||||||
|  | 			cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) | ||||||
|  | 		end | ||||||
|  | 		 | ||||||
|  | 		local was_active = false | ||||||
|  | 		 | ||||||
|  | 		if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then | ||||||
|  | 			was_active = true | ||||||
|  | 			meta:set_float("fuel_time", meta:get_float("fuel_time") + 1) | ||||||
|  | 			meta:set_float("src_time", meta:get_float("src_time") + 1) | ||||||
|  | 			if cooked and cooked.item and meta:get_float("src_time") >= cooked.time then | ||||||
|  | 				-- check if there's room for output in "dst" list | ||||||
|  | 				if inv:room_for_item("dst",cooked.item) then | ||||||
|  | 					-- Put result in "dst" list | ||||||
|  | 					inv:add_item("dst", cooked.item) | ||||||
|  | 					-- take stuff from "src" list | ||||||
|  | 					srcstack = inv:get_stack("src", 1) | ||||||
|  | 					srcstack:take_item() | ||||||
|  | 					inv:set_stack("src", 1, srcstack) | ||||||
|  | 				else | ||||||
|  | 					print("Could not insert '"..cooked.item.."'") | ||||||
|  | 				end | ||||||
|  | 				meta:set_string("src_time", 0) | ||||||
|  | 			end | ||||||
|  | 		end | ||||||
|  | 		 | ||||||
|  | 		if meta:get_float("fuel_time") < meta:get_float("fuel_totaltime") then | ||||||
|  | 			local percent = math.floor(meta:get_float("fuel_time") / | ||||||
|  | 					meta:get_float("fuel_totaltime") * 100) | ||||||
|  | 			meta:set_string("infotext","Furnace active: "..percent.."%") | ||||||
|  | 			hacky_swap_node(pos,"default:furnace_active") | ||||||
|  | 			meta:set_string("formspec", | ||||||
|  | 				"invsize[8,9;]".. | ||||||
|  | 				"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:".. | ||||||
|  | 						(100-percent)..":default_furnace_fire_fg.png]".. | ||||||
|  | 				"list[current_name;fuel;2,3;1,1;]".. | ||||||
|  | 				"list[current_name;src;2,1;1,1;]".. | ||||||
|  | 				"list[current_name;dst;5,1;2,2;]".. | ||||||
|  | 				"list[current_player;main;0,5;8,4;]") | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		local fuel = nil | ||||||
|  | 		local cooked = nil | ||||||
|  | 		local fuellist = inv:get_list("fuel") | ||||||
|  | 		local srclist = inv:get_list("src") | ||||||
|  | 		 | ||||||
|  | 		if srclist then | ||||||
|  | 			cooked = minetest.get_craft_result({method = "cooking", width = 1, items = srclist}) | ||||||
|  | 		end | ||||||
|  | 		if fuellist then | ||||||
|  | 			fuel = minetest.get_craft_result({method = "fuel", width = 1, items = fuellist}) | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		if fuel.time <= 0 then | ||||||
|  | 			meta:set_string("infotext","Furnace out of fuel") | ||||||
|  | 			hacky_swap_node(pos,"default:furnace") | ||||||
|  | 			meta:set_string("formspec", default.furnace_inactive_formspec) | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		if cooked.item:is_empty() then | ||||||
|  | 			if was_active then | ||||||
|  | 				meta:set_string("infotext","Furnace is empty") | ||||||
|  | 				hacky_swap_node(pos,"default:furnace") | ||||||
|  | 				meta:set_string("formspec", default.furnace_inactive_formspec) | ||||||
|  | 			end | ||||||
|  | 			return | ||||||
|  | 		end | ||||||
|  |  | ||||||
|  | 		meta:set_string("fuel_totaltime", fuel.time) | ||||||
|  | 		meta:set_string("fuel_time", 0) | ||||||
|  | 		 | ||||||
|  | 		local stack = inv:get_stack("fuel", 1) | ||||||
|  | 		stack:take_item() | ||||||
|  | 		inv:set_stack("fuel", 1, stack) | ||||||
|  | 	end, | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:cobble", { | minetest.register_node("default:cobble", { | ||||||
| 	description = "Cobble", | 	description = "Cobblestone", | ||||||
| 	tile_images = {"default_cobble.png"}, | 	tiles = {"default_cobble.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	sounds = default.node_sound_stone_defaults(), | 	sounds = default.node_sound_stone_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:mossycobble", { | minetest.register_node("default:mossycobble", { | ||||||
| 	description = "Mossy Cobble", | 	description = "Mossy Cobblestone", | ||||||
| 	tile_images = {"default_mossycobble.png"}, | 	tiles = {"default_mossycobble.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {cracky=3}, | 	groups = {cracky=3}, | ||||||
| 	sounds = default.node_sound_stone_defaults(), | 	sounds = default.node_sound_stone_defaults(), | ||||||
| @@ -1178,15 +1484,15 @@ minetest.register_node("default:mossycobble", { | |||||||
|  |  | ||||||
| minetest.register_node("default:steelblock", { | minetest.register_node("default:steelblock", { | ||||||
| 	description = "Steel Block", | 	description = "Steel Block", | ||||||
| 	tile_images = {"default_steel_block.png"}, | 	tiles = {"default_steel_block.png"}, | ||||||
| 	is_ground_content = true, | 	is_ground_content = true, | ||||||
| 	groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2}, | 	groups = {snappy=1,bendy=2,cracky=1,melty=2,level=2}, | ||||||
| 	sounds = default.node_sound_stone_defaults(), | 	sounds = default.node_sound_stone_defaults(), | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:nyancat", { | minetest.register_node("default:nyancat", { | ||||||
| 	description = "Nyancat", | 	description = "Nyan Cat", | ||||||
| 	tile_images = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png", | 	tiles = {"default_nc_side.png", "default_nc_side.png", "default_nc_side.png", | ||||||
| 		"default_nc_side.png", "default_nc_back.png", "default_nc_front.png"}, | 		"default_nc_side.png", "default_nc_back.png", "default_nc_front.png"}, | ||||||
| 	inventory_image = "default_nc_front.png", | 	inventory_image = "default_nc_front.png", | ||||||
| 	paramtype2 = "facedir", | 	paramtype2 = "facedir", | ||||||
| @@ -1196,8 +1502,8 @@ minetest.register_node("default:nyancat", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_node("default:nyancat_rainbow", { | minetest.register_node("default:nyancat_rainbow", { | ||||||
| 	description = "Nyancat Rainbow", | 	description = "Nyan Cat Rainbow", | ||||||
| 	tile_images = {"default_nc_rb.png"}, | 	tiles = {"default_nc_rb.png"}, | ||||||
| 	inventory_image = "default_nc_rb.png", | 	inventory_image = "default_nc_rb.png", | ||||||
| 	groups = {cracky=2}, | 	groups = {cracky=2}, | ||||||
| 	sounds = default.node_sound_defaults(), | 	sounds = default.node_sound_defaults(), | ||||||
| @@ -1207,7 +1513,7 @@ minetest.register_node("default:sapling", { | |||||||
| 	description = "Sapling", | 	description = "Sapling", | ||||||
| 	drawtype = "plantlike", | 	drawtype = "plantlike", | ||||||
| 	visual_scale = 1.0, | 	visual_scale = 1.0, | ||||||
| 	tile_images = {"default_sapling.png"}, | 	tiles = {"default_sapling.png"}, | ||||||
| 	inventory_image = "default_sapling.png", | 	inventory_image = "default_sapling.png", | ||||||
| 	wield_image = "default_sapling.png", | 	wield_image = "default_sapling.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -1220,7 +1526,7 @@ minetest.register_node("default:apple", { | |||||||
| 	description = "Apple", | 	description = "Apple", | ||||||
| 	drawtype = "plantlike", | 	drawtype = "plantlike", | ||||||
| 	visual_scale = 1.0, | 	visual_scale = 1.0, | ||||||
| 	tile_images = {"default_apple.png"}, | 	tiles = {"default_apple.png"}, | ||||||
| 	inventory_image = "default_apple.png", | 	inventory_image = "default_apple.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| 	sunlight_propagates = true, | 	sunlight_propagates = true, | ||||||
| @@ -1234,7 +1540,7 @@ minetest.register_node("default:dry_shrub", { | |||||||
| 	description = "Dry Shrub", | 	description = "Dry Shrub", | ||||||
| 	drawtype = "plantlike", | 	drawtype = "plantlike", | ||||||
| 	visual_scale = 1.0, | 	visual_scale = 1.0, | ||||||
| 	tile_images = {"default_dry_shrub.png"}, | 	tiles = {"default_dry_shrub.png"}, | ||||||
| 	inventory_image = "default_dry_shrub.png", | 	inventory_image = "default_dry_shrub.png", | ||||||
| 	wield_image = "default_dry_shrub.png", | 	wield_image = "default_dry_shrub.png", | ||||||
| 	paramtype = "light", | 	paramtype = "light", | ||||||
| @@ -1267,33 +1573,33 @@ minetest.register_craftitem("default:book", { | |||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("default:coal_lump", { | minetest.register_craftitem("default:coal_lump", { | ||||||
| 	description = "Lump of coal", | 	description = "Coal Lump", | ||||||
| 	inventory_image = "default_coal_lump.png", | 	inventory_image = "default_coal_lump.png", | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("default:iron_lump", { | minetest.register_craftitem("default:iron_lump", { | ||||||
| 	description = "Lump of iron", | 	description = "Iron Lump", | ||||||
| 	inventory_image = "default_iron_lump.png", | 	inventory_image = "default_iron_lump.png", | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("default:clay_lump", { | minetest.register_craftitem("default:clay_lump", { | ||||||
| 	description = "Lump of clay", | 	description = "Clay Lump", | ||||||
| 	inventory_image = "default_clay_lump.png", | 	inventory_image = "default_clay_lump.png", | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("default:steel_ingot", { | minetest.register_craftitem("default:steel_ingot", { | ||||||
| 	description = "Steel ingot", | 	description = "Steel Ingot", | ||||||
| 	inventory_image = "default_steel_ingot.png", | 	inventory_image = "default_steel_ingot.png", | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("default:clay_brick", { | minetest.register_craftitem("default:clay_brick", { | ||||||
| 	description = "Clay brick", | 	description = "Clay Brick", | ||||||
| 	inventory_image = "default_steel_ingot.png", | 	inventory_image = "default_steel_ingot.png", | ||||||
| 	inventory_image = "default_clay_brick.png", | 	inventory_image = "default_clay_brick.png", | ||||||
| }) | }) | ||||||
|  |  | ||||||
| minetest.register_craftitem("default:scorched_stuff", { | minetest.register_craftitem("default:scorched_stuff", { | ||||||
| 	description = "Scorched stuff", | 	description = "Scorched Stuff", | ||||||
| 	inventory_image = "default_scorched_stuff.png", | 	inventory_image = "default_scorched_stuff.png", | ||||||
| }) | }) | ||||||
|  |  | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ minetest.register_alias("mapgen_desert_stone", "default:desert_stone") | |||||||
| -- Ore generation | -- Ore generation | ||||||
| -- | -- | ||||||
|  |  | ||||||
| local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, ore_per_chunk, height_min, height_max) | local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, chunk_size, ore_per_chunk, height_min, height_max) | ||||||
| 	if maxp.y < height_min or minp.y > height_max then | 	if maxp.y < height_min or minp.y > height_max then | ||||||
| 		return | 		return | ||||||
| 	end | 	end | ||||||
| @@ -38,10 +38,6 @@ local function generate_ore(name, wherein, minp, maxp, seed, chunks_per_volume, | |||||||
| 	local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1) | 	local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1) | ||||||
| 	local pr = PseudoRandom(seed) | 	local pr = PseudoRandom(seed) | ||||||
| 	local num_chunks = math.floor(chunks_per_volume * volume) | 	local num_chunks = math.floor(chunks_per_volume * volume) | ||||||
| 	local chunk_size = 3 |  | ||||||
| 	if ore_per_chunk <= 4 then |  | ||||||
| 		chunk_size = 2 |  | ||||||
| 	end |  | ||||||
| 	local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk) | 	local inverse_chance = math.floor(chunk_size*chunk_size*chunk_size / ore_per_chunk) | ||||||
| 	--print("generate_ore num_chunks: "..dump(num_chunks)) | 	--print("generate_ore num_chunks: "..dump(num_chunks)) | ||||||
| 	for i=1,num_chunks do | 	for i=1,num_chunks do | ||||||
| @@ -84,11 +80,66 @@ function default.make_cactus(pos, size) | |||||||
| 	end | 	end | ||||||
| end | end | ||||||
|  |  | ||||||
|  | -- facedir: 0/1/2/3 (head node facedir value) | ||||||
|  | -- length: length of rainbow tail | ||||||
|  | function default.make_nyancat(pos, facedir, length) | ||||||
|  | 	local tailvec = {x=0, y=0, z=0} | ||||||
|  | 	if facedir == 0 then | ||||||
|  | 		tailvec.z = 1 | ||||||
|  | 	elseif facedir == 1 then | ||||||
|  | 		tailvec.x = 1 | ||||||
|  | 	elseif facedir == 2 then | ||||||
|  | 		tailvec.z = -1 | ||||||
|  | 	elseif facedir == 3 then | ||||||
|  | 		tailvec.x = -1 | ||||||
|  | 	else | ||||||
|  | 		print("default.make_nyancat(): Invalid facedir: "+dump(facedir)) | ||||||
|  | 		facedir = 0 | ||||||
|  | 		tailvec.z = 1 | ||||||
|  | 	end | ||||||
|  | 	local p = {x=pos.x, y=pos.y, z=pos.z} | ||||||
|  | 	minetest.env:set_node(p, {name="default:nyancat", param2=facedir}) | ||||||
|  | 	for i=1,length do | ||||||
|  | 		p.x = p.x + tailvec.x | ||||||
|  | 		p.z = p.z + tailvec.z | ||||||
|  | 		minetest.env:set_node(p, {name="default:nyancat_rainbow"}) | ||||||
|  | 	end | ||||||
|  | end | ||||||
|  |  | ||||||
|  | function generate_nyancats(seed, minp, maxp) | ||||||
|  | 	local height_min = -31000 | ||||||
|  | 	local height_max = -32 | ||||||
|  | 	if maxp.y < height_min or minp.y > height_max then | ||||||
|  | 		return | ||||||
|  | 	end | ||||||
|  | 	local y_min = math.max(minp.y, height_min) | ||||||
|  | 	local y_max = math.min(maxp.y, height_max) | ||||||
|  | 	local volume = (maxp.x-minp.x+1)*(y_max-y_min+1)*(maxp.z-minp.z+1) | ||||||
|  | 	local pr = PseudoRandom(seed + 9324342) | ||||||
|  | 	local max_num_nyancats = math.floor(volume / (16*16*16)) | ||||||
|  | 	for i=1,max_num_nyancats do | ||||||
|  | 		if pr:next(0, 1000) == 0 then | ||||||
|  | 			local x0 = pr:next(minp.x, maxp.x) | ||||||
|  | 			local y0 = pr:next(minp.y, maxp.y) | ||||||
|  | 			local z0 = pr:next(minp.z, maxp.z) | ||||||
|  | 			local p0 = {x=x0, y=y0, z=z0} | ||||||
|  | 			default.make_nyancat(p0, pr:next(0,3), pr:next(3,15)) | ||||||
|  | 		end | ||||||
|  | 	end | ||||||
|  | end | ||||||
|  |  | ||||||
| minetest.register_on_generated(function(minp, maxp, seed) | minetest.register_on_generated(function(minp, maxp, seed) | ||||||
| 	generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed,   1/8/8/8,    5, -31000,  64) | 	-- Generate regular ores | ||||||
| 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/16/16/16, 5,   -5,   7) | 	generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+0, 1/8/8/8,    3, 8, -31000,  64) | ||||||
| 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/12/12/12, 5, -16,   -5) | 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+1, 1/12/12/12, 2, 3,    -15,   2) | ||||||
| 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/9/9/9,    5, -31000, -17) | 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+2, 1/9/9/9,    3, 5,    -63, -16) | ||||||
|  | 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+3, 1/7/7/7,    3, 5, -31000, -64) | ||||||
|  | 	generate_ore("default:mese",            "default:stone", minp, maxp, seed+4, 1/16/16/16, 2, 3,   -127, -64) | ||||||
|  | 	generate_ore("default:mese",            "default:stone", minp, maxp, seed+5, 1/9/9/9,    3, 5, -31000,-128) | ||||||
|  | 	 | ||||||
|  | 	generate_ore("default:stone_with_coal", "default:stone", minp, maxp, seed+7, 1/24/24/24, 6,27, -31000,  0) | ||||||
|  | 	generate_ore("default:stone_with_iron", "default:stone", minp, maxp, seed+6, 1/24/24/24, 6,27, -31000, -64) | ||||||
|  |  | ||||||
| 	if maxp.y >= 2 and minp.y <= 0 then | 	if maxp.y >= 2 and minp.y <= 0 then | ||||||
| 		-- Generate clay | 		-- Generate clay | ||||||
| 		-- Assume X and Z lengths are equal | 		-- Assume X and Z lengths are equal | ||||||
| @@ -217,5 +268,8 @@ minetest.register_on_generated(function(minp, maxp, seed) | |||||||
| 		end | 		end | ||||||
| 		end | 		end | ||||||
| 	end | 	end | ||||||
|  |  | ||||||
|  | 	-- Generate nyan cats | ||||||
|  | 	generate_nyancats(seed, minp, maxp) | ||||||
| end) | end) | ||||||
|  |  | ||||||
|   | |||||||
| Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_furnace_bottom.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 731 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_furnace_fire_bg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 313 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_furnace_fire_fg.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 865 B | 
| Before Width: | Height: | Size: 246 B After Width: | Height: | Size: 651 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_furnace_front_active.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 826 B | 
| Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 731 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_furnace_top.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 731 B | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_lava_flowing_animated.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 8.5 KiB | 
							
								
								
									
										
											BIN
										
									
								
								mods/default/textures/default_lava_source_animated.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| After Width: | Height: | Size: 3.4 KiB | 
| Before Width: | Height: | Size: 299 B After Width: | Height: | Size: 203 B | 
| Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 483 B | 
| @@ -11,18 +11,18 @@ Original license text: | |||||||
|  |  | ||||||
| There has been unsuccesful attempts to contact the original author. Thus, | There has been unsuccesful attempts to contact the original author. Thus, | ||||||
| based on the intentions of the author, it is assumed that this code is | based on the intentions of the author, it is assumed that this code is | ||||||
| distributable and modifiable under GPLv2+later, under which Minetest is | distributable and modifiable under LGPLv2+later, under which Minetest is | ||||||
| distributed. | distributed. | ||||||
|  |  | ||||||
| Modifications: | Modifications: | ||||||
|   Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com> |   Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com> | ||||||
|  |  | ||||||
| This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU Lesser General Public License as published by | ||||||
| the Free Software Foundation; either version 2 of the License, or | the Free Software Foundation; either version 2.1 of the License, or | ||||||
| (at your option) any later version. | (at your option) any later version. | ||||||
|  |  | ||||||
| http://www.gnu.org/licenses/gpl-2.0.html | http://www.gnu.org/licenses/lgpl-2.1.html | ||||||
|  |  | ||||||
| License of media (textures and sounds) | License of media (textures and sounds) | ||||||
| -------------------------------------- | -------------------------------------- | ||||||
|   | |||||||
| @@ -6,11 +6,11 @@ License of source code: | |||||||
| Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com> | Copyright (C) 2012 Perttu Ahola (celeron55) <celeron55@gmail.com> | ||||||
|  |  | ||||||
| This program is free software; you can redistribute it and/or modify | This program is free software; you can redistribute it and/or modify | ||||||
| it under the terms of the GNU General Public License as published by | it under the terms of the GNU Lesser General Public License as published by | ||||||
| the Free Software Foundation; either version 2 of the License, or | the Free Software Foundation; either version 2.1 of the License, or | ||||||
| (at your option) any later version. | (at your option) any later version. | ||||||
|  |  | ||||||
| http://www.gnu.org/licenses/gpl-2.0.html | http://www.gnu.org/licenses/lgpl-2.1.html | ||||||
|  |  | ||||||
| License of media (textures and sounds) | License of media (textures and sounds) | ||||||
| -------------------------------------- | -------------------------------------- | ||||||
|   | |||||||
| @@ -5,7 +5,7 @@ minetest.register_node("fire:basic_flame", { | |||||||
| 	drawtype = "glasslike", | 	drawtype = "glasslike", | ||||||
| 	tile_images = {"fire_basic_flame.png"}, | 	tile_images = {"fire_basic_flame.png"}, | ||||||
| 	light_source = 14, | 	light_source = 14, | ||||||
| 	groups = {igniter=3,dig_immediate=3}, | 	groups = {igniter=2,dig_immediate=3}, | ||||||
| 	drop = '', | 	drop = '', | ||||||
| 	walkable = false, | 	walkable = false, | ||||||
| }) | }) | ||||||
|   | |||||||
							
								
								
									
										26
									
								
								mods/stairs/README.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,26 @@ | |||||||
|  | Minetest 0.4 mod: stairs | ||||||
|  | ========================= | ||||||
|  |  | ||||||
|  | License of source code: | ||||||
|  | ----------------------- | ||||||
|  | Copyright (C) 2011-2012 Kahrl <kahrl@gmx.net> | ||||||
|  | Copyright (C) 2011-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | ||||||
|  |  | ||||||
|  | This program is free software; you can redistribute it and/or modify | ||||||
|  | it under the terms of the GNU Lesser General Public License as published by | ||||||
|  | the Free Software Foundation; either version 2 of the License, or | ||||||
|  | (at your option) any later version. | ||||||
|  |  | ||||||
|  | http://www.gnu.org/licenses/lgpl-2.1.html | ||||||
|  |  | ||||||
|  | License of media (textures and sounds) | ||||||
|  | -------------------------------------- | ||||||
|  | Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)                                  | ||||||
|  | http://creativecommons.org/licenses/by-sa/3.0/ | ||||||
|  |  | ||||||
|  | Authors of media files | ||||||
|  | ----------------------- | ||||||
|  | Everything not listed in here: | ||||||
|  | Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com> | ||||||
|  |  | ||||||
|  |  | ||||||
							
								
								
									
										1
									
								
								mods/stairs/depends.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1 @@ | |||||||
|  | default | ||||||
							
								
								
									
										146
									
								
								mods/stairs/init.lua
									
									
									
									
									
										Normal file
									
								
							
							
						
						| @@ -0,0 +1,146 @@ | |||||||
|  | -- Minetest 0.4 mod: stairs | ||||||
|  | -- See README.txt for licensing and other information. | ||||||
|  |  | ||||||
|  | stairs = {} | ||||||
|  |  | ||||||
|  | -- Node will be called stairs:stair_<subname> | ||||||
|  | function stairs.register_stair(subname, recipeitem, groups, images, description) | ||||||
|  | 	minetest.register_node("stairs:stair_" .. subname, { | ||||||
|  | 		description = description, | ||||||
|  | 		drawtype = "nodebox", | ||||||
|  | 		tiles = images, | ||||||
|  | 		paramtype = "light", | ||||||
|  | 		paramtype2 = "facedir", | ||||||
|  | 		is_ground_content = true, | ||||||
|  | 		groups = groups, | ||||||
|  | 		node_box = { | ||||||
|  | 			type = "fixed", | ||||||
|  | 			fixed = { | ||||||
|  | 				{-0.5, -0.5, -0.5, 0.5, 0, 0.5}, | ||||||
|  | 				{-0.5, 0, 0, 0.5, 0.5, 0.5}, | ||||||
|  | 			}, | ||||||
|  | 		}, | ||||||
|  | 	}) | ||||||
|  |  | ||||||
|  | 	minetest.register_craft({ | ||||||
|  | 		output = 'stairs:stair_' .. subname .. ' 4', | ||||||
|  | 		recipe = { | ||||||
|  | 			{recipeitem, "", ""}, | ||||||
|  | 			{recipeitem, recipeitem, ""}, | ||||||
|  | 			{recipeitem, recipeitem, recipeitem}, | ||||||
|  | 		}, | ||||||
|  | 	}) | ||||||
|  |  | ||||||
|  | 	-- Flipped recipe for the silly minecrafters | ||||||
|  | 	minetest.register_craft({ | ||||||
|  | 		output = 'stairs:stair_' .. subname .. ' 4', | ||||||
|  | 		recipe = { | ||||||
|  | 			{"", "", recipeitem}, | ||||||
|  | 			{"", recipeitem, recipeitem}, | ||||||
|  | 			{recipeitem, recipeitem, recipeitem}, | ||||||
|  | 		}, | ||||||
|  | 	}) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | -- Node will be called stairs:slab_<subname> | ||||||
|  | function stairs.register_slab(subname, recipeitem, groups, images, description) | ||||||
|  | 	minetest.register_node("stairs:slab_" .. subname, { | ||||||
|  | 		description = description, | ||||||
|  | 		drawtype = "nodebox", | ||||||
|  | 		tiles = images, | ||||||
|  | 		paramtype = "light", | ||||||
|  | 		is_ground_content = true, | ||||||
|  | 		groups = groups, | ||||||
|  | 		node_box = { | ||||||
|  | 			type = "fixed", | ||||||
|  | 			fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, | ||||||
|  | 		}, | ||||||
|  | 		selection_box = { | ||||||
|  | 			type = "fixed", | ||||||
|  | 			fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, | ||||||
|  | 		}, | ||||||
|  | 		on_place = function(itemstack, placer, pointed_thing) | ||||||
|  | 			if pointed_thing.type ~= "node" then | ||||||
|  | 				return itemstack | ||||||
|  | 			end | ||||||
|  |  | ||||||
|  | 			-- If it's being placed on an another similar one, replace it with | ||||||
|  | 			-- a full block | ||||||
|  | 			local slabpos = nil | ||||||
|  | 			local slabnode = nil | ||||||
|  | 			local p0 = pointed_thing.under | ||||||
|  | 			local p1 = pointed_thing.above | ||||||
|  | 			local n0 = minetest.env:get_node(p0) | ||||||
|  | 			local n1 = minetest.env:get_node(p1) | ||||||
|  | 			if n0.name == "stairs:slab_" .. subname then | ||||||
|  | 				slabpos = p0 | ||||||
|  | 				slabnode = n0 | ||||||
|  | 			elseif n1.name == "stairs:slab_" .. subname then | ||||||
|  | 				slabpos = p1 | ||||||
|  | 				slabnode = n1 | ||||||
|  | 			end | ||||||
|  | 			if slabpos then | ||||||
|  | 				-- Remove the slab at slabpos | ||||||
|  | 				minetest.env:remove_node(slabpos) | ||||||
|  | 				-- Make a fake stack of a single item and try to place it | ||||||
|  | 				local fakestack = ItemStack(recipeitem) | ||||||
|  | 				pointed_thing.above = slabpos | ||||||
|  | 				fakestack = minetest.item_place(fakestack, placer, pointed_thing) | ||||||
|  | 				-- If the item was taken from the fake stack, decrement original | ||||||
|  | 				if not fakestack or fakestack:is_empty() then | ||||||
|  | 					itemstack:take_item(1) | ||||||
|  | 				-- Else put old node back | ||||||
|  | 				else | ||||||
|  | 					minetest.env:set_node(slabpos, slabnode) | ||||||
|  | 				end | ||||||
|  | 				return itemstack | ||||||
|  | 			end | ||||||
|  | 			 | ||||||
|  | 			-- Otherwise place regularly | ||||||
|  | 			return minetest.item_place(itemstack, placer, pointed_thing) | ||||||
|  | 		end, | ||||||
|  | 	}) | ||||||
|  |  | ||||||
|  | 	minetest.register_craft({ | ||||||
|  | 		output = 'stairs:slab_' .. subname .. ' 3', | ||||||
|  | 		recipe = { | ||||||
|  | 			{recipeitem, recipeitem, recipeitem}, | ||||||
|  | 		}, | ||||||
|  | 	}) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | -- Nodes will be called stairs:{stair,slab}_<subname> | ||||||
|  | function stairs.register_stair_and_slab(subname, recipeitem, groups, images, desc_stair, desc_slab) | ||||||
|  | 	stairs.register_stair(subname, recipeitem, groups, images, desc_stair) | ||||||
|  | 	stairs.register_slab(subname, recipeitem, groups, images, desc_slab) | ||||||
|  | end | ||||||
|  |  | ||||||
|  | stairs.register_stair_and_slab("wood", "default:wood", | ||||||
|  | 		{snappy=2,choppy=2,oddly_breakable_by_hand=2}, | ||||||
|  | 		{"default_wood.png"}, | ||||||
|  | 		"Wooden stair", | ||||||
|  | 		"Wooden slab") | ||||||
|  |  | ||||||
|  | stairs.register_stair_and_slab("stone", "default:stone", | ||||||
|  | 		{cracky=3}, | ||||||
|  | 		{"default_stone.png"}, | ||||||
|  | 		"Stone stair", | ||||||
|  | 		"Stone slab") | ||||||
|  |  | ||||||
|  | stairs.register_stair_and_slab("cobble", "default:cobble", | ||||||
|  | 		{cracky=3}, | ||||||
|  | 		{"default_cobble.png"}, | ||||||
|  | 		"Cobble stair", | ||||||
|  | 		"Cobble slab") | ||||||
|  |  | ||||||
|  | stairs.register_stair_and_slab("brick", "default:brick", | ||||||
|  | 		{cracky=3}, | ||||||
|  | 		{"default_brick.png"}, | ||||||
|  | 		"Brick stair", | ||||||
|  | 		"Brick slab") | ||||||
|  |  | ||||||
|  | stairs.register_stair_and_slab("sandstone", "default:sandstone", | ||||||
|  | 		{crumbly=2,cracky=2}, | ||||||
|  | 		{"default_sandstone.png"}, | ||||||
|  | 		"Sandstone stair", | ||||||
|  | 		"Sandstone slab") | ||||||