Skip to content

Commit

Permalink
Updates the garbage collector to the latest tg version.
Browse files Browse the repository at this point in the history
  • Loading branch information
PsiOmegaDelta committed Sep 28, 2017
1 parent 44b85a3 commit f0198cf
Show file tree
Hide file tree
Showing 9 changed files with 995 additions and 906 deletions.
1 change: 1 addition & 0 deletions baystation12.dme
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@
#include "code\game\shuttle_engines.dm"
#include "code\game\sound.dm"
#include "code\game\supplyshuttle.dm"
#include "code\game\world.dm"
#include "code\game\antagonist\_antagonist_setup.dm"
#include "code\game\antagonist\antagonist.dm"
#include "code\game\antagonist\antagonist_add.dm"
Expand Down
5 changes: 5 additions & 0 deletions code/__defines/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
//if TESTING is enabled, qdel will call this object's find_references() verb.
//defines for the gc_destroyed var

#define GC_QUEUE_PREQUEUE 1
#define GC_QUEUE_CHECK 2
#define GC_QUEUE_HARDDELETE 3
#define GC_QUEUE_COUNT 3 //increase this when adding more steps.

#define GC_QUEUED_FOR_QUEUING -1
#define GC_QUEUED_FOR_HARD_DEL -2
#define GC_CURRENTLY_BEING_QDELETED -3
Expand Down
2 changes: 0 additions & 2 deletions code/_global_vars/lists/logs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ GLOBAL_LIST_EMPTY(bombers)
GLOBAL_LIST_EMPTY(admin_log)
GLOBAL_LIST_EMPTY(lastsignalers) // Keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
GLOBAL_LIST_EMPTY(lawchanges) // Stores who uploaded laws to which silicon-based lifeform, and what the law was.
GLOBAL_VAR(world_runtime_log)
GLOBAL_PROTECT(world_runtime_log)
4 changes: 4 additions & 0 deletions code/_global_vars/logging.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ var/diary = null

GLOBAL_VAR(log_directory)
GLOBAL_PROTECT(log_directory)
GLOBAL_VAR(world_runtime_log)
GLOBAL_PROTECT(world_runtime_log)
GLOBAL_VAR(world_qdel_log)
GLOBAL_PROTECT(world_qdel_log)
9 changes: 9 additions & 0 deletions code/_helpers/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,12 @@

/proc/cmp_text_dsc(a,b)
return sorttext(a, b)

/proc/cmp_qdel_item_time(datum/qdel_item/A, datum/qdel_item/B)
. = B.hard_delete_time - A.hard_delete_time
if (!.)
. = B.destroy_time - A.destroy_time
if (!.)
. = B.failures - A.failures
if (!.)
. = B.qdels - A.qdels
7 changes: 6 additions & 1 deletion code/_helpers/logging.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//print an error message to world.log
//wrapper macros for easier grepping
#define DIRECT_OUTPUT(A, B) A << B
#define WRITE_FILE(file, text) DIRECT_OUTPUT(file, text)


// On Linux/Unix systems the line endings are LF, on windows it's CRLF, admins that don't use notepad++
Expand Down Expand Up @@ -102,6 +104,9 @@
to_world_log("## UNIT_TEST ##: [text]")
log_debug(text)

/proc/log_qdel(text)
WRITE_FILE(GLOB.world_qdel_log, "\[[time_stamp()]]QDEL: [text]")

//This replaces world.log so it displays both in DD and the file
/proc/log_world(text)
if(config && config.log_runtime)
Expand Down
Loading

0 comments on commit f0198cf

Please sign in to comment.