Skip to content

Commit

Permalink
more changes
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSuckerberg committed Nov 14, 2023
1 parent b266175 commit ab1f26a
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 26 deletions.
64 changes: 47 additions & 17 deletions code/__DEFINES/spaceman_dmm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +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/auxtools_stack_trace(msg)
CRASH(msg)

/proc/enable_debugging(mode, port)
CRASH("auxtools not loaded")

/proc/auxtools_expr_stub()
CRASH("auxtools not loaded")

/world/Del()
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
if (debug_server)
LIBCALL(debug_server, "auxtools_shutdown")()
. = ..()
8 changes: 8 additions & 0 deletions code/__HELPERS/_auxtools_api.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/proc/auxtools_stack_trace(msg)
CRASH(msg)

/proc/enable_debugging(mode, port)
CRASH("auxtools not loaded")

/proc/auxtools_expr_stub()
CRASH("auxtools not loaded")
5 changes: 0 additions & 5 deletions code/__HELPERS/_extools_api.dm

This file was deleted.

4 changes: 2 additions & 2 deletions dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export BYOND_MAJOR=515
export BYOND_MINOR=1619

#rust version
export RUST_VERSION=1.67.0
export RUST_VERSION=1.73.0

#rust_g git tag
export RUST_G_VERSION=3.0.0
Expand All @@ -27,4 +27,4 @@ export PYTHON_VERSION=3.7.9
export AUXMOS_REPO=https://github.com/Putnam3145/auxmos

#auxmos version
export AUXMOS_VERSION=v2.2.1
export AUXMOS_VERSION=master
1 change: 0 additions & 1 deletion shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@
#include "code\__DEFINES\dcs\flags.dm"
#include "code\__DEFINES\dcs\helpers.dm"
#include "code\__DEFINES\dcs\signals.dm"
#include "code\__HELPERS\_extools_api.dm"
#include "code\__HELPERS\_lists.dm"
#include "code\__HELPERS\_logging.dm"
#include "code\__HELPERS\_string_lists.dm"
Expand Down
2 changes: 1 addition & 1 deletion tools/tgs_scripts/PreCompile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ cd ..
echo "Deploying auxmos..."
cd auxmos
git checkout "$AUXMOS_VERSION"
env PKG_CONFIG_ALLOW_CROSS=1 RUSTFLAGS="-C target-cpu=native" ~/.cargo/bin/cargo rustc --release --target=i686-unknown-linux-gnu --features "all_reaction_hooks,katmos" -- -C target_cpu=native
env PKG_CONFIG_ALLOW_CROSS=1 RUSTFLAGS="-C target-cpu=native" ~/.cargo/bin/cargo build --release --target=i686-unknown-linux-gnu --features "all_reaction_hooks,katmos"
mv target/i686-unknown-linux-gnu/release/libauxmos.so "$1/libauxmos.so"
cd ..

Expand Down

0 comments on commit ab1f26a

Please sign in to comment.