-
-
Notifications
You must be signed in to change notification settings - Fork 542
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
Generic ammo boxes and printable ammo cans #2940
Generic ammo boxes and printable ammo cans #2940
Conversation
You're doing awesome work. Curious if there's room to consider the size of the round having an effect on how much the box holds? |
The thing is, all bullets with a few exceptions like grenades are code-wise all the same size. There's no real elegant way to check for it in the variables as far as I'm aware. |
Got it. Sounds like a QOL for me down the road then to add something to each round type so they would have a size as well, and revisit these boxes. |
There’s no especially elegant solution to this right now afaik, but it’s not the end of the world if you just have to write a big dumb if-else chain to check the caliber of the round being added and define capacity based on that. if(cartridge.caliber = list(“9mm”, “.45”, “10mm”, etc)) capacity = 20 or whatever. |
Would you prefer it with the list, or is it fine as is? |
I’d prefer the list personally- It’s extra functionality, and if/when cartridges are updated with some kind of cartridge size/category variable it’ll be fairly easy to update the code here |
It's been implemented. Max ammo values are open to be adjusted if needed. |
oh you could just had var/ammo_per_box in the bullet itself |
also we really should define our calibers.. i got that tho remind me if i forgrt |
this is how I had thought about doing it in the future. Apogee's list method certainly is simple, but if we ever do things like implement larger vs smaller boxes or other means of storing these, having vars for the individual bullets is more future proof. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
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.
Everything else looks good.
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> Adds generic ammo boxes, printable in the autolathe. They can be set to hold any ammo type by using a bullet on it, and the capacity changes depending on the bullet type. Also makes ammo cans autolathe printable. Replaces a few instances of update_appearence with update_ammo_count in ammo box code so the materials properly update. Thanks to FalloutFalcon for the idea <!-- Please add a short description of why you think these changes would benefit the game. If you can't justify it in words, it might not be worth adding. --> Basically a redo of my other PR, shiptest-ss13#2868 intentwise. This PR aims to make ammo storage more practical by adding these generic ammo boxes to prevent having loose rounds everywhere if you don't have a compatible ammo box with space. Ammo cans are basically just themed toolboxes, so they're just nice to have thematically as well. Also some bug fixes I guess, that's good. :cl: add: Generic Ammo Boxes, printable in the autolathe add: Ammo cans are printable in the autolathe fix: Ammo boxes sometimes not properly updating their materials /:cl: <!-- Both :cl:'s are required for the changelog to work! You can put your name to the right of the first :cl: if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
About The Pull Request
Adds generic ammo boxes, printable in the autolathe. They can be set to hold any ammo type by using a bullet on it, and the capacity changes depending on the bullet type.
Also makes ammo cans autolathe printable.
Replaces a few instances of update_appearence with update_ammo_count in ammo box code so the materials properly update.
Thanks to FalloutFalcon for the idea
Why It's Good For The Game
Basically a redo of my other PR, #2868 intentwise. This PR aims to make ammo storage more practical by adding these generic ammo boxes to prevent having loose rounds everywhere if you don't have a compatible ammo box with space. Ammo cans are basically just themed toolboxes, so they're just nice to have thematically as well.
Also some bug fixes I guess, that's good.
Changelog
🆑
add: Generic Ammo Boxes, printable in the autolathe
add: Ammo cans are printable in the autolathe
fix: Ammo boxes sometimes not properly updating their materials
/:cl: