refactor: disposition alter functions to return strings#1240
Open
OH296 wants to merge 3 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
3 issues found across 2 files
Confidence score: 2/5
- In
scripts/scr_ChapterTraits/scr_ChapterTraits.gml,array_create(14, struct)makes allfaction_disp_modsentries point to the same struct, somerge_modscan overwrite every faction with identicalint_mod/multvalues and cause broad gameplay regressions — initialize each array slot with a distinct struct before merging. - In
scripts/scr_diplomacy_helpers/scr_diplomacy_helpers.gml, a string template is missing the$prefix, so{}placeholders will render literally and show broken text to players — add the$so interpolation occurs as intended. - In
scripts/scr_ChapterTraits/scr_ChapterTraits.gml, the newstringsfield is currently unused and not merged, which adds confusing dead state (and currently inherits the same shared-reference risk) — either wire it into merge/use paths or remove it in this PR to reduce follow-on bugs.
Shadow auto-approve: would not auto-approve because issues were found.
Re-trigger cubic
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Shadow auto-approve: would require human review. Refactors core disposition logic, altering bounds from -100..100 to 0..100 and adding string return capabilities. Even though it's a single file, this changes how disposition values are calculated and stored, which could break any code relying on the old range or behavior.
Re-trigger cubic
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.
Summary by cubic
Refactored disposition helpers to optionally return formatted messages and centralized bounds so dispositions stay within 0–100.
Refactors
alter_disposition(faction, value, return_string=false)andalter_dispositions(alterations, return_strings)can return strings ("Faction Name : +/-N");faction_disp_modsnow includesstrings: [].calc_final_disp_valueto keep results in 0–100;alter_dispositiononly applies the adjusted delta.Migration
alter_dispositionclamping. Use thereturn_string(s)flags if you need messages.Written for commit 60558ab. Summary will update on new commits.