Skip to content

Commit

Permalink
Merge pull request #210 from TyrantCerberus/handedness
Browse files Browse the repository at this point in the history
New quirk: Dominant Hand
  • Loading branch information
SynthTwo authored Feb 2, 2025
2 parents 527355c + 703a8d8 commit b302702
Show file tree
Hide file tree
Showing 32 changed files with 268 additions and 45 deletions.
11 changes: 7 additions & 4 deletions code/__DEFINES/~~iris_defines/traits/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,14 @@

//mob traits

//START PORT https://github.com/lizardqueenlexi/orbstation/pull/254:
//Makes you illiterate while not wearing glasses
//Makes you illiterate while not wearing glasses, part of https://github.com/lizardqueenlexi/orbstation/pull/254
#define TRAIT_FARSIGHT "farsighted"

//HANDEDNESS_QUIRK
#define TRAIT_HANDEDNESS "handedness"
#define TRAIT_HANDEDNESS_LEFT "handedness_left"

//Trait sources
// Special trait source for illiteracy granted by farsightedness

//Special trait source for illiteracy granted by farsightedness, part of https://github.com/lizardqueenlexi/orbstation/pull/254
#define FARSIGHT_TRAIT "farsighted_trait"
//END PORT
7 changes: 7 additions & 0 deletions code/_globalvars/lists/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,10 @@ GLOBAL_LIST_INIT(quirk_chipped_choice, list(
"Mast-Angl-Er" = /obj/item/skillchip/master_angler,
"Kommand" = /obj/item/skillchip/big_pointer,
))

//IRIS EDIT ADDITION BEGIN - HANDEDNESS_QUIRK
GLOBAL_LIST_INIT(side_choice_handedness, list(
"Dominant Left Hand",
"Dominant Right Hand",
))
//IRIS EDIT ADDITION END
4 changes: 4 additions & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,10 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_GUN_NATURAL" = TRAIT_GUN_NATURAL,
"TRAIT_HALLUCINATION_IMMUNE" = TRAIT_HALLUCINATION_IMMUNE,
"TRAIT_HALT_RADIATION_EFFECTS" = TRAIT_HALT_RADIATION_EFFECTS,
// IRIS EDIT ADDITION BEGIN - HANDEDNESS_QUIRK
"TRAIT_HANDEDNESS" = TRAIT_HANDEDNESS,
"TRAIT_HANDEDNESS_LEFT" = TRAIT_HANDEDNESS_LEFT,
// IRIS EDIT ADDITION END
"TRAIT_HANDS_BLOCKED" = TRAIT_HANDS_BLOCKED,
"TRAIT_HARDLY_WOUNDED" = TRAIT_HARDLY_WOUNDED,
"TRAIT_HAS_BEEN_KIDNAPPED" = TRAIT_HAS_BEEN_KIDNAPPED,
Expand Down
3 changes: 3 additions & 0 deletions code/controllers/subsystem/processing/quirks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ GLOBAL_LIST_INIT_TYPED(quirk_blacklist, /list/datum/quirk, list(
//IRIS EDIT ADDITION BEGIN
//ORBSTATION PORT: if you're illiterate, farsighted would just be free points
list(/datum/quirk/item_quirk/farsighted, /datum/quirk/illiterate),
//HANDEDNESS_QUIRK (split across two lines so we don't prevent the taking of clumsy with hemiplegic)
list(/datum/quirk/handedness, /datum/quirk/hemiplegic),
list(/datum/quirk/handedness, /datum/quirk/clumsy),
//IRIS EDIT ADDITION END
))

Expand Down
7 changes: 6 additions & 1 deletion code/datums/components/supermatter_crystal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@
return FALSE
if(istype(item, /obj/item/cigarette))
var/obj/item/cigarette/cig = item
var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/clumsy = FALSE
var/hand_index = user.active_hand_index
if(HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
clumsy = TRUE
//IRIS EDIT CHANGE END
if(clumsy)
var/obj/item/bodypart/dust_arm = user.get_active_hand()
dust_arm.dismember()
Expand Down
8 changes: 7 additions & 1 deletion code/datums/components/transforming.dm
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,15 @@
if(!clumsy_check)
return FALSE

if(!user || !HAS_TRAIT(user, TRAIT_CLUMSY))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
if(!user)
return FALSE

var/hand_index = user.active_hand_index
if(!(HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
return FALSE
//IRIS EDIT CHANGE END

if(active && prob(50))
var/hurt_self_verb_simple = LAZYLEN(attack_verb_simple_on) ? pick(attack_verb_simple_on) : "hit"
var/hurt_self_verb_continuous = LAZYLEN(attack_verb_continuous_on) ? pick(attack_verb_continuous_on) : "hits"
Expand Down
8 changes: 6 additions & 2 deletions code/datums/elements/eyestab.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@
if (HAS_TRAIT(user, TRAIT_PACIFISM))
return

if (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(CLUMSY_ATTACK_SELF_CHANCE))
target = user
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
if(prob(CLUMSY_ATTACK_SELF_CHANCE))
target = user
//IRIS EDIT CHANGE END

if (target.is_eyes_covered() || isalien(target) || isbrain(target))
return
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/devices/flashlight.dm
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@
add_fingerprint(user)
if(user.combat_mode || (user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_PRECISE_MOUTH))
return NONE
if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(50) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)) || HAS_TRAIT(user, TRAIT_DUMB))) //too dumb to use flashlight properly
//IRIS EDIT CHANGE END
return ITEM_INTERACT_SKIP_TO_ATTACK //just hit them in the head

. = ITEM_INTERACT_BLOCKING
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/devices/scanners/autopsy_scanner.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
. = ITEM_INTERACT_SUCCESS

// Clumsiness/brain damage check
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(50) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)) || HAS_TRAIT(user, TRAIT_DUMB)))
//IRIS EDIT CHANGE END
user.visible_message(span_warning("[user] analyzes the floor's vitals!"), \
span_notice("You stupidly try to analyze the floor's vitals!"))
to_chat(user, "[span_info("Analyzing results for The floor:\n\tOverall status: <b>Healthy</b>")]\
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/devices/scanners/health_analyzer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@
flick("[icon_state]-scan", src) //makes it so that it plays the scan animation upon scanning, including clumsy scanning

// Clumsiness/brain damage check
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if (prob(50) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)) || HAS_TRAIT(user, TRAIT_DUMB)))
//IRIS EDIT CHANGE END
var/turf/scan_turf = get_turf(user)
user.visible_message(
span_warning("[user] analyzes [scan_turf]'s vitals!"),
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/devices/scanners/scanner_wand.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
/obj/item/scanner_wand/attack(mob/living/M, mob/living/carbon/human/user)
flick("[icon_state]_active", src) //nice little visual flash when scanning someone else.

if((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(25))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(25) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)) || HAS_TRAIT(user, TRAIT_DUMB)))
//IRIS EDIT CHANGE END
user.visible_message(span_warning("[user] targets himself for scanning."), \
to_chat(user, span_info("You try scanning [M], before realizing you're holding the scanner backwards. Whoops.")))
selected_target = user
Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/grenades/_grenade.dm
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,10 @@
to_chat(user, span_warning("What the... [src] is stuck to your hand!"))
ADD_TRAIT(src, TRAIT_NODROP, STICKY_NODROP)

