mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
Merge pull request #24132 from Cyberboss/LowLevelInitialize
Ports some low level New()s to Initialize
This commit is contained in:
+11
-10
@@ -30,16 +30,6 @@
|
||||
//atom creation method that preloads variables at creation
|
||||
if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
_preloader.load(src)
|
||||
//atom color stuff
|
||||
if(color)
|
||||
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
//lighting stuff
|
||||
if(opacity && isturf(loc))
|
||||
loc.UpdateAffectingLights()
|
||||
|
||||
if(luminosity)
|
||||
light = new(src)
|
||||
|
||||
var/do_initialize = SSobj.initialized
|
||||
if(do_initialize > INITIALIZATION_INSSOBJ)
|
||||
@@ -61,6 +51,17 @@
|
||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||
initialized = TRUE
|
||||
|
||||
//atom color stuff
|
||||
if(color)
|
||||
add_atom_colour(color, FIXED_COLOUR_PRIORITY)
|
||||
|
||||
//lighting stuff
|
||||
if(opacity && isturf(loc))
|
||||
loc.UpdateAffectingLights()
|
||||
|
||||
if(luminosity)
|
||||
light = new(src)
|
||||
|
||||
/atom/Destroy()
|
||||
if(alternate_appearances)
|
||||
for(var/aakey in alternate_appearances)
|
||||
|
||||
@@ -124,7 +124,7 @@ Class Procs:
|
||||
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
|
||||
var/speed_process = 0 // Process as fast as possible?
|
||||
|
||||
/obj/machinery/New()
|
||||
/obj/machinery/Initialize()
|
||||
if (!armor)
|
||||
armor = list(melee = 25, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70)
|
||||
..()
|
||||
|
||||
@@ -98,7 +98,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
// non-clothing items
|
||||
var/datum/dog_fashion/dog_fashion = null
|
||||
|
||||
/obj/item/New()
|
||||
/obj/item/Initialize()
|
||||
if (!materials)
|
||||
materials = list()
|
||||
..()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/unique_rename = 0 // can you customize the description/name of the thing?
|
||||
|
||||
|
||||
/obj/New()
|
||||
/obj/Initialize()
|
||||
..()
|
||||
if (!armor)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/mob/structureclimber
|
||||
var/broken = 0 //similar to machinery's stat BROKEN
|
||||
|
||||
/obj/structure/New()
|
||||
/obj/structure/Initialize()
|
||||
if (!armor)
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50)
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user