forked from Mirrorlandia_minetest/mesecons
Experimental 3D plugs and sockets/inverters, fix a few things with Whiskers75's code.
This commit is contained in:
parent
1e569782f5
commit
51539ef173
@ -99,7 +99,7 @@ mesecon:register_on_signal_on(plug_on)
|
|||||||
mesecon:register_on_signal_off(plug_off)
|
mesecon:register_on_signal_off(plug_off)
|
||||||
|
|
||||||
minetest.register_node("mesecons_temperest:mesecon_plug", {
|
minetest.register_node("mesecons_temperest:mesecon_plug", {
|
||||||
drawtype = "raillike",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
tile_images = {"jeija_mesecon_plug.png"},
|
tile_images = {"jeija_mesecon_plug.png"},
|
||||||
@ -109,6 +109,11 @@ minetest.register_node("mesecons_temperest:mesecon_plug", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
},
|
},
|
||||||
description = "Plug",
|
description = "Plug",
|
||||||
after_place_node = plug_off,
|
after_place_node = plug_off,
|
||||||
@ -128,7 +133,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
minetest.register_node("mesecons_temperest:mesecon_socket_off", {
|
minetest.register_node("mesecons_temperest:mesecon_socket_off", {
|
||||||
description = "Socket",
|
description = "Socket",
|
||||||
drawtype = "raillike",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
tile_images = {"jeija_mesecon_socket_off.png"},
|
tile_images = {"jeija_mesecon_socket_off.png"},
|
||||||
@ -138,11 +143,16 @@ minetest.register_node("mesecons_temperest:mesecon_socket_off", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_temperest:mesecon_socket_on", {
|
minetest.register_node("mesecons_temperest:mesecon_socket_on", {
|
||||||
drawtype = "raillike",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
tile_images = {"jeija_mesecon_socket_on.png"},
|
tile_images = {"jeija_mesecon_socket_on.png"},
|
||||||
@ -150,6 +160,11 @@ minetest.register_node("mesecons_temperest:mesecon_socket_on", {
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
},
|
},
|
||||||
drop='"mesecons_temperest:mesecon_socket_off" 1',
|
drop='"mesecons_temperest:mesecon_socket_off" 1',
|
||||||
after_dig_node = function(pos)
|
after_dig_node = function(pos)
|
||||||
@ -172,7 +187,7 @@ minetest.register_craft({
|
|||||||
--TEMPEREST-INVERTER
|
--TEMPEREST-INVERTER
|
||||||
if ENABLE_TEMPEREST==1 then
|
if ENABLE_TEMPEREST==1 then
|
||||||
minetest.register_node("mesecons_temperest:mesecon_inverter_off", {
|
minetest.register_node("mesecons_temperest:mesecon_inverter_off", {
|
||||||
drawtype = "raillike",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
tile_images = {"jeija_mesecon_inverter_off.png"},
|
tile_images = {"jeija_mesecon_inverter_off.png"},
|
||||||
@ -180,13 +195,18 @@ if ENABLE_TEMPEREST==1 then
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
},
|
},
|
||||||
drop='"mesecons_temperest:mesecon_inverter_on" 1',
|
drop='"mesecons_temperest:mesecon_inverter_on" 1',
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_node("mesecons_temperest:mesecon_inverter_on", {
|
minetest.register_node("mesecons_temperest:mesecon_inverter_on", {
|
||||||
description = "Inverter",
|
description = "Inverter",
|
||||||
drawtype = "raillike",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
tile_images = {"jeija_mesecon_inverter_on.png"},
|
tile_images = {"jeija_mesecon_inverter_on.png"},
|
||||||
@ -196,6 +216,11 @@ if ENABLE_TEMPEREST==1 then
|
|||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {
|
selection_box = {
|
||||||
type = "fixed",
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
|
},
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5},
|
||||||
},
|
},
|
||||||
after_place_node = function(pos)
|
after_place_node = function(pos)
|
||||||
mesecon:receptor_on(pos)
|
mesecon:receptor_on(pos)
|
||||||
@ -223,14 +248,11 @@ end
|
|||||||
--Whiskers75's code
|
--Whiskers75's code
|
||||||
--AND block
|
--AND block
|
||||||
|
|
||||||
local i
|
|
||||||
|
|
||||||
|
|
||||||
-- Make the block:
|
-- Make the block:
|
||||||
|
|
||||||
minetest.register_node("mesecons_temperest:andblock", {
|
minetest.register_node("mesecons_temperest:andblock", {
|
||||||
drawtype = raillike,
|
|
||||||
description = "AND block",
|
description = "AND block",
|
||||||
|
drawtype = "raillike",
|
||||||
tile_images = {"whiskers75andblock.png"},
|
tile_images = {"whiskers75andblock.png"},
|
||||||
inventory_image = {"whiskers75andblock.png"},
|
inventory_image = {"whiskers75andblock.png"},
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user