var/clumsy = HAS_TRAIT(user, TRAIT_CLUMSY)
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
var/clumsy = (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
//IRIS EDIT CHANGE END
if(clumsy && (clumsy_check == GRENADE_CLUMSY_FUMBLE) && prob(50))
to_chat(user, span_warning("Huh? How does this thing work?"))
arm_grenade(user, 5, FALSE)
Expand Down
13 changes: 9 additions & 4 deletions code/game/objects/items/handcuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,15 @@
victim.balloon_alert(user, "can't be handcuffed!")
return

if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))) //Clumsy people have a 50% chance to handcuff themselves instead of their target.
to_chat(user, span_warning("Uh... how do those things work?!"))
apply_cuffs(user, user)
return
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
if(iscarbon(user))
var/hand_index = user.active_hand_index
if(HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
if(prob(50)) //Clumsy people have a 50% chance to handcuff themselves instead of their target.
to_chat(user, span_warning("Uh... how do those things work?!"))
apply_cuffs(user, user)
return
//IRIS EDIT CHANGE END

if(!isnull(victim.handcuffed))
victim.balloon_alert(user, "already handcuffed!")
Expand Down
7 changes: 6 additions & 1 deletion code/game/objects/items/melee/baton.dm
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,12 @@
addtimer(TRAIT_CALLBACK_REMOVE(target, TRAIT_IWASBATONED, user_ref), cooldown)

/obj/item/melee/baton/proc/clumsy_check(mob/living/user, mob/living/intented_target)
if(!active || !HAS_TRAIT(user, TRAIT_CLUMSY) || prob(50))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(!(HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
return FALSE
if(!active || prob(50))
//IRIS EDIT CHANGE END
return FALSE
user.visible_message(span_danger("[user] accidentally hits [user.p_them()]self over the head with [src]! What a doofus!"), span_userdanger("You accidentally hit yourself over the head with [src]!"))

Expand Down
5 changes: 4 additions & 1 deletion code/game/objects/items/pneumaticCannon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@
if(tank && !tank.remove_air(gasPerThrow * pressure_setting))
to_chat(user, span_warning("\The [src] lets out a weak hiss and doesn't react!"))
return
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(75) && clumsyCheck && iscarbon(user))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(clumsyCheck && iscarbon(user) && prob(75) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
//IRIS EDIT CHANGE END
var/mob/living/carbon/C = user
C.visible_message(span_warning("[C] loses [C.p_their()] grip on [src], causing it to go off!"), span_userdanger("[src] slips out of your hands and goes off!"))
C.dropItemToGround(src, TRUE)
Expand Down
7 changes: 6 additions & 1 deletion code/game/turfs/open/lava.dm
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,12 @@
if(ciggie.lit)
to_chat(user, span_warning("The [ciggie.name] is already lit!"))
return TRUE
var/clumsy_modifier = HAS_TRAIT(user, TRAIT_CLUMSY) ? 2 : 1
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/clumsy_modifier = 1
var/hand_index = user.active_hand_index
if(HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
clumsy_modifier *= 2 //double the chance of an accident if they're clumsy
//IRIS EDIT CHANGE END
if(prob(25 * clumsy_modifier) && isliving(user))
ciggie.light(span_warning("[user] expertly dips \the [ciggie.name] into [src], along with the rest of [user.p_their()] arm. What a dumbass."))
var/mob/living/burned_guy = user
Expand Down
5 changes: 4 additions & 1 deletion code/modules/assembly/flash.dm
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@
return ..()

/obj/item/assembly/flash/proc/clown_check(mob/living/carbon/human/user)
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(50) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
//IRIS EDIT CHANGE END
flash_carbon(user, user, confusion_duration = 15 SECONDS, targeted = FALSE)
return FALSE
return TRUE
Expand Down
30 changes: 19 additions & 11 deletions code/modules/assembly/mousetrap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,13 @@
if(!armed)
if(ishuman(usr))
var/mob/living/carbon/human/user = usr
if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
to_chat(user, span_warning("Your hand slips, setting off the trigger!"))
pulse()
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
if(prob(50))
to_chat(user, span_warning("Your hand slips, setting off the trigger!"))
pulse()
//IRIS EDIT CHANGE END
update_appearance()
playsound(loc, 'sound/items/weapons/handcuffs.ogg', 30, TRUE, -3)

Expand Down Expand Up @@ -154,14 +158,18 @@
/obj/item/assembly/mousetrap/proc/clumsy_check(mob/living/carbon/human/user)
if(!armed || !user)
return FALSE
if((HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY)) && prob(50))
var/which_hand = BODY_ZONE_PRECISE_L_HAND
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."), \
span_warning("You accidentally trigger [src]!"))
return TRUE
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(HAS_TRAIT(user, TRAIT_DUMB) || HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
if(prob(50))
var/which_hand = BODY_ZONE_PRECISE_L_HAND
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."), \
span_warning("You accidentally trigger [src]!"))
return TRUE
//IRIS EDIT CHANGE END
return FALSE

/obj/item/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
Expand Down
5 changes: 4 additions & 1 deletion code/modules/library/bibles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ GLOBAL_LIST_INIT(bibleitemstates, list(
balloon_alert(user, "not dextrous enough!")
return

if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(50) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
//IRIS EDIT CHANGE END
to_chat(user, span_danger("[src] slips out of your hand and hits your head."))
user.take_bodypart_damage(10)
user.Unconscious(40 SECONDS)
Expand Down
5 changes: 4 additions & 1 deletion code/modules/paperwork/paper.dm
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,10 @@
var/ignition_message = attacking_item.ignition_effect(src, user)
if(!ignition_message)
return FALSE
if(!bypass_clumsy && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(10) && Adjacent(user))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(!bypass_clumsy && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))) && prob(10) && Adjacent(user))
//IRIS EDIT CHANGE END
user.visible_message(span_warning("[user] accidentally ignites [user.p_them()]self!"), \
span_userdanger("You miss [src] and accidentally light yourself on fire!"))
if(user.is_holding(attacking_item)) //checking if they're holding it in case TK is involved
Expand Down
21 changes: 15 additions & 6 deletions code/modules/paperwork/paper_cutter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,13 +164,22 @@

/obj/item/papercutter/proc/cut_paper(mob/user)
playsound(src.loc, 'sound/items/weapons/slash.ogg', 50, TRUE)
var/clumsy = (iscarbon(user) && HAS_TRAIT(user, TRAIT_CLUMSY) && prob(cut_self_chance))
to_chat(user, span_userdanger("You neatly cut [stored_paper][clumsy ? "... and your finger in the process!" : "."]"))
if(clumsy)
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/clumsy = FALSE
if(iscarbon(user))
var/hand_index = user.active_hand_index
if(HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index)))
clumsy = TRUE

var/accident = FALSE
if(clumsy && prob(cut_self_chance))
accident = TRUE
to_chat(user, span_userdanger("You neatly cut [stored_paper][accident ? "... and your finger in the process!" : "."]"))
if(accident)
var/obj/item/bodypart/finger = user.get_active_hand()
if (iscarbon(user))
var/mob/living/carbon/carbon_user = user
carbon_user.cause_wound_of_type_and_severity(WOUND_SLASH, finger, WOUND_SEVERITY_MODERATE, wound_source = "paper cut")
var/mob/living/carbon/carbon_user = user //removed a redundant carbon check here
carbon_user.cause_wound_of_type_and_severity(WOUND_SLASH, finger, WOUND_SEVERITY_MODERATE, wound_source = "paper cut")
//IRIS EDIT CHANGE END
stored_paper = null
qdel(stored_paper)
new /obj/item/paper/paperslip(get_turf(src))
Expand Down
10 changes: 8 additions & 2 deletions code/modules/projectiles/gun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN

COOLDOWN_START(src, flip_cooldown, 3 SECONDS)
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(40) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
//IRIS EDIT CHANGE END
// yes this will sound silly for bows and wands, but that's a "gun" moment for you
user.visible_message(
span_danger("While trying to flip [src] [user] pulls the trigger accidentally!"),
Expand Down Expand Up @@ -374,7 +377,10 @@
/obj/item/gun/proc/check_botched(mob/living/user, atom/target)
if(clumsy_check)
if(istype(user))
if(HAS_TRAIT(user, TRAIT_CLUMSY) && prob(40))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(40) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
//IRIS EDIT CHANGE END
var/target_zone = user.get_random_valid_zone(blacklisted_parts = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM), even_weights = TRUE, bypass_warning = TRUE)
if(!target_zone)
return
Expand Down
4 changes: 3 additions & 1 deletion code/modules/projectiles/guns/ballistic/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,9 @@
/obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user, akimbo_usage)
if(akimbo_usage)
return FALSE
if(HAS_TRAIT(user, TRAIT_CLUMSY) || is_clown_job(user.mind?.assigned_role))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK, makes this truly clown-only
if(is_clown_job(user.mind?.assigned_role) || user.mind?.has_antag_datum(/datum/antagonist/nukeop/clownop) || user.mind?.has_antag_datum(/datum/antagonist/nukeop/leader/clownop))
//IRIS EDIT CHANGE END
return ..()
if(process_fire(user, user, FALSE, null, BODY_ZONE_HEAD))
user.visible_message(span_warning("[user] somehow manages to shoot [user.p_them()]self in the face!"), span_userdanger("You somehow shoot yourself in the face! How the hell?!"))
Expand Down
4 changes: 4 additions & 0 deletions code/modules/projectiles/pins.dm
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,12 @@
if(QDELETED(user)) //how the hell...?
stack_trace("/obj/item/firing_pin/clown/ultra/pin_auth called with a [isnull(user) ? "null" : "invalid"] user.")
return TRUE
//IRIS STATION REMOVAL BEGIN - HANDEDNESS_PR, reason for removal: unneccessary due to mind checks below, currently only expands firing pin use to non-clowns (which seems unintended) on account of the existence of the "Clumsy" quirk
/*
if(HAS_TRAIT(user, TRAIT_CLUMSY)) //clumsy
return TRUE
*/
//IRIS STATION REMOVAL END
if(user.mind)
if(is_clown_job(user.mind.assigned_role)) //traitor clowns can use this, even though they're technically not clumsy
return TRUE
Expand Down
5 changes: 4 additions & 1 deletion code/modules/reagents/reagent_containers/chem_pack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@
balloon_alert(user, "sealed!")
return CLICK_ACTION_BLOCKING

if(iscarbon(user) && (HAS_TRAIT(user, TRAIT_CLUMSY) && prob(50)))
//IRIS EDIT CHANGE BEGIN - HANDEDNESS_QUIRK
var/hand_index = user.active_hand_index
if(prob(50) && (HAS_TRAIT(user, TRAIT_CLUMSY) || (HAS_TRAIT(user, TRAIT_HANDEDNESS) && IS_LEFT_INDEX(hand_index)) || (HAS_TRAIT(user, TRAIT_HANDEDNESS_LEFT) && IS_RIGHT_INDEX(hand_index))))
//IRIS EDIT CHANGE END
to_chat(user, span_warning("Uh... whoops! You accidentally spill the content of the bag onto yourself."))
SplashReagents(user)
return CLICK_ACTION_BLOCKING
Expand Down
Loading

0 comments on commit b302702

Please sign in to comment.