Applies same restrictions as first aid to external synth repair

This commit is contained in:
Atermonera
2020-02-10 15:53:14 -08:00
committed by VirgoBot
parent 0af93e57cc
commit 6374108fa2
5 changed files with 78 additions and 7 deletions

View File

@@ -15,12 +15,12 @@
/obj/item/stack/medical/attack(mob/living/carbon/M as mob, mob/user as mob)
if (!istype(M))
user << "<span class='warning'>\The [src] cannot be applied to [M]!</span>"
to_chat(user, "<span class='warning'>\The [src] cannot be applied to [M]!</span>")
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon)) )
user << "<span class='warning'>You don't have the dexterity to do this!</span>"
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return 1
if (istype(M, /mob/living/carbon/human))
@@ -28,24 +28,24 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(!affecting)
user << "<span class='warning'>No body part there to work on!</span>"
to_chat(user, "<span class='warning'>No body part there to work on!</span>")
return 1
if(affecting.organ_tag == BP_HEAD)
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
user << "<span class='warning'>You can't apply [src] through [H.head]!</span>"
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")
return 1
else
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
user << "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>"
to_chat(user, "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>")
return 1
if(affecting.robotic == ORGAN_ROBOT)
user << "<span class='warning'>This isn't useful at all on a robotic limb.</span>"
to_chat(user, "<span class='warning'>This isn't useful at all on a robotic limb.</span>")
return 1
if(affecting.robotic >= ORGAN_LIFELIKE)
user << "<span class='warning'>You apply the [src], but it seems to have no effect...</span>"
to_chat(user, "<span class='warning'>You apply the [src], but it seems to have no effect...</span>")
use(1)
return 1

View File

@@ -29,7 +29,24 @@
if (istype(M,/mob/living/carbon/human)) //Repairing robolimbs
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
<<<<<<< HEAD
//VOREStation Edit Start
=======
if(!S)
to_chat(user, "<span class='warning'>No body part there to work on!</span>")
return 1
if(S.organ_tag == BP_HEAD)
if(H.head && istype(H.head,/obj/item/clothing/head/helmet/space))
to_chat(user, "<span class='warning'>You can't apply [src] through [H.head]!</span>")
return 1
else
if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
to_chat(user, "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>")
return 1
>>>>>>> d0159d3... Merge pull request #6666 from Heroman3003/synthpair-fix
if (S && (S.robotic >= ORGAN_ROBOT))
if(!S.get_damage())
to_chat(user, "<span class='notice'>Nothing to fix here.</span>")