Skip to content

Commit

Permalink
Switches to an auxtools-based debugger for local development (goonsta…
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeWaka authored Dec 11, 2020
1 parent de8715c commit 5247dd0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 8 deletions.
2 changes: 2 additions & 0 deletions SpacemanDMM.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[langserver]
dreamchecker = true
[debugger]
engine = "auxtools"
15 changes: 11 additions & 4 deletions _std/_spaceman_dmm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,14 @@
#define VAR_PROTECTED var
#endif

/proc/enable_extools_debugger()
var/extools = world.GetConfig("env", "EXTOOLS_DLL") || (world.system_type == MS_WINDOWS ? "./byond-extools.dll" : "./libbyond-extools.so")
if(fexists(extools))
call(extools, "debug_initialize")()
/proc/enable_auxtools_debugger()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
call(debug_server, "auxtools_init")()
enable_debugging()

/proc/auxtools_stack_trace(msg)
CRASH(msg)

/proc/enable_debugging(mode, port)
CRASH("auxtools not loaded")
11 changes: 7 additions & 4 deletions code/world.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ var/f_color_selector_handler/F_Color_Selector
//Called BEFORE the map loads. Useful for objects that require certain things be set during init
/datum/preMapLoad
New()
enable_extools_debugger()
enable_auxtools_debugger()
#ifdef REFERENCE_TRACKING
enable_reference_tracking()
#endif
Expand Down Expand Up @@ -1669,13 +1669,16 @@ var/opt_inactive = null

sleep(10 SECONDS)




/world/proc/KickInactiveClients()
for(var/client/C in clients)
if(!C.holder && ((C.inactivity/10)/60) >= 15)
boutput(C, "<span class='alert'>You have been inactive for more than 15 minutes and have been disconnected.</span>")
del(C)

/// EXPERIMENTAL STUFF

/world/Del()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
call(debug_server, "auxtools_shutdown")()
. = ..()

0 comments on commit 5247dd0

Please sign in to comment.