-
-
Notifications
You must be signed in to change notification settings - Fork 543
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
Gun Safety PSA - Keep your gun safeties on to prevent accidental discharges! #3312
Conversation
I thought this was already a thing! Overdue tbh. Very nice. |
how does this interact with storage like bags and guncases? |
If it's loaded, and unsafe. It can still go off and hit someone |
hm. just checked it actually doesnt go off if it's in a storage and not on a person. Thats probably easy enough to fix |
While they are dangerous weapons, guns do not readily go off even if you drop them. Usually this is because of poor care. I like the change, but if its stored like in a holster, it should be less likely to occur. Someone hitting the ground with it in their hand might accidentally hit the trigger and usually THAT is what causes negligent discharges. |
…red guns less likely to go off
…st-Fork into gun-safety-psa
This is a fun idea, though I don’t know if it makes sense for holstered lasers to go off when they’re jostled from a ship moving. Though this never really happens - ballistic weapons could plausibly be explained as going off from sudden movement if the firing pin is dislodged and hits the bullet, but lasers… I dunno. Any weapon in someone’s hand could go off when falling down, since most negligent discharges in life happen when the gun is in someone’s hand and their finger is where it’s not supposed to be. |
Needs a TM, amazing pr I've been wanting this for so long |
var/target | ||
if(!safety) | ||
// someone is very unlucky and about to be shot | ||
if(prob(seek_chance)) |
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.
This needs to be VERY VERY VERY low or not exist at all.
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.
base chance has been reduced to 10%, and on throw now has been reduced to a 50% chance, as a coin flip hail mary option to throw your gun as a last resort
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.
Still think it's too much honestly, should be pretty rare and absolutely not reliable
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.
5 and 20 sound okay for base and throw respectively?
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.
Chance to seek is just a flat 10% now, and should be seen even less with the reduced misfire chances now.
Firing pins are spring loaded with a pretty powerful spring and take a pretty considerable force to even unseat them... like the hammer. Not all of them, but its really uncommon. A really crappy built improvised weapon, old design, or modded one might be more prone but usually that would be more issues with the bolt carrier jamming due to the precision needed. Modern safeties such as the drop safety mechanism aside, really the most prone are long arms. STILL, fun PR. |
code/modules/projectiles/gun.dm
Outdated
chance_to_fire = GUN_NO_SAFETY_MALFUNCTION_CHANCE_MEDIUM | ||
if(at_risk.safety == FALSE && prob(chance_to_fire)) | ||
if(at_risk.process_fire(src,src,FALSE, null, pick(BODY_ZONE_L_LEG,BODY_ZONE_R_LEG)) == TRUE) | ||
visible_message(span_danger("\The [at_risk.name]'s trigger gets caught as [src] falls, suddenly going off into [src]'s leg! Should have had the safeties on."), span_danger("\The [at_risk.name]'s trigger gets caught on something as you fall, suddenly going off into your leg without it's safeties on!")) |
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.
visible_message(span_danger("\The [at_risk.name]'s trigger gets caught as [src] falls, suddenly going off into [src]'s leg! Should have had the safeties on."), span_danger("\The [at_risk.name]'s trigger gets caught on something as you fall, suddenly going off into your leg without it's safeties on!")) | |
visible_message(span_danger("\The [at_risk.name]'s trigger gets caught as [src] falls, suddenly going off into [src]'s leg!"), span_danger("\The [at_risk.name]'s trigger gets caught on something as you fall, suddenly going off into your leg!")) |
i understand the thought but maybe its, like, too on the nose.
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.
it is a bit on the nose, but I think it's important to have feedback why you got shot/punished so you can correct. I dont think it feels great to not know why a punishment mechanic happened.
This still needs to cook some more, so Im setting this to draft |
Requested changes have been implemented, the bugs that Im aware of have been ironed out. This should be good for review again unless Im stupid and missed something |
On this note, we DO have quite a number of open bolt SMGs that would reasonably have a dramatically higher chance to misfire than other arms |
Crawling over a slippery surface (motor oil, mainly) can still cause a gun to misfire. |
In this same vein, someone accidentally tackled a table, got stunned, and had a safety's commisioner go off into their leg. |
That was one fixed, and was from earlier version of the PR.
So with tackle code, it knocks you down (which rolls the chance for a misfire) then if you hit a table with items on it, it applies paralyze to you (which can also roll misfire). That's intended behavior, though it triggering with the safety on isnt. I wasn't able to recreate the bug though with a commisioner with the safety on and also tackling a table, so this also might be a case of a bug from the earlier version. |
8740dd7
@@ -69,6 +69,11 @@ | |||
#define MANUFACTURER_PGF "the Etherbor Industries emblem" | |||
#define MANUFACTURER_IMPORT "Lanchester Import Co." | |||
|
|||
// Misfire chances if the gun's safety is off | |||
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_LOW 100 |
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.
What happened here
…harges! (shiptest-ss13#3312) <!-- 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. --> ## About The Pull Request <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> Unsafetied guns have a small chance to go off and fire on their own under select conditions, which are currently: - Being thrown and hitting something. - Being on a ship when it takes off or docks. (Having it stored in a stable container eg. lockers/crates, protect it from going off) - Falling down while carrying a gun (Shoves, slips, etc) - Paralyzes while holding a gun - Having your gun holstered lowers the chance of it going off from falling down due to the aforementioned causes - Being EMPed if it's an energy weapon. Modifies fire_casing so it works without a user. ## Why It's Good For The Game <!-- 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. --> Makes guns a bit more dangerous (to yourself mainly), and reinforces the fact guns are Dangerous Weapons and you should be careful with them by adding a mechanical reason to have your safety on outside of combat and properly securing your weapons. ~~adds more medical gameplay due to increased injuries~~ ## Changelog :cl: add: Unsaftied guns can go off on their own. code: Changes ammo casing firing code so it's able to work without a user. /: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. -->
…harges! (shiptest-ss13#3312) <!-- 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! --> Unsafetied guns have a small chance to go off and fire on their own under select conditions, which are currently: - Being thrown and hitting something. - Being on a ship when it takes off or docks. (Having it stored in a stable container eg. lockers/crates, protect it from going off) - Falling down while carrying a gun (Shoves, slips, etc) - Paralyzes while holding a gun - Having your gun holstered lowers the chance of it going off from falling down due to the aforementioned causes - Being EMPed if it's an energy weapon. Modifies fire_casing so it works without a user. <!-- 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. --> Makes guns a bit more dangerous (to yourself mainly), and reinforces the fact guns are Dangerous Weapons and you should be careful with them by adding a mechanical reason to have your safety on outside of combat and properly securing your weapons. ~~adds more medical gameplay due to increased injuries~~ :cl: add: Unsaftied guns can go off on their own. code: Changes ammo casing firing code so it's able to work without a user. /: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
Unsafetied guns have a small chance to go off and fire on their own under select conditions, which are currently:
Modifies fire_casing so it works without a user.
Why It's Good For The Game
Makes guns a bit more dangerous (to yourself mainly), and reinforces the fact guns are Dangerous Weapons and you should be careful with them by adding a mechanical reason to have your safety on outside of combat and properly securing your weapons.
adds more medical gameplay due to increased injuriesChangelog
🆑
add: Unsaftied guns can go off on their own.
code: Changes ammo casing firing code so it's able to work without a user.
/:cl: