Expand description
Structured rule content in the versioned workshop-rs/rule-content-v1
format.
rule_content renders one Rule as the canonical call tree defined
by RULE_CONTENT_V1_SCHEMA. Every value and action is a call node named
by its catalog id; literals, strings, enum members, and declared variable
or subroutine names use the tagged forms the schema defines. Output is
deterministic for a given rule and independent of the source locale.
Constructs the canonical model specializes but the catalog does not name
use the reserved ids declared in the schema: globalVariable and
playerVariable for variable reads, assignMember and modifyMember for
member-assignment actions, and a zero-argument operator call such as
{"call":"add","args":[]} for the modify operand.
Constants§
- ASSIGN_
MEMBER_ CALL - The reserved call id for a plain member assignment (
target = value). - GLOBAL_
VARIABLE_ CALL - The reserved call id for a global variable read.
- MEMBER_
ACCESS_ CALL - The reserved call id for a receiver member read (
receiver.memberorreceiver.member[index]). It appears insideASSIGN_MEMBER_CALLandMODIFY_MEMBER_CALLtargets and anywhere a member read is a value. - MODIFY_
MEMBER_ CALL - The reserved call id for a compound member assignment (
target op= value). - PLAYER_
VARIABLE_ CALL - The reserved call id for a player variable read.
- RAW_
WORKSHOP_ ACTION_ CALL - The reserved call id for an opaque action the parser preserved without canonical content (a raw Workshop residual). It carries no arguments.
- RULE_
CONTENT_ V1 - The format identity every produced document carries in
"format". - RULE_
CONTENT_ V1_ SCHEMA - The published JSON Schema for
RULE_CONTENT_V1documents.
Functions§
- rule_
content - Render one rule in the
RULE_CONTENT_V1format; seeRule::content.