Files
FalloutFalcon e7615580ac Better recoil visuals (#93904)
## About The Pull Request
Port of https://github.com/shiptest-ss13/Shiptest/pull/3330
Partial port of https://github.com/shiptest-ss13/Shiptest/pull/1601

Makes two changes to how guns handle recoil.
- Changes recoil from an erratic shaking to a kicking of your screen
relative to your firing angle
- Adds a small cosmetic recoil to all ballistics (with an accompanying
pref option to tweak or disable it)

Primary recoil still is only used as a balance lever for a very small
handful of guns (and sawoff)

## Why It's Good For The Game

Cosmetic recoil makes guns feel a lot more punchier. People who think
its a competitive disadvantage (nerds/loosers) or people with a
legitimate sickness to screen shake or similar can just turn it off.

Old recoil was just reused explosion, while new recoil feels like its
actually recoil
2025-12-07 16:51:37 -06:00

46 lines
1.6 KiB
Plaintext

/// When toggled, being flashed will show a dark screen rather than a light one.
/datum/preference/toggle/darkened_flash
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
default_value = FALSE
savefile_key = "darkened_flash"
savefile_identifier = PREFERENCE_PLAYER
/// When toggled, will darken the screen on screen shake
/datum/preference/toggle/screen_shake_darken
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
default_value = FALSE
savefile_key = "screen_shake_darken"
savefile_identifier = PREFERENCE_PLAYER
/// When toggled, removes some double-click reliant actions.
/datum/preference/toggle/remove_double_click
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
default_value = FALSE
savefile_key = "remove_double_click"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/min_recoil_multiplier
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
maximum = 200
minimum = 0
savefile_key = "min_recoil_multiplier"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/min_recoil_multiplier/create_default_value()
return 100
/// When toggled, enables staircase indicators
/datum/preference/toggle/stair_indicator
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
default_value = TRUE
savefile_key = "stair_indicator"
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/stair_indicator/apply_to_client_updated(client/client, value)
if(value || !isliving(client.mob)) // only hide, showing is more trouble than it's worth
return
var/datum/weakref/climber_ref = WEAKREF(client.mob)
for(var/obj/structure/stairs/stair as anything in GLOB.stairs)
stair.clear_climber_image(climber_ref)