Ports Bay's Robolimb Changes (#1779)

* Consolidates copypasta for repairing robolimbs

Also prevents self-repairing a limb you are using to hold the tool

* Fixes robot organs becoming undamagable after reaching cap

* Fixes repairing with cable not using any cable, repairing with weldingtool not doing eyecheck

* Removes ORGAN_ROBOT and ORGAN_ASSISTED flags, fixes #13123

* Fixes damage to robotic limbs not triggering organ processing

At the same time, robotic limbs with damage don't need to process.
However, it's much safer to explicitly have robot limbs return 0 from
needs_process() instead of not rechecking bad external organs.

* Build on HarpyEagle changes to apply to Polaris

Had to apply the change from flag to an enumeration.

* Removes unneeded file

* Fix bruisepacks, remove heart

Well, the unused bay version of the heart anyway

* Tweaks examine, reverts isSynthetic

Reverted that because Bay doesn't use it the same way. Also changed Examine to not list every robo-limb on non-FBPs in red, but left them listed as normal per Spookerton
This commit is contained in:
Arokha Sieyes
2016-05-28 09:12:19 -04:00
committed by Yoshax
parent 7835c89bec
commit ea6754597e
41 changed files with 204 additions and 223 deletions

View File

@@ -17,7 +17,7 @@
return 0
if (affected.status & ORGAN_DESTROYED)
return 0
if (!(affected.status & ORGAN_ROBOT))
if (!(affected.robotic >= ORGAN_ROBOT))
return 0
return 1
@@ -213,7 +213,7 @@
if(!affected) return
var/is_organ_damaged = 0
for(var/obj/item/organ/I in affected.internal_organs)
if(I.damage > 0 && (I.status & ORGAN_ROBOT))
if(I.damage > 0 && (I.robotic >= ORGAN_ROBOT))
is_organ_damaged = 1
break
return affected.open == 3 && is_organ_damaged
@@ -226,7 +226,7 @@
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.status & ORGAN_ROBOT)
if(I.robotic >= ORGAN_ROBOT)
user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \
"You start mending the damage to [target]'s [I.name]'s mechanisms." )
@@ -242,7 +242,7 @@
for(var/obj/item/organ/I in affected.internal_organs)
if(I && I.damage > 0)
if(I.status & ORGAN_ROBOT)
if(I.robotic >= ORGAN_ROBOT)
user.visible_message("<span class='notice'>[user] repairs [target]'s [I.name] with [tool].</span>", \
"<span class='notice'>You repair [target]'s [I.name] with [tool].</span>" )
I.damage = 0
@@ -277,7 +277,7 @@
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!(affected && (affected.status & ORGAN_ROBOT)))
if(!(affected && (affected.robotic >= ORGAN_ROBOT)))
return 0
if(affected.open < 3)
return 0
@@ -326,7 +326,7 @@
can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)
var/obj/item/organ/external/affected = target.get_organ(target_zone)
if(!(affected && (affected.status & ORGAN_ROBOT)))
if(!(affected && (affected.robotic >= ORGAN_ROBOT)))
return 0
if(affected.open < 3)
return 0
@@ -336,7 +336,7 @@
var/list/removable_organs = list()
for(var/organ in target.internal_organs_by_name)
var/obj/item/organ/I = target.internal_organs_by_name[organ]
if(I && (I.status & ORGAN_CUT_AWAY) && (I.status & ORGAN_ROBOT) && I.parent_organ == target_zone)
if(I && (I.status & ORGAN_CUT_AWAY) && (I.robotic >= ORGAN_ROBOT) && I.parent_organ == target_zone)
removable_organs |= organ
var/organ_to_replace = input(user, "Which organ do you want to reattach?") as null|anything in removable_organs
@@ -388,12 +388,11 @@
user << "<span class='danger'>That brain is not usable.</span>"
return SURGERY_FAILURE
if(!(affected.status & ORGAN_ROBOT))
if(!(affected.robotic >= ORGAN_ROBOT))
user << "<span class='danger'>You cannot install a computer brain into a meat skull.</span>"
return SURGERY_FAILURE
if(!target.should_have_organ("brain"))
user << "<span class='danger'>You're pretty sure [target.species.name_plural] don't normally have a brain.</span>"
return SURGERY_FAILURE