mirror of
https://github.com/D00Med/scifi_nodes.git
synced 2025-07-04 00:51:16 +02:00
Compare commits
16 Commits
mtinfo
...
b88b7349a5
Author | SHA1 | Date | |
---|---|---|---|
b88b7349a5 | |||
53d9659051 | |||
c30ae4b3bd | |||
79ba8cabc3 | |||
6cf45fcd43 | |||
1ded358e04 | |||
ecfaa4714a | |||
c341cb8a20 | |||
d66e04f9b1 | |||
d3d6a7bf79 | |||
e34fdde795 | |||
1993068ed1 | |||
436f51ab0d | |||
749d59a530 | |||
bd58dbc48b | |||
4eaba4f6e1 |
@ -122,7 +122,7 @@ minetest.register_node("scifi_nodes:digicode_on", {
|
|||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
light_source = 5,
|
light_source = 5,
|
||||||
groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
|
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 = {
|
mesecons = {
|
||||||
receptor = {
|
receptor = {
|
||||||
state = (has_mesecons and mesecon.state.on)
|
state = (has_mesecons and mesecon.state.on)
|
||||||
|
1
init.lua
1
init.lua
@ -22,3 +22,4 @@ dofile(MP.."/digicode.lua")
|
|||||||
dofile(MP.."/models.lua")
|
dofile(MP.."/models.lua")
|
||||||
dofile(MP.."/octagon_panes.lua")
|
dofile(MP.."/octagon_panes.lua")
|
||||||
dofile(MP.."/crafts.lua")
|
dofile(MP.."/crafts.lua")
|
||||||
|
minetest.log("action", "[scifi_nodes] loaded.")
|
||||||
|
@ -22,6 +22,8 @@ local function activate_palm_scanner(pos, node, player)
|
|||||||
|
|
||||||
-- check protection
|
-- check protection
|
||||||
minetest.after(2, function()
|
minetest.after(2, function()
|
||||||
|
if minetest.get_node(pos).name ~= node.name then return end
|
||||||
|
|
||||||
if minetest.is_protected(pos, name or "") then
|
if minetest.is_protected(pos, name or "") then
|
||||||
-- clicker has no access to area
|
-- clicker has no access to area
|
||||||
minetest.chat_send_player(name, "Access denied !")
|
minetest.chat_send_player(name, "Access denied !")
|
||||||
@ -36,6 +38,7 @@ local function activate_palm_scanner(pos, node, player)
|
|||||||
|
|
||||||
-- reset state
|
-- reset state
|
||||||
minetest.after(1, function()
|
minetest.after(1, function()
|
||||||
|
if minetest.get_node(pos).name ~= node.name then return end
|
||||||
node.name = "scifi_nodes:palm_scanner_off"
|
node.name = "scifi_nodes:palm_scanner_off"
|
||||||
minetest.swap_node(pos, node)
|
minetest.swap_node(pos, node)
|
||||||
mesecon.receptor_off(pos, scifi_nodes.get_switch_rules(node.param2))
|
mesecon.receptor_off(pos, scifi_nodes.get_switch_rules(node.param2))
|
||||||
|
Reference in New Issue
Block a user