SetWorldDoorLocked

From Wiki G1R-MP G1 Remake Multiplayer
Revision as of 20:00, 19 October 2026 by QCherry (talk | contribs) (Document upcoming 0.1.9 custom native keys, shared doors, server Lua callbacks and persistence; not a release)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

setWorldDoorLocked

Available from 0.1.9 (upcoming; not yet publicly released). Not included in public 0.1.8. Use matching updated server and clients.

Server Lua. Part of custom keys and shared placed doors.

Syntax

ok, error = setWorldDoorLocked(id, locked)

Parameters and behavior

id identifies an owned placed door with an assigned key; locked is a boolean. false disables the requirement while retaining the assignment; true enables it again. No binding means failure.

Returns

true, empty error on success; false, error string otherwise. Idempotent setters do not emit duplicate lock-change events.

Examples and security

See Custom keys for complete registration, copy issuance, placement, persistence and callback examples. These are server functions, not client RPC endpoints. Do not forward untrusted client arguments without gameplay authorization.