Skip to content

Commit

Permalink
Removed unneccesary nodedef checks.
Browse files Browse the repository at this point in the history
  • Loading branch information
SomeName42 committed Nov 16, 2024
1 parent 415c330 commit a8bf56d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions technic/machines/switching_station.lua
Original file line number Diff line number Diff line change
Expand Up @@ -481,15 +481,13 @@ minetest.register_abm({

if technic_machine and not has_network then
local nodedef = minetest.registered_nodes[node.name]
if nodedef then
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("%s Has No Network"):format(nodedef.description))
end
if nodedef and nodedef.technic_disabled_machine_name then
local meta = minetest.get_meta(pos)
meta:set_string("infotext", S("%s Has No Network"):format(nodedef.description))
if nodedef.technic_disabled_machine_name then
node.name = nodedef.technic_disabled_machine_name
minetest.swap_node(pos, node)
end
if nodedef and nodedef.technic_on_disable then
if nodedef.technic_on_disable then
nodedef.technic_on_disable(pos, node)
end
end
Expand Down

0 comments on commit a8bf56d

Please sign in to comment.