Repository navigation
docs: add a Gates guide and bring the Doors guide up to date - #20
Merged
Merged
Conversation
The 1.10 contract declares every DoorStateUpdate field required, though an absent field leaves that axis alone, so these samples fail without a lockLevel. Fence them as jsx until the Mod marks the fields optional.
Doors.set's lockLevel, what a held level does together with a held lock, and the level Doors.list reports on the client.
Their resource sections now describe Foundations' hmp-doors: its data/hmp-doors.json rules, lock levels, shared unlocks, held gates, gate schedule and /doors commands.
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.
Adds a Gates guide to the World section, brings the Doors guide up to date, and links the two.
The Gates guide covers:
Doorscall reaches a gate, and noGatescall reaches a door;portcullis(opens, closes, locks),runeGate(opens past its puzzle, closes),swingGate(opens, closes) andcrawlGrate(opens one way, by breaking);Gates.listand its row fields,setOpen,setLocked,freezeSchedule,setPolicy,policy()andheld();Gates.set/get/list/clear/clearAll, and how held state combines with the policy;gates:rules (kind,open,lock),heldGates,gateScheduleand the gate commands;kind, freezing portcullis schedules, and gates a player opens their own way not being shared.The Doors guide gains:
Doors.setShareUnlocks/getShareUnlocksand thedoorUnlockedevent;doorUnlockRequestdetails: at most once a second per door, the other leaf of a double door, and an emptyselectorfor a lock the player's own policy keeps shut;superAlohomora);heldconfig,/listdoors,/doorsetand/doorsheld;Doors.setunlocks the door for everyone. It does not open it.The overview lists the new guide under World.
Depends on a contract republish. The Gates API landed on mod
mainin 718af20e, but the publishedtestingcontract is still 1.9.2, which has noGates. Until a contract from that commit or later is published,docs:checkfails on the five Gates samples:The guides don't link into the API reference, so nothing here breaks while the reference lacks the Gates types.
Tested locally:
docs:check: all 183 samples type-check against a contract built from modmain718af20e;pnpm buildanddocs:links: every link and anchor on 50 pages resolves;