mirror of
https://github.com/Aurorastation/Aurora-Old.git
synced 2026-08-23 04:36:18 +01:00
IPC Organs - surgery fixes, debug removal
Fixes the glitches and runtime errors with surgery code. Removes the debug messages put in place.
This commit is contained in:
@@ -149,6 +149,13 @@
|
||||
var/icon_state_broken = "broken"
|
||||
var/obj/item/organ/organ_type = null // for shells. Only define if this can be placed inside an IPC during organ replacement surgery.
|
||||
|
||||
// In case the robot_component has a child organ, it is updated to have the proper datums and so on.
|
||||
/obj/item/robot_parts/robot_component/New()
|
||||
..()
|
||||
spawn(5)
|
||||
if(organ_type)
|
||||
organ_type.update()
|
||||
|
||||
// TODO: actual icons ;)
|
||||
/obj/item/robot_parts/robot_component/binary_communication_device
|
||||
name = "binary communication device"
|
||||
@@ -169,7 +176,7 @@
|
||||
name = "camera"
|
||||
icon_state = "camera"
|
||||
icon_state_broken = "camera_broken"
|
||||
organ_type = /obj/item/organ/eyes/robot
|
||||
organ_type = new /obj/item/organ/eyes/robot()
|
||||
|
||||
/obj/item/robot_parts/robot_component/law_computer
|
||||
name = "law computer"
|
||||
@@ -180,7 +187,7 @@
|
||||
name = "diagnosis unit"
|
||||
icon_state = "analyser"
|
||||
icon_state_broken = "analyser_broken"
|
||||
organ_type = /obj/item/organ/machine/diagnosis_unit
|
||||
organ_type = new /obj/item/organ/machine/diagnosis_unit()
|
||||
|
||||
/obj/item/robot_parts/robot_component/radio
|
||||
name = "radio"
|
||||
@@ -191,13 +198,13 @@
|
||||
name = "radiator"
|
||||
icon_state = "radiator"
|
||||
icon_state_broken = "radiator_broken"
|
||||
organ_type = /obj/item/organ/machine/radiator
|
||||
organ_type = new /obj/item/organ/machine/radiator()
|
||||
|
||||
/obj/item/robot_parts/robot_component/bladder
|
||||
name = "chemical containment"
|
||||
icon_state = "bladder"
|
||||
icon_state_broken = "bladder_broken"
|
||||
organ_type = /obj/item/organ/machine/bladder
|
||||
organ_type = new /obj/item/organ/machine/bladder()
|
||||
|
||||
//
|
||||
//Robotic Component Analyser, basically a health analyser for robots
|
||||
|
||||
@@ -336,12 +336,9 @@
|
||||
var/organ_missing
|
||||
|
||||
if(!istype(O) && istype(O, /obj/item/robot_parts/robot_component))
|
||||
msg_scopes("Component's type: [tool.type].")
|
||||
var/obj/item/robot_parts/robot_component/A = tool
|
||||
msg_scopes("Component's organ_type: [A.organ_type].")
|
||||
if(A.organ_type)
|
||||
O = new A.organ_type()
|
||||
O.update()
|
||||
O = A.organ_type
|
||||
else
|
||||
return 0
|
||||
else
|
||||
@@ -367,19 +364,6 @@
|
||||
user << "\red \The [target] already has [o_a][O.organ_tag]."
|
||||
return 2
|
||||
|
||||
msg_scopes("Affected.name: [affected.name].")
|
||||
msg_scopes("Parent_organ: [O.organ_data.parent_organ].")
|
||||
msg_scopes("Organ_data.type: [O.organ_data.type].")
|
||||
if(O.organ_data)
|
||||
msg_scopes("We have organ data.")
|
||||
else
|
||||
msg_scopes("No organ data.")
|
||||
|
||||
if(affected.name == O.organ_data.parent_organ)
|
||||
msg_scopes("Affected name matches parent_organ.")
|
||||
else
|
||||
msg_scopes("Affected name does not match parent_organ.")
|
||||
|
||||
if(O.organ_data && affected.name == O.organ_data.parent_organ)
|
||||
organ_compatible = 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user