Refactors the Virtual file System creation process to improve memory
efficiency at scale. This is laying the ground work for a copy-on-write
system.
Previously, each new VFS instance was a full copy, which won't scale to
a large number of NPC's. Especially now that we are loading in entire
Lua scripts.
- Added VFSManager class which now manages the lifecycle of all VFS
instances.
- VFSManager creates a single "template" VFS on initilisation. The
template holds the shared, read-only directories like '/bin' and their
command scripts.
- When a new VFS is created (for a client or NPC), it links it's 'bin'
directory to the shared template's '/bin' by pointer rather than
creating a copy of it.
this makes sure the content for *all* common command scripts exists in
memory only once, regardless of the number of NPC's we will later
generate.
This is the beginning of the remote session functionality. It allows
players to connect to different NPC systems via an 'ssh' command.
*Server*
- Can now manage a world of multiple NPC file systems that are
identified by IP addresses.
- Implemented SSH command to allow connection to remote NPC systems.
Each remote session is managed via a 'CommandProcessor'.
- 'exit' command causes the remote server to terminate the client
connection
*Client*
- Terminal can enter a 'remote' state via the SSH command which sends
subsequent commands to the server.
- the local 'exit' command will close the terminal window.
- Refactored UI object ownership to prevent memory leaks and ensure
proper cleanup when a window is closed or the terminal application.