Fixes accessories and a few others not showing properly (#17255)

* better fix

Also fixes it in a few other places

* fix that

* gloves

* no doublechecking H

---------

Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
Cameron Lennox
2025-03-02 19:45:46 -05:00
committed by GitHub
co-authored by Kashargul
parent efe9dd1dcf
commit cc4e7cae40
5 changed files with 33 additions and 32 deletions
@@ -19,23 +19,27 @@
min_cold_protection_temperature = GLOVES_MIN_COLD_PROTECTION_TEMPERATURE
max_heat_protection_temperature = GLOVES_MAX_HEAT_PROTECTION_TEMPERATURE
/obj/item/clothing/gloves/regen/equipped(var/mob/living/carbon/human/H)
if(H && H.gloves == src)
wearer = WEAKREF(H)
if(H.can_feel_pain())
to_chat(H, span_danger("You feel a stabbing sensation in your hands as you slide \the [src] on!"))
H.custom_pain("You feel a sharp pain in your hands!",1)
/obj/item/clothing/gloves/regen/equipped(var/mob/user)
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(H.gloves == src)
wearer = WEAKREF(H)
if(H.can_feel_pain())
to_chat(H, span_danger("You feel a stabbing sensation in your hands as you slide \the [src] on!"))
H.custom_pain("You feel a sharp pain in your hands!",1)
..()
/obj/item/clothing/gloves/regen/dropped(var/mob/living/carbon/human/H)
/obj/item/clothing/gloves/regen/dropped(var/mob/user)
..()
wearer?.resolve()
H = wearer
if(ishuman(H))
if(H.can_feel_pain())
to_chat(H, span_danger("You feel the hypodermic needles as you slide \the [src] off!"))
H.custom_pain("Your hands hurt like hell!",1)
wearer = null
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(H.can_feel_pain())
to_chat(H, span_danger("You feel the hypodermic needles as you slide \the [src] off!"))
H.custom_pain("Your hands hurt like hell!",1)
/obj/item/clothing/gloves/regen/Initialize(mapload)
. = ..()
@@ -47,8 +51,7 @@
return ..()
/obj/item/clothing/gloves/regen/process()
wearer?.resolve()
var/mob/living/carbon/human/H = wearer
var/mob/living/carbon/human/H = wearer?.resolve()
if(!ishuman(H) || H.isSynthetic() || H.stat == DEAD || H.nutrition <= 10)
return // Robots and dead people don't have a metabolism.
@@ -49,8 +49,7 @@
else
wearer = null
wearer?.resolve()
var/mob/living/carbon/human/H = wearer
var/mob/living/carbon/human/H = wearer?.resolve()
if(!ishuman(H))
return
@@ -58,8 +58,7 @@
return ..()
/obj/item/clothing/accessory/dosimeter/proc/check_holder()
wearer?.resolve()
var/mob/living/carbon/human/H = wearer
var/mob/living/carbon/human/H = wearer?.resolve()
if(H)
if(current_film && (H.radiation >= 25) && (current_film.state == 0))
update_state(1)
+4 -4
View File
@@ -423,10 +423,12 @@
/obj/item/clothing/gloves/dropped(mob/user)
..()
var/mob/living/carbon/human/H = wearer?.resolve()
if(!ishuman(H))
punch_force = initial(punch_force)
wearer = null
if(!ishuman(user))
return
var/mob/living/carbon/human/H = user
if(gloves) //We have nested gloves! Gloves under our gloves!
if(!H.equip_to_slot_if_possible(gloves, slot_gloves))
gloves.forceMove(get_turf(src))
@@ -437,8 +439,6 @@
if(!H.equip_to_slot_if_possible(ring, slot_gloves))
ring.forceMove(get_turf(src))
src.ring = null
punch_force = initial(punch_force)
wearer = null
/obj/item/clothing/gloves
var/datum/unarmed_attack/special_attack = null //do the gloves have a special unarmed attack?
+8 -8
View File
@@ -71,16 +71,16 @@
/obj/item/clothing/shoes/magboots/dropped(mob/user)
..()
wearer?.resolve()
var/mob/living/carbon/human/H = wearer
if(ishuman(H) && shoes)
if(!H.equip_to_slot_if_possible(shoes, slot_shoes))
shoes.forceMove(get_turf(src))
shoes = null
wearer = null
var/mob/living/carbon/human/H = user
if(!ishuman(H) || !shoes)
return
if(!H.equip_to_slot_if_possible(shoes, slot_shoes))
shoes.forceMove(get_turf(src))
shoes = null
/obj/item/clothing/shoes/magboots/examine(mob/user)
. = ..()
. += "Its mag-pulse traction system appears to be [item_flags & NOSLIP ? "enabled" : "disabled"]."