mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-31 07:58:22 +01:00
Tweaks to previous commits.
More tweaks to IPC fixes. Merge resolution/compile fixes. Further work on properly integrating, updating and fixing prosthetic options. Repathed internal organs to organ/internal. More work on full synthetics, changelings, overheating. Working on getting organs to qdel properly and spawn properly when robotized. Finalized some overheating values, added remaining prosthetic icons. Finalizing the testing version of the full prosthetic bodies branch. Added suit cyclers to the autolathe and map. Fixing runtime errors. Fixing errors. Changelog. Replacing limb and organ strings with constants. Prevented brainless species from becoming full cyborgs. Fixed issues with brain/MMIs renaming themselves inappropriately. Various fixes and oversights.
This commit is contained in:
@@ -3,24 +3,52 @@
|
||||
/****************************************************
|
||||
INTERNAL ORGANS DEFINES
|
||||
****************************************************/
|
||||
/obj/item/organ/internal
|
||||
var/dead_icon // Icon to use when the organ has died.
|
||||
|
||||
/obj/item/organ/internal/die()
|
||||
..()
|
||||
if((status & ORGAN_DEAD) && dead_icon)
|
||||
icon_state = dead_icon
|
||||
|
||||
/obj/item/organ/internal/Destroy()
|
||||
if(owner)
|
||||
owner.internal_organs.Remove(src)
|
||||
owner.internal_organs_by_name[organ_tag] = null
|
||||
owner.internal_organs_by_name -= organ_tag
|
||||
while(null in owner.internal_organs)
|
||||
owner.internal_organs -= null
|
||||
var/obj/item/organ/external/E = owner.organs_by_name[parent_organ]
|
||||
if(istype(E)) E.internal_organs -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/internal/remove_rejuv()
|
||||
if(owner)
|
||||
owner.internal_organs -= src
|
||||
owner.internal_organs_by_name[organ_tag] = null
|
||||
owner.internal_organs_by_name -= organ_tag
|
||||
while(null in owner.internal_organs)
|
||||
owner.internal_organs -= null
|
||||
var/obj/item/organ/external/E = owner.organs_by_name[parent_organ]
|
||||
if(istype(E)) E.internal_organs -= src
|
||||
..()
|
||||
|
||||
// Brain is defined in brain_item.dm.
|
||||
/obj/item/organ/heart
|
||||
/obj/item/organ/internal/heart
|
||||
name = "heart"
|
||||
icon_state = "heart-on"
|
||||
organ_tag = "heart"
|
||||
parent_organ = "chest"
|
||||
organ_tag = O_HEART
|
||||
parent_organ = BP_TORSO
|
||||
dead_icon = "heart-off"
|
||||
|
||||
/obj/item/organ/lungs
|
||||
/obj/item/organ/internal/lungs
|
||||
name = "lungs"
|
||||
icon_state = "lungs"
|
||||
gender = PLURAL
|
||||
organ_tag = "lungs"
|
||||
parent_organ = "chest"
|
||||
organ_tag = O_LUNGS
|
||||
parent_organ = BP_TORSO
|
||||
|
||||
/obj/item/organ/lungs/process()
|
||||
/obj/item/organ/internal/lungs/process()
|
||||
..()
|
||||
|
||||
if(!owner)
|
||||
@@ -38,14 +66,14 @@
|
||||
spawn owner.emote("me", 1, "gasps for air!")
|
||||
owner.losebreath += 15
|
||||
|
||||
/obj/item/organ/kidneys
|
||||
/obj/item/organ/internal/kidneys
|
||||
name = "kidneys"
|
||||
icon_state = "kidneys"
|
||||
gender = PLURAL
|
||||
organ_tag = "kidneys"
|
||||
parent_organ = "groin"
|
||||
organ_tag = O_KIDNEYS
|
||||
parent_organ = BP_GROIN
|
||||
|
||||
/obj/item/organ/kidneys/process()
|
||||
/obj/item/organ/internal/kidneys/process()
|
||||
|
||||
..()
|
||||
|
||||
@@ -62,22 +90,39 @@
|
||||
else if(is_broken())
|
||||
owner.adjustToxLoss(0.3 * PROCESS_ACCURACY)
|
||||
|
||||
/obj/item/organ/eyes
|
||||
/obj/item/organ/internal/eyes
|
||||
name = "eyeballs"
|
||||
icon_state = "eyes"
|
||||
gender = PLURAL
|
||||
organ_tag = "eyes"
|
||||
parent_organ = "head"
|
||||
organ_tag = O_EYES
|
||||
parent_organ = BP_HEAD
|
||||
var/list/eye_colour = list(0,0,0)
|
||||
|
||||
/obj/item/organ/eyes/robotize()
|
||||
/obj/item/organ/internal/eyes/robotize()
|
||||
..()
|
||||
name = "optical sensor"
|
||||
icon = 'icons/obj/robot_component.dmi'
|
||||
icon_state = "camera"
|
||||
dead_icon = "camera_broken"
|
||||
|
||||
/obj/item/organ/eyes/proc/update_colour()
|
||||
/obj/item/organ/internal/eyes/robot
|
||||
name = "optical sensor"
|
||||
|
||||
/obj/item/organ/internal/eyes/robot/New()
|
||||
..()
|
||||
robotize()
|
||||
|
||||
/obj/item/organ/internal/eyes/replaced(var/mob/living/carbon/human/target)
|
||||
|
||||
// Apply our eye colour to the target.
|
||||
if(istype(target) && eye_colour)
|
||||
target.r_eyes = eye_colour[1]
|
||||
target.g_eyes = eye_colour[2]
|
||||
target.b_eyes = eye_colour[3]
|
||||
target.update_eyes()
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/eyes/proc/update_colour()
|
||||
if(!owner)
|
||||
return
|
||||
eye_colour = list(
|
||||
@@ -86,13 +131,13 @@
|
||||
owner.b_eyes ? owner.b_eyes : 0
|
||||
)
|
||||
|
||||
/obj/item/organ/eyes/take_damage(amount, var/silent=0)
|
||||
/obj/item/organ/internal/eyes/take_damage(amount, var/silent=0)
|
||||
var/oldbroken = is_broken()
|
||||
..()
|
||||
if(is_broken() && !oldbroken && owner && !owner.stat)
|
||||
owner << "<span class='danger'>You go blind!</span>"
|
||||
|
||||
/obj/item/organ/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||
/obj/item/organ/internal/eyes/process() //Eye damage replaces the old eye_stat var.
|
||||
..()
|
||||
if(!owner)
|
||||
return
|
||||
@@ -101,13 +146,13 @@
|
||||
if(is_broken())
|
||||
owner.eye_blind = 20
|
||||
|
||||
/obj/item/organ/liver
|
||||
/obj/item/organ/internal/liver
|
||||
name = "liver"
|
||||
icon_state = "liver"
|
||||
organ_tag = "liver"
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
|
||||
/obj/item/organ/liver/process()
|
||||
/obj/item/organ/internal/liver/process()
|
||||
|
||||
..()
|
||||
|
||||
@@ -130,7 +175,7 @@
|
||||
src.damage += 0.2 * PROCESS_ACCURACY
|
||||
//Damaged one shares the fun
|
||||
else
|
||||
var/obj/item/organ/O = pick(owner.internal_organs)
|
||||
var/obj/item/organ/internal/O = pick(owner.internal_organs)
|
||||
if(O)
|
||||
O.damage += 0.2 * PROCESS_ACCURACY
|
||||
|
||||
@@ -155,13 +200,13 @@
|
||||
else
|
||||
take_damage(owner.chem_effects[CE_ALCOHOL_TOXIC] * 0.1 * PROCESS_ACCURACY, prob(1)) // Chance to warn them
|
||||
|
||||
/obj/item/organ/appendix
|
||||
/obj/item/organ/internal/appendix
|
||||
name = "appendix"
|
||||
icon_state = "appendix"
|
||||
parent_organ = "groin"
|
||||
parent_organ = BP_GROIN
|
||||
organ_tag = "appendix"
|
||||
|
||||
/obj/item/organ/appendix/removed()
|
||||
/obj/item/organ/internal/appendix/removed()
|
||||
if(owner)
|
||||
var/inflamed = 0
|
||||
for(var/datum/disease/appendicitis/appendicitis in owner.viruses)
|
||||
|
||||
Reference in New Issue
Block a user