Update AmmoThing.cs - #4699
Open
RichardRamirez-TommyArashikage wants to merge 1 commit into
Open
Update AmmoThing.cs#4699RichardRamirez-TommyArashikage wants to merge 1 commit into
RichardRamirez-TommyArashikage wants to merge 1 commit into
Conversation
|
You can download the rebuilt assembly for this PR here: https://combatextended.lp-programming.com/CombatExtended-32720690840.zip |
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.
Additions
#4698
Source .cs alternative to my older PR request. So a lot less bloated.
Changes
Forces ammo to explode on external damage so stacks of dozens/hundreds of explosives don't magically disappear when damaged.
References
https://steamcommunity.com/sharedfiles/filedetails/?id=3784849472
https://www.youtube.com/watch?v=YIR8ab-s9-Y
Same effect as my bug fix mod and old video except instead of .xml based it just uses CE's pre-existing ammo explosion logic. so it is simpler and doesn't make all explosives explode in the same way. It uses CE's better 0.333 multiplier to simulate square cube explosion size increases instead of vanilla RimWorld's "explosiveExpandPerStackcount" which is pretty bad.
Reasoning
https://www.youtube.com/watch?v=q2x9d6viDW4
Just to fix the bug of CE's ammo being destroyed by damage and making large stacks of explosives magically disappear.
Alternatives
#4692
#4698
Only these 2 older PRs which are obviously not as good, the 1st one was .xml based using vanilla RimWorld's flawed logic. The 2nd was just patching CE itself so it was obviously more bloated.
Testing
https://www.youtube.com/watch?v=q2x9d6viDW4
This old first video shows what happens in the current version of CE when you detonate an IED next to a stack of 1 and a stack of over 100 HE shells.
https://www.youtube.com/watch?v=JehoQzFOK4Y
This new video shows my little test comparing a stack of 1 and a stack of 100 HE shells next to an IED detonation. Obviously it removes the bug of the extra HE shells magically disappearing.
The test load order was just:
Harmony
Core
Combat Extended (my modified version)
CE IED RemoteDetonation
Stack By Weight
And obviously I use the modified behaviour for my own gameplay when I play RimWorld day-to-day. Haven't noticed any visible bugs so far.