diff options
| author | ShadowNinja <shadowninja@minetest.net> | 2014-08-06 22:54:17 -0400 | 
|---|---|---|
| committer | ShadowNinja <shadowninja@minetest.net> | 2014-10-07 17:09:25 -0400 | 
| commit | bd1766e448b149f7245c3d2db18af7ecc984f7ca (patch) | |
| tree | b84d704de007a1549476e7cb161efe643cf3512b /mesecons_microcontroller | |
| parent | d325292291ebc0bdb10ebc73b235b9569842e003 (diff) | |
Improve the LuaController
Changes:
  * Stops code after a certain number of instructions.
  * Allows functions, due to instruction counting.
  * Allows loops and goto with non-JIT Lua (LuaJIT doesn't count looping as an instruction, allowing infinite loops), due to instruction counting.
  * Removes string matching functions as they can be slow.
  * Adds some safe functions.
  * Limits the amount of printing that can be done (to prevent console flooding).
  * Code cleanup.
  * More...
Diffstat (limited to 'mesecons_microcontroller')
| -rw-r--r-- | mesecons_microcontroller/init.lua | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/mesecons_microcontroller/init.lua b/mesecons_microcontroller/init.lua index 8c9f3b8..2cea23c 100644 --- a/mesecons_microcontroller/init.lua +++ b/mesecons_microcontroller/init.lua @@ -638,7 +638,7 @@ function yc_update_real_portstates(pos, node, rulename, newstate)  	end  	local n = meta:get_int("real_portstates") - 1  	if n < 0 then -		legacy_update_ports(pos) +		mesecon.legacy_update_ports(pos)  		n = meta:get_int("real_portstates") - 1  	end  	local L = {} @@ -663,7 +663,7 @@ function yc_get_real_portstates(pos) -- determine if ports are powered (by itsel  	local L = {}  	local n = meta:get_int("real_portstates") - 1  	if n < 0 then -		return legacy_update_ports(pos) +		return mesecon.legacy_update_ports(pos)  	end  	for _, index in ipairs({"a", "b", "c", "d"}) do  		L[index] = ((n%2) == 1) | 
