[MIRROR] Nearsightness, Blindness, Tongue-tied on_spawn() code improvements, bug fixes (#2557)

* Nearsightness, Blindness, Tongue-tied on_spawn() code improvements, bug fixes (#55807)

Spawning equipment for nearsighted or tongue-tied people is now safe code-wise, and shouldnt do any bugs, nor will they delete your previous equipment. Also blindness doesn't call a redundant expensive proc

* Nearsightness, Blindness, Tongue-tied on_spawn() code improvements, bug fixes

Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2021-01-08 00:11:41 +01:00
committed by GitHub
co-authored by Azarak
parent ccc901bfa0
commit 7aa0019bc7
2 changed files with 4 additions and 9 deletions
+2 -4
View File
@@ -57,7 +57,6 @@
var/obj/item/clothing/glasses/blindfold/white/B = new(get_turf(H))
if(!H.equip_to_slot_if_possible(B, ITEM_SLOT_EYES, bypass_equip_delay_self = TRUE)) //if you can't put it on the user's eyes, put it in their hands, otherwise put it on their eyes
H.put_in_hands(B)
H.regenerate_icons()
/* A couple of brain tumor stats for anyone curious / looking at this quirk for balancing:
* - It takes less 16 minute 40 seconds to die from brain death due to a brain tumor.
@@ -318,9 +317,8 @@
/datum/quirk/nearsighted/on_spawn()
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/clothing/glasses/regular/glasses = new(get_turf(H))
H.put_in_hands(glasses)
H.equip_to_slot(glasses, ITEM_SLOT_EYES)
H.regenerate_icons() //this is to remove the inhand icon, which persists even if it's not in their hands
if(!H.equip_to_slot_if_possible(glasses, ITEM_SLOT_EYES, bypass_equip_delay_self = TRUE))
H.put_in_hands(glasses)
/datum/quirk/nyctophobia
name = "Nyctophobia"
+2 -5
View File
@@ -257,15 +257,12 @@
var/mob/living/carbon/human/H = quirk_holder
var/obj/item/organ/tongue/old_tongue = locate() in H.internal_organs
var/obj/item/organ/tongue/tied/new_tongue = new(get_turf(H))
var/obj/item/clothing/gloves/old_gloves = locate() in H
var/obj/item/clothing/gloves/radio/gloves = new(get_turf(H))
old_tongue.Remove(H)
new_tongue.Insert(H)
qdel(old_tongue)
qdel(old_gloves)
H.put_in_hands(gloves)
H.equip_to_slot(gloves, ITEM_SLOT_GLOVES)
H.regenerate_icons()
if(!H.equip_to_slot_if_possible(gloves, ITEM_SLOT_GLOVES, bypass_equip_delay_self = TRUE))
H.put_in_hands(gloves)
/datum/quirk/tongue_tied/post_add()
to_chat(quirk_holder, "<span class='boldannounce'>Because you speak with your hands, having them full hinders your ability to communicate!</span>")