Repository navigation
Serialize mob programs in one ROM 2.4-shaped list per mob - #21
Merged
Merged
Conversation
Each mob in the JSON output gets mob_programs: ROM trigger records joined with their #MOBPROGS bodies, and inline SMAUG/ACK/FUSS programs translated to ROM 2.4 triggers and mob commands. A missing body, an unknown trigger and a line or phrase with no confident ROM form are reported as diagnostics.
A SMAUG colour token on an echo becomes the ROM brace code, closed with {x.
An ACT or SPEECH word list becomes one entry per word; every entry carries
group, the index of its source program on the mob.
load_sections reads the sections, then appends the mob program diagnostics to reader.diagnostics, the one list as_dict serializes. The per-dialect section loops are now read_sections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every mob in the JSON output gains
mob_programs: a list of{trigger, phrase, lines, source, vnum, group}in ROM 2.4 trigger words and syntax, whatever the dialect.Mtrigger records with the#MOBPROGSbodies.mp*commands,if check(arg)conditions and SMAUG echo colour tokens are translated. A line with no confident ROM form is left as written and reported asuntranslated_mobprog_line.missing_mobprogand gets emptylines.group.The existing
mprogs,programsand top-levelmobprogskeys and the native writer are unchanged. The list is computed inas_dict; nothing new is stored on the model.Checked against area files from the Mongoose corpus: mthydra 31 entries, no diagnostics; peeks 69
missing_mobprog(the file has no#MOBPROGSsection); asgard 111 entries / 16 untranslated lines; cursenec 156 / 30; xchan1 266 / 52.Not verified against source: the SMAUG colour token table (
_redis taken as dark red) and ROM'scmd_evalargument forms.