20 Commits

Author SHA1 Message Date
Emojigit
319b7dd484
import steps: rename items 2021-05-03 13:02:39 +08:00
octacian
0326648b0d
Replace OS APIs in favour of a system table
`get_os` and `set_os` APIs are replaced with a `system` table which 
stores the data and limits the valid keys and types via metatables.
2018-07-23 18:39:42 -07:00
octacian
31d4360570
Preserve RAM across MT restarts via metadata
RAM is still accessible with the RAM table, however, as a metatable is
used to ensure that whenever information is set in the RAM table it is
automatically stored in the metadata, and to ensure that functions and
userdata is not stored.
2018-07-23 18:29:44 -07:00
octacian
1ed8f9cf73
Add configurable text wrapping to command line and debug 2018-07-23 17:43:21 -07:00
octacian
4c6884fd6f
Add debug console tab 2018-07-23 17:16:34 -07:00
octacian
642139b1b8
Split API into different files
* Move formspec APIs to gui.lua
* Move environment APIs to env.lua
* Move userdata and computer ID APIs to init.lua
2018-07-23 11:48:01 -07:00
octacian
d749eafb28
Preserve, improve environment and replace userdata
* Preserve the environment table so that it must
only be regenerated after a game restart, after
a computer is restarted, and at the tiem of the
initialization of a computer.
* Replace the current meta-based userdata
mechanisms with a global `ram` variable within the
environment, as the preservation of the environment
itself causes its global variables to be preserved
as well
* Make `get_attr` convert meta to a table before
accessing the requested key in order to ensure that
the meta can be correctly accessed even if it is
not a string
* Initialize output_editable meta on node place
2018-06-01 07:50:42 -07:00
octacian
fdeb68a5d5
Improve help and fix blank output after reinit
* Add clear to help
* Add off/shutdown to help
* Add reboot/restart to help
* Sort help alphabetically
* Ensure that start.lua is automatically run after
the filesystem is reinitialized in order to prevent
the output buffer from being empty
2018-05-31 19:13:15 -07:00
octacian
e930f0715f
Fix computers frozen on bios after MT restart
Prevent computers from freezing on the BIOS node
after Minetest is restarted by adding a `booting`
flag to all computers waiting for the two seconds
to be over before the BIOS node is replaced with
the on node and by adding a coroutine which loops
through all the computers and replaces them with
"on" versions if they are stuck in BIOS.
2018-05-31 18:53:08 -07:00
octacian
7bc3a5c6b1
Disconnect player object environment and scripts
Remove the requirement of a player object as a parameter
to make_env and to run_code and run_file. Instead, a
`current_user` meta field is used.
2018-05-31 18:30:43 -07:00
octacian
43bc638dbf
Document missing OS APIs and remove loadstring API
* Document fs.list
* Document fs.run
* Improve documentation for run
2018-05-31 12:48:47 -07:00
octacian
b48d5c2d55
Add nano command
Supplemented by new set_run OS API.
2018-05-31 12:40:26 -07:00
octacian
613657d454
Add luacheck and convert spaces to tabs 2018-05-31 11:00:44 -07:00
octacian
9ec3d9e76f OctOS: Add command framework
Documented in commands.md and applications.md.
2017-03-28 16:23:49 -07:00
octacian
a32178ae55 Fix on Windows
Mod would load but would crash upon giving the computer input. This was a result of the base OS files not being copied meaning that the "code" variable would be nil. Bundled in this commit are other related changes improving the overall filesystem-related stability on Windows. TODO: prevent crash when missing important files like main.lua
2017-02-06 21:02:54 -08:00
octacian
a1701f4513 Computer: Add Settings to env
Adds the Settings() function for easily parsing configuration files and others of that sort.
2017-01-31 18:54:58 -08:00
octacian
f805b6b1e0 Computer: allow output buffer to be editable 2017-01-30 22:29:52 -08:00
octacian
a4e0a2c875 Computers: Rename BiosOS to octOS
Thanks for the idea OldCoder!
2017-01-30 22:14:27 -08:00
octacian
adda987e6b Computers: Replace "local function" with "function" in env
Updated comments in env code.
2017-01-30 22:13:55 -08:00
octacian
9169209333 "Modulify"
This introduces a small API allowing different portions of the mod (digicompute) to be divided among sub-mods (modules) in the modules directory. See documentation for further information (modules.md).
2017-01-30 19:40:30 -08:00