fix the runtimes
This commit is contained in:
@@ -3,30 +3,72 @@
|
||||
|
||||
// The SPACEMAN_DMM define is set by the linter and other tooling when it runs.
|
||||
#ifdef SPACEMAN_DMM
|
||||
/**
|
||||
* Sets a return type expression for a proc. The return type can take the forms:
|
||||
|
||||
* `/typepath` - a raw typepath. The return type of the proc is the type named.
|
||||
|
||||
* `param` - a typepath given as a parameter, for procs which return an instance of the passed-in type.
|
||||
|
||||
* `param.type` - the static type of a passed-in parameter, for procs which
|
||||
* return their input or otherwise another value of the same type.
|
||||
|
||||
* `param[_].type` - the static type of a passed-in parameter, with one level
|
||||
* of `/list` stripped, for procs which select one item from a list. The `[_]`
|
||||
* may be repeated to strip more levels of `/list`.
|
||||
*/
|
||||
#define RETURN_TYPE(X) set SpacemanDMM_return_type = X
|
||||
/**
|
||||
* If set, will enable a diagnostic on children of the proc it is set on which do
|
||||
* not contain any `..()` parent calls. This can help with finding situations
|
||||
* where a signal or other important handling in the parent proc is being skipped.
|
||||
* Child procs may set this setting to `0` instead to override the check.
|
||||
*/
|
||||
#define SHOULD_CALL_PARENT(X) set SpacemanDMM_should_call_parent = X
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
/**
|
||||
* If set, raise a warning for any child procs that override this one,
|
||||
* regardless of if it calls parent or not.
|
||||
* This functions in a similar way to the `final` keyword in some languages.
|
||||
* This cannot be disabled by child overrides.
|
||||
*/
|
||||
#define SHOULD_NOT_OVERRIDE(X) set SpacemanDMM_should_not_override = X
|
||||
/**
|
||||
* If set, raise a warning if the proc or one of the sub-procs it calls
|
||||
* uses a blocking call, such as `sleep()` or `input()` without using `set waitfor = 0`
|
||||
* This cannot be disabled by child overrides.
|
||||
*/
|
||||
#define SHOULD_NOT_SLEEP(X) set SpacemanDMM_should_not_sleep = X
|
||||
/**
|
||||
* If set, ensure a proc is 'pure', such that it does not make any changes
|
||||
* outside itself or output. This also checks to make sure anything using
|
||||
* this proc doesn't invoke it without making use of the return value.
|
||||
* This cannot be disabled by child overrides.
|
||||
*/
|
||||
#define SHOULD_BE_PURE(X) set SpacemanDMM_should_be_pure = X
|
||||
///Private procs can only be called by things of exactly the same type.
|
||||
#define PRIVATE_PROC(X) set SpacemanDMM_private_proc = X
|
||||
///Protected procs can only be call by things of the same type *or subtypes*.
|
||||
#define PROTECTED_PROC(X) set SpacemanDMM_protected_proc = X
|
||||
///If set, will not lint.
|
||||
#define UNLINT(X) SpacemanDMM_unlint(X)
|
||||
|
||||
///If set, overriding their value isn't permitted by types that inherit it.
|
||||
#define VAR_FINAL var/SpacemanDMM_final
|
||||
///Private vars can only be called by things of exactly the same type.
|
||||
#define VAR_PRIVATE var/SpacemanDMM_private
|
||||
///Protected vars can only be called by things of the same type *or subtypes*.
|
||||
#define VAR_PROTECTED var/SpacemanDMM_protected
|
||||
#else
|
||||
#define RETURN_TYPE(X)
|
||||
#define SHOULD_CALL_PARENT(X)
|
||||
#define UNLINT(X) X
|
||||
#define SHOULD_NOT_OVERRIDE(X)
|
||||
#define SHOULD_NOT_SLEEP(X)
|
||||
#define SHOULD_BE_PURE(X)
|
||||
#define PRIVATE_PROC(X)
|
||||
#define PROTECTED_PROC(X)
|
||||
#define UNLINT(X) X
|
||||
|
||||
#define VAR_FINAL var
|
||||
#define VAR_PRIVATE var
|
||||
#define VAR_PROTECTED var
|
||||
#endif
|
||||
|
||||
/proc/enable_debugging()
|
||||
CRASH("Auxtools not found")
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
#define AUXTOOLS_FULL_INIT 2
|
||||
#define AUXTOOLS_PARTIAL_INIT 1
|
||||
|
||||
GLOBAL_LIST_EMPTY(auxtools_initialized)
|
||||
GLOBAL_PROTECT(auxtools_initialized)
|
||||
|
||||
#define AUXTOOLS_CHECK(LIB)\
|
||||
if (!CONFIG_GET(flag/auxtools_enabled)) {\
|
||||
CRASH("Auxtools is not enabled in config!");\
|
||||
}\
|
||||
if (GLOB.auxtools_initialized[LIB] != AUXTOOLS_FULL_INIT) {\
|
||||
if (fexists(LIB)) {\
|
||||
var/string = call_ext(LIB,"auxtools_init")();\
|
||||
if(findtext(string, "SUCCESS")) {\
|
||||
GLOB.auxtools_initialized[LIB] = AUXTOOLS_FULL_INIT;\
|
||||
} else {\
|
||||
CRASH(string);\
|
||||
}\
|
||||
} else {\
|
||||
CRASH("No file named [LIB] found!")\
|
||||
}\
|
||||
}\
|
||||
|
||||
#define AUXTOOLS_SHUTDOWN(LIB)\
|
||||
if (GLOB.auxtools_initialized[LIB] == AUXTOOLS_FULL_INIT && fexists(LIB)){\
|
||||
call_ext(LIB,"auxtools_shutdown")();\
|
||||
GLOB.auxtools_initialized[LIB] = AUXTOOLS_PARTIAL_INIT;\
|
||||
}\
|
||||
|
||||
#define AUXTOOLS_FULL_SHUTDOWN(LIB)\
|
||||
if (GLOB.auxtools_initialized[LIB] && fexists(LIB)){\
|
||||
call_ext(LIB,"auxtools_full_shutdown")();\
|
||||
GLOB.auxtools_initialized[LIB] = FALSE;\
|
||||
}
|
||||
|
||||
/proc/auxtools_stack_trace(msg)
|
||||
CRASH(msg)
|
||||
|
||||
/proc/auxtools_expr_stub()
|
||||
CRASH("auxtools not loaded")
|
||||
|
||||
/proc/enable_debugging(mode, port)
|
||||
CRASH("auxtools not loaded")
|
||||
@@ -1,5 +0,0 @@
|
||||
//#define EXTOOLS_LOGGING // rust_g is used as a fallback if this is undefined
|
||||
|
||||
/proc/extools_log_write()
|
||||
|
||||
/proc/extools_finalize_logging()
|
||||
@@ -9,6 +9,11 @@ GLOBAL_LIST(topic_status_cache)
|
||||
//So subsystems globals exist, but are not initialised
|
||||
|
||||
/world/New()
|
||||
var/dll = GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (dll)
|
||||
call_ext(dll, "auxtools_init")()
|
||||
enable_debugging()
|
||||
|
||||
world.Profile(PROFILE_START)
|
||||
log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!")
|
||||
|
||||
@@ -262,14 +267,23 @@ GLOBAL_LIST(topic_status_cache)
|
||||
if(do_hard_reboot)
|
||||
log_world("World hard rebooted at [TIME_STAMP("hh:mm:ss", FALSE)]")
|
||||
shutdown_logging() // See comment below.
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call_ext(debug_server, "auxtools_shutdown")()
|
||||
TgsEndProcess()
|
||||
|
||||
log_world("World rebooted at [TIME_STAMP("hh:mm:ss", FALSE)]")
|
||||
shutdown_logging() // Past this point, no logging procs can be used, at risk of data loss.
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call_ext(debug_server, "auxtools_shutdown")()
|
||||
..()
|
||||
|
||||
/world/Del()
|
||||
shutdown_logging() // makes sure the thread is closed before end, else we terminate
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
call_ext(debug_server, "auxtools_shutdown")()
|
||||
..()
|
||||
|
||||
/world/proc/update_status()
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
icon = 'icons/obj/car.dmi'
|
||||
icon_state = "speedwagon"
|
||||
layer = LYING_MOB_LAYER
|
||||
var/static/mutable_appearance/overlay = mutable_appearance(icon, "speedwagon_cover", ABOVE_MOB_LAYER)
|
||||
var/static/mutable_appearance/overlay
|
||||
max_buckled_mobs = 4
|
||||
var/crash_all = FALSE //CHAOS
|
||||
pixel_y = -48
|
||||
@@ -52,6 +52,7 @@
|
||||
|
||||
/obj/vehicle/ridden/space/speedwagon/Initialize(mapload)
|
||||
. = ..()
|
||||
overlay = mutable_appearance(icon, "speedwagon_cover", ABOVE_MOB_LAYER)
|
||||
add_overlay(overlay)
|
||||
var/datum/component/riding/D = LoadComponent(/datum/component/riding)
|
||||
D.vehicle_move_delay = 0
|
||||
|
||||
+1
-1
@@ -187,8 +187,8 @@
|
||||
#include "code\__DEFINES\skills\helpers.dm"
|
||||
#include "code\__DEFINES\storage\_storage.dm"
|
||||
#include "code\__DEFINES\storage\volumetrics.dm"
|
||||
#include "code\__HELPERS\_auxtools_api.dm"
|
||||
#include "code\__HELPERS\_cit_helpers.dm"
|
||||
#include "code\__HELPERS\_extools_api.dm"
|
||||
#include "code\__HELPERS\_lists.dm"
|
||||
#include "code\__HELPERS\_logging.dm"
|
||||
#include "code\__HELPERS\_string_lists.dm"
|
||||
|
||||
Reference in New Issue
Block a user