• xtrn/lord2/l2lib.js lord2.js

    From Deuc¿@VERT to Git commit to main/sbbs/master on Wed Mar 3 19:21:04 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/28ad40b10903623428f8b845
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Start of a timeout handing framework.

    As of this commit, LORD2 keeps track of the last time a key was
    pressed, and a timeout occurs five minutes after that if it's
    waiting for a key. This has issues as the getstr() timeout does
    not behave in this manner.

    However, if the timeout callback style works, getstr() and the other
    dk functions can grow callback support pretty easily, and this seems
    like it may be the best way forward.

    Further, disconnect handling should be tied up in this, and dorkit
    does not have very robust features for this. In most cases, a
    disconnect will be treated the same as a timeout, so the same solution
    should likely be usable by both.

    The biggest challenge is preventing the need for all the code to
    have exceptional condition handling, which can be quite tricky as
    battles can end by running a REF file (For example, the training
    centre). This would mean all code paths reachable via REF calls
    would need to fail nicely in the face of a connection loss/timeout.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 4 11:58:37 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/c49151c9d5db305659edcd51
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Deal with the three classes of variables...

    1) ` vars which are always expanded.
    2) & vars which are expanded "sometimes" (generally for display stuff).
    3) "pure" vars which are only expanded when they are the entire string.

    The main change here is in the & var handling... lw() no longer
    expands these, so they can be displayed to the user... they are now
    expanded in the following cases:

    1) Anything that calculates the displayed length. The assumption
    here is that the string will be passed to one of the following
    things.
    2) Bar updates, either @quebar or @saybar
    3) @do addlog
    4) @do write
    5) @moremap
    6) @progname
    7) @show
    8) @writefile

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Thu Mar 4 16:30:50 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/843055e7122729dc4e44f1e8
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Write the player record after changing lastmap.

    This allows more @whoison to be more accurate.
    Also, fix a misplaced ) while I'm here.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Sat Mar 6 01:10:50 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/129fa88a5f85e12507a546d1
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Fix bounty and such...

    So it actually looks like the *only* thing that doesn't expand
    & strings is the output code.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Mar 8 21:43:48 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/1a83d97e5ed58aa2bd39f3bd
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Various engine fixes/updates

    - Set default values for world.dat so it can be created with new()
    - Add `r0 to start of the default more string
    - Create the world file if it doesn't exist (for globals)
    - Fix stupid error in @do trim
    - Support all the different @clear commands
    - Support the different @key commands properly
    - Support @name command
    - Only @say is still required for the NPC "stuff" that nothing uses
    - Fix blank line skip looking for @begin after @if...then do
    Was looking for comments starting with ; only
    - Add try/catch around maint call in case it doesn't exist
    - Don't load rules.ref if there's a REF passed on command-line

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Mar 8 22:44:33 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/005d7bf4fdf016b5ff9c4a88
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Fixes required for RTWall

    - Have getsvar() join arguments with spaces for strings
    - Fix fg/bg in @readstring/@readnum
    - Special-case NIL in readstring (this is where it's documented)

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Mar 8 22:59:56 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/1d472da3cb6970199ccfbaec
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    @if still needs the old getsvar() behaviour.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Mon Mar 8 23:52:45 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/87bbc1e9d743a7fba075e985
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    More svar fixes, and fix &money and &gold in hard-coded strings.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Deuc¿@VERT to Git commit to main/sbbs/master on Tue Mar 9 16:24:36 2021
    https://gitlab.synchro.net/main/sbbs/-/commit/27f0aa873405aef3d9e7354a
    Modified Files:
    xtrn/lord2/l2lib.js lord2.js
    Log Message:
    Save time in player.lastsaved every time.

    This allows timing out the battle bit. If the game/BBS crashes
    while you're in battle, you should now only need to wait two times
    the idle timeout (ie: 2 * 5 minutes) before you can get back in.

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net