organs NEW to INIT (#17050)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
Kashargul
2025-02-07 18:30:20 +01:00
committed by GitHub
parent 71627d97ce
commit bb6a263e2f
12 changed files with 143 additions and 117 deletions
+23 -20
View File
@@ -78,16 +78,19 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
tmp_owner.internal_organs_by_name[organ_tag] = new replace_path(tmp_owner, 1)
tmp_owner = null
/obj/item/organ/internal/brain/New()
/obj/item/organ/internal/brain/Initialize(mapload)
..()
health = CONFIG_GET(number/default_brain_health)
defib_timer = (CONFIG_GET(number/defib_timer) MINUTES) / 20 // Time vars measure things in ticks. Life tick happens every ~2 seconds, therefore dividing by 20
spawn(5)
if(brainmob)
butcherable = FALSE
return INITIALIZE_HINT_LATELOAD
if(brainmob.client)
brainmob.client.screen.len = null //clear the hud
/obj/item/organ/internal/brain/LateInitialize()
. = ..()
if(brainmob)
butcherable = FALSE
if(brainmob.client)
brainmob.client.screen.len = null //clear the hud
/obj/item/organ/internal/brain/Destroy()
if(brainmob && brainmob.dna)
@@ -194,14 +197,16 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
/obj/item/organ/internal/brain/slime/is_open_container()
return 1
/obj/item/organ/internal/brain/slime/New()
..()
/obj/item/organ/internal/brain/slime/Initialize(mapload)
. = ..()
create_reagents(50)
var/mob/living/carbon/human/H = null
spawn(15) //Match the core to the Promethean's starting color.
if(ishuman(owner))
H = owner
color = rgb(min(H.r_skin + 40, 255), min(H.g_skin + 40, 255), min(H.b_skin + 40, 255))
/obj/item/organ/internal/brain/slime/LateInitialize()
. = ..()
//Match the core to the Promethean's starting color.
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
color = rgb(min(H.r_skin + 40, 255), min(H.g_skin + 40, 255), min(H.b_skin + 40, 255))
/obj/item/organ/internal/brain/slime/removed(var/mob/living/user)
if(istype(owner))
@@ -314,10 +319,8 @@ GLOBAL_LIST_BOILERPLATE(all_brain_organs, /obj/item/organ/internal/brain)
desc = "A piece of juicy meat found in a person's head. This one is strange."
icon_state = "brain_grey"
/obj/item/organ/internal/brain/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
H = owner
color = H.species.blood_color
/obj/item/organ/internal/brain/grey/colormatch/LateInitialize()
. = ..()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
color = H.species.blood_color
+10 -8
View File
@@ -15,20 +15,22 @@
/obj/item/organ/internal/eyes/robot
name = "optical sensor"
/obj/item/organ/internal/eyes/robot/New()
..()
/obj/item/organ/internal/eyes/robot/Initialize(mapload, internal)
. = ..()
robotize()
/obj/item/organ/internal/eyes/grey
icon_state = "eyes_grey"
/obj/item/organ/internal/eyes/grey/colormatch/New()
/obj/item/organ/internal/eyes/grey/colormatch/Initialize(mapload, internal)
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
H = owner
color = H.species.blood_color
return INITIALIZE_HINT_LATELOAD
/obj/item/organ/internal/eyes/grey/colormatch/LateInitialize()
. = ..()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
color = H.species.blood_color
/obj/item/organ/internal/eyes/proc/change_eye_color()
set name = "Change Eye Color"
+8 -6
View File
@@ -28,13 +28,15 @@
icon_state = "heart_grey-on"
dead_icon = "heart_grey-off"
/obj/item/organ/internal/heart/grey/colormatch/New()
/obj/item/organ/internal/heart/grey/colormatch/Initialize(mapload, internal)
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
H = owner
color = H.species.blood_color
return INITIALIZE_HINT_LATELOAD
/obj/item/organ/internal/heart/grey/colormatch/LateInitialize()
. = ..()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
color = H.species.blood_color
/obj/item/organ/internal/heart/machine
name = "hydraulic hub"
+8 -6
View File
@@ -44,10 +44,12 @@
/obj/item/organ/internal/kidneys/grey
icon_state = "kidneys_grey"
/obj/item/organ/internal/kidneys/grey/colormatch/New()
/obj/item/organ/internal/kidneys/grey/colormatch/Initialize(mapload, internal)
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
H = owner
color = H.species.blood_color
return INITIALIZE_HINT_LATELOAD
/obj/item/organ/internal/kidneys/grey/colormatch/LateInitialize()
. = ..()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
color = H.species.blood_color
+8 -6
View File
@@ -59,10 +59,12 @@
/obj/item/organ/internal/liver/grey
icon_state = "liver_grey"
/obj/item/organ/internal/liver/grey/colormatch/New()
/obj/item/organ/internal/liver/grey/colormatch/Initialize(mapload, internal)
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
H = owner
color = H.species.blood_color
return INITIALIZE_HINT_LATELOAD
/obj/item/organ/internal/liver/grey/colormatch/LateInitialize()
. = ..()
if(ishuman(loc))
var/mob/living/carbon/human/H = loc
color = H.species.blood_color
+8 -6
View File
@@ -61,10 +61,12 @@
/obj/item/organ/internal/lungs/grey
icon_state = "lungs_grey"
/obj/item/organ/internal/lungs/grey/colormatch/New()
/obj/item/organ/internal/lungs/grey/colormatch/Initialize(mapload, internal)
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(owner && ishuman(owner))
H = owner
color = H.species.blood_color
return INITIALIZE_HINT_LATELOAD
/obj/item/organ/internal/lungs/grey/colormatch/LateInitialize()
. = ..()
if(owner && ishuman(loc))
var/mob/living/carbon/human/H = loc
color = H.species.blood_color
+6 -6
View File
@@ -12,8 +12,8 @@
will_assist_languages = list(LANGUAGE_GALCOM)
var/mute = FALSE
/obj/item/organ/internal/voicebox/New()
..()
/obj/item/organ/internal/voicebox/Initialize(mapload, internal)
. = ..()
amend_assist_langs()
/obj/item/organ/internal/voicebox/proc/amend_assist_langs() // Adds the list of language datums assisted by the voicebox to the list used in speaking
@@ -30,14 +30,14 @@
/obj/item/organ/internal/voicebox/assist // In the off chance we get a species that doesn't speak GalCom by default
/obj/item/organ/internal/voicebox/assist/New()
..()
/obj/item/organ/internal/voicebox/assist/Initialize(mapload, internal)
. = ..()
mechassist()
/obj/item/organ/internal/voicebox/robot
name = "vocal synthesizer"
will_assist_languages = list(LANGUAGE_GALCOM, LANGUAGE_EAL) // Synthetics spawn with this by default
/obj/item/organ/internal/voicebox/robot/New()
..()
/obj/item/organ/internal/voicebox/robot/Initialize(mapload, internal)
. = ..()
robotize()