Skip to content

Commit

Permalink
Use rust-g to url_encode (and other builtin overrides) (tgstation#60190)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mothblocks authored Jul 24, 2021
1 parent d67cdab commit 5dc463b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions code/__DEFINES/rust_g.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
#define RUST_G (__rust_g || __detect_rust_g())
#endif

/// Gets the version of rust_g
/proc/rustg_get_version() return call(RUST_G, "get_version")()

/**
* This proc generates a cellular automata noise grid which can be used in procedural generation methods.
*
Expand Down Expand Up @@ -99,3 +102,11 @@
#define rustg_sql_disconnect_pool(handle) call(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) call(RUST_G, "sql_check_query")("[job_id]")

#define rustg_url_encode(text) call(RUST_G, "url_encode")(text)
#define rustg_url_decode(text) call(RUST_G, "url_decode")(text)

#ifdef RUSTG_OVERRIDE_BUILTINS
#define url_encode(text) rustg_url_encode(text)
#define url_decode(text) rustg_url_decode(text)
#endif

3 changes: 3 additions & 0 deletions code/__DEFINES/rust_g_overrides.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// RUSTG_OVERRIDE_BUILTINS is not used since the file APIs don't work well over Linux.
#define url_encode(text) rustg_url_encode(text)
#define url_decode(text) rustg_url_decode(text)
2 changes: 1 addition & 1 deletion dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export BYOND_MAJOR=514
export BYOND_MINOR=1556

#rust_g git tag
export RUST_G_VERSION=0.4.8
export RUST_G_VERSION=0.4.9

#node version
export NODE_VERSION=12
Expand Down
Binary file modified rust_g.dll
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
#include "code\__DEFINES\robots.dm"
#include "code\__DEFINES\role_preferences.dm"
#include "code\__DEFINES\rust_g.dm"
#include "code\__DEFINES\rust_g_overrides.dm"
#include "code\__DEFINES\say.dm"
#include "code\__DEFINES\shuttles.dm"
#include "code\__DEFINES\sight.dm"
Expand Down

0 comments on commit 5dc463b

Please sign in to comment.