-
Notifications
You must be signed in to change notification settings - Fork 56
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
Ammo file refactoring #404
Merged
TwistedTail
merged 7 commits into
ACF-Team:dev
from
LengthenedGradient:Ammo-File-Refactoring
Apr 26, 2024
Merged
Ammo file refactoring #404
TwistedTail
merged 7 commits into
ACF-Team:dev
from
LengthenedGradient:Ammo-File-Refactoring
Apr 26, 2024
Commits on Apr 24, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ce1cf1e - Browse repository at this point
Copy the full SHA ce1cf1eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f49844e - Browse repository at this point
Copy the full SHA f49844eView commit details
Commits on Apr 25, 2024
-
Additional Annotations And Simplifications To VerifyData
Annotated some more things in the file, Simplified the logic of VerifyData and fixed what was confirmed to be a likely typo in the detonation code that prevented ammo crates with a single shot from being able to cookoff, only detonate. (Planned in a future commit is to fix cookoffs being impossible for shells above a certain weight)
Configuration menu - View commit details
-
Copy full SHA for d889224 - Browse repository at this point
Copy the full SHA d889224View commit details -
Add Probability Cap To Cookoff Volumerolll
Caps the VolumeRoll randomness to 25% minimum, particularly for larger calibers. Originally `BulletData.RoundVolume ^ 0.5` was not capped and could reach values above 150 (e.g. 155mmC AP), and since math.rand(0,150) is never larger than 150, it was possible for high caliber ammo types to be immune to cookoff. This was confirmed as unintentional. Adjusting the random range would require us knowing some upper bound on BulletData.RoundVolume (if you consider ACF missiles than the upper bound stretches the range quite a bit). So capping is the simplest solution that doesn't change the detonation changes for anything below the cap. I determined 25% minimum was a reasonable choice, but that could be changed if necessary. AmmoRoll was updated for the very rare case that the random call returns exactly the ratio (e.g. 1 for 1)
Configuration menu - View commit details
-
Copy full SHA for ae2815c - Browse repository at this point
Copy the full SHA ae2815cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 72d2a90 - Browse repository at this point
Copy the full SHA 72d2a90View commit details -
Configuration menu - View commit details
-
Copy full SHA for ee5768a - Browse repository at this point
Copy the full SHA ee5768aView commit details
Commits on Apr 26, 2024
-
Improved caliber verification, fixed crate name and short names
- Improved caliber verification for non scalable weapons, now it should properly default to 50mm if the weapon is defined but the user failed to provide a caliber value. - Fixed weapon name and weapon short name having trouble accounting for scalable weapons having items registered items under them. - Added a bunch of spaces between variables and the start of conditions. - Removed seemingly unused WeaponData field from ammo crates.
Configuration menu - View commit details
-
Copy full SHA for 2d8e66b - Browse repository at this point
Copy the full SHA 2d8e66bView commit details
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.