Skip to content

Conversation

@unboundlopez
Copy link
Owner

Motivation

  • Prevent invalid or unexpected entry_count values from being used by centralizing parsing and enforcing a minimum positive integer.
  • Improve reliability of simulated GUI input by refreshing the current viewscreen reference before each input step.
  • Make the overlay filename and documentation follow project naming conventions by removing the leading z from the doc file.

Description

  • Add sanitize_entry_count(count, fallback) to parse and clamp numeric input to >= 1 and use it as the single source of truth for entry validation.
  • Call sanitize_entry_count at the start of simulate_actions and in the EditField on_change handler, and initialize the edit field text with tostring(self.entry_count).
  • Cache dfhack.gui.getCurViewscreen() into a local viewscreen variable inside the simulation loop and when scrolling back up so each gui.simulateInput uses a fresh viewscreen reference.
  • Rename docs/zSelectLockLabors.rst to docs/SelectLockLabors.rst and update the intro to reference SelectLockLabors.

Testing

  • No automated tests were run for this change.

Codex Task

@unboundlopez unboundlopez merged commit c218558 into add-selectlocklabors Jan 25, 2026
@unboundlopez unboundlopez deleted the codex/rename-zselectlocklabors-to-selectlocklabors branch January 25, 2026 19:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant