mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Being drunk or having a broken arm hurts accuracy with ranged weapons. Also cleans up a fair bit of hand handling to be more readable (#87904)
## About The Pull Request 1. Having a broken arm will affect your accuracy when firing a weapon with that arm, even potentially causing damage to you if it's a weapon with recoil. This effect is not applied under the effects of a painkiller. 2. The sister effect of this (punching someone with a broken arm) now also has an interact with painkillers (it can no longer block your attack). 3. Being drunk heavily affects ranged weapon accuracy, unless you're the bartender 4. A lot of hand handling cleanup, using new macros to make it a lot more readable at a glance ## Why It's Good For The Game We have this system for modifying firearm accuracy but we don't really use it commonly, and I feel like it slots in well with a lot of places For broken arms, it adds some more depth to the wound system, in the same way that trying to punch someone with a broken arm causes pain. (I actually want to expand this to melee weapon accuracy and attacking with melee weapons in general, but that's for a later time) For drunkenness, it just adds to the drunk shenanigans. It also slightly reduces the effectiveness of drinks as combat healing chemicals, such as quadsec - makes it a bit more of a trade off. ## Changelog 🆑 Melbert balance: Having a broken arm affects your accuracy with ranged weapons fired with that arm. Utilizing a painkiller will nullify this effect, however. balance: Painkillers will prevent your punches from being cancelled due to having a broken arm. You'll still take damage, though. balance: Being drunk now affects your accuracy with ranged weapon. The bartender is immune to this effect via their skillchip. code: A lot of code involving left and right hand handling has been cleaned up, easier to read. Report any oddities, like left and rights being flipped /🆑
This commit is contained in:
@@ -100,12 +100,12 @@
|
||||
/obj/item/assembly_holder/update_overlays()
|
||||
. = ..()
|
||||
for(var/i in 1 to LAZYLEN(assemblies))
|
||||
if(i % 2 == 1)
|
||||
if(IS_LEFT_INDEX(i))
|
||||
var/obj/item/assembly/assembly = assemblies[i]
|
||||
. += "[assembly.icon_state]_left"
|
||||
for(var/left_overlay in assembly.attached_overlays)
|
||||
. += "[left_overlay]_l"
|
||||
if(i % 2 == 0)
|
||||
if(IS_RIGHT_INDEX(i))
|
||||
var/obj/item/assembly/assembly = assemblies[i]
|
||||
var/mutable_appearance/right = mutable_appearance(icon, "[assembly.icon_state]_left")
|
||||
right.transform = matrix(-1, 0, 0, 0, 1, 0)
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
return FALSE
|
||||
if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
|
||||
var/which_hand = BODY_ZONE_PRECISE_L_HAND
|
||||
if(!(user.active_hand_index % 2))
|
||||
if(IS_RIGHT_INDEX(user.active_hand_index))
|
||||
which_hand = BODY_ZONE_PRECISE_R_HAND
|
||||
triggered(user, which_hand)
|
||||
user.visible_message(span_warning("[user] accidentally sets off [src], breaking their fingers."), \
|
||||
@@ -206,7 +206,7 @@
|
||||
if(finder)
|
||||
finder.visible_message(span_warning("[finder] accidentally sets off [src], breaking their fingers."), \
|
||||
span_warning("You accidentally trigger [src]!"))
|
||||
triggered(finder, (finder.active_hand_index % 2 == 0) ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND)
|
||||
triggered(finder, (IS_RIGHT_INDEX(finder.active_hand_index)) ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND)
|
||||
return TRUE //end the search!
|
||||
else
|
||||
visible_message(span_warning("[src] snaps shut!"))
|
||||
|
||||
Reference in New Issue
Block a user