openKey
openKey(
authority,handle,openKeyOptions?):void
Asks the room to hold the key handle names: KeyOpenedEvent answers
on a later tick with the key’s entity, its record restored onto it and
what its restore spawned, or KeyRefusedEvent with why. With ask,
a room that holds it is asked to pass it. A key this room holds or is
opening is refused; one it is closing opens again once its close
commits. Throws on a world no room holds keys for.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
authority |
Authority |
handle |
KeyedSaveHandle |
openKeyOptions |
OpenKeyOptions |
Returns
Section titled “Returns”void
Example
Section titled “Example”openKey(step, plots.for(worldId, "ada"), { ask: true });