Skip to main content

Module computer

Module computer 

Source
Expand description

This computer: its address, uptime, memory, beeps, and power. (The computer component itself is crate::components::Computer.)

Functions§

address
This computer’s component address.
beep
Beeps at frequency Hz (20 to 2000) for duration.
crash
Stops the computer with an error, shown in its GUI like a Lua crash.
files_disk
The filesystem std::fs uses: the disk this program sees as /. None if the computer has no filesystem. On first use the architecture picks the boot disk if it is writable, else the first writable disk, else a read-only one; child processes share their parent’s.
log
Appends a line to this computer’s server-side log (<world>/wackasm/logs).
memory_limit
Bytes of RAM this program may use (installed RAM, minus what the other programs on this computer hold).
reboot
shutdown
uptime
Time since the computer started, in game time. It survives world saves.