factoriax.playground.play.play_state

Contents

factoriax.playground.play.play_state#

Mutable UI state for the interactive play loop.

This dataclass holds all menu visibility, navigation, and recording state. It is entirely separate from EnvState and is never passed to JAX functions.

class factoriax.playground.play.play_state.PlayState(inventory_open: bool = False, achievement_open: bool = False, pause_open: bool = False, help_open: bool = False, machine_open: bool = False, welcome_open: bool = True, victory_open: bool = False, victory_shown: bool = False, achievement_scroll: int = 0, achievement_selection: int = 0, pause_selection: int = 0, machine_tx: int = 0, machine_ty: int = 0, machine_panel_active: bool = True, selected_item: int = 24, focused_machine_item: int = 0, selected_recipe: int = 0, record_enabled: bool = False, recorded_states: list[EnvState] = <factory>, recorded_actions: list[int] = <factory>, recorded_rewards: list[float] = <factory>, click_regions: list[ClickRegion] = <factory>, frame_tick: int = 0, mouse_facing: int = 0, hover_tile_x: int = -1, hover_tile_y: int = -1)#

UI-only state managed by the play loop.