New Game does not read the seed input or set GameState.run_seed #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
scripts/main_menu.gd:The
%SeedInputLineEditcollects a value that is never read, andGameState.run_seedis never written. The New Game button does nothing.Two parts:
1. Resolve the seed text to an int. Agreed rule:
randi()), matching the "random" placeholderString.is_valid_int()) → use it literallyhash(text), so word seeds likeeuropaworkAvoid
SpinBoxfor this: it stores its value as a float, so seeds above 2^53 lose precision, and it cannot express "blank means random".2. Write it to
GameState.run_seed, then change scene.There is no game scene yet, so this issue can land as far as populating
GameStateand logging the resolved seed. The scene change follows once a game scene exists.Depends on the
run_seeddefault being fixed first, otherwise the two changes conflict.