Reference/Libraries/rbxcli_spec
Library

rbxcli_spec

table

Declarative, data-only game specifications. Lowered once to native plans.

Functions

27

#rbxcli_spec.define(spec: table) → number

since 1.10.0-beta

Lowers a specification definition into a plan, then binds it to its game. The table is read once, here; nothing in it is ever called again during a refresh.

Parameters

spectable

Specification table. Must carry game; every value must be data, not a function.

Returns

number

Count of lowered plan steps.

Errors

  • LuaError missing game -- No game field.
  • LuaError function field -- A field held a function.

#rbxcli_spec.undefine(game: number) → boolean

since 1.10.0-beta

Removes the specification bound to game, if any.

Parameters

gamenumber

Game id.

#rbxcli_spec.list() → { number }

since 1.10.0-beta

Lists every game id that currently has a script-defined specification.

#rbxcli_spec.debug_plan(spec: table) → { string }

since 1.10.0-beta

Lowers a specification table without binding it and returns the step kind names, in order. Lowering is pure, so this is the one part of the pipeline testable without a game.

Parameters

spectable

Specification table.

#rbxcli_spec.explain_plan(spec: table) → string

since 1.10.0-beta

Lowers a specification and describes, in order, what it will actually do -- resolved child names, which column feeds which, and where a later match arm overrides an earlier one. Use this to debug a specification; debug_plan returns bare step kinds for tests instead.

Parameters

spectable

Specification table.

Returns

string

The whole report, newline separated, ready to hand straight to print().

#rbxcli_spec.match() → table

since 1.10.0-beta

Builds a first-match-wins table of { predicate, value } arms with an optional default.

#rbxcli_spec.first(candidates: { path }) → table

since 1.10.0-beta

Builds a fallback chain: the earliest candidate path that resolves for an entity wins.

Parameters

candidates{ path }

Candidate paths, most preferred first.

#rbxcli_spec.byTeam() → table

since 1.10.0-beta

Marks relation as derived from team identity: an entity whose team key matches the local player's is a teammate, anything else is an enemy.

#rbxcli_spec.resolve() → any

No description yet.

#rbxcli_spec.child() → any

No description yet.

#rbxcli_spec.children() → any

No description yet.

#rbxcli_spec.parts() → any

No description yet.

#rbxcli_spec.descendantParts() → any

No description yet.

#rbxcli_spec.primaryPart() → any

No description yet.

#rbxcli_spec.parent() → any

No description yet.

#rbxcli_spec.ofClass() → any

No description yet.

#rbxcli_spec.havingChild() → any

No description yet.

#rbxcli_spec.havingChildOfClass() → any

No description yet.

#rbxcli_spec.havingMeshId() → any

No description yet.

#rbxcli_spec.havingSpecialMeshId() → any

No description yet.

#rbxcli_spec.candidate() → any

No description yet.

#rbxcli_spec.always() → any

No description yet.

#rbxcli_spec.exists() → any

No description yet.

#rbxcli_spec.isA() → any

No description yet.

#rbxcli_spec.gt() → any

No description yet.

#rbxcli_spec.lt() → any

No description yet.

#rbxcli_spec.eq() → any

No description yet.