Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.
Sign upFirearms expansion. #6169
Conversation
Rivet-the-Zombie
added some commits
Feb 17, 2014
kevingranade
reviewed
Feb 18, 2014
| if (is_underwater() && !weapon.has_flag("WATERPROOF_GUN") && one_in(firing->durability)) { | ||
| g->add_msg_player_or_npc(this, _("Your weapon misfires with a wet click!"), | ||
| _("<npcname>'s weapon misfires with a wet click!") ); | ||
| if (is_underwater() && !weapon.has_flag("WATERPROOF_GUN") && one_in(firing->durability)) { // here we check if we're underwater and whether we should misfire as a result |
This comment has been minimized.
This comment has been minimized.
kevingranade
Feb 18, 2014
Member
Two little requests. One is please put the comments on their own lines, generally above the code. These can scroll off the right side of my editor and make them hard to read. Generally the break is at column 100.
Second consider sticking these in their own function. It's a sizeable chunk of related game logic centered on the gun and ammo objects and giving it it;s on function makes it easier to find among other things.
This comment has been minimized.
This comment has been minimized.
Rivet-the-Zombie
Feb 18, 2014
Author
Member
I'm not sure how to go about making a special function for this. I'm perfectly willing to do so, but I'll need assistance.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Awesome as usual! one thing, I haven't looked at the firing code in a while. What does damaging the gun actually do? |
This comment has been minimized.
This comment has been minimized.
|
It reduces the gun's stats across the board, weakening it in all categories. |
Rivet-the-Zombie
added some commits
Feb 18, 2014
This comment has been minimized.
This comment has been minimized.
|
Players should, as skill becomes sufficient, be able to produce full-quality ammo. |
This comment has been minimized.
This comment has been minimized.
|
Yep that's in the plans. I just wanted to PR this one before the code became outdated by subsequent PRs. I'll toss together a second PR of high-tier recipes that allow you to produce proper duplicates of OEM bullets soon. |
This comment has been minimized.
This comment has been minimized.
|
Some kind of recipe replacement should probably be added together with that, to reduce clutter. Some kind of tag or property, maybe? "obsoleted_by"? |
This comment has been minimized.
This comment has been minimized.
|
This is pretty sweet! Looking forward to this. |
Rivet-the-Zombie commentedFeb 18, 2014
Isn't it odd how firearms never really malfunction or show any wear and tear? Or how all bullets are equal when it comes to quality and manufacturing? Or how the self-taught player character can turn out perfect quality reloads and sound suppressors using scrounged bits of trash?
This aims to fix all of that.
new system of firearm malfunctions, misfires, and failures which can require maintenance
firearms can take damage and be repaired using a calibrated tool kit
4 new gun mods
2 new tools
many new recipes
many new ammunition types
many bug fixes
fixes #6162