mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-11-16 23:30:34 +01:00
Add explanatory comments
This commit is contained in:
parent
4906608bb1
commit
2479eec4af
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user