Gaslight 2.3.1 + 2.4.0 - #2330
Open
KenanMillet wants to merge 2 commits into
Open
Conversation
Reword 'experimental/Jumpgate sandbox' to 'Latest sandbox (Mod Script Sandbox v1.5)' across the error message, help/guide text, comments, and README to match Roll20's current Mod Scripts settings. No behavior change. Adds 2.3.1 snapshot, changelog entry, and regenerated script.json.
On the Latest sandbox (v1.5+), scratch pages live in an auto-created GL-SCRATCH pageFolder. Any page in the folder is a scratch page (drop blank pages in; no naming needed). In-use copies are moved next to the master during quick and returned to the folder on merge. Empty pages added to the folder are auto-named GL-SCRATCH; non-empty pages dropped in by mistake are ejected back to their origin with a GM notice. Startup migrates loose GL-SCRATCH-named pages into the folder. GMs are reminded to open new scratch pages once (Roll20 only initializes a page when first viewed). v1.0 (Legacy) is unaffected — flat name-based behavior. Clearer uninitialized-page error. Adds 2.4.0 snapshot, changelog, README, and regenerated script.json.
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.
Gaslight 2.3.1 + 2.4.0 — sandbox terminology + GL-SCRATCH pageFolder
Summary
Two versions in one PR:
GL-SCRATCHpageFolder so they stay out of sight. Any page in the folder is treated as a scratch page, in-use copies are moved next to the master duringquickand returned to the folder on merge, and the folder is auto-created/maintained. Latest-sandbox (v1.5+) only; v1.0 (Legacy) is unaffected.Both versions ship with their own snapshot folder and
previousversionsentry, so each remains individually installable from the one-click version dropdown (2.4.0 is "Latest").What's new
2.3.1
Sandbox terminology — the
quickgating error, help/guide text, code comments, and README now say "Latest sandbox (Mod Script Sandbox v1.5)" rather than "experimental/Jumpgate", matching what users actually see in the Mod Scripts settings dropdown ("Mod Script Sandbox v1.5 (Latest)"). Purely wording; no functional change.2.4.0
GL-SCRATCHpageFolder (Latest sandbox v1.5+) — scratch pages now live in a dedicatedGL-SCRATCHpage folder. Any page in the folder is a scratch page (regardless of name), so setup is just "drop a few blank pages into the folder" — no naming required. Uses the v1.5pageFolderobject and the pageplaceIn/placeAfter/placeBeforemethods. Gated onsandboxVersion >= 1.5(numeric compare, so future 1.6/2.0 don't regress); every folder operation is additionally method-guarded and wrapped so a failure degrades to the prior behavior rather than breaking a split.In-use copies sit next to the master — during
quick, a scratch page taken into use is moved out of the folder to sit adjacent to the master page (viaplaceAfter(master)— lands at the master's folder level, root or otherwise). On merge, recycled scratch pages are wiped, renamed back toGL-SCRATCH, and returned to the folder for reuse.Auto-maintenance — on startup the
GL-SCRATCHfolder is auto-created (if absent) and any loose pages namedGL-SCRATCHare tucked into it. When a page is added to or dragged into the folder: an empty page is auto-namedGL-SCRATCH; a non-empty page (a real map dropped in by mistake) is ejected back to where it came from (its origin folder, or root just before theGL-SCRATCHfolder) with a heads-up whisper to the GM. "Empty" is defined by the same object setquickclones (graphic/path/pathv2/text/door/window/pin).Open-page reminder — Roll20 only initializes a page's z-order the first time a GM views it, and there is no API way to seed it (a never-viewed page has
_zorder === falseandcreateObjthrows on it). Gaslight now whispers a reminder to open newly-added scratch pages once, the getting-started guide says so up front, and thequickpre-flight error was rewritten to be clear (it no longer glues player names onto the sharedGL-SCRATCHpage name).v1.0 (Legacy) unaffected — with no
pageFolderAPI, all of the above is inert and Gaslight falls back to the existing flat, name-basedGL-SCRATCHbehavior.Files changed
Gaslight/Gaslight.js— 2.3.1 terminology + 2.4.0 folder feature.Gaslight/2.3.1/Gaslight.js,Gaslight/2.4.0/Gaslight.js— version snapshots (2.3.0 snapshot left frozen).Gaslight/script.json— version 2.4.0,previousversionsnow includes 2.3.0 and 2.3.1, refreshed description/changelog/command list.Gaslight/README.md— updated setup (folder workflow + open-once note), command table, and v2.3.1 / v2.4.0 changelog sections.Testing
Tested in-game on the Latest sandbox (v1.5):
GL-SCRATCHfolder auto-created; looseGL-SCRATCH-named pages moved into it.GL-SCRATCH, with an open-once reminder when the page is uninitialized.!gaslight quickfull cycle: blank pages in the folder → cloned onto, moved next to the master, split;!gaslight merge→ wiped, renamed, and returned to theGL-SCRATCHfolder for reuse.quickpre-flight on never-viewed scratch pages → clear, non-misleading error telling the GM to open the folder's pages once (the raw Roll20createObjcrash on uninitialized pages was reproduced separately and reported to Roll20).script.jsonvalidated againstscript.json.schema.Notes