Standardized Robotic Organ Checking--Removes Mechassited Organs

This commit is contained in:
Fox McCloud
2018-07-07 21:33:42 -04:00
parent 2a0eee38b0
commit 27ebe7a6fe
46 changed files with 114 additions and 174 deletions
@@ -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
+1 -1
View File
@@ -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, "<span class='warning'>Your eyes start to burn badly!</span>")
else //snowflake conditions piss me off for the record
to_chat(src, "<span class='warning'>The flash blinds you!</span>")
@@ -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
@@ -210,7 +210,7 @@
wound_flavor_text["[organ_tag]"] = "<B>[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].</B>\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)
@@ -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
@@ -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
@@ -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, "<span class='warning'>That limb isn't robotic.</span>")
return
if(affecting.sabotaged)
@@ -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))
+2 -5
View File
@@ -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++
@@ -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"
@@ -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]: <font color='red'>[round(E.brute_dam)]</font> <font color='#FFA500'>[round(E.burn_dam)]</font>")
@@ -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)]: <font color='red'>[O.damage]</font>")
+1 -1
View File
@@ -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)
+5 -5
View File
@@ -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)
+3 -3
View File
@@ -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("<span class='notice'> [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.</span>", \
"<span class='notice'> You put \the [tool] inside [target]'s [get_cavity(affected)] cavity.</span>" )
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, "<span class='warning'> You tear some vessels trying to fit the object in the cavity.</span>")
affected.internal_bleeding = TRUE
affected.owner.custom_pain("You feel something rip in your [affected.name]!")
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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
+2 -2
View File
@@ -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
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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")
@@ -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)
. = ..()
+1 -1
View File
@@ -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
+13 -41
View File
@@ -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("<span class='danger'>[owner] clutches [owner.p_their()] chest and gasps!</span>","<span class='userdanger'>You clutch your chest in pain!</span>")
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"]))
+17 -19
View File
@@ -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(
"<span class='danger'>\The [owner]'s [src.name] flies off in an arc!</span>",\
"<span class='moderate'><b>Your [src.name] goes flying off!</b></span>",\
"<span class='danger'>You hear a terrible sound of [gore_sound].</span>")
if(DROPLIMB_BURN)
var/gore = "[(status & ORGAN_ROBOT) ? "": " of burning flesh"]"
var/gore = "[is_robotic() ? "" : " of burning flesh"]"
owner.visible_message(
"<span class='danger'>\The [owner]'s [src.name] flashes away into ashes!</span>",\
"<span class='moderate'><b>Your [src.name] flashes away into ashes!</b></span>",\
"<span class='danger'>You hear a crackling sound[gore].</span>")
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(
"<span class='danger'>\The [owner]'s [src.name] explodes[gore]!</span>",\
"<span class='moderate'><b>Your [src.name] explodes[gore]!</b></span>",\
@@ -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
+5 -5
View File
@@ -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
+5 -17
View File
@@ -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"
+1 -1
View File
@@ -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
+4 -13
View File
@@ -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("<span class='notice'> [user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
"<span class='notice'> You treat damage to [target]'s [I.name] with [tool_name].</span>" )
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("<span class='notice'> [user] treats damage to [target]'s [I.name] with [tool_name].</span>", \
"<span class='notice'> You treat damage to [target]'s [I.name] with [tool_name].</span>" )
I.damage = 0
+3 -3
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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
+8 -8
View File
@@ -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, "<span class='notice'>You can only implant cybernetic organs.</span>")
if(target_zone != I.parent_organ || target.get_organ_slot(I.slot))
@@ -343,7 +343,7 @@
to_chat(user, "<span class='danger'>That brain is not usable.</span>")
return -1
if(!(affected.status & ORGAN_ROBOT))
if(!affected.is_robotic())
to_chat(user, "<span class='danger'>You cannot install a computer brain into a meat enclosure.</span>")
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, "<span class='notice'>There is no removeable organs in [target]'s [parse_zone(target_zone)]!</span>")
@@ -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("<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
+2 -2
View File
@@ -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