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.
* Separate custom function definitions from make_env for better
readability
* Add newlines between functions
* Make comments more descriptive
* Move `Settings()` API to `fs.read_settings()`
* 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
* 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
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.
Check if `os.execute` is available before attempting to use it (is not
available on Windows). This is not a real fix as it results in empty
directories being left behind in the computer files. The only actual fix
to this issue is an official `rmdir` Minetest API.
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
Modules would not load on Windows because directories are treated differently then they are on Linux. For this reason, io.open() did not suffice to check if a directory existed. This commit makes get_module_path() check for an init.lua file rather than attempting to just check the directory.
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).