Initialize Refactor
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
diff a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm (rejected hunks)
|
||||
@@ -153,7 +153,8 @@ var/list/admin_verbs_debug = list(
|
||||
/client/proc/clear_dynamic_transit,
|
||||
/client/proc/toggle_medal_disable,
|
||||
/client/proc/view_runtimes,
|
||||
- /client/proc/pump_random_event
|
||||
+ /client/proc/pump_random_event,
|
||||
+ /client/proc/cmd_display_init_log
|
||||
)
|
||||
var/list/admin_verbs_possess = list(
|
||||
/proc/possess,
|
||||
@@ -721,6 +721,13 @@ GLOBAL_PROTECT(AdminProcCall)
|
||||
|
||||
usr << browse(dat, "window=dellog")
|
||||
|
||||
/client/proc/cmd_display_init_log()
|
||||
set category = "Debug"
|
||||
set name = "Display Initialzie() Log"
|
||||
set desc = "Displays a list of things that didn't handle Initialize() properly"
|
||||
|
||||
usr << browse(replacetext(SSatoms.InitLog(), "\n", "<br>"), "window=initlog")
|
||||
|
||||
/client/proc/debug_huds(i as num)
|
||||
set category = "Debug"
|
||||
set name = "Debug HUDs"
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
diff a/code/modules/holodeck/computer.dm b/code/modules/holodeck/computer.dm (rejected hunks)
|
||||
@@ -64,25 +64,26 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/holodeck/Initialize(mapload)
|
||||
- . = mapload //late-initialize, area_copy need turfs to have air
|
||||
- if(!mapload)
|
||||
- ..()
|
||||
- program_cache = list()
|
||||
- emag_programs = list()
|
||||
- for(var/typekey in subtypesof(program_type))
|
||||
- var/area/holodeck/A = locate(typekey)
|
||||
- if(!A || A == offline_program) continue
|
||||
- if(A.contents.len == 0) continue // not loaded
|
||||
- if(A.restricted)
|
||||
- emag_programs += A
|
||||
- else
|
||||
- program_cache += A
|
||||
- if(typekey == init_program)
|
||||
- load_program(A,force=1)
|
||||
- if(random_program && program_cache.len && init_program == null)
|
||||
- load_program(pick(program_cache),force=1)
|
||||
- else if(!program)
|
||||
- load_program(offline_program)
|
||||
+ ..()
|
||||
+ return INITIALIZE_HINT_LATELOAD
|
||||
+
|
||||
+/obj/machinery/computer/holodeck/LateInitialize()
|
||||
+ program_cache = list()
|
||||
+ emag_programs = list()
|
||||
+ for(var/typekey in subtypesof(program_type))
|
||||
+ var/area/holodeck/A = locate(typekey)
|
||||
+ if(!A || A == offline_program) continue
|
||||
+ if(A.contents.len == 0) continue // not loaded
|
||||
+ if(A.restricted)
|
||||
+ emag_programs += A
|
||||
+ else
|
||||
+ program_cache += A
|
||||
+ if(typekey == init_program)
|
||||
+ load_program(A,force=1)
|
||||
+ if(random_program && program_cache.len && init_program == null)
|
||||
+ load_program(pick(program_cache),force=1)
|
||||
+ else if(!program)
|
||||
+ load_program(offline_program)
|
||||
|
||||
/obj/machinery/computer/holodeck/power_change()
|
||||
..()
|
||||
@@ -1,9 +1,6 @@
|
||||
//Dead mobs can exist whenever. This is needful
|
||||
/mob/dead/New(loc)
|
||||
..()
|
||||
if(!initialized)
|
||||
args[1] = FALSE
|
||||
Initialize(arglist(args)) //EXIST DAMN YOU!!!
|
||||
|
||||
INITIALIZE_IMMEDIATE(/mob/dead)
|
||||
|
||||
/mob/dead/dust() //ghosts can't be vaporised.
|
||||
return
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
diff a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm (rejected hunks)
|
||||
@@ -30,6 +30,7 @@
|
||||
loc = pick(newplayer_start)
|
||||
else
|
||||
loc = locate(1,1,1)
|
||||
+ return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/mob/dead/new_player/proc/new_player_panel()
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm (rejected hunks)
|
||||
@@ -220,7 +220,7 @@
|
||||
id = newid
|
||||
update()
|
||||
|
||||
- return INITIALIZE_HINT_LATELOAD
|
||||
+ return INITIALIZE_HINT_LATELOAD //for machines list
|
||||
|
||||
/obj/machinery/conveyor_switch/LateInitialize()
|
||||
conveyors = list()
|
||||
@@ -64,17 +64,17 @@
|
||||
deconstruct()
|
||||
|
||||
/obj/machinery/disposal/Initialize(mapload)
|
||||
. = mapload //late-initialize, we need turfs to have air
|
||||
if(initialized) //will only be run on late mapload initialization
|
||||
//this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
|
||||
var/atom/L = loc
|
||||
var/datum/gas_mixture/env = new
|
||||
env.copy_from(L.return_air())
|
||||
var/datum/gas_mixture/removed = env.remove(SEND_PRESSURE + 1)
|
||||
air_contents.merge(removed)
|
||||
trunk_check()
|
||||
else
|
||||
..()
|
||||
..()
|
||||
return INITIALIZE_HINT_LATELOAD //we need turfs to have air
|
||||
|
||||
/obj/machinery/disposal/LateInitialize()
|
||||
//this will get a copy of the air turf and take a SEND PRESSURE amount of air from it
|
||||
var/atom/L = loc
|
||||
var/datum/gas_mixture/env = new
|
||||
env.copy_from(L.return_air())
|
||||
var/datum/gas_mixture/removed = env.remove(SEND_PRESSURE + 1)
|
||||
air_contents.merge(removed)
|
||||
trunk_check()
|
||||
|
||||
/obj/machinery/disposal/attackby(obj/item/I, mob/user, params)
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
diff a/code/modules/shuttle/arrivals.dm b/code/modules/shuttle/arrivals.dm (rejected hunks)
|
||||
@@ -30,6 +30,9 @@
|
||||
..()
|
||||
|
||||
preferred_direction = dir
|
||||
+ return INITIALIZE_HINT_LATELOAD //for latejoin list
|
||||
+
|
||||
+/obj/docking_port/mobile/arrivals/LateInitialize()
|
||||
areas = list()
|
||||
|
||||
var/list/new_latejoin = list()
|
||||
@@ -54,7 +54,7 @@
|
||||
return new step_type
|
||||
|
||||
/datum/surgery/proc/complete()
|
||||
feedback_add_details("surgeries_completed", "[type]")
|
||||
feedback_add_details("surgeries_completed", type)
|
||||
qdel(src)
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm (rejected hunks)
|
||||
@@ -54,7 +54,7 @@
|
||||
return new step_type
|
||||
|
||||
/datum/surgery/proc/complete()
|
||||
- feedback_add_details("surgeries_completed", type)
|
||||
+ feedback_add_details("surgeries_completed", "[type]")
|
||||
qdel(src)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user