Repository navigation
Game Over: make the AI resign and overwhelming advantage options work - #5880
Open
moss-orbit-9f339e wants to merge 1 commit into
Open
moss-orbit-9f339e wants to merge 1 commit into
moss-orbit-9f339e wants to merge 1 commit into
Conversation
…s booleans Spring.GetModOptions() returns every value as a string (the engine pushes each option with lua_pushsstring), so disable_ai_team_resign == 1 and disable_overwhelming_advantage == 1 were always false and both bool modoptions (ModOptions.lua, type='bool') had no effect since they were added. Read them with tobool like the commends and noelo options above: "1" or "true" enables, "0", "false" or unset leaves the defaults. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The lobby options "Disable AI Resignation" and "Disable Overwhelming Advantage" never worked.
Spring.GetModOptions()gives every value as a string, but the code compares the value with the number 1. This change reads both options withtobool, as the file already does forcommendsandnoelo.Testing (Windows, RTX 3080, master ee8950e):
disable_ai_team_resign=1: without this change, both teams resign at frame 69. With this change, the game continues to frame 12,600.toboolread.AI disclosure: Claude Code wrote this change and the tests. I reviewed the change.