plants
>added plants >added more greenblock and green door >fixed error with the light sources
@@ -17,6 +17,7 @@
 | 
			
		||||
local doors = {
 | 
			
		||||
	{"scifi_nodes:door2a","scifi_nodes:door2b","scifi_nodes:door2c","scifi_nodes:door2d","2","black"},
 | 
			
		||||
	{"scifi_nodes:door3a","scifi_nodes:door3b","scifi_nodes:door3c","scifi_nodes:door3d","3","white"},
 | 
			
		||||
	{"scifi_nodes:door4a","scifi_nodes:door4b","scifi_nodes:door4c","scifi_nodes:door4d","4","green"},
 | 
			
		||||
	{"scifi_nodes:door1a","scifi_nodes:door1b","scifi_nodes:door1c","scifi_nodes:door1d","1","Doom"},}
 | 
			
		||||
 | 
			
		||||
for i in ipairs (doors) do
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										84
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						@@ -54,6 +54,52 @@ minetest.register_node("scifi_nodes:stripes2", {
 | 
			
		||||
	groups = {cracky=1}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_node("scifi_nodes:gblock", {
 | 
			
		||||
	description = "Green metal block",
 | 
			
		||||
	sunlight_propagates = false,
 | 
			
		||||
	tiles = {
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock.png"
 | 
			
		||||
	},
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	groups = {cracky=1}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_node("scifi_nodes:gblock2", {
 | 
			
		||||
	description = "Green metal block 2",
 | 
			
		||||
	sunlight_propagates = false,
 | 
			
		||||
	tiles = {
 | 
			
		||||
		"scifi_nodes_gblock2_top.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock2.png",
 | 
			
		||||
		"scifi_nodes_gblock2_fx.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock2_front1.png"
 | 
			
		||||
	},
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
	groups = {cracky=1}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
minetest.register_node("scifi_nodes:gblock3", {
 | 
			
		||||
	description = "Green metal block 3",
 | 
			
		||||
	sunlight_propagates = false,
 | 
			
		||||
	tiles = {
 | 
			
		||||
		"scifi_nodes_gblock2_top.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock2.png",
 | 
			
		||||
		"scifi_nodes_gblock2_fx.png",
 | 
			
		||||
		"scifi_nodes_gblock.png",
 | 
			
		||||
		"scifi_nodes_gblock2_screen.png"
 | 
			
		||||
	},
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	paramtype2 = "facedir",
 | 
			
		||||
	groups = {cracky=1}
 | 
			
		||||
})
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -322,15 +368,14 @@ node.types = {
 | 
			
		||||
	{"doomengine",      "Doom engine wall",       "doomengine"},
 | 
			
		||||
	{"monitorwall",      "Wall monitors",       "monitorwall"},
 | 
			
		||||
	{"screen3",      "Wall monitor",       "screen3"},
 | 
			
		||||
	{"doomlight",      "Doom light",       "doomlight", "12"},
 | 
			
		||||
	{"bluwllight",      "Blue wall light",       "capsule3", "20"},
 | 
			
		||||
	{"doomlight",      "Doom light",       "doomlight", 12},
 | 
			
		||||
	{"bluwllight",      "Blue wall light",       "capsule3", 20},
 | 
			
		||||
	{"fan",      "Fan",       "fan"},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for _, row in ipairs(node.types) do
 | 
			
		||||
	local name = row[1]
 | 
			
		||||
	local desc = row[2]
 | 
			
		||||
	local craft_color_group = row[3]
 | 
			
		||||
	local light = row[4]
 | 
			
		||||
	-- Node Definition
 | 
			
		||||
	minetest.register_node("scifi_nodes:"..name, {
 | 
			
		||||
@@ -342,6 +387,39 @@ for _, row in ipairs(node.types) do
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
node.plants = {
 | 
			
		||||
	{"flower1", "Glow flower", 1, 50},
 | 
			
		||||
	{"flower2", "Pink flower", 1.5, 10},
 | 
			
		||||
	{"flower3", "Triffid", 2, 0},
 | 
			
		||||
	{"plant1", "Bulb plant", 1, 0},
 | 
			
		||||
	{"plant2", "Trap plant", 1.5, 30},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
for _, row in ipairs(node.plants) do
 | 
			
		||||
	local name = row[1]
 | 
			
		||||
	local desc = row[2]
 | 
			
		||||
	local size = row[3]
 | 
			
		||||
	local light = row[4]
 | 
			
		||||
	-- Node Definition
 | 
			
		||||
	minetest.register_node("scifi_nodes:"..name, {
 | 
			
		||||
		description = desc,
 | 
			
		||||
		tiles = {"scifi_nodes_"..name..".png"},
 | 
			
		||||
		drawtype = "plantlike",
 | 
			
		||||
		inventory_image = {"scifi_nodes_"..name..".png"},
 | 
			
		||||
		groups = {snappy=1, oddly_breakable_by_hand=1, dig_immediate=3, flora=1},
 | 
			
		||||
		paramtype = "light",
 | 
			
		||||
		visual_scale = size,
 | 
			
		||||
		selection_box = {
 | 
			
		||||
		type = "fixed",
 | 
			
		||||
		fixed = {
 | 
			
		||||
			{-0.3, -0.5, -0.3, 0.3, 0.5, 0.3},
 | 
			
		||||
		}
 | 
			
		||||
		},
 | 
			
		||||
		is_ground_content = false,
 | 
			
		||||
		light_source = light,
 | 
			
		||||
	})
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
--chest code from default(Copyright (C) 2012 celeron55, Perttu Ahola <celeron55@gmail.com>)
 | 
			
		||||
 | 
			
		||||
local chest_formspec =
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_bottom.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 382 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_bottom0.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 187 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_edge.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 91 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_inv.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 299 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_rbottom.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 373 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_rbottom0.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 194 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_rtop.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 351 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_rtopo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 159 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_top.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 367 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_door4a_topo.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 161 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_flower1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 514 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_flower2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 653 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_flower3.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 733 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_gblock.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 391 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_gblock2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 469 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_gblock2_front1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 333 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_gblock2_fx.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 499 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_gblock2_screen.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 490 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_gblock2_top.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 270 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_plant1.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 501 B  | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_plant2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						| 
		 After Width: | Height: | Size: 935 B  |