Changes how fingerprints are applied to objects through gloves. (#65674)

This commit is contained in:
Wallem
2022-03-28 10:22:33 -07:00
committed by GitHub
parent ea1a8fb557
commit 9458d3a801
9 changed files with 12 additions and 16 deletions
+3
View File
@@ -852,3 +852,6 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
/// Ignore Crew monitor Z levels
#define TRAIT_MULTIZ_SUIT_SENSORS "multiz_suit_sensors"
/// Ignores body_parts_covered during the add_fingerprint() proc. Works both on the person and the item in the glove slot.
#define TRAIT_FINGERPRINT_PASSTHROUGH "fingerprint_passthrough"
+3 -3
View File
@@ -84,9 +84,9 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
add_fibers(H)
if(H.gloves) //Check if the gloves (if any) hide fingerprints
var/obj/item/clothing/gloves/G = H.gloves
if(G.transfer_prints)
var/obj/item/gloves = H.gloves
if(gloves) //Check if the gloves (if any) hide fingerprints
if(!(gloves.body_parts_covered & HANDS) || HAS_TRAIT(gloves, TRAIT_FINGERPRINT_PASSTHROUGH) || HAS_TRAIT(H, TRAIT_FINGERPRINT_PASSTHROUGH))
ignoregloves = TRUE
if(!ignoregloves)
H.gloves.add_fingerprint(H, TRUE) //ignoregloves = 1 to avoid infinite loop.
-1
View File
@@ -8,7 +8,6 @@
slot_flags = ITEM_SLOT_GLOVES
attack_verb_continuous = list("challenges")
attack_verb_simple = list("challenge")
var/transfer_prints = FALSE
strip_delay = 20
equip_delay_other = 40
// Path variable. If defined, will produced the type through interaction with wirecutters.
-1
View File
@@ -3,7 +3,6 @@
desc = "For when you're expecting to get slapped on the wrist. Offers modest protection to your arms."
icon_state = "bracers"
inhand_icon_state = "bracers"
transfer_prints = TRUE
strip_delay = 40
equip_delay_other = 20
body_parts_covered = ARMS
+3 -6
View File
@@ -94,7 +94,7 @@
name = "fingerless insulated gloves"
icon_state = "yellowcut"
inhand_icon_state = "ygloves"
transfer_prints = TRUE
clothing_traits = list(TRAIT_FINGERPRINT_PASSTHROUGH)
/obj/item/clothing/gloves/cut/heirloom
desc = "The old gloves your great grandfather stole from Engineering, many moons ago. They've seen some tough times recently."
@@ -116,13 +116,13 @@
desc = "Plain black gloves without fingertips for the hard working."
icon_state = "fingerless"
inhand_icon_state = "fingerless"
transfer_prints = TRUE
strip_delay = 40
equip_delay_other = 20
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
custom_price = PAYCHECK_ASSISTANT * 1.5
undyeable = TRUE
clothing_traits = list(TRAIT_FINGERPRINT_PASSTHROUGH)
/obj/item/clothing/gloves/color/orange
name = "orange gloves"
@@ -220,8 +220,7 @@
inhand_icon_state = "latex"
siemens_coefficient = 0.3
permeability_coefficient = 0.01
clothing_traits = list(TRAIT_QUICK_CARRY)
transfer_prints = TRUE
clothing_traits = list(TRAIT_QUICK_CARRY, TRAIT_FINGERPRINT_PASSTHROUGH)
resistance_flags = NONE
/obj/item/clothing/gloves/color/latex/nitrile
@@ -230,7 +229,6 @@
icon_state = "nitrile"
inhand_icon_state = "nitrilegloves"
clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED)
transfer_prints = FALSE
/obj/item/clothing/gloves/color/infiltrator
name = "infiltrator gloves"
@@ -241,7 +239,6 @@
permeability_coefficient = 0.3
clothing_traits = list(TRAIT_QUICKER_CARRY)
resistance_flags = FIRE_PROOF | ACID_PROOF
transfer_prints = FALSE
/obj/item/clothing/gloves/color/latex/engineering
name = "tinker's gloves"
@@ -22,7 +22,6 @@
icon_state = "nitrile"
inhand_icon_state = "nitrilegloves"
clothing_traits = list(TRAIT_QUICKER_CARRY, TRAIT_FASTMED)
transfer_prints = FALSE
/obj/item/clothing/gloves/color/plasmaman/white
name = "white envirogloves"
+1 -2
View File
@@ -4,7 +4,6 @@
desc = "These clunky gauntlets allow you to drag things with more confidence on them not getting nabbed from you."
icon_state = "haul_gauntlet"
inhand_icon_state = "bgloves"
transfer_prints = FALSE
equip_delay_self = 3 SECONDS
equip_delay_other = 4 SECONDS
clothing_traits = list(TRAIT_CHUNKYFINGERS)
@@ -55,7 +54,7 @@
desc = "Just looking at these fills you with an urge to beat the shit out of people."
icon_state = "rapid"
inhand_icon_state = "rapid"
transfer_prints = TRUE
clothing_traits = list(TRAIT_FINGERPRINT_PASSTHROUGH)
/obj/item/clothing/gloves/rapid/ComponentInitialize()
. = ..()
+1 -1
View File
@@ -3,11 +3,11 @@
desc = "Special gloves that manipulate the blood vessels in the wearer's hands, granting them the ability to launch headfirst into walls."
icon_state = "tackle"
inhand_icon_state = "tackle"
transfer_prints = TRUE
cold_protection = HANDS
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
resistance_flags = NONE
custom_premium_price = PAYCHECK_HARD * 3.5
clothing_traits = list(TRAIT_FINGERPRINT_PASSTHROUGH)
/// For storing our tackler datum so we can remove it after
var/datum/component/tackler
/// See: [/datum/component/tackler/var/stamina_cost]
+1 -1
View File
@@ -116,7 +116,7 @@
if(contact_poison && ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/clothing/gloves/G = H.gloves
if(!istype(G) || G.transfer_prints)
if(!istype(G) || !(G.body_parts_covered & HANDS) || HAS_TRAIT(G, TRAIT_FINGERPRINT_PASSTHROUGH) || HAS_TRAIT(H, TRAIT_FINGERPRINT_PASSTHROUGH))
H.reagents.add_reagent(contact_poison,contact_poison_volume)
contact_poison = null
. = ..()