-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
add drops to turrets/nonmilitary robots #32544
Conversation
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.
You need to lint and astyle your changes.
Co-Authored-By: Nick Greazaro <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: Nick Greazaro <[email protected]>
Co-Authored-By: Nick Greazaro <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Yes, it should be consistent. I copied the components from the file you referenced. |
Yeah, will keep in mind for future. Otherwise it would be easier to make the change en masse in a future PR. |
Please make the change to the items in this PR, because you're introducing new items here. |
Jenkins Rebuild |
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.
The broken turret items are largely duplicates of eachother, you should clean them up with copy-from.
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
Co-Authored-By: anothersimulacrum <[email protected]>
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.
Tested, and works for me.
Compiled with make -j4 -s CCACHE=1 TILES=1 RELEASE=1
with gcc 9.1.0 on Arch Linux 5.2.2.
To test, I spawned in two turrets. With the debug invincibility mutation, I had one turret empty all its bullets into me, and one not. I then used the debug menu to kill both turrets. The turret that had not shot dropped 100 bullets, and the turret that had shot me dropped no bullets, but had already dropped 100 casings.
Then, I went and killed two security bots in a bank, after they had spent some bullets. They dropped ammo corresponding to how much they had left.
So, this seems to be working to me.
Co-Authored-By: BevapDin <[email protected]>
Summary
SUMMARY: Features "Make secubots/turrets drop ammo and a salvageable robot carcass."
Purpose of change
Balance/realism
Describe the solution
Mostly changes secubots/turrets from “explode” to “broken.” Doesn’t make sense for turrets/civilian bots to come with self-destruct features like a tank or for rifle/pistol ammo to cook off from a shot. IRL a round would penetrate a power supply or circuit board and the robot would just shut down.
The biggest changes are the addition of a “drops_ammo” tag and the changes of the carcass generation script to check for that tag and then perform a loop to check for and generate the ammo drops alongside the carcass.
Describe alternatives you've considered
I considered putting the ammo into the carcass of the bot, to be disassembled later, but I don’t think there is any infrastructure for this. Any inactive bot only inherits amount of damage, not any specifics like unspent ammo, so it would be possible to recover 9mm rounds from an empty turret, which would have made no sense.
Additional context
You guys must have been messing around with STUN_IMMUNE, so I had to put it back into my code to make it compile, but omitted it from the stuff I am posting to make my changes more clear. Also some stuff with ceramic plates for dragon armor? Anyway, I didn't test every possible combination of enemy, but it seems to be working fine since the code is not really item-specific but pretty general and makes liberal use of tags/existing infrastructure.