Commit Graph

80 Commits (master)

Author SHA1 Message Date
Emojigit 4c22387816
Unknown addtional files 2021-05-03 13:14:36 +08:00
Emojigit 16dc7a29c4
Unknown addtional files 2021-05-03 13:03:41 +08:00
Emojigit 319b7dd484
import steps: rename items 2021-05-03 13:02:39 +08:00
Emojigit c77b42d6b3
Update mod.conf 2021-05-03 12:59:53 +08:00
Emojigit ded540d6f8
Update LICENSE 2021-05-03 12:59:14 +08:00
Emojigit 629482e525
Update README.md 2021-05-03 12:58:47 +08:00
octacian ca6beff464
Move clear, shutdown, and reboot to OS
* Add `system.shutdown()`
* Add `system.reboot()`
* Add `clear` command
* Add `shutdown [-r]` command
2018-11-24 22:45:30 -08:00
octacian 12415cc700
Replace input, output, and output_editable APIs for system.* keys
* [set/get]_input -> system.input (string)
* [set/get]_output -> system.output (string)
* set_output_editable -> system.output_editable (bool)
2018-11-24 21:25:27 -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 ec5864b645
Prevent naming field from closing on enter 2018-07-23 17:45:02 -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 c836b569f5
Fix current user management 2018-07-23 12:54:46 -07:00
octacian 327a6dd29e
Clean up custom environment definition
* 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()`
2018-07-23 12:26:21 -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 84ea1850ce
OctOS: Add ls and cat commands
Allow listing the contents of a directory
and printing the contents of a file.
2018-05-31 11:28:31 -07:00
octacian 613657d454
Add luacheck and convert spaces to tabs 2018-05-31 11:00:44 -07:00
octacian 6cf860b0b1
Windows: Temporarily fix crash on break computer
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.
2017-11-28 19:30:07 -08:00
octacian dc6c24e669 OctOS: Add mv command
Allows moving files and directories.
2017-03-28 17:21:38 -07:00
octacian cfc1bb4e79 OctOS: Add mkdir, rmdir, and cpdir commands
Documented in `commands.md`. Allow manipulation of directories.
2017-03-28 17:18:06 -07:00
octacian b84a250c25 OctOS: Add touch, rm, and cp commands
Documented in `commands.md`
2017-03-28 17:15:45 -07:00
octacian 5d59142b10 OctOS: Improve error handling
Commands run and code called with the `lua` command would not throw an error if it was unsucessful.
2017-03-28 16:45:27 -07:00
octacian 662c265cab OctOS: Allow specifying command to get help for with help command 2017-03-28 16:35:25 -07:00
octacian c4bd091ae8 OctOS: Add `params` field to applications
Shows parameters for each command in help.
2017-03-28 16:31:10 -07:00
octacian 3c2fa52b4f OctOS: Add echo command
Prints text to the command line.
2017-03-28 16:26:26 -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 6cdabc2934 Fix Modules on Windows (#2)
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.
2017-02-03 15:45:17 -08:00
octacian af2023b3eb Computer/env: Add assert, pairs, ipairs 2017-02-02 17:13:46 -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 6c640f5823 env: Add dump() and type() 2017-01-31 18:43:39 -08:00
octacian 5141e41fe4 Improve documentation with Modules in mind 2017-01-31 07:39:01 -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 7fad5d4762 Make loops time out
Previous setup did not properly cause loops to time out due to returning false, msg rather than using error().
2017-01-30 19:57:46 -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
octacian b155acb3c2 Bump version to 0.5, beta 2017-01-29 16:20:25 -08:00
octacian 416a60039f Add screenshot, mod.conf, and description 2017-01-29 15:28:38 -08:00
octacian 03d8e9235b Make computers emmit light level 7 2017-01-29 15:26:46 -08:00
octacian de79747243 Rewrite entire mod
Now far more efficient, and prepared for the addition of other computer-related items and computers.
2017-01-29 15:18:49 -08:00
octacian 78b1b836a7 fix error checking in digicompute.fs.run_file 2017-01-04 21:46:52 -08:00
octacian 2b28ee800f introduce filesystem API & adjust meta API 2016-12-02 12:08:51 -08:00