Commit Graph

23 Commits

Author SHA1 Message Date
Jeija
e789794c75 Experimental fix for issue #85 by removing ignored ports from the luacontroller 2013-04-01 22:24:01 +02:00
Jeija
36bcce57b0 Add table.* to luacontroller sandbox 2013-03-26 15:12:56 +01:00
Anthony Zhang
21550b3727 Explicit tables of luacontroller environment. 2013-03-23 18:41:44 -04:00
Anthony Zhang
6983db6d82 Add math library to luacontroller, and make sure to copy stuff so code can't get out of the sandbox. 2013-03-23 17:49:25 -04:00
Anthony Zhang
3c3e45c7ea Avoid corrupting metadata. 2013-03-15 17:46:59 -04:00
Anthony Zhang
5fd1cf5c80 Use formspec_escape when available. 2013-03-15 17:21:16 -04:00
Anthony Zhang
e1211729cc Avoid borking the luacontroller if the code uses square brackets. When the next stable MT is released, uncomment the formspec_escape call to take advantave of formspec escaping. 2013-03-15 17:07:15 -04:00
Anthony Zhang
3792b692aa Digging and footstep sounds for everything that needs them! Plus, pushing buttons, punching switches, and flipping levers all make sounds. 2013-03-06 20:51:57 -05:00
Jeija
cc41f136cc More distinguishable inventory image for the luacontroller (not wield
item, just top)
2013-02-19 16:58:17 +01:00
Jeija
1c4ab938ad Fix a dumb bug that conflicted with different things in the luacontroller 2013-02-12 10:58:29 +01:00
Jeija
eeed4f148d Fix odd behaviour when using interrupts in the luacontroller 2013-02-12 10:25:24 +01:00
Jeija
591e2d7cde LuaController: Queue setting the ports (wait for pending operations) 2013-02-10 23:10:22 +01:00
Jeija
59cd72191b Add tostring, tonumber, string to luacontroller, prohibit 'function' 2013-01-22 21:15:49 +01:00
Jeija
2b30360da2 Bugfix for the luacontroller that occured when two events occur at the
same time (output connected to input).
The behaviour of the controller can now be described this way:
The luacontroller sets port A, then B, then C, then D; if it is
interrupted by another event during that time it stops and let the
second event do the job.
2013-01-22 18:26:27 +01:00
Jeija
18da94006a Lots of bugfixes concerning the luacontroller
- Bug when using NOT-Gates
- Moved error label a little downwards
- On digiline event, msg and channel are now in event.*, not in
event.iid.*
2013-01-20 18:00:33 +01:00
Jeija
ef087f2bb6 Fix Bug: Wrong usage of action_on/action_off instead of action_change 2013-01-19 23:37:03 +01:00
Jeija
62ddebaecb Add support in luacontroller for a not yet released mod called 'digilines' 2013-01-19 21:45:39 +01:00
Jeija
fc384aedbb Remove unused variable 2013-01-19 12:04:10 +01:00
Jeija
ec517becab Texture the LuaController formspec 2013-01-19 12:03:27 +01:00
Jeija
0d44144421 Bugfixes and improved stability of the luacontroller 2013-01-14 17:58:14 +01:00
Jeija
240fb83e8b Implement interrupt(time, iid): The whole code is called again after a
certain amount of time.
Whenever it is called, an event is set.
Possible events are: program, interrupt, on and off
It also contains additional information (on/off -> event.in; interrupt ->
event.iid)
iid must be an integer or string value, otherwise the interrupt is not active
2013-01-13 17:33:16 +01:00
Jeija
e297a02ec2 Implement a memory for the controller (accesible via mem.) and cleanup code
Based on PilzAdam's code.
2013-01-13 11:08:13 +01:00
Jeija
bd749ec4d4 Add luacontroller, a microcontroller that you can code in lua.
It still misses some functionality such as a persistent memory and a
timer, but that is subject to change. The code runs in a sandbox.
Speaking long term this will hopefully replace the old controller.
2013-01-13 00:18:25 +01:00