[MIRROR] Fixes surgical moth wing reconstruction trying to repair not moth wings. [MDB IGNORE] (#15228)

* Fixes surgical moth wing reconstruction trying to repair not moth wings.

* Update wingreconstruction.dm

Co-authored-by: ShizCalev <ShizCalev@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-07-31 15:09:26 +02:00
committed by GitHub
parent cc56d880a9
commit f8d47a63e7
@@ -12,7 +12,10 @@
/datum/surgery/advanced/wing_reconstruction/can_start(mob/user, mob/living/carbon/target)
if(!istype(target))
return FALSE
return ..() && target.dna.features["moth_wings"] == "Burnt Off" && ismoth(target)
var/obj/item/organ/external/wings/moth/wings = target.getorganslot(ORGAN_SLOT_EXTERNAL_WINGS)
if(!istype(wings, /obj/item/organ/external/wings/moth))
return FALSE
return ..() && wings?.burnt
/datum/surgery_step/wing_reconstruction
name = "start wing reconstruction"
@@ -38,7 +41,8 @@
span_notice("[user] completes the surgery on [target]'s wings."))
display_pain(target, "You can feel your wings again!")
var/obj/item/organ/external/wings/moth/wings = target.getorganslot(ORGAN_SLOT_EXTERNAL_WINGS)
wings?.heal_wings()
if(istype(wings, /obj/item/organ/external/wings/moth)) //make sure we only heal moth wings.
wings.heal_wings()
var/obj/item/organ/external/antennae/antennae = target.getorganslot(ORGAN_SLOT_EXTERNAL_ANTENNAE) //i mean we might aswell heal their antennae too
antennae?.heal_antennae()