Skip to content

Commit

Permalink
Gun Safety PSA - Keep your gun safeties on to prevent accidental disc…
Browse files Browse the repository at this point in the history
…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. -->
  • Loading branch information
Gristlebee authored and MrCat15352 committed Dec 24, 2024
1 parent 223d805 commit bf017da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/__DEFINES/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@
#define MANUFACTURER_IMPORT "Lanchester Import Co."

// Misfire chances if the gun's safety is off
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_LOW 5
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_MEDIUM 10
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_HIGH 15
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_LOW 100
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_MEDIUM 100
#define GUN_NO_SAFETY_MALFUNCTION_CHANCE_HIGH 100

/////////////////
// ATTACHMENTS //
Expand Down
1 change: 1 addition & 0 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -992,6 +992,7 @@
human_holder = src
for(var/obj/item/gun/at_risk in get_all_contents())
var/chance_to_fire = GUN_NO_SAFETY_MALFUNCTION_CHANCE_MEDIUM
var/did_fire = FALSE
if(human_holder)
// gun is less likely to go off in a holster
if(at_risk == human_holder.s_store)
Expand Down

0 comments on commit bf017da

Please sign in to comment.