-
Notifications
You must be signed in to change notification settings - Fork 260
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
Fixes for siege mortar ammo #3169
Merged
N7Huntsman
merged 7 commits into
CombatExtended-Continued:Development
from
Rhinous:siege_fix_ammo
Jun 8, 2024
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
400eefe
Fix sieges using non lethal ammo
Rhinous f073f30
Add isHarmful to DamageDefExtensionCE
Rhinous 50ae72d
Add support for isHarmful
Rhinous 951cee1
Rework tick transpiler for sieges to support custom checking for vali…
Rhinous e5c8dfa
Update Biotech and Biological warfare patches
Rhinous 55852dd
Code style to make bot happy
Rhinous 22e20a4
Scrap damage check for spawnAsSiegeAmmo
Rhinous File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I honestly think this is probably something we'd prefer to add to the ammo item, rather than the DamageDef itself--that leaves us finer control over what does or doesn't spawn for mortar shells dropped to sieges. Thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I don't really like how currently we can't control it per shell, was originally done this way to stay similar to the old/vanilla method of just checking damage but it's definitely gotten bloated/overcomplicated. What do you think about scrapping the damage/harmshealth checks entirely and instead adding something like
SpawnAsSiegeAmmo
to the AmmoDef class? That way we can just blacklist shells we don't want since I think default behaviour should be to include themThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think an easy true/false we can just assign to each shell as an override is probably our easiest way to address edge cases. Leave the more straight-forward checks in the code to filter out shells that obviously aren't suitable for siege, but we'll just use xml to address any outliers as necessary. Otherwise, we end up with a hideous, expensive string of checks that still will find a way to let some strange shells spawn when they shouldn't.