Baltor Get started

Gallery / Godot components

Pushdown state stack for screens and modal states

In your harnessGodot componentMIT

Keep a stack of state objects where only the top runs: pushing pauses the state below, popping resumes it, replace swaps the top, and pop_to unwinds several levels. Use it for pause menus and nested screens.

Files, names only

  • ATTRIBUTION.md
  • LICENSE
  • README.md
  • baltor_test.gd
  • component.json
  • inspect_gdscript.py
  • pushdown_automaton.gd
  • run_tests.gd
  • test_package.py
  • tests/test_pushdown_automaton.gd
  • verification/native.json

Full files in your harness.

What it takes and gives

Class
BaltorStateStack, extends Node
Methods
push(state: Object, data: Dictionary = {}) -> bool; pop() -> Object; replace(state: Object, data: Dictionary = {}) -> bool; pop_to(state: Object) -> bool; clear() -> void; peek() -> Object; depth() -> int; contains(state: Object) -> bool; and 1 more
Signals
pushed, popped, top_changed
Exports
max_depth, update_all
Placement
res://baltor/godot_components/pushdown_automaton/

Limits. States are plain objects found by the methods they define; the stack holds references and does not free them. Callbacks run synchronously in push and pop order. Verified with Godot 4.7.2 headless; written against the Godot 4.3 API.

Details

Kind
Godot component
Engine
Godot 4.3 or later
Files
11 files, 77.1 KB
Licence
MIT
Declared effects
reads files, runs commands
Checked with
Godot 4.7.2, headless
Checks
godot parse check only, godot gdscript tests, godot tests reject gutted component, godot editor import, godot contract reflection, godot readme usage compiles
Techniques
pushdown automaton, stack-based state management
Tags
state machine, pushdown automaton, stack, menus, game flow
Identity
library.supply.creative_originals.630d83711d8798d175957c96.07d43469a260e1a9
Version
07d43469a260e1a9bf72fe5e3bbad1cf0e1400614596dfdef3e65c677e1ba672

The version is the SHA-256 of the item your harness downloads; every file in it names its own checksum.

Something wrong with this item, its rights or its safety? Report it on the support page, or from your harness after a download.