Revert "[MIRROR] /atom New() => Initialize() [MDB IGNORE]"

This commit is contained in:
Novacat
2022-08-27 08:49:56 -04:00
committed by GitHub
parent 0be7af4774
commit 1aa4c73e8d
599 changed files with 3329 additions and 4983 deletions
+6 -6
View File
@@ -78,8 +78,8 @@ 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/Initialize()
. = ..()
/obj/item/organ/internal/brain/New()
..()
health = config.default_brain_health
defib_timer = (config.defib_timer MINUTES) / 20 // Time vars measure things in ticks. Life tick happens every ~2 seconds, therefore dividing by 20
spawn(5)
@@ -190,8 +190,8 @@ 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/Initialize()
. = ..()
/obj/item/organ/internal/brain/slime/New()
..()
create_reagents(50)
var/mob/living/carbon/human/H = null
spawn(15) //Match the core to the Promethean's starting color.
@@ -306,8 +306,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/Initialize()
. = ..()
/obj/item/organ/internal/brain/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
+4 -4
View File
@@ -15,15 +15,15 @@
/obj/item/organ/internal/eyes/robot
name = "optical sensor"
/obj/item/organ/internal/eyes/robot/Initialize()
. = ..()
/obj/item/organ/internal/eyes/robot/New()
..()
robotize()
/obj/item/organ/internal/eyes/grey
icon_state = "eyes_grey"
/obj/item/organ/internal/eyes/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/eyes/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
+2 -2
View File
@@ -28,8 +28,8 @@
icon_state = "heart_grey-on"
dead_icon = "heart_grey-off"
/obj/item/organ/internal/heart/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/heart/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
+2 -2
View File
@@ -44,8 +44,8 @@
/obj/item/organ/internal/kidneys/grey
icon_state = "kidneys_grey"
/obj/item/organ/internal/kidneys/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/kidneys/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
+2 -2
View File
@@ -59,8 +59,8 @@
/obj/item/organ/internal/liver/grey
icon_state = "liver_grey"
/obj/item/organ/internal/liver/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/liver/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
+2 -2
View File
@@ -61,8 +61,8 @@
/obj/item/organ/internal/lungs/grey
icon_state = "lungs_grey"
/obj/item/organ/internal/lungs/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/lungs/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(owner && ishuman(owner))
+6 -6
View File
@@ -12,8 +12,8 @@
will_assist_languages = list(LANGUAGE_GALCOM)
var/mute = FALSE
/obj/item/organ/internal/voicebox/Initialize()
. = ..()
/obj/item/organ/internal/voicebox/New()
..()
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/Initialize()
. = ..()
/obj/item/organ/internal/voicebox/assist/New()
..()
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/Initialize()
. = ..()
/obj/item/organ/internal/voicebox/robot/New()
..()
robotize()
+25 -21
View File
@@ -62,35 +62,37 @@ var/list/organ_cache = list()
/obj/item/organ/proc/update_health()
return
/obj/item/organ/Initialize(var/ml, var/internal)
. = ..(ml)
/obj/item/organ/New(var/mob/living/holder, var/internal)
..(holder)
create_reagents(5)
if(isliving(loc))
owner = loc
w_class = max(src.w_class + mob_size_difference(owner.mob_size, MOB_MEDIUM), 1) //smaller mobs have smaller organs.
if(isliving(holder))
src.owner = holder
src.w_class = max(src.w_class + mob_size_difference(holder.mob_size, MOB_MEDIUM), 1) //smaller mobs have smaller organs.
if(internal)
if(!LAZYLEN(owner.internal_organs))
owner.internal_organs = list()
if(!LAZYLEN(owner.internal_organs_by_name))
owner.internal_organs_by_name = list()
owner.internal_organs |= src
owner.internal_organs_by_name[organ_tag] = src
else
if(!LAZYLEN(owner.organs))
owner.organs = list()
if(!LAZYLEN(owner.organs_by_name))
owner.organs_by_name = list()
if(!LAZYLEN(holder.internal_organs))
holder.internal_organs = list()
if(!LAZYLEN(holder.internal_organs_by_name))
holder.internal_organs_by_name = list()
owner.organs |= src
owner.organs_by_name[organ_tag] = src
holder.internal_organs |= src
holder.internal_organs_by_name[organ_tag] = src
else
if(!LAZYLEN(holder.organs))
holder.organs = list()
if(!LAZYLEN(holder.organs_by_name))
holder.organs_by_name = list()
holder.organs |= src
holder.organs_by_name[organ_tag] = src
if(!max_damage)
max_damage = min_broken_damage * 2
if(iscarbon(owner))
var/mob/living/carbon/C = owner
if(iscarbon(holder))
var/mob/living/carbon/C = holder
species = GLOB.all_species[SPECIES_HUMAN]
if(owner.dna)
if(holder.dna)
dna = C.dna.Clone()
species = C.species //VOREStation Edit - For custom species
else
@@ -112,6 +114,8 @@ var/list/organ_cache = list()
handle_organ_mod_special()
/obj/item/organ/Initialize()
. = ..()
if(owner)
if(!meat_type)
if(owner.isSynthetic())
+4 -3
View File
@@ -224,12 +224,13 @@
/obj/item/organ/external/update_health()
damage = min(max_damage, (brute_dam + burn_dam))
/obj/item/organ/external/Initialize(var/ml)
. = ..(ml, 0)
/obj/item/organ/external/New(var/mob/living/carbon/holder)
..(holder, 0)
if(istype(owner))
replaced(owner)
sync_colour_to_human(owner)
addtimer(CALLBACK(src, .proc/get_icon), 1)
spawn(1)
get_icon()
/obj/item/organ/external/replaced(var/mob/living/carbon/human/target)
owner = target
+2 -2
View File
@@ -3,7 +3,7 @@
icon_name = ""
dislocated = -1
/obj/item/organ/external/stump/Initialize(var/ml, var/internal, var/obj/item/organ/external/limb)
/obj/item/organ/external/stump/New(var/mob/living/carbon/holder, var/internal, var/obj/item/organ/external/limb)
if(istype(limb))
organ_tag = limb.organ_tag
body_part = limb.body_part
@@ -11,7 +11,7 @@
joint = limb.joint
parent_organ = limb.parent_organ
wounds = limb.wounds
. = ..(ml, internal)
..(holder, internal)
if(istype(limb))
max_damage = limb.max_damage
if((limb.robotic >= ORGAN_ROBOT) && (!parent || (parent.robotic >= ORGAN_ROBOT)))
+2 -2
View File
@@ -475,8 +475,8 @@ var/const/standard_monitor_styles = "blank=ipc_blank;\
icon_state = "data-white" //VOREStation Edit
var/company = ""
/obj/item/weapon/disk/limb/Initialize()
. = ..()
/obj/item/weapon/disk/limb/New(var/newloc)
..()
if(company)
name = "[company] [initial(name)]"
+9 -10
View File
@@ -7,9 +7,9 @@
vital = 1
var/defib_timer = 1 // This sits in the brain organ slot, but is not a brain.
/obj/item/organ/internal/cell/Initialize()
/obj/item/organ/internal/cell/New()
robotize()
. = ..()
..()
/obj/item/organ/internal/cell/replaced()
..()
@@ -46,14 +46,13 @@
stored_mmi = null
return ..()
/obj/item/organ/internal/mmi_holder/Initialize()
. = ..()
if(ishuman(loc) && !istype(loc, /mob/living/carbon/human/dummy/mannequin))
stored_mmi = new brain_type(src)
return INITIALIZE_HINT_LATELOAD
/obj/item/organ/internal/mmi_holder/LateInitialize()
. = ..()
/obj/item/organ/internal/mmi_holder/New(var/mob/living/carbon/human/new_owner, var/internal)
..(new_owner, internal)
var/mob/living/carbon/human/dummy/mannequin/M = new_owner
if(istype(M))
return
stored_mmi = new brain_type(src)
sleep(-1)
update_from_mmi()
// This sits in the brain organ slot, but is not a brain. Posibrains and dronecores aren't brains either.
+10 -10
View File
@@ -13,8 +13,8 @@
/obj/item/organ/internal/xenos/eggsac/grey
icon_state = "sac_grey"
/obj/item/organ/internal/xenos/eggsac/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/xenos/eggsac/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
@@ -54,8 +54,8 @@
icon_state = "plasma_grey"
stored_plasma = 200
/obj/item/organ/internal/xenos/plasmavessel/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/xenos/plasmavessel/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
@@ -91,8 +91,8 @@
/obj/item/organ/internal/xenos/acidgland/grey
icon_state = "acidgland_grey"
/obj/item/organ/internal/xenos/acidgland/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/xenos/acidgland/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
@@ -108,8 +108,8 @@
/obj/item/organ/internal/xenos/hivenode/grey
icon_state = "xenode_grey"
/obj/item/organ/internal/xenos/hivenode/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/xenos/hivenode/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))
@@ -130,8 +130,8 @@
/obj/item/organ/internal/xenos/resinspinner/grey
icon_state = "xenode_grey"
/obj/item/organ/internal/xenos/resinspinner/grey/colormatch/Initialize()
. = ..()
/obj/item/organ/internal/xenos/resinspinner/grey/colormatch/New()
..()
var/mob/living/carbon/human/H = null
spawn(15)
if(ishuman(owner))