Misc Synthetic Code Cleanup & Minor Tweaks (#3307)

Mostly synthetic code cleanup, some tweaks to human examine and ID cards too.

changes:

Synthetic sprint procs have been compressed down to one proc for all machine subspecies vs. one per subspecies.
Synthetic sprint now only stuns synthetics with empty cells for 30 seconds for all types.
Refactored synthetic limb roboticization.
Changed how a lot of synthetic/industrial checks work.
ID portraits are now 128x128, and scaled without blurring.
Species can now specify an examine text color (for their species name) that differs from their flesh color.
Fixed some eye checks not respecting species.vision_organ.
Examine pulse-checking now uses do_mob & has a progress bar.
This commit is contained in:
Lohikar
2017-08-29 23:21:29 +03:00
committed by Erki
parent ff3b59f67f
commit c80d893e71
31 changed files with 218 additions and 424 deletions
+5
View File
@@ -17,6 +17,8 @@
var/brute_mod = 1
var/burn_mod = 1
var/robotize_type // If set, this organ type will automatically be roboticized with this manufacturer.
var/icon_name = null
var/body_part = null
var/icon_position = 0
@@ -166,6 +168,9 @@
return
/obj/item/organ/external/Initialize(mapload)
if (robotize_type)
robotize(robotize_type)
. = ..(mapload, FALSE)
if(owner)
replaced(owner)
+3 -8
View File
@@ -39,12 +39,7 @@
/obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/human)
..()
var/obj/item/organ/eyes/eyes
if (species.vision_organ)
eyes = owner.internal_organs_by_name[species.vision_organ]
else
eyes = owner.internal_organs_by_name["eyes"]
var/obj/item/organ/eyes/eyes = owner.get_eyes()
if(eyes)
eyes.update_colour()
@@ -57,8 +52,8 @@
cut_overlays()
if(!owner || !owner.species)
return
if(owner.species.has_organ["eyes"] || (owner.species.vision_organ && owner.species.has_organ[species.vision_organ]))
var/obj/item/organ/eyes/eyes = owner.internal_organs_by_name["eyes"] || owner.internal_organs_by_name[species.vision_organ]
if(owner.species.has_organ[owner.species.vision_organ])
var/obj/item/organ/eyes/eyes = owner.get_eyes()
if(eyes && species.eyes)
var/eyecolor
if (eyes.eye_colour)
+1
View File
@@ -69,6 +69,7 @@
organ_tag = "eyes"
parent_organ = "head"
var/list/eye_colour = list(0,0,0)
var/singular_name = "eye"
/obj/item/organ/eyes/proc/update_colour()
if(!owner)
+8 -8
View File
@@ -29,46 +29,46 @@ var/global/datum/robolimb/basic_robolimb
var/paintable = 0 //tired of istype exceptions. bullshirt to find, and by god do i know it after this project.
/datum/robolimb/bishop
company = "Bishop Cybernetics"
company = PROSTHETIC_BC
desc = "This limb is coated in a brilliant silver illuminated from the inside with blue status lights."
icon = 'icons/mob/human_races/cyberlimbs/bishop.dmi'
/datum/robolimb/hesphaistos
company = "Hephaestus Industries"
company = PROSTHETIC_HI
desc = "This limb is covered in thick plating coated with a militaristic olive drab."
icon = 'icons/mob/human_races/cyberlimbs/hesphaistos.dmi'
/datum/robolimb/zenghu
company = "Zeng-Hu Pharmaceuticals"
company = PROSTHETIC_ZH
desc = "This limb has sleek white plating over a graphene-based nanofiber weave."
icon = 'icons/mob/human_races/cyberlimbs/zenghu.dmi'
/datum/robolimb/xion
company = "Xion Manufacturing Group"
company = PROSTHETIC_XMG
desc = "This limb has a minimalist black and grey casing with exposed orange wiring channels."
icon = 'icons/mob/human_races/cyberlimbs/xion.dmi'
/datum/robolimb/ipc
company = "Hephaestus Integrated Limb"
company = PROSTHETIC_IPC
desc = "This limb is simple and functional; no effort has been made to make it look human."
icon = 'icons/mob/human_races/r_machine.dmi'
unavailable_at_chargen = 1
paintable = 1
/datum/robolimb/industrial
company = "Hephaestus Industrial Limb"
company = PROSTHETIC_IND
desc = "This limb is more robust than the standard Hephaestus Integrated Limb, and is better suited for industrial machinery."
icon = 'icons/mob/human_races/r_industrial.dmi'
unavailable_at_chargen = 1
/datum/robolimb/terminator
company = "Hephaestus Vulcanite Limb"
company = PROSTHETIC_HK
desc = "A ludicrously expensive and EMP shielded component, these types of limbs are best suited for highly specialized cyborgs."
icon = 'icons/mob/human_races/r_terminator.dmi'
unavailable_at_chargen = 1
/datum/robolimb/human
company = "Human Synthskin"
company = PROSTHETIC_SYNTHSKIN
desc = "This limb is designed to mimic the Human form. It does so with moderate success."
icon = 'icons/mob/human_races/r_human.dmi'
species_can_use = list("Human")
+44 -177
View File
@@ -5,89 +5,55 @@
dislocated = -1
can_intake_reagents = 0
encased = "support frame"
/obj/item/organ/external/head/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/chest/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/chest/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/groin/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/groin/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/arm/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/arm/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/arm/right/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/arm/right/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/leg/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/leg/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/leg/right/ipc
dislocated = -1
/obj/item/organ/external/leg/right/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
/obj/item/organ/external/foot/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/foot/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/foot/right/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/foot/right/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/hand/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/hand/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/external/hand/right/ipc
dislocated = -1
encased = "support frame"
/obj/item/organ/external/hand/right/ipc/Initialize()
robotize("Hephaestus Integrated Limb")
. = ..()
robotize_type = PROSTHETIC_IPC
/obj/item/organ/cell
name = "microbattery"
@@ -111,6 +77,7 @@
/obj/item/organ/eyes/optical_sensor
name = "optical sensor"
singular_name = "optical sensor"
organ_tag = "optics"
icon = 'icons/obj/robot_component.dmi'
icon_state = "camera"
@@ -232,103 +199,70 @@
can_intake_reagents = 0
encased = "reinforced support frame"
emp_coeff = 0.5
robotize_type = PROSTHETIC_HK
/obj/item/organ/eyes/optical_sensor/terminator
emp_coeff = 0.5
/obj/item/organ/external/head/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
/obj/item/organ/external/chest/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/chest/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/groin/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/groin/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/arm/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/arm/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/arm/right/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/arm/right/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/leg/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/leg/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/leg/right/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/leg/right/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/foot/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/foot/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/foot/right/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/foot/right/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/hand/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/hand/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
/obj/item/organ/external/hand/right/terminator
dislocated = -1
encased = "reinforced support frame"
emp_coeff = 0.5
/obj/item/organ/external/hand/right/terminator/Initialize()
robotize("Hephaestus Vulcanite Limb")
. = ..()
robotize_type = PROSTHETIC_HK
//////////////
//Industrial//
@@ -338,90 +272,57 @@
dislocated = -1
can_intake_reagents = 0
encased = "support frame"
/obj/item/organ/external/head/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/chest/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/chest/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/groin/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/groin/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/arm/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/arm/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/arm/right/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/arm/right/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/leg/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/leg/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/leg/right/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/leg/right/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/foot/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/foot/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/foot/right/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/foot/right/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/hand/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/hand/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
/obj/item/organ/external/hand/right/industrial
dislocated = -1
encased = "support frame"
/obj/item/organ/external/hand/right/industrial/Initialize()
robotize("Hephaestus Industrial Limb")
. = ..()
robotize_type = PROSTHETIC_IND
///////////////
//Shell limbs//
@@ -432,98 +333,64 @@
can_intake_reagents = 0
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/head/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/chest/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/chest/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/groin/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/groin/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/arm/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/arm/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/arm/right/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/arm/right/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/leg/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/leg/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/leg/right/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/leg/right/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/foot/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/foot/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/foot/right/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/foot/right/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/hand/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/hand/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN
/obj/item/organ/external/hand/right/shell
dislocated = -1
encased = "support frame"
force_skintone = TRUE
/obj/item/organ/external/hand/right/shell/Initialize()
robotize("Human Synthskin")
. = ..()
robotize_type = PROSTHETIC_SYNTHSKIN