Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoSecondaryWeaponFallback can now cancel the weapon selection for walls. #1516

Merged
merged 2 commits into from
Feb 6, 2025

Conversation

DeathFishAtEase
Copy link
Collaborator

Phobos previously added a rule to select weapons based on [Warhead] ► Wall= (bool)
but [TechnoType] ► NoSecondaryWeaponFallback= (bool) cannot disable this rule
this causing the Soviet Siege Chopper to use the 160mm weapon to attack walls even when not deployed.

@DeathFishAtEase DeathFishAtEase added the Minor Documentation is not required label Feb 2, 2025
Copy link

github-actions bot commented Feb 2, 2025

Nightly build for this pull request:

This comment is automatic and is meant to allow guests to get latest nightly builds for this pull request without registering. It is updated on every successful build.

@DeathFishAtEase DeathFishAtEase added the Phobos bug Something isn't working properly label Feb 2, 2025
- Move the NoSecondaryWeaponFallback fix to correct location
- Move the wall weapon selection behind a toggle to prevent vanilla breaking changes
- Add migration notice and alter documentation with above change in mind
Copy link
Contributor

@Starkku Starkku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fix was not sufficient or at correct position. TechnoExt::GetWeaponIndexAgainstWall() already had a check for NoSecondaryWeaponFallback but due to wrongly positioned brackets it didn't work as intended.

I have took a liberty of committing changes that address this as well as moving the entire weapon selection against wall logic behind a toggle to prevent issues from arising with existing INI configurations, with modders having to manually enable the logic if they wish to use it and documentation mentioning this appropriately.

@Starkku Starkku merged commit 6355937 into develop Feb 6, 2025
6 checks passed
@Starkku Starkku deleted the NoSecondaryWeaponFallback-to-wall branch February 6, 2025 16:11
Starkku added a commit that referenced this pull request Feb 6, 2025
…ls. (#1516)

Phobos previously added a rule to select weapons based on `[Warhead] ►
Wall= (bool)`
but `[TechnoType] ► NoSecondaryWeaponFallback= (bool)` cannot disable
this rule
this causing the Soviet Siege Chopper to use the `160mm` weapon to
attack walls even when not deployed.

---------

Co-authored-by: Starkku <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Minor Documentation is not required Phobos bug Something isn't working properly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants