rej cleanup
This commit is contained in:
@@ -1,18 +0,0 @@
|
||||
diff a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm (rejected hunks)
|
||||
@@ -26,4 +26,13 @@
|
||||
|
||||
#define INITIALIZE_HINT_NORMAL 0 //Nothing happens
|
||||
#define INITIALIZE_HINT_LATELOAD 1 //Call LateInitialize
|
||||
-#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
|
||||
\ No newline at end of file
|
||||
+#define INITIALIZE_HINT_QDEL 2 //Call qdel on the atom
|
||||
+
|
||||
+//type and all subtypes should always call Initialize in New()
|
||||
+#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
|
||||
+ ..();\
|
||||
+ if(!initialized) {\
|
||||
+ args[1] = TRUE;\
|
||||
+ SSatoms.InitAtom(src, args);\
|
||||
+ }\
|
||||
+}
|
||||
\ No newline at end of file
|
||||
@@ -1,9 +0,0 @@
|
||||
diff a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm (rejected hunks)
|
||||
@@ -12,6 +12,7 @@ SUBSYSTEM_DEF(atoms)
|
||||
var/old_initialized
|
||||
|
||||
var/list/late_loaders
|
||||
+ var/list/created_atoms
|
||||
|
||||
var/list/BadInitializeCalls = list()
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
diff a/code/game/objects/effects/overlays.dm b/code/game/objects/effects/overlays.dm (rejected hunks)
|
||||
@@ -31,8 +31,8 @@
|
||||
. = ..()
|
||||
deltimer(timerid)
|
||||
|
||||
-/obj/effect/overlay/temp/New()
|
||||
- ..()
|
||||
+/obj/effect/overlay/temp/Initialize()
|
||||
+ . = ..()
|
||||
if(randomdir)
|
||||
setDir(pick(GLOB.cardinal))
|
||||
flick("[icon_state]", src) //Because we might be pulling it from a pool, flick whatever icon it uses so it starts at the start of the icon's animation.
|
||||
@@ -214,7 +221,7 @@
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "3"
|
||||
duration = 20
|
||||
-
|
||||
+
|
||||
/obj/effect/overlay/temp/cult
|
||||
randomdir = 0
|
||||
duration = 10
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/game/objects/items.dm b/code/game/objects/items.dm (rejected hunks)
|
||||
@@ -102,7 +102,7 @@ var/global/image/fire_overlay = image("icon" = 'icons/effects/fire.dmi', "icon_s
|
||||
/obj/item/Initialize()
|
||||
if (!materials)
|
||||
materials = list()
|
||||
- ..()
|
||||
+ . = ..()
|
||||
for(var/path in actions_types)
|
||||
new path(src)
|
||||
actions_types = null
|
||||
@@ -1,11 +0,0 @@
|
||||
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,
|
||||
@@ -1,41 +0,0 @@
|
||||
diff a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm (rejected hunks)
|
||||
@@ -83,17 +83,23 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
to_chat(usr, .)
|
||||
feedback_add_details("admin_verb","Advanced ProcCall") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
-GLOBAL_VAR_INIT(AdminProcCall, null)
|
||||
-GLOBAL_PROTECT(AdminProcCall)
|
||||
+GLOBAL_VAR_INIT(AdminProcCaller, null)
|
||||
+GLOBAL_PROTECT(AdminProcCaller)
|
||||
+GLOBAL_VAR_INIT(AdminProcCallCount, 0)
|
||||
+GLOBAL_PROTECT(AdminProcCallCount)
|
||||
|
||||
/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
- if(GLOB.AdminProcCall)
|
||||
- to_chat(usr, "<span class='adminnotice'>Another admin called proc is still running, your proc will be run after theirs finishes</span>")
|
||||
- UNTIL(!GLOB.AdminProcCall)
|
||||
+ var/current_caller = GLOB.AdminProcCaller
|
||||
+ var/ckey = usr.client.ckey
|
||||
+ if(current_caller && current_caller != ckey)
|
||||
+ to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
|
||||
+ UNTIL(!GLOB.AdminProcCaller)
|
||||
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
|
||||
- GLOB.AdminProcCall = usr.client.ckey //if this runtimes, too bad for you
|
||||
+ GLOB.AdminProcCaller = ckey //if this runtimes, too bad for you
|
||||
+ ++GLOB.AdminProcCallCount
|
||||
world.WrapAdminProcCall(target, procname, arguments)
|
||||
- GLOB.AdminProcCall = null
|
||||
+ if(--GLOB.AdminProcCallCount == 0)
|
||||
+ GLOB.AdminProcCaller = null
|
||||
|
||||
//adv proc call this, ya nerds
|
||||
/world/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
@@ -103,7 +109,7 @@ GLOBAL_PROTECT(AdminProcCall)
|
||||
return call(procname)(arglist(arguments))
|
||||
|
||||
/proc/IsAdminAdvancedProcCall()
|
||||
- return usr && usr.client && GLOB.AdminProcCall == usr.client.ckey
|
||||
+ return usr && usr.client && GLOB.AdminProcCaller == usr.client.ckey
|
||||
|
||||
/client/proc/callproc_datum(datum/A as null|area|mob|obj|turf)
|
||||
set category = "Debug"
|
||||
@@ -1,47 +0,0 @@
|
||||
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 +0,0 @@
|
||||
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()
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/colossus.dm (rejected hunks)
|
||||
@@ -106,7 +106,7 @@ Difficulty: Very Hard
|
||||
var/target
|
||||
|
||||
/obj/effect/overlay/temp/at_shield/Initialize(mapload, new_target)
|
||||
- ..()
|
||||
+ . = ..()
|
||||
target = new_target
|
||||
INVOKE_ASYNC(src, /atom/movable/proc/orbit, target, 0, FALSE, 0, 0, FALSE, TRUE)
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
diff a/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/dragon.dm (rejected hunks)
|
||||
@@ -96,8 +96,8 @@ Difficulty: Medium
|
||||
duration = 12
|
||||
pixel_z = 500
|
||||
|
||||
-/obj/effect/overlay/temp/fireball/Initialize(loc)
|
||||
- ..()
|
||||
+/obj/effect/overlay/temp/fireball/Initialize()
|
||||
+ . = ..()
|
||||
animate(src, pixel_z = 0, time = 12)
|
||||
|
||||
/obj/effect/overlay/temp/target
|
||||
@@ -121,8 +121,8 @@ Difficulty: Medium
|
||||
/obj/effect/overlay/temp/target/ex_act()
|
||||
return
|
||||
|
||||
-/obj/effect/overlay/temp/target/Initialize(loc)
|
||||
- ..()
|
||||
+/obj/effect/overlay/temp/target/Initialize()
|
||||
+ . = ..()
|
||||
INVOKE_ASYNC(src, .proc/fall)
|
||||
|
||||
/obj/effect/overlay/temp/target/proc/fall()
|
||||
@@ -1,10 +0,0 @@
|
||||
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()
|
||||
@@ -1,11 +0,0 @@
|
||||
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()
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm (rejected hunks)
|
||||
@@ -316,7 +316,7 @@
|
||||
if(!check_dock(S))
|
||||
testing("check_dock failed on request for [src]")
|
||||
return
|
||||
-
|
||||
+
|
||||
if(mode == SHUTTLE_IGNITING && destination == S)
|
||||
return
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm (rejected hunks)
|
||||
@@ -161,8 +161,8 @@
|
||||
return locate(world.maxx,y,z)
|
||||
return get_turf(src)
|
||||
|
||||
-/obj/machinery/bsa/full/New(loc,cannon_direction = WEST)
|
||||
- ..()
|
||||
+/obj/machinery/bsa/full/Initialize(mapload,cannon_direction = WEST)
|
||||
+ . = ..()
|
||||
switch(cannon_direction)
|
||||
if(WEST)
|
||||
dir = WEST
|
||||
@@ -1,10 +0,0 @@
|
||||
diff a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm (rejected hunks)
|
||||
@@ -655,7 +655,7 @@
|
||||
var/phomeme_type = "sans"
|
||||
var/list/phomeme_types = list("sans", "papyrus")
|
||||
|
||||
-/obj/item/organ/tongue/bone/New()
|
||||
+/obj/item/organ/tongue/bone/Initialize()
|
||||
. = ..()
|
||||
phomeme_type = pick(phomeme_types)
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
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)
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
diff a/code/modules/vehicles/atv.dm b/code/modules/vehicles/atv.dm (rejected hunks)
|
||||
@@ -9,8 +9,8 @@
|
||||
. = ..()
|
||||
riding_datum = new/datum/riding/atv
|
||||
|
||||
-/obj/vehicle/atv/New()
|
||||
- ..()
|
||||
+/obj/vehicle/atv/Initialize()
|
||||
+ . = ..()
|
||||
if(!atvcover)
|
||||
atvcover = image("icons/obj/vehicles.dmi", "atvcover")
|
||||
atvcover.layer = ABOVE_MOB_LAYER
|
||||
@@ -1,23 +0,0 @@
|
||||
diff a/code/modules/vehicles/speedbike.dm b/code/modules/vehicles/speedbike.dm (rejected hunks)
|
||||
@@ -16,20 +16,9 @@
|
||||
overlay.layer = ABOVE_MOB_LAYER
|
||||
add_overlay(overlay)
|
||||
|
||||
-/obj/effect/overlay/temp/speedbike_trail
|
||||
- name = "speedbike trails"
|
||||
- icon_state = "ion_fade"
|
||||
- layer = BELOW_MOB_LAYER
|
||||
- duration = 10
|
||||
- randomdir = 0
|
||||
-
|
||||
-/obj/effect/overlay/temp/speedbike_trail/New(loc,move_dir)
|
||||
- ..()
|
||||
- setDir(move_dir)
|
||||
-
|
||||
/obj/vehicle/space/speedbike/Move(newloc,move_dir)
|
||||
if(has_buckled_mobs())
|
||||
- new /obj/effect/overlay/temp/speedbike_trail(loc,move_dir)
|
||||
+ new /obj/effect/overlay/temp/dir_setting/speedbike_trail(loc,move_dir)
|
||||
. = ..()
|
||||
|
||||
/obj/vehicle/space/speedbike/red
|
||||
Reference in New Issue
Block a user