mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
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:
@@ -75,7 +75,7 @@ REAGENT SCANNER
|
||||
for(var/obj/item/organ/external/org in damaged)
|
||||
user.show_message(text("<span class='notice'> [][]: [][] - []</span>",
|
||||
capitalize(org.name),
|
||||
(org.status & ORGAN_ROBOT) ? "(Cybernetic)" : "",
|
||||
(org.robotic >= ORGAN_ROBOT) ? "(Cybernetic)" : "",
|
||||
(org.brute_dam > 0) ? "<span class='warning'>[org.brute_dam]</span>" : 0,
|
||||
(org.status & ORGAN_BLEEDING)?"<span class='danger'>\[Bleeding\]</span>":"",
|
||||
(org.burn_dam > 0) ? "<font color='#FFA500'>[org.burn_dam]</font>" : 0),1)
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
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>"
|
||||
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>"
|
||||
@@ -33,7 +37,7 @@
|
||||
user << "<span class='warning'>You can't apply [src] through [H.wear_suit]!</span>"
|
||||
return 1
|
||||
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
if(affecting.robotic >= ORGAN_ROBOT)
|
||||
user << "<span class='warning'>This isn't useful at all on a robotic limb..</span>"
|
||||
return 1
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting)
|
||||
|
||||
if(S.open == 1)
|
||||
if (S && (S.status & ORGAN_ROBOT))
|
||||
if (S && (S.robotic >= ORGAN_ROBOT))
|
||||
if(S.get_damage())
|
||||
S.heal_damage(15, 15, robo_repair = 1)
|
||||
H.updatehealth()
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
var/picked = pick(check)
|
||||
var/obj/item/organ/external/affecting = H.get_organ(picked)
|
||||
if(affecting)
|
||||
if(affecting.status & ORGAN_ROBOT)
|
||||
if(affecting.robotic >= ORGAN_ROBOT)
|
||||
return
|
||||
if(affecting.take_damage(5, 0))
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
@@ -1,71 +0,0 @@
|
||||
/obj/item/robot_parts/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
|
||||
var/limbloc = null
|
||||
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
|
||||
if(!((locate(/obj/machinery/optable, M.loc) && M.resting) || (locate(/obj/structure/bed/roller, M.loc) && (M.buckled || M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat)) && prob(75) || (locate(/obj/structure/table/, M.loc) && (M.lying || M.weakened || M.stunned || M.paralysis || M.sleeping || M.stat) && prob(66))))
|
||||
return ..()
|
||||
|
||||
if(!istype(M, /mob/living/carbon/human))
|
||||
return ..()
|
||||
|
||||
if((user.zone_sel.selecting == "l_arm") && (istype(src, /obj/item/robot_parts/l_arm)))
|
||||
limbloc = "l_hand"
|
||||
else if((user.zone_sel.selecting == "r_arm") && (istype(src, /obj/item/robot_parts/r_arm)))
|
||||
limbloc = "r_hand"
|
||||
else if((user.zone_sel.selecting == "r_leg") && (istype(src, /obj/item/robot_parts/r_leg)))
|
||||
limbloc = "r_foot"
|
||||
else if((user.zone_sel.selecting == "l_leg") && (istype(src, /obj/item/robot_parts/l_leg)))
|
||||
limbloc = "l_foot"
|
||||
else
|
||||
user << "<span class='warning'>That doesn't fit there!</span>"
|
||||
return ..()
|
||||
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/datum/organ/external/S = H.organs[user.zone_sel.selecting]
|
||||
if(S.status & ORGAN_DESTROYED)
|
||||
if(!(S.status & ORGAN_ATTACHABLE))
|
||||
user << "<span class='warning'>The wound is not ready for a replacement!</span>"
|
||||
return 0
|
||||
if(M != user)
|
||||
M.visible_message( \
|
||||
"<span class='notice'>\The [user] is beginning to attach \the [src] where [H]'s [S.display_name] used to be.</span>", \
|
||||
"<span class='notice'>\The [user] begins to attach \the [src] where your [S.display_name] used to be.</span>")
|
||||
else
|
||||
M.visible_message( \
|
||||
"<span class='notice'>\The [user] begins to attach a robotic limb where \his [S.display_name] used to be with [src].</span>", \
|
||||
"<span class='notice'>You begin to attach \the [src] where your [S.display_name] used to be.</span>")
|
||||
|
||||
if(do_mob(user, H, 100))
|
||||
if(M != user)
|
||||
M.visible_message( \
|
||||
"<span class='notice'>\The [user] finishes attaching [H]'s new [S.display_name].</span>", \
|
||||
"<span class='notice'>\The [user] finishes attaching your new [S.display_name].</span>")
|
||||
else
|
||||
M.visible_message( \
|
||||
"<span class='notice'>\The [user] finishes attaching \his new [S.display_name].</span>", \
|
||||
"<span class='notice'>You finish attaching your new [S.display_name].</span>")
|
||||
|
||||
if(H == user && prob(25))
|
||||
user << "<span class='warning'>You mess up!</span>"
|
||||
S.take_damage(15)
|
||||
|
||||
S.status &= ~ORGAN_BROKEN
|
||||
S.status &= ~ORGAN_SPLINTED
|
||||
S.status &= ~ORGAN_ATTACHABLE
|
||||
S.status &= ~ORGAN_DESTROYED
|
||||
S.status |= ORGAN_ROBOT
|
||||
var/datum/organ/external/T = H.organs["[limbloc]"]
|
||||
T.status &= ~ORGAN_BROKEN
|
||||
T.status &= ~ORGAN_SPLINTED
|
||||
T.status &= ~ORGAN_ATTACHABLE
|
||||
T.status &= ~ORGAN_DESTROYED
|
||||
T.status |= ORGAN_ROBOT
|
||||
H.update_body()
|
||||
M.updatehealth()
|
||||
M.UpdateDamageIcon()
|
||||
qdel(src)
|
||||
|
||||
return 1
|
||||
return 0
|
||||
@@ -428,22 +428,18 @@
|
||||
var/mob/living/carbon/human/H = A
|
||||
var/obj/item/organ/external/S = H.organs_by_name[user.zone_sel.selecting]
|
||||
|
||||
if(!S || !(S.status & ORGAN_ROBOT))
|
||||
if(!S || S.robotic < ORGAN_ROBOT || S.open == 3)
|
||||
return ..()
|
||||
|
||||
if(S.brute_dam)
|
||||
if(S.brute_dam < ROBOLIMB_SELF_REPAIR_CAP)
|
||||
S.heal_damage(15,0,0,1)
|
||||
user.visible_message("<span class='notice'>\The [user] patches some dents on \the [H]'s [S.name] with \the [src].</span>")
|
||||
else if(S.open < 3)
|
||||
user << "<span class='danger'>The damage is far too severe to patch over externally.</span>"
|
||||
else
|
||||
return ..()
|
||||
else
|
||||
user << "<span class='notice'>Nothing to fix!</span>"
|
||||
S.update_wounds()
|
||||
return
|
||||
return ..()
|
||||
if(!welding)
|
||||
user << "<span class='warning'>You'll need to turn [src] on to patch the damage on [H]'s [S.name]!</span>"
|
||||
return 1
|
||||
|
||||
if(S.robo_repair(15, BRUTE, "some dents", src, user))
|
||||
remove_fuel(1, user)
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
/*/obj/item/weapon/combitool
|
||||
name = "combi-tool"
|
||||
|
||||
Reference in New Issue
Block a user