diff options
Diffstat (limited to 'cavestuff')
| -rw-r--r-- | cavestuff/depends.txt | 2 | ||||
| -rw-r--r-- | cavestuff/init.lua | 3 | ||||
| -rw-r--r-- | cavestuff/nodes.lua | 16 | 
3 files changed, 12 insertions, 9 deletions
| diff --git a/cavestuff/depends.txt b/cavestuff/depends.txt index 3a7daa1..d46eade 100644 --- a/cavestuff/depends.txt +++ b/cavestuff/depends.txt @@ -1,2 +1,2 @@  default - +plantlife_i18n diff --git a/cavestuff/init.lua b/cavestuff/init.lua index f2bed1a..ad8b9f4 100644 --- a/cavestuff/init.lua +++ b/cavestuff/init.lua @@ -4,6 +4,9 @@ local version 	= "0.0.3"  local mname		= "cavestuff"  ----------------------------------------------------------------------------------------------- +-- support for i18n +local S = plantlife_i18n.gettext +  dofile(minetest.get_modpath("cavestuff").."/nodes.lua")  dofile(minetest.get_modpath("cavestuff").."/mapgen.lua") diff --git a/cavestuff/nodes.lua b/cavestuff/nodes.lua index dc537cf..6d919b9 100644 --- a/cavestuff/nodes.lua +++ b/cavestuff/nodes.lua @@ -1,3 +1,6 @@ +-- support for i18n +local S = plantlife_i18n.gettext +  --Rocks  local cbox = { @@ -6,7 +9,7 @@ local cbox = {  }  minetest.register_node("cavestuff:pebble_1",{ -	description = "Pebble", +	description = S("Pebble"),  	drawtype = "mesh",  	mesh = "cavestuff_pebble.obj",      tiles = {"undergrowth_pebble.png"}, @@ -39,7 +42,7 @@ minetest.register_node("cavestuff:pebble_2",{  })  minetest.register_node("cavestuff:desert_pebble_1",{ -	description = "Desert Pebble", +	description = S("Desert Pebble"),  	drawtype = "mesh",  	mesh = "cavestuff_pebble.obj",      tiles = {"default_desert_stone.png"}, @@ -76,7 +79,7 @@ minetest.register_node("cavestuff:stalactite_1",{  	drawtype="nodebox",  	tiles = {"undergrowth_pebble.png"},  	groups = {cracky=3,attached_node=1}, -	description = "Stalactite", +	description = S("Stalactite"),  	paramtype = "light",  	paramtype2 = "wallmounted",  	node_box = { @@ -88,10 +91,10 @@ minetest.register_node("cavestuff:stalactite_1",{  			{-0.037500,-0.837500,0.037500,0.037500,0.500000,-0.025000},  		}  	}, -	 +  	on_place = function(itemstack, placer, pointed_thing)  		local pt = pointed_thing -		if minetest.get_node(pt.under).name=="default:stone"  +		if minetest.get_node(pt.under).name=="default:stone"  		and minetest.get_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}).name=="air"  		and minetest.get_node({x=pt.under.x, y=pt.under.y-2, z=pt.under.z}).name=="air" then  			minetest.set_node({x=pt.under.x, y=pt.under.y-1, z=pt.under.z}, {name="cavestuff:stalactite_"..math.random(1,3)}) @@ -140,6 +143,3 @@ minetest.register_node("cavestuff:stalactite_3",{  })  --Stalagmites - - - | 
