Add explanatory comments

This commit is contained in:
Jude Melton-Houghton 2022-02-20 21:10:07 -05:00
parent 4906608bb1
commit 2479eec4af
3 changed files with 6 additions and 0 deletions

View File

@ -327,6 +327,8 @@ plg.update = function(pos)
plg.setports(pos, A, B, C, D)
end
-- Updates the port states according to the signal change.
-- Returns whether the port states actually changed.
plg.ports_changed = function(pos, rule, newstate)
if rule == nil then return false end
local meta = minetest.get_meta(pos)

View File

@ -43,6 +43,8 @@ local rules = {
------------------
-- These helpers are required to set the port states of the luacontroller
-- Updates the real port states according to the signal change.
-- Returns whether the real port states actually changed.
local function update_real_port_states(pos, rule_name, new_state)
local meta = minetest.get_meta(pos)
if rule_name == nil then

View File

@ -656,6 +656,8 @@ yc.set_portstate = function(port, state, L)
return L
end
-- Updates the real port states according to the signal change.
-- Returns whether the real port states actually changed.
yc.update_real_portstates = function(pos, _, rulename, newstate)
local meta = minetest.get_meta(pos)
if rulename == nil then