feat(controllers): #57 foundation — ludic.gameplay package + lever 5 (disable system)
Shared building blocks for the builtin gameplay controllers (#57): the ludic.gameplay source package (Cooldown timer, Stats + timed modifier stack, Faction table, Combat damage pipeline with cancel/mutable hooks), plus the compiler `disable system <esys_fn>` extensibility lever. Deterministic, integer-only; C-free bootstrap fixpoint holds. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
764a0296ce
commit
ed385efa7b
11 changed files with 18734 additions and 18157 deletions
|
|
@ -55,6 +55,7 @@ function emit_call_one(d: Node) -> void {
|
|||
# settled when the engine advances animation / accumulates light. Keep the
|
||||
# component list in sync with uses_engine_systems (emit_ecs.ludic).
|
||||
function emit_one_engine_system(comp: pointer, fn: pointer) -> void {
|
||||
if is_system_disabled(fn) { return } # lever 5 (#57): `disable system <fn>` drops the tick
|
||||
if (find_comp(comp) != null) and (find_fn(fn) != null) {
|
||||
emit(" call void @fn_"); emit(fn); emit("()\n")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ function emit_detach(st: Node) -> void {
|
|||
# flag). A bare `<Model>` / `<Handler>` flips a global enabled flag.
|
||||
function emit_toggle(st: Node) -> void {
|
||||
var val = "0"; if st.ival == 1 { val = "1" }
|
||||
if (st.ty != null) and (st.ty == "system") { return } # `disable system <fn>` is compile-time (handled in emit_one_engine_system); no runtime code
|
||||
if (st.ty != null) and (st.ty == "layer") { # enable/disable layer L
|
||||
emit(" store i32 "); emit(val); emit(", ptr @LE_"); emit(st.s); emit("\n")
|
||||
var lev = `layer_{st.s}_hide`; if st.ival == 1 { lev = `layer_{st.s}_show` } # public layer -> event
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue