server: the property buckets, the registry and the status set (#22)
Migration step 6 ("token details") adds the three prop buckets to `entity`
and creates `entity_status`, the `(status, source)` set of 5.5. A token's
status rows are rewritten with its row, so a status change and the `token`
frame that reports it commit together.
server/props.nim owns the buckets, their caps (64 keys per bucket, a key of
1..64 code points, a value of at most 8 KB of serialized JSON) and the
property-schema registry: empty at start with a permissive fallback, because
DESIGN 8 says v1 never interprets props; a key the rules module registers is
enforced (kind and bucket). server/text.nim is the one copy of the 6.5 text
rule, shared by names and prop keys.
tokens.nim gains `props` and `statuses` on the record, the sorted-unique
entry helpers, `isLocked`, `parseRadius`/`parseStatusKind`/`parseStatusSource`,
the prop and status columns in insert/replace, and `loadStatuses` joined on
the scene. Every helper builds a fresh sequence: a copied record shares its
seq buffer, so an in-place edit would reach the authoritative list before
the transaction commits (4.2 step 6).
This commit is contained in:
+12
@@ -42,6 +42,18 @@ _Avoid_: PC, hero
|
||||
A figure on the map. It may belong to a character; a plain token (monster, item) belongs to none. Holds what is happening to the figure. Its controller is set on its own and does not follow the character's owner.
|
||||
_Avoid_: entity, piece, counter
|
||||
|
||||
**Property**:
|
||||
One named value a token carries, e.g. "aura" or "hp". The server stores it and never interprets it in v1; FFF does later.
|
||||
_Avoid_: attribute, stat, metadata
|
||||
|
||||
**Property bucket**:
|
||||
The visibility a property is filed under: `public` (anyone who sees the token), `owner` (the token's controller and the GM) or `gm` (the GM only). A prop key may live in all three at once with different values.
|
||||
_Avoid_: layer, scope, channel
|
||||
|
||||
**Property schema registry**:
|
||||
The rules module's table of known property keys, each with a value kind and a bucket. It ships empty in v1, so any key is accepted in any bucket; a registered key is enforced on every write.
|
||||
_Avoid_: prop whitelist, schema cache
|
||||
|
||||
**Descriptive name**:
|
||||
The name a player sees for a character or plain token until the GM reveals the actual name, e.g. "a grumpy man". Every character and plain token has one.
|
||||
_Avoid_: alias, label, nickname
|
||||
|
||||
Reference in New Issue
Block a user