These were previously filtered out. Unfortunately now there's some
awkward emtpy lines in various places, but, I prefer having empty
lines show since that makes typing much simpler.
I was severely worried about `mbox` and `spool` becoming way
too large way too quick - We just can't store the entire array
of full messages in there all the time.
Instead, both those arrays become simple string arrays of `msgid`
objects, which are nothing more but simple numeric strings. Each
message can now live in mod_storage which should scale a lot better
and make player mboxes a lot smaller - it can now easily hold a few
hundred messages without growing much.
This means all the messages are in mod_storage. We can at a later
point perhaps consider compression.
There's compat code to read old mbox formats, but not spool. Thus
the server spool must be empty when this code is deployed.
This allows players to quickly respond to an existing message
and send a quoted reply to the original user. The reply is
a new draft that has the message quoted and subject prepended
with "Re: ".
After a draft or edit, the terminal always left the context in an
invalid state. I finally found this terrible bug that's been making
the terminal difficult to work with... `button_exit` can _not_ be
used if the context is to be preserved. Of course we also forgot to
properly store the output for the context.
This is a simple backend `telex` mod that takes care of encoding,
storing, spooling and handling mail delivery for players.
Everything is in StorageRef objects. The spool is global and contains
undelivered msgs. Each user has an mbox. These can likely grow
out of bounds and may need size checking to prevent corruption.
The Terminal mod provides the UI. a `telex` command exists and it
has subcommands for send/read/list and working with drafts. The
draft is stored in the player StorageRef and is persistent. This
makes editing and sending messages to more people doable, and you
can re-edit your message later.
There is no SENT folder or anything like it.
There is no REPLY subcommand, but I do intend to include it.
Messages do NOT get delivered to offline players. Those remain
in the spool for 3 days. If the player does not log on, the mail
is RETURNED UNDELIVERABLE. If the returning does not succeed within
30 days, the message is DROPPED.
A couple of nodes have missing or wrong node sounds:
nodes:hardened_clay*: Plays no sound (suggested sound: stone sound)
nodes:chest_with_*: No sound (suggested: wood sound)
nodes:flowerpot*: Plays wood sound (suggested: stone sound)
nodes:vine*: Wood sound when climbing (suggested: leaves sound)
terminal:terminal: No sound (suggested: metal sound)
nodes:tnt: No sound (suggested: wood sound)
signs:bg: No sound (suggested: stone sound)
All doors and fence gates: No sounds for placing/digging
frame:*: No sound (suggested: wood sound)
signs:sign_wall: No sound (suggested: wood sound)
Special cases:
Trampoline: Wood sound
Waterlily: No change, still no sound (leaves sound would be too odd here)
Lava: Sound removed
boxes:nexus: No change, I have no good idea
Sponge: Dirt sound
Rope: Sound removed (other sounds just don't fit well)
Some of these are copies from the respective origins from mtg,
to make sure we have headers everywhere listing the proper code.
I've relicensed spectator_mode from WT*PL to LGPL-2.1. No other
licenses were changed.
opens a normal text editor window, allowing anyone to edit a text
file in the normal way one edits a file. After saving, the view of
the terminal is restored.
Still doesn't do much yet, but the terminal code is somewhat
working. Need to limit output to ~16-18 lines. Implement locking
with triggers unlocking, input of text files, file/folder structure?