diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index efe8a4aac86..c504af46cfa 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -6,7 +6,6 @@ #define ORGAN_SPLINTED 4 #define ORGAN_DEAD 8 #define ORGAN_MUTATED 16 -#define ORGAN_ASSISTED 32 #define DROPLIMB_SHARP 0 #define DROPLIMB_BLUNT 1 diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index ddd6e14a5b0..bf481d4e747 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -37,7 +37,7 @@ return 1 if(istype(src,/obj/item/organ/external)) var/obj/item/organ/external/E = src - if(E.robotic == 2) // Robot limbs are less messy to attach + if(E.is_robotic()) // Robot limbs are less messy to attach if(!attempt_initiate_surgery(src, M, user,1)) return 0 else diff --git a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm index 2d3bed1e0cf..d07381b7cce 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm @@ -11,7 +11,7 @@ var/obj/item/organ/external/affected = H.get_organ(target_zone) if(!affected) return FALSE - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return FALSE var/mob/living/carbon/human/H = user // You must either: Be of the abductor species, or contain an abductor implant @@ -89,7 +89,7 @@ var/obj/item/organ/external/affected = H.get_organ(target_zone) if(!affected) return FALSE - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return FALSE var/mob/living/carbon/human/H = user // You must either: Be of the abductor species, or contain an abductor implant diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index a5660f86883..8e7219e401a 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -13,7 +13,6 @@ var/human_only = 0 var/active = 0 tough = TRUE //not easily broken by combat damage - sterile = TRUE //not very germy /obj/item/organ/internal/heart/gland/proc/ownerCheck() if(ishuman(owner)) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index 11ec158db84..9593ee6b792 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -308,7 +308,7 @@ var/list/choices = list() for(var/mob/living/carbon/human/H in view(1,src)) var/obj/item/organ/external/head/head = H.get_organ("head") - if(head.status & ORGAN_ROBOT) + if(head.is_robotic()) continue if(H.stat != DEAD && Adjacent(H) && !H.has_brain_worms()) choices += H diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 59009e9930f..040fd848cfd 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -427,7 +427,7 @@ var/organStatus[0] if(E.status & ORGAN_BROKEN) organStatus["broken"] = E.broken_description - if(E.status & ORGAN_ROBOT) + if(E.is_robotic()) organStatus["robotic"] = 1 if(E.status & ORGAN_SPLINTED) organStatus["splinted"] = 1 @@ -456,7 +456,7 @@ organData["maxHealth"] = I.max_damage organData["bruised"] = I.min_broken_damage organData["broken"] = I.min_bruised_damage - organData["robotic"] = I.robotic + organData["robotic"] = I.is_robotic() organData["dead"] = (I.status & ORGAN_DEAD) intOrganData.Add(list(organData)) @@ -596,8 +596,8 @@ splint = "Splinted:" if(e.status & ORGAN_BROKEN) AN = "[e.broken_description]:" - if(e.status & ORGAN_ROBOT) - robot = "Prosthetic:" + if(e.is_robotic()) + robot = "Robotic:" if(e.open) open = "Open:" switch(e.germ_level) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index d83660e4de6..646c93977fc 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -465,7 +465,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d eyes.receive_damage(rand(3,4), 1) if(eyes.damage >= eyes.min_bruised_damage) if(M.stat != 2) - if(!(eyes.status & ORGAN_ROBOT) || !(eyes.status & ORGAN_ASSISTED)) //robot eyes bleeding might be a bit silly + if(!eyes.is_robotic()) //robot eyes bleeding might be a bit silly to_chat(M, "Your eyes start to bleed profusely!") if(prob(50)) if(M.stat != DEAD) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 9912957c2bb..62d8dc6c87d 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -245,7 +245,7 @@ REAGENT SCANNER user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.") var/implant_detect for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs) - if(CI.status == ORGAN_ROBOT) + if(CI.is_robotic()) implant_detect += "[H.name] is modified with a [CI.name].
" if(implant_detect) user.show_message("Detected cybernetic modifications:") diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 2ae1a2d6e00..bba03c4b07b 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -34,7 +34,7 @@ to_chat(user, "That limb is missing!") return 1 - if(affecting.status & ORGAN_ROBOT) + if(affecting.is_robotic()) to_chat(user, "This can't be used on a robotic limb.") return 1 diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index 593ef9a820f..ec5ba4ef684 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -28,7 +28,7 @@ var/mob/living/carbon/human/H = M var/obj/item/organ/external/S = H.get_organ(user.zone_sel.selecting) - if(S && (S.status & ORGAN_ROBOT)) + if(S && S.is_robotic()) if(S.get_damage()) S.heal_damage(15, 15, robo_repair = 1) H.updatehealth() diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index b0d7477bbbb..0f771fee03d 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -45,7 +45,7 @@ var/mob/living/carbon/human/H = user if(!H.gloves) var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") - if(affecting.status & ORGAN_ROBOT) + if(affecting.is_robotic()) return to_chat(H, "[src] cuts into your hand!") if(affecting.receive_damage(force*0.5)) @@ -82,7 +82,7 @@ var/obj/item/organ/external/affecting = H.get_organ(pick("l_foot", "r_foot")) if(!affecting) return - if(affecting.status & ORGAN_ROBOT) + if(affecting.is_robotic()) return H.Weaken(3) if(affecting.receive_damage(5, 0)) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 867cc473932..43904d27359 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -400,7 +400,7 @@ if(!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2) + if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2) return ..() if(!isOn()) //why wasn't this being checked already? diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index db4f33ac121..7f68f216890 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -2130,9 +2130,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts else var/obj/item/organ/internal/I = character.get_int_organ_tag(name) if(I) - if(status == "assisted") - I.mechassist() - else if(status == "mechanical") + if(status == "mechanical") I.robotize() character.dna.b_type = b_type diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index aa890cbd17f..604dfc36f32 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -342,7 +342,7 @@ AdjustEyeBlurry(damage * rand(3, 6)) if(E.damage > (E.min_bruised_damage + E.min_broken_damage) / 2) - if(!(E.status & ORGAN_ROBOT)) + if(!E.is_robotic()) to_chat(src, "Your eyes start to burn badly!") else //snowflake conditions piss me off for the record to_chat(src, "The flash blinds you!") diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 80b871e7996..152262b69ea 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -129,7 +129,7 @@ /mob/living/carbon/human/proc/change_alt_head(var/alternate_head) var/obj/item/organ/external/head/H = get_organ("head") - if(!H || H.alt_head == alternate_head || (H.status & ORGAN_ROBOT) || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list)) + if(!H || H.alt_head == alternate_head || H.is_robotic() || (!(species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in alt_heads_list)) return H.alt_head = alternate_head diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index ef352b5a8f8..e382796cd09 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -210,7 +210,7 @@ wound_flavor_text["[organ_tag]"] = "[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].\n" else if(!isSynthetic()) - if(E.status & ORGAN_ROBOT) + if(E.is_robotic()) wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a robotic [E.name]!\n" else if(E.status & ORGAN_SPLINTED) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index cca71c1e8d6..ad249d8307f 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1065,7 +1065,7 @@ if(!affecting) . = 0 fail_msg = "[p_they(TRUE)] [p_are()] missing that limb." - else if(affecting.status & ORGAN_ROBOT) + else if(affecting.is_robotic()) . = 0 fail_msg = "That limb is robotic." else diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 5ed14b3a18e..c2c16382995 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -115,7 +115,7 @@ O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(-amount, 0, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) + O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic()) /mob/living/carbon/human/proc/adjustFireLossByPart(amount, organ_name, obj/damage_source = null) @@ -129,7 +129,7 @@ O.receive_damage(0, amount, sharp=is_sharp(damage_source), used_weapon=damage_source) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(0, -amount, internal=0, robo_repair=(O.status & ORGAN_ROBOT)) + O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic()) /mob/living/carbon/human/Paralyse(amount) @@ -149,7 +149,7 @@ if(prob(mut_prob)) var/list/obj/item/organ/external/candidates = list() //TYPECASTED LISTS ARE NOT A FUCKING THING WHAT THE FUCK for(var/obj/item/organ/external/O in bodyparts) - if(O.status & ORGAN_ROBOT) + if(O.is_robotic()) continue if(!(O.status & ORGAN_MUTATED)) candidates |= O @@ -205,9 +205,9 @@ var/list/obj/item/organ/external/parts = list() for(var/obj/item/organ/external/O in bodyparts) if((brute && O.brute_dam) || (burn && O.burn_dam)) - if(!(flags & AFFECT_ROBOTIC_ORGAN) && O.status & ORGAN_ROBOT) + if(!(flags & AFFECT_ROBOTIC_ORGAN) && O.is_robotic()) continue - if(!(flags & AFFECT_ORGANIC_ORGAN) && !(O.status & ORGAN_ROBOT)) + if(!(flags & AFFECT_ORGANIC_ORGAN) && !O.is_robotic()) continue parts += O return parts diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 5b78b450357..2991e0a7111 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -165,7 +165,7 @@ emp_act /mob/living/carbon/human/emag_act(user as mob, var/obj/item/organ/external/affecting) if(!istype(affecting)) return - if(!(affecting.status & ORGAN_ROBOT)) + if(!affecting.is_robotic()) to_chat(user, "That limb isn't robotic.") return if(affecting.sabotaged) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 9a78eafadd8..3f478e65d40 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -178,7 +178,7 @@ I use this to standardize shadowling dethrall code /mob/living/carbon/human/has_organic_damage() var/odmg = 0 for(var/obj/item/organ/external/O in bodyparts) - if(O.status & ORGAN_ROBOT) + if(O.is_robotic()) odmg += O.brute_dam odmg += O.burn_dam return (health < (100 - odmg)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 22e2e0ffe25..2e9e9b88656 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -993,7 +993,7 @@ if(!H) //H.status will runtime if there is no H (obviously) return - if(H.status & ORGAN_ROBOT) //Handle robotic hearts specially with a wuuuubb. This also applies to machine-people. + if(H.is_robotic()) //Handle robotic hearts specially with a wuuuubb. This also applies to machine-people. if(shock_stage >= 10 || istype(get_turf(src), /turf/space)) //PULSE_THREADY - maximum value for pulse, currently it 5. //High pulse value corresponds to a fast rate of heartbeat. @@ -1020,10 +1020,7 @@ if(heartbeat >= rate) heartbeat = 0 - if(H.status & ORGAN_ASSISTED) - src << sound('sound/effects/pacemakebeat.ogg',0,0,CHANNEL_HEARTBEAT,50) - else - src << sound('sound/effects/singlebeat.ogg',0,0,CHANNEL_HEARTBEAT,50) + src << sound('sound/effects/singlebeat.ogg',0,0,CHANNEL_HEARTBEAT,50) else heartbeat++ diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 328e4c14ab8..3a1ac4d3a83 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -241,7 +241,7 @@ var/global/list/damage_icon_parts = list() var/obj/item/organ/external/part = bodyparts_by_name[organ_tag] if(isnull(part)) icon_key += "0" - else if(part.status & ORGAN_ROBOT) + else if(part.is_robotic()) icon_key += "2[part.model ? "-[part.model]": ""]" else if(part.status & ORGAN_DEAD) icon_key += "3" diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index e3407c06f3d..5802bdeb9ec 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -234,7 +234,7 @@ var/organ_found if(H.internal_organs.len) for(var/obj/item/organ/external/E in H.bodyparts) - if(!(E.status & ORGAN_ROBOT)) + if(!E.is_robotic()) continue organ_found = 1 to_chat(user, "[E.name]: [round(E.brute_dam)] [round(E.burn_dam)]") @@ -245,7 +245,7 @@ organ_found = null if(H.internal_organs.len) for(var/obj/item/organ/internal/O in H.internal_organs) - if(!(O.status & ORGAN_ROBOT)) + if(!O.is_robotic()) continue organ_found = 1 to_chat(user, "[capitalize(O.name)]: [O.damage]") diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 25a47f19e04..ae64d5d4d6e 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -528,7 +528,7 @@ var/global/list/datum/stack_recipe/cable_coil_recipes = list( if(!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != INTENT_HELP || S.open == 2) + if(!S.is_robotic() || user.a_intent != INTENT_HELP || S.open == 2) return ..() if(S.burn_dam) diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index a053b568dc7..fb45bddb9ba 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -19,7 +19,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(affected.cannot_break) return 0 @@ -43,7 +43,7 @@ /datum/surgery_step/glue_bone/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) - return affected && !(affected.status & ORGAN_ROBOT) && !(affected.cannot_break) + return affected && !affected.is_robotic() && !(affected.cannot_break) /datum/surgery_step/glue_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -77,7 +77,7 @@ /datum/surgery_step/set_bone/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) - return affected && !(affected.status & ORGAN_ROBOT) + return affected && !affected.is_robotic() /datum/surgery_step/set_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -116,7 +116,7 @@ /datum/surgery_step/mend_skull/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) - return affected && !(affected.status & ORGAN_ROBOT) && affected.limb_name == "head" + return affected && !affected.is_robotic() && affected.limb_name == "head" /datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \ @@ -153,7 +153,7 @@ /datum/surgery_step/finish_bone/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) - return affected && !(affected.status & ORGAN_ROBOT) + return affected && !affected.is_robotic() /datum/surgery_step/finish_bone/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm index 2ab2aca37c7..16d1b18dc1b 100644 --- a/code/modules/surgery/cavity_implant.dm +++ b/code/modules/surgery/cavity_implant.dm @@ -23,7 +23,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -33,7 +33,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - return (affected.status & ORGAN_ROBOT) + return affected.is_robotic() /datum/surgery_step/cavity priority = 1 @@ -187,7 +187,7 @@ else user.visible_message(" [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \ " You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." ) - if((tool.w_class > get_max_wclass(affected)/2 && prob(50) && !(affected.status & ORGAN_ROBOT))) + if((tool.w_class > get_max_wclass(affected) / 2 && prob(50) && !affected.is_robotic())) to_chat(user, " You tear some vessels trying to fit the object in the cavity.") affected.internal_bleeding = TRUE affected.owner.custom_pain("You feel something rip in your [affected.name]!") diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index b9a33fcecab..e1402083dbd 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -15,7 +15,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index 1e1b3a10365..c66d95df899 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -12,7 +12,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected == null) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm index 986ce671860..715f3e9837b 100644 --- a/code/modules/surgery/helpers.dm +++ b/code/modules/surgery/helpers.dm @@ -21,7 +21,7 @@ for(var/datum/surgery/S in all_surgeries) if(!S.possible_locs.Find(selected_zone)) continue - if(affecting && S.requires_organic_bodypart && affecting.status == ORGAN_ROBOT) + if(affecting && S.requires_organic_bodypart && affecting.is_robotic()) continue if(!S.can_start(user, M)) continue @@ -39,7 +39,7 @@ S = available_surgeries["Apply Robotic Prosthetic"] if(istype(I,/obj/item/organ/external)) var/obj/item/organ/external/E = I - if(E.robotic == 2) + if(E.is_robotic()) S = available_surgeries["Synthetic Limb Reattachment"] if(S) var/datum/surgery/procedure = new S.type diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm index c36df974ea3..435ce92b94e 100644 --- a/code/modules/surgery/implant_removal.dm +++ b/code/modules/surgery/implant_removal.dm @@ -19,7 +19,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -29,7 +29,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm index 9674f4aec49..48a16b00a67 100644 --- a/code/modules/surgery/limb_augmentation.dm +++ b/code/modules/surgery/limb_augmentation.dm @@ -11,7 +11,7 @@ return 0 if(affected.status & ORGAN_BROKEN) //The arm has to be in prime condition to augment it. return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index d64d00c34bb..2e8a3b85300 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -15,7 +15,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(affected.cannot_amputate) return 0 @@ -131,7 +131,7 @@ /datum/surgery_step/limb/attach/proc/is_correct_limb(obj/item/organ/external/E) - if(E.status & ORGAN_ROBOT) + if(E.is_robotic()) return 0 return 1 @@ -149,13 +149,13 @@ name = "attach robotic limb" /datum/surgery_step/limb/attach/robo/is_correct_limb(obj/item/organ/external/E) - if(!(E.status & ORGAN_ROBOT)) + if(!E.is_robotic()) return 0 return 1 /datum/surgery_step/limb/attach/robo/attach_limb(mob/living/user, mob/living/carbon/human/target, obj/item/organ/external/E) // Fixes fabricator IPC heads - if(!(E.dna) && E.robotic == 2 && target.dna) + if(!(E.dna) && E.is_robotic() && target.dna) E.set_dna(target.dna) ..() if(E.limb_name == "head") diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 64d62d3f6b4..f0b05ad0659 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -7,8 +7,6 @@ var/implant_color = "#FFFFFF" var/implant_overlay tough = TRUE // Immune to damage - sterile = TRUE // Doesn't accumulate germs - robotic = 2 // these are cybernetic after all /obj/item/organ/internal/cyberimp/New(var/mob/M = null) . = ..() diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index 9f732fdef4d..fecbdb05287 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -64,7 +64,7 @@ var/obj/item/organ/external/BP = X var/brutedamage = BP.brute_dam - if(BP.status & ORGAN_ROBOT) + if(BP.is_robotic()) continue //We want an accurate reading of .len diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 5837fab5925..cde97918a50 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -13,7 +13,6 @@ var/organ_tag = "organ" var/parent_organ = "chest" - var/robotic = 0 //For being a robot var/list/datum/autopsy_data/autopsy_data = list() var/list/trace_chemicals = list() // traces of chemicals in the organ, @@ -75,7 +74,7 @@ blood_DNA[dna.unique_enzymes] = dna.b_type /obj/item/organ/proc/necrotize(update_sprite=TRUE) - if(status & ORGAN_ROBOT) + if(is_robotic()) return damage = max_damage status |= ORGAN_DEAD @@ -95,7 +94,7 @@ return //Process infections - if((status & ORGAN_ROBOT) || sterile || (owner && (IS_PLANT in owner.species.species_traits))) + if(is_robotic() || sterile || (owner && (IS_PLANT in owner.species.species_traits))) germ_level = 0 return @@ -175,10 +174,8 @@ /obj/item/organ/proc/rejuvenate() damage = 0 germ_level = 0 - if(status & ORGAN_ROBOT) //Robotic organs stay robotic. + if(is_robotic()) //Robotic organs stay robotic. status = ORGAN_ROBOT - else if(status & ORGAN_ASSISTED) //Assisted organs stay assisted. - status = ORGAN_ASSISTED else status = 0 if(!owner) @@ -224,7 +221,7 @@ /obj/item/organ/proc/receive_damage(amount, silent = 0) if(tough) return - if(status & ORGAN_ROBOT) + if(is_robotic()) damage = between(0, damage + (amount * 0.8), max_damage) else damage = between(0, damage + amount, max_damage) @@ -240,21 +237,12 @@ necrotize() /obj/item/organ/proc/robotize() //Being used to make robutt hearts, etc - robotic = 2 status &= ~ORGAN_BROKEN status &= ~ORGAN_SPLINTED status |= ORGAN_ROBOT -/obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc - robotize(1) //Skip the icon/name setting that occurs in robotize to avoid having to reset the icon file. - status &= ~ORGAN_ROBOT - status |= ORGAN_ASSISTED - robotic = 1 - min_bruised_damage = 15 - min_broken_damage = 35 - /obj/item/organ/external/emp_act(severity) - if(!(status & ORGAN_ROBOT) || emp_proof) + if(!is_robotic() || emp_proof) return if(tough) switch(severity) @@ -274,25 +262,21 @@ receive_damage(0, 7) /obj/item/organ/internal/emp_act(severity) - if(!robotic || emp_proof) + if(!is_robotic() || emp_proof) return - if(robotic == 2) + if(is_robotic()) switch(severity) - if(1.0) + if(1) receive_damage(20, 1) - if(2.0) + if(2) receive_damage(7, 1) - else if(robotic == 1) - receive_damage(11, 1) /obj/item/organ/internal/heart/emp_act(intensity) if(emp_proof) return - if(owner && robotic == 2) + if(owner && is_robotic()) Stop() // In the name of looooove~! owner.visible_message("[owner] clutches [owner.p_their()] chest and gasps!","You clutch your chest in pain!") - else if(owner && robotic == 1) - receive_damage(11,1) /obj/item/organ/proc/remove(var/mob/living/user,special = 0) if(!istype(owner)) @@ -335,20 +319,15 @@ I use this so that this can be made better once the organ overhaul rolls out -- return 0 return src == O.get_int_organ(organ_tag) -/obj/item/organ/proc/is_robotic(var/purist = FALSE) - if(purist && (robotic > 1 || status & (ORGAN_ROBOT))) //Only the robotiest. +/obj/item/organ/proc/is_robotic() + if(status & ORGAN_ROBOT) return TRUE - if(robotic || status & (ORGAN_ROBOT|ORGAN_ASSISTED)) //Any tech will do. - return TRUE - return FALSE /obj/item/organ/serialize() var/data = ..() if(status != 0) data["status"] = status - if(robotic > 0) - data["robotic"] = robotic // Save the DNA datum if: The owner doesn't exist, or the dna doesn't match // the owner @@ -356,14 +335,7 @@ I use this so that this can be made better once the organ overhaul rolls out -- data["dna"] = dna.serialize() return data -/obj/item/organ/deserialize(var/data) - switch(data["robotic"]) - if(1) - mechassist() - if(2) - robotize() - else - // Nothing +/obj/item/organ/deserialize(data) if(isnum(data["status"])) status = data["status"] if(islist(data["dna"])) diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index 960ce7c0da1..bd064a7d062 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -241,7 +241,7 @@ #undef LIMB_DMG_PROB /obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0) - if(status & ORGAN_ROBOT && !robo_repair) + if(is_robotic() && !robo_repair) return brute_dam = max(brute_dam - brute, 0) @@ -260,10 +260,8 @@ This function completely restores a damaged organ to perfect condition. */ /obj/item/organ/external/rejuvenate() damage_state = "00" - if(status & ORGAN_ROBOT) //Robotic organs stay robotic. + if(is_robotic()) //Robotic organs stay robotic. status = ORGAN_ROBOT - else if(status & ORGAN_ASSISTED) //Assisted organs stay assisted. - status = ORGAN_ASSISTED else status = 0 germ_level = 0 @@ -330,7 +328,7 @@ Note that amputating the affected organ does in fact remove the infection from t */ /obj/item/organ/external/proc/update_germs() - if((status & ORGAN_ROBOT) || (IS_PLANT in owner.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. + if(is_robotic() || (IS_PLANT in owner.species.species_traits)) //Robotic limbs shouldn't be infected, nor should nonexistant limbs. germ_level = 0 return @@ -381,12 +379,12 @@ Note that amputating the affected organ does in fact remove the infection from t //spread the infection to child and parent organs if(children) for(var/obj/item/organ/external/child in children) - if(child.germ_level < germ_level && !(child.status & ORGAN_ROBOT)) + if(child.germ_level < germ_level && !child.is_robotic()) if(child.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) child.germ_level++ if(parent) - if(parent.germ_level < germ_level && !(parent.status & ORGAN_ROBOT)) + if(parent.germ_level < germ_level && !parent.is_robotic()) if(parent.germ_level < INFECTION_LEVEL_ONE*2 || prob(30)) parent.germ_level++ @@ -398,14 +396,14 @@ Note that amputating the affected organ does in fact remove the infection from t //Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status. /obj/item/organ/external/proc/check_fracture() - if(config.bones_can_break && brute_dam > min_broken_damage && !(status & ORGAN_ROBOT)) + if(config.bones_can_break && brute_dam > min_broken_damage && !is_robotic()) fracture() /obj/item/organ/external/proc/check_for_internal_bleeding(damage) if(NO_BLOOD in owner.species.species_traits) return var/local_damage = brute_dam + damage - if(damage > 15 && local_damage > 30 && prob(damage) && !(status & ORGAN_ROBOT)) + if(damage > 15 && local_damage > 30 && prob(damage) && !is_robotic()) internal_bleeding = TRUE owner.custom_pain("You feel something rip in your [name]!") @@ -462,20 +460,20 @@ Note that amputating the affected organ does in fact remove the infection from t switch(disintegrate) if(DROPLIMB_SHARP) if(!clean) - var/gore_sound = "[(status & ORGAN_ROBOT) ? "tortured metal" : "ripping tendons and flesh"]" + var/gore_sound = "[is_robotic() ? "tortured metal" : "ripping tendons and flesh"]" owner.visible_message( "\The [owner]'s [src.name] flies off in an arc!",\ "Your [src.name] goes flying off!",\ "You hear a terrible sound of [gore_sound].") if(DROPLIMB_BURN) - var/gore = "[(status & ORGAN_ROBOT) ? "": " of burning flesh"]" + var/gore = "[is_robotic() ? "" : " of burning flesh"]" owner.visible_message( "\The [owner]'s [src.name] flashes away into ashes!",\ "Your [src.name] flashes away into ashes!",\ "You hear a crackling sound[gore].") if(DROPLIMB_BLUNT) - var/gore = "[(status & ORGAN_ROBOT) ? "": " in shower of gore"]" - var/gore_sound = "[(status & ORGAN_ROBOT) ? "rending sound of tortured metal" : "sickening splatter of gore"]" + var/gore = "[is_robotic() ? "": " in shower of gore"]" + var/gore_sound = "[is_robotic() ? "rending sound of tortured metal" : "sickening splatter of gore"]" owner.visible_message( "\The [owner]'s [src.name] explodes[gore]!",\ "Your [src.name] explodes[gore]!",\ @@ -573,7 +571,7 @@ Note that amputating the affected organ does in fact remove the infection from t //empties the bodypart from its organs and other things inside it /obj/item/organ/external/proc/drop_organs(mob/user) var/turf/T = get_turf(src) - if(status != ORGAN_ROBOT) + if(!is_robotic()) playsound(T, 'sound/effects/splat.ogg', 25, 1) for(var/obj/item/I in src) I.forceMove(T) @@ -598,7 +596,7 @@ Note that amputating the affected organ does in fact remove the infection from t holder.unEquip(holder.legcuffed) /obj/item/organ/external/proc/fracture() - if(status & ORGAN_ROBOT) + if(is_robotic()) return //ORGAN_BROKEN doesn't have the same meaning for robot limbs if((status & ORGAN_BROKEN) || cannot_break) @@ -620,7 +618,7 @@ Note that amputating the affected organ does in fact remove the infection from t release_restraints() /obj/item/organ/external/proc/mend_fracture() - if(status & ORGAN_ROBOT) + if(is_robotic()) return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs if(brute_dam > min_broken_damage) return 0 //will just immediately fracture again @@ -679,12 +677,12 @@ Note that amputating the affected organ does in fact remove the infection from t return FALSE /obj/item/organ/external/proc/is_usable() - if(((status & ORGAN_ROBOT) && get_damage() >= max_damage) && !tough) //robot limbs just become inoperable at max damage + if((is_robotic() && get_damage() >= max_damage) && !tough) //robot limbs just become inoperable at max damage return return !(status & (ORGAN_MUTATED|ORGAN_DEAD)) /obj/item/organ/external/proc/is_malfunctioning() - return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam) && !tough) + return (is_robotic() && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam) && !tough) /obj/item/organ/external/remove(var/mob/living/user, var/ignore_children) @@ -766,7 +764,7 @@ Note that amputating the affected organ does in fact remove the infection from t /obj/item/organ/external/serialize() var/list/data = ..() - if(robotic == 2) + if(is_robotic()) data["company"] = model // If we wanted to store wound information, here is where it would go return data diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index e1be25758b5..d1c1070b19d 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -25,7 +25,7 @@ var/global/list/limb_icon_cache = list() deform = new_deform ? new_deform : deform /obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/H) - if(status & ORGAN_ROBOT && !(species && species.name == "Machine")) //machine people get skin color + if(is_robotic() && !(species && species.name == "Machine")) //machine people get skin color return if(species && H.species && species.name != H.species.name) return @@ -44,7 +44,7 @@ var/global/list/limb_icon_cache = list() change_organ_icobase(C.icobase, C.deform) /obj/item/organ/external/proc/sync_colour_to_dna() - if(status & ORGAN_ROBOT) + if(is_robotic()) return if(!isnull(dna.GetUIValue(DNA_UI_SKIN_TONE)) && ((species.bodyflags & HAS_SKIN_TONE) || (species.bodyflags & HAS_ICON_SKIN_TONE))) s_col = null @@ -76,7 +76,7 @@ var/global/list/limb_icon_cache = list() var/icon_file = new_icons[1] var/new_icon_state = new_icons[2] mob_icon = new /icon(icon_file, new_icon_state) - if(!skeletal && !(status & ORGAN_ROBOT)) + if(!skeletal && !is_robotic()) if(status & ORGAN_DEAD) mob_icon.ColorTone(rgb(10,50,0)) mob_icon.SetIntensity(0.7) @@ -172,7 +172,7 @@ var/global/list/limb_icon_cache = list() if(skeletal) icon_file = 'icons/mob/human_races/r_skeleton.dmi' - else if(status & ORGAN_ROBOT) + else if(is_robotic()) icon_file = 'icons/mob/human_races/robotic.dmi' else if(status & ORGAN_MUTATED) @@ -184,7 +184,7 @@ var/global/list/limb_icon_cache = list() /obj/item/organ/external/chest/get_icon_state(skeletal) var/result = ..() - if(fat && !skeletal && !(status & ORGAN_ROBOT) && (CAN_BE_FAT in species.species_traits)) + if(fat && !skeletal && !is_robotic() && (CAN_BE_FAT in species.species_traits)) result[2] += "_fat" return result diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 42d2c98a66d..67e8febdd17 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -90,7 +90,7 @@ return /obj/item/organ/internal/proc/prepare_eat() - if(status == ORGAN_ROBOT) + if(is_robotic()) return //no eating cybernetic implants! var/obj/item/reagent_containers/food/snacks/organ/S = new S.name = name @@ -315,7 +315,7 @@ return eyes_icon /obj/item/organ/internal/eyes/proc/get_colourmatrix() //Returns a special colour matrix if the eyes are organic and the mob is colourblind, otherwise it uses the current one. - if(!robotic && owner.disabilities & COLOURBLIND) + if(!is_robotic() && owner.disabilities & COLOURBLIND) return colourblind_matrix else return colourmatrix @@ -355,8 +355,8 @@ owner.SetEyeBlurry(0) owner.SetEyeBlind(0) -/obj/item/organ/internal/robotize(var/icon_bypass) //If icon bypass isn't null, skip the processing here and go straight to the parent call. - if(!icon_bypass && !(status & ORGAN_ROBOT)) //Don't override the icons for the already-mechanical IPC organs. +/obj/item/organ/internal/robotize() //If icon bypass isn't null, skip the processing here and go straight to the parent call. + if(!is_robotic()) //Don't override the icons for the already-mechanical IPC organs. var/list/states = icon_states('icons/obj/surgery.dmi') //Insensitive to specially-defined icon files for species like the Drask or whomever else. Everyone gets the same robotic heart. if(slot == "heart" && ("[slot]-prosthetic-on" in states) && ("[slot]-prosthetic-off" in states)) //Give the robotic heart its robotic heart icons if they exist. var/obj/item/organ/internal/heart/H = src @@ -375,19 +375,7 @@ dark_view = 2 ..() //Make sure the organ's got the robotic status indicators before updating the client colour. if(owner) - owner.update_client_colour(0) //Since both mechassisted and mechanical eyes give dark_view of 2 and full colour vision atm, just having this here is fine as mechassist() will call it anyway. - -/obj/item/organ/internal/mechassist() - ..() //Go back, call robotize(), adjust the robotic status indicators and the organ damage parameters. - var/list/states = icon_states(icon) //Sensitive to specially-defined icon files since the organs are not fully synthetic. - if(slot == "heart" && ("[organ_tag]-assisted-on" in states) && ("[organ_tag]-assisted-off" in states)) //Give the mechassisted heart its mechassisted heart icons if they exist. - var/obj/item/organ/internal/heart/H = src - H.icon_base = "[organ_tag]-assisted" - H.dead_icon = "[organ_tag]-assisted-off" - H.update_icon() - else if("[organ_tag]-assisted" in states) //Give the mechassisted organ its mechassisted organ icons if they exist. - icon_state = "[organ_tag]-assisted" - name = "mechanically assisted [initial(name)]" //Avoid setting the organ's name to something like "mechanically assisted mechanical eyes". + owner.update_client_colour(0) //Since mechanical eyes give dark_view of 2 and full colour vision atm, just having this here is fine. /obj/item/organ/internal/liver name = "liver" diff --git a/code/modules/surgery/organs/subtypes/vox.dm b/code/modules/surgery/organs/subtypes/vox.dm index bb56c41030d..3b30b85f30c 100644 --- a/code/modules/surgery/organs/subtypes/vox.dm +++ b/code/modules/surgery/organs/subtypes/vox.dm @@ -9,7 +9,7 @@ parent_organ = "head" organ_tag = "stack" slot = "vox_stack" - robotic = 2 + status = ORGAN_ROBOT vital = 1 /obj/item/organ/internal/stack/vox diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 4c0094592e9..7fbfedf849f 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -32,7 +32,7 @@ if(!affected) // I'd like to see you do surgery on LITERALLY NOTHING return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(!affected.encased) //no bone, problem. return 0 @@ -43,7 +43,7 @@ var/mob/living/carbon/human/H = target var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) - if(affected && (affected.status & ORGAN_ROBOT)) + if(affected && affected.is_robotic()) return 0//no operating on robotic limbs in an organic surgery if(!affected) // I'd like to see you do surgery on LITERALLY NOTHING @@ -208,12 +208,7 @@ for(var/obj/item/organ/internal/I in affected.internal_organs) if(I && I.damage) - if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste)) - if(!(I.sterile)) - spread_germs_to_organ(I, user, tool) - user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ - "You start treating damage to [target]'s [I.name] with [tool_name]." ) - else if(I.robotic >= 2 && istype(tool, /obj/item/stack/nanopaste)) + if(I.is_robotic() && istype(tool, /obj/item/stack/nanopaste)) user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ "You start treating damage to [target]'s [I.name] with [tool_name]." ) @@ -246,11 +241,7 @@ if(I) I.surgeryize() if(I && I.damage) - if(I.robotic < 2 && !istype (tool, /obj/item/stack/nanopaste)) - user.visible_message(" [user] treats damage to [target]'s [I.name] with [tool_name].", \ - " You treat damage to [target]'s [I.name] with [tool_name]." ) - I.damage = 0 - else if(I.robotic >= 2 && istype (tool, /obj/item/stack/nanopaste)) + if(I.is_robotic() && istype(tool, /obj/item/stack/nanopaste)) user.visible_message(" [user] treats damage to [target]'s [I.name] with [tool_name].", \ " You treat damage to [target]'s [I.name] with [tool_name]." ) I.damage = 0 diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index 455a6a8de04..467f1e64a00 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -24,7 +24,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 return 0 @@ -260,7 +260,7 @@ if(!B) // No brain to remove the tumor from return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 if(!(B in affected.internal_organs)) return 0 @@ -276,7 +276,7 @@ if(!B) // No brain to remove the tumor from return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 if(!(B in affected.internal_organs)) return 0 diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index 4d14d2e8a79..a0e4c2a3976 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -9,7 +9,7 @@ var/obj/item/organ/external/head/head = H.get_organ(user.zone_sel.selecting) if(!head) return FALSE - if(head.status & ORGAN_ROBOT) + if(head.is_robotic()) return FALSE return TRUE diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm index 56162dcabc8..3dde9ce1a09 100644 --- a/code/modules/surgery/remove_embedded_object.dm +++ b/code/modules/surgery/remove_embedded_object.dm @@ -13,7 +13,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(affected.status & ORGAN_ROBOT) + if(affected.is_robotic()) return 0 return 1 @@ -23,7 +23,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index ed82328c47d..0fc8b2852cc 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -28,7 +28,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 @@ -38,7 +38,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting) if(!affected) return 0 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 if(affected.cannot_amputate) return 0 @@ -64,7 +64,7 @@ if(!..()) return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return 0 return 1 @@ -305,7 +305,7 @@ current_type = "insert" var/obj/item/organ/internal/I = tool - if(I.status != ORGAN_ROBOT || I.robotic != 2) + if(!I.is_robotic()) to_chat(user, "You can only implant cybernetic organs.") if(target_zone != I.parent_organ || target.get_organ_slot(I.slot)) @@ -343,7 +343,7 @@ to_chat(user, "That brain is not usable.") return -1 - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) to_chat(user, "You cannot install a computer brain into a meat enclosure.") return -1 @@ -365,7 +365,7 @@ else if(implement_type in implements_extract) current_type = "extract" var/list/organs = target.get_organs_zone(target_zone) - if(!(affected && (affected.status & ORGAN_ROBOT))) + if(!(affected && affected.is_robotic())) return -1 if(!organs.len) to_chat(user, "There is no removeable organs in [target]'s [parse_zone(target_zone)]!") @@ -395,7 +395,7 @@ var/found_damaged_organ = FALSE for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I && I.damage && I.robotic >= 2) + if(I && I.damage && I.is_robotic()) 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.") found_damaged_organ = TRUE @@ -421,7 +421,7 @@ return for(var/obj/item/organ/internal/I in affected.internal_organs) if(I && I.damage) - if(I.robotic >= 2) + if(I.is_robotic()) user.visible_message(" [user] repairs [target]'s [I.name] with [tool].", \ " You repair [target]'s [I.name] with [tool]." ) I.damage = 0 diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index 56da8f031e3..0c7aadc36c5 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -187,7 +187,7 @@ return null /proc/spread_germs_to_organ(obj/item/organ/E, mob/living/carbon/human/user, obj/item/tool) - if(!istype(user) || !istype(E) || !(E.status & ORGAN_ROBOT) || E.sterile) + if(!istype(user) || !istype(E) || E.is_robotic() || E.sterile) return var/germ_level = user.germ_level @@ -220,7 +220,7 @@ if(E.internal_organs.len) germs = germs / (E.internal_organs.len + 1) // +1 for the external limb this eventually applies to; let's not multiply germs now. for(var/obj/item/organ/internal/O in E.internal_organs) - if(!(O.status & ORGAN_ROBOT)) + if(!O.is_robotic()) O.germ_level += germs E.germ_level += germs diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index a47c56cba87..09619058db2 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