mirror of
				https://github.com/D00Med/scifi_nodes.git
				synced 2025-10-31 22:25:22 +01:00 
			
		
		
		
	Compare commits
	
		
			19 Commits
		
	
	
		
			mtinfo
			...
			2fd4de11c0
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 2fd4de11c0 | |||
|  | 85aa74e98b | ||
|  | 5b9431ea18 | ||
| b88b7349a5 | |||
|  | 53d9659051 | ||
| c30ae4b3bd | |||
|  | 79ba8cabc3 | ||
| 6cf45fcd43 | |||
| 1ded358e04 | |||
| ecfaa4714a | |||
| c341cb8a20 | |||
| d66e04f9b1 | |||
| d3d6a7bf79 | |||
| e34fdde795 | |||
| 1993068ed1 | |||
| 436f51ab0d | |||
| 749d59a530 | |||
| bd58dbc48b | |||
| 4eaba4f6e1 | 
							
								
								
									
										21
									
								
								.github/workflows/mtinfo.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										21
									
								
								.github/workflows/mtinfo.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,21 +0,0 @@ | ||||
| name: mtinfo | ||||
|  | ||||
| on: [push, pull_request] | ||||
|  | ||||
| jobs: | ||||
|   build: | ||||
|  | ||||
|     runs-on: ubuntu-20.04 | ||||
|  | ||||
|     steps: | ||||
|     - uses: actions/checkout@v1 | ||||
|  | ||||
|     - name: generate | ||||
|       run: ./generate-mtinfo.sh | ||||
|  | ||||
|     - name: deploy | ||||
|       if: github.ref == 'refs/heads/master' | ||||
|       uses: peaceiris/actions-gh-pages@v3 | ||||
|       with: | ||||
|         github_token: ${{ secrets.GITHUB_TOKEN }} | ||||
|         publish_dir: ./output | ||||
							
								
								
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -45,6 +45,3 @@ $RECYCLE.BIN/ | ||||
| Network Trash Folder | ||||
| Temporary Items | ||||
| .apdisk | ||||
|  | ||||
| # generated sources | ||||
| output | ||||
|   | ||||
							
								
								
									
										16
									
								
								crafts.lua
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								crafts.lua
									
									
									
									
									
								
							| @@ -1099,6 +1099,22 @@ minetest.register_craft({ | ||||
|     } | ||||
| }) | ||||
|  | ||||
| -- wet metal plant pot from dry metal plant pot | ||||
| minetest.register_craft({ | ||||
|     output = "scifi_nodes:pot2", | ||||
|     recipe = { | ||||
|         {"scifi_nodes:pot", "bucket:bucket_water"} | ||||
|     }, | ||||
|     replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}} | ||||
| }) | ||||
|  | ||||
| -- dry metal plant pot from wet metal plant pot | ||||
| minetest.register_craft({ | ||||
| 	type = "cooking", | ||||
| 	output = "scifi_nodes:pot", | ||||
| 	recipe = "scifi_nodes:pot2", | ||||
| }) | ||||
|  | ||||
| -- 6 itemholder from 2 dented metal block and 1 plastic | ||||
| minetest.register_craft({ | ||||
|     output = "scifi_nodes:itemholder 6", | ||||
|   | ||||
| @@ -122,7 +122,7 @@ minetest.register_node("scifi_nodes:digicode_on", { | ||||
| 	paramtype2 = "wallmounted", | ||||
| 	light_source = 5, | ||||
| 	groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1}, | ||||
| 	drop = {items = {"scifi_nodes:digicode_off"}}, | ||||
| 	drop = "scifi_nodes:digicode_off", | ||||
| 	mesecons = { | ||||
| 		receptor = { | ||||
| 			state = (has_mesecons and mesecon.state.on) | ||||
|   | ||||
| @@ -1,27 +0,0 @@ | ||||
| #!/bin/sh | ||||
|  | ||||
| # prepare config | ||||
| CONFIG=/tmp/scifi_nodes_minetest.conf | ||||
| echo "mtinfo.autoshutdown = true" > ${CONFIG} | ||||
| echo "moreblocks.stairsplus_in_creative_inventory = false" >> ${CONFIG} | ||||
|  | ||||
| # prepare dependent mods | ||||
| WORLDMODS_DIR=/tmp/scifi_nodes_worldmods | ||||
| git clone --depth=1 https://gitlab.com/VanessaE/unifieddyes.git ${WORLDMODS_DIR}/unifieddyes | ||||
| git clone --depth=1 https://gitlab.com/VanessaE/basic_materials.git ${WORLDMODS_DIR}/basic_materials | ||||
| git clone --depth=1 https://github.com/minetest-mods/mesecons.git ${WORLDMODS_DIR}/mesecons | ||||
| git clone --depth=1 https://github.com/minetest-mods/moreblocks.git ${WORLDMODS_DIR}/moreblocks | ||||
| git clone --depth=1 https://github.com/BuckarooBanzay/mtinfo.git ${WORLDMODS_DIR}/mtinfo | ||||
| cp . ${WORLDMODS_DIR}/scifi_nodes -R | ||||
|  | ||||
| # start container with mtinfo | ||||
| docker run --rm -i \ | ||||
| 	--user root \ | ||||
| 	-v ${CONFIG}:/etc/minetest/minetest.conf:ro \ | ||||
| 	-v ${WORLDMODS_DIR}/:/root/.minetest/worlds/world/worldmods \ | ||||
| 	-v $(pwd)/output:/root/.minetest/worlds/world/mtinfo \ | ||||
| 	registry.gitlab.com/minetest/minetest/server:5.4.0 | ||||
|  | ||||
| test -f $(pwd)/output/index.html || exit 1 | ||||
| test -f $(pwd)/output/data/items.js || exit 1 | ||||
| test -d $(pwd)/output/textures || exit 1 | ||||
							
								
								
									
										1
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								init.lua
									
									
									
									
									
								
							| @@ -22,3 +22,4 @@ dofile(MP.."/digicode.lua") | ||||
| dofile(MP.."/models.lua") | ||||
| dofile(MP.."/octagon_panes.lua") | ||||
| dofile(MP.."/crafts.lua") | ||||
| minetest.log("action", "[scifi_nodes] loaded.") | ||||
|   | ||||
							
								
								
									
										122
									
								
								nodeboxes.lua
									
									
									
									
									
								
							
							
						
						
									
										122
									
								
								nodeboxes.lua
									
									
									
									
									
								
							| @@ -324,13 +324,8 @@ minetest.register_node("scifi_nodes:gloshroom", { | ||||
| }) | ||||
|  | ||||
| minetest.register_node("scifi_nodes:pot_lid", { | ||||
| 	description = "plant pot lid(place above plant)", | ||||
| 	description = "Plant Pot Lid", | ||||
| 	tiles = { | ||||
| 		"scifi_nodes_glass2.png", | ||||
| 		"scifi_nodes_glass2.png", | ||||
| 		"scifi_nodes_glass2.png", | ||||
| 		"scifi_nodes_glass2.png", | ||||
| 		"scifi_nodes_glass2.png", | ||||
| 		"scifi_nodes_glass2.png" | ||||
| 	}, | ||||
| 	inventory_image = "scifi_nodes_pod_inv.png", | ||||
| @@ -338,36 +333,55 @@ minetest.register_node("scifi_nodes:pot_lid", { | ||||
| 	use_texture_alpha = "blend", | ||||
| 	drawtype = "nodebox", | ||||
| 	paramtype = "light", | ||||
| 	groups = {cracky=1, not_in_creative_inventory=1}, | ||||
| 	groups = {not_in_creative_inventory = 1}, | ||||
| 	sunlight_propagates = true, | ||||
| 	diggable = false, | ||||
| 	drop = "", | ||||
| 	selection_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = {0, 0, 0, 0, 0, 0} | ||||
| 	}, | ||||
| 	collision_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = {-0.5, -1.5, -0.5, 0.5, -0.5, 0.5} | ||||
| 		fixed = {-0.5, -1.5, -0.5, 0.5, -0.25, 0.5} | ||||
| 	}, | ||||
| 	node_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = { | ||||
| 			{-0.1875, -0.5625, -0.1875, 0.1875, -0.5, 0.1875}, -- NodeBox13 | ||||
| 			{-0.25, -0.625, -0.25, 0.25, -0.5625, 0.25}, -- NodeBox14 | ||||
| 			{-0.3125, -0.6875, -0.3125, 0.3125, -0.625, 0.3125}, -- NodeBox15 | ||||
| 			{-0.375, -0.75, -0.375, 0.375, -0.6875, 0.375}, -- NodeBox16 | ||||
| 			{-0.4375, -0.75, 0.375, 0.4375, -1.5, 0.4375}, -- NodeBox17 | ||||
| 			{-0.4375, -0.75, -0.4375, 0.4375, -1.5, -0.375}, -- NodeBox18 | ||||
| 			{0.375, -0.75, -0.4375, 0.4375, -1.5, 0.4375}, -- NodeBox19 | ||||
| 			{-0.4375, -0.75, -0.4375, -0.375, -1.5, 0.4375}, -- NodeBox20 | ||||
| 			{-0.4375, -1.5, -0.4375, 0.4375, -0.5, -0.375}, | ||||
| 			{-0.4375, -1.5, 0.375, 0.4375, -0.5, 0.4375}, | ||||
| 			{-0.4375, -1.5, -0.375, -0.375, -0.5, 0.375}, | ||||
| 			{0.375, -1.5, -0.375, 0.4375, -0.5, 0.375}, | ||||
| 			{-0.375, -0.5, -0.375, 0.375, -0.4375, 0.375}, | ||||
| 			{-0.3125, -0.4375, -0.3125, 0.3125, -0.375, 0.3125}, | ||||
| 			{-0.25, -0.375, -0.25, 0.25, -0.3125, 0.25}, | ||||
| 			{-0.1875, -0.3125, -0.1875, 0.1875, -0.25, 0.1875} | ||||
| 		} | ||||
| 	}, | ||||
| 	sounds = default.node_sound_glass_defaults() | ||||
| }) | ||||
|  | ||||
| local function toggle_lid(pos, node, player, itemstack) | ||||
| 	if not player or minetest.is_protected(pos, player:get_player_name()) then | ||||
| 		return | ||||
| 	end | ||||
| 	local lid_pos = {x = pos.x, y = pos.y+2 , z = pos.z} | ||||
| 	local lid_node = minetest.get_node(lid_pos) | ||||
| 	if lid_node.name == "scifi_nodes:pot_lid" then | ||||
| 		minetest.set_node(lid_pos, {name = "air"}) | ||||
| 	elseif lid_node.name == "air" then | ||||
| 		minetest.set_node(lid_pos, {name = "scifi_nodes:pot_lid"}) | ||||
| 	end | ||||
| end | ||||
|  | ||||
| local function remove_lid(pos) | ||||
| 	local lid_pos = {x = pos.x, y = pos.y+2 , z = pos.z} | ||||
| 	local lid_node = minetest.get_node(lid_pos) | ||||
| 	if lid_node.name == "scifi_nodes:pot_lid" then | ||||
| 		minetest.set_node(lid_pos, {name = "air"}) | ||||
| 	end | ||||
| end | ||||
|  | ||||
| minetest.register_node("scifi_nodes:pot", { | ||||
| 	description = "metal plant pot (right click for lid, shift+rightclick to plant)", | ||||
| 	description = "Metal Plant Pot (right-click for lid, sneak + right-click to plant)", | ||||
| 	tiles = { | ||||
| 		"scifi_nodes_pot.png", | ||||
| 		"default_dirt.png^scifi_nodes_pot.png", | ||||
| 		"scifi_nodes_greybolts.png", | ||||
| 		"scifi_nodes_greybolts.png", | ||||
| 		"scifi_nodes_greybolts.png", | ||||
| @@ -376,34 +390,30 @@ minetest.register_node("scifi_nodes:pot", { | ||||
| 	}, | ||||
| 	drawtype = "nodebox", | ||||
| 	paramtype = "light", | ||||
| 	groups = {cracky=1, soil=1, sand=1}, | ||||
| 	groups = {cracky = 1, soil = 1, sand = 1}, | ||||
| 	selection_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5} | ||||
| 	}, | ||||
| 	node_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = { | ||||
| 			{-0.5, -0.25, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1 | ||||
| 			{0.1875, -0.5, 0.1875, 0.5, -0.25, 0.5}, -- NodeBox2 | ||||
| 			{-0.5, -0.5, -0.5, -0.1875, -0.25, -0.1875}, -- NodeBox3 | ||||
| 			{-0.5, -0.5, 0.1875, -0.1875, -0.25, 0.5}, -- NodeBox4 | ||||
| 			{0.1875, -0.5, -0.5, 0.5, -0.25, -0.1875}, -- NodeBox5 | ||||
| 			{-0.5, -0.25, -0.5, 0.5, 0.5, 0.5}, | ||||
| 			{0.1875, -0.5, 0.1875, 0.5, -0.25, 0.5}, | ||||
| 			{-0.5, -0.5, -0.5, -0.1875, -0.25, -0.1875}, | ||||
| 			{-0.5, -0.5, 0.1875, -0.1875, -0.25, 0.5}, | ||||
| 			{0.1875, -0.5, -0.5, 0.5, -0.25, -0.1875} | ||||
| 		} | ||||
| 	}, | ||||
| 	on_rightclick = function(pos, node, clicker, item, _) | ||||
| 		local lid_node = minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}) | ||||
| 		if lid_node.name == "scifi_nodes:pot_lid" then | ||||
| 			minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="air", param2=lid_node.param2}) | ||||
| 		elseif lid_node.name ~= "scifi_nodes:pot_lid" and node.name == "air" then | ||||
| 			minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="scifi_nodes:pot_lid", param2=lid_node.param2}) | ||||
| 		end | ||||
| 	end, | ||||
| 	on_destruct = function(pos, node, _) | ||||
| 		minetest.remove_node({x=pos.x, y=pos.y+2, z=pos.z}) | ||||
| 	end | ||||
| 	on_rightclick = toggle_lid, | ||||
| 	on_destruct = remove_lid, | ||||
| 	sounds = default.node_sound_metal_defaults(), | ||||
| }) | ||||
|  | ||||
| minetest.register_node("scifi_nodes:pot2", { | ||||
| 	description = "metal wet plant pot(right click for lid, shift+rightclick to plant)", | ||||
| 	description = "Metal Plant Pot Wet (right-click for lid, sneak + right-click to plant)", | ||||
| 	tiles = { | ||||
| 		"scifi_nodes_pot.png^[colorize:black:100", | ||||
| 		"default_dirt.png^scifi_nodes_pot2.png", | ||||
| 		"scifi_nodes_greybolts.png", | ||||
| 		"scifi_nodes_greybolts.png", | ||||
| 		"scifi_nodes_greybolts.png", | ||||
| @@ -412,28 +422,24 @@ minetest.register_node("scifi_nodes:pot2", { | ||||
| 	}, | ||||
| 	drawtype = "nodebox", | ||||
| 	paramtype = "light", | ||||
| 	groups = {cracky=1, soil=3, wet=1}, | ||||
| 	groups = {cracky = 1, soil = 3, wet = 1}, | ||||
| 	selection_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5} | ||||
| 	}, | ||||
| 	node_box = { | ||||
| 		type = "fixed", | ||||
| 		fixed = { | ||||
| 			{-0.5, -0.25, -0.5, 0.5, 0.5, 0.5}, -- NodeBox1 | ||||
| 			{0.1875, -0.5, 0.1875, 0.5, -0.25, 0.5}, -- NodeBox2 | ||||
| 			{-0.5, -0.5, -0.5, -0.1875, -0.25, -0.1875}, -- NodeBox3 | ||||
| 			{-0.5, -0.5, 0.1875, -0.1875, -0.25, 0.5}, -- NodeBox4 | ||||
| 			{0.1875, -0.5, -0.5, 0.5, -0.25, -0.1875}, -- NodeBox5 | ||||
| 			{-0.5, -0.25, -0.5, 0.5, 0.5, 0.5}, | ||||
| 			{0.1875, -0.5, 0.1875, 0.5, -0.25, 0.5}, | ||||
| 			{-0.5, -0.5, -0.5, -0.1875, -0.25, -0.1875}, | ||||
| 			{-0.5, -0.5, 0.1875, -0.1875, -0.25, 0.5}, | ||||
| 			{0.1875, -0.5, -0.5, 0.5, -0.25, -0.1875} | ||||
| 		} | ||||
| 	}, | ||||
| 	on_rightclick = function(pos, node, clicker, item, _) | ||||
| 		local lid_node = minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z}) | ||||
| 		if lid_node.name == "scifi_nodes:pot_lid" then | ||||
| 			minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="air", param2=lid_node.param2}) | ||||
| 		elseif lid_node.name ~= "scifi_nodes:pot_lid" and node.name == "air" then | ||||
| 			minetest.set_node({x=pos.x, y=pos.y+2, z=pos.z}, {name="scifi_nodes:pot_lid", param2=lid_node.param2}) | ||||
| 		end | ||||
| 	end, | ||||
| 	on_destruct = function(pos, node, _) | ||||
| 		minetest.remove_node({x=pos.x, y=pos.y+2, z=pos.z}) | ||||
| 	end | ||||
| 	on_rightclick = toggle_lid, | ||||
| 	on_destruct = remove_lid, | ||||
| 	sounds = default.node_sound_metal_defaults(), | ||||
| }) | ||||
|  | ||||
| minetest.register_node("scifi_nodes:lightbar", { | ||||
|   | ||||
| @@ -22,6 +22,8 @@ local function activate_palm_scanner(pos, node, player) | ||||
|  | ||||
| 	-- check protection | ||||
| 	minetest.after(2, function() | ||||
| 		if minetest.get_node(pos).name ~= node.name then return end | ||||
|  | ||||
| 		if minetest.is_protected(pos, name or "") then | ||||
| 			-- clicker has no access to area | ||||
| 			minetest.chat_send_player(name, "Access denied !") | ||||
| @@ -36,6 +38,7 @@ local function activate_palm_scanner(pos, node, player) | ||||
|  | ||||
| 		-- reset state | ||||
| 		minetest.after(1, function() | ||||
| 			if minetest.get_node(pos).name ~= node.name then return end | ||||
| 			node.name = "scifi_nodes:palm_scanner_off" | ||||
| 			minetest.swap_node(pos, node) | ||||
| 			mesecon.receptor_off(pos, scifi_nodes.get_switch_rules(node.param2)) | ||||
|   | ||||
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 124 B | 
							
								
								
									
										
											BIN
										
									
								
								textures/scifi_nodes_pot2.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								textures/scifi_nodes_pot2.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 124 B | 
		Reference in New Issue
	
	Block a user