Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release' into upstream-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
DameonOwen committed Sep 19, 2023
2 parents f66acba + e27edb7 commit d7e6ffc
Show file tree
Hide file tree
Showing 1,735 changed files with 474,550 additions and 51,237 deletions.
5 changes: 2 additions & 3 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,13 @@ Unsure where to begin contributing to VOREStation? You can start by looking thro

Any code submissions that do not meet our coding standards are likely to be rejected, or at the very least, have a maintainer request changes on your PR. Save time and follow these standards from the start.

* If it is something like a bugfix that Polaris would want (the codebase we use), you may want to consider coding it there as well. They may want any general gameplay bugfixes, and things that are obviously intended to work one way, but do not. They do not have any of our fluff species (vulp, akula, fenn, etc) so do not make PRs related to that, or any vore content to them.
* Change whitespace as little as possible. Do not randomly add/remove whitespace.
* Map changes must be in tgm format. See the [Mapmerge2 Readme] for details, or use [StrongDMM] which can automatically save maps as tgm.

### Pull Requests

* Your submission must pass CI checking. The checks are important, prevent many common mistakes, and even experienced coders get caught by it sometimes. If you think there is a bug in CI, open an issue. (One known CI issue is comments in the middle of multi-line lists, just don't do it)
* Your PR should not have an excessive number of commits unless it is a large project or includes many separate remote commits (such as a pull from Polaris). If you need to keep tweaking your PR to pass CI or to satisfy a maintainer's requests and are making many commits, you should squash them in the end and update your PR accordingly so these commits don't clog up the history.
* Your PR should not have an excessive number of commits unless it is a large project or includes many separate remote commits. If you need to keep tweaking your PR to pass CI or to satisfy a maintainer's requests and are making many commits, you should squash them in the end and update your PR accordingly so these commits don't clog up the history.
* You can create a WIP PR, and if so, please mark it with [WIP] in the title **and make it a draft pr** so it can be labeled appropriately. These can't sit forever, though.
* If your pull request has many no-conflict merge commits ('merge from master' into your PR branch), it cannot be merged. Squash and make a new PR/forcepush to your PR branch.

Expand All @@ -61,4 +60,4 @@ Commits with a git authorship date prior to `1420675200 +0000` (2015/01/08 00:00
All commits whose authorship dates are not prior to `1420675200 +0000` are assumed to be licensed under AGPL v3, if you wish to license under GPL v3 please make this clear in the commit message and any added files.

[Mapmerge2 Readme]: ../tools/mapmerge2/mapmerge tool readme.md
[StrongDMM]: ../tools/StrongDMM/README.md
[StrongDMM]: ../tools/StrongDMM/README.md
15 changes: 14 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,19 @@
"problemMatcher": [],
"label": "tgui: build tgfont",
"detail": "node mkdist.cjs && fantasticon --config config.cjs"
},
{
"type": "shell",
"command": "tgui/bin/tgui",
"windows": {
"command": ".\\tgui\\bin\\tgui-prettybuild.bat"
},
"problemMatcher": [
"$tsc",
"$eslint-stylish"
],
"group": "build",
"label": "tgui: prettybuild"
}
]
}
}
18 changes: 18 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Security Policy

## Supported Versions

Please check to ensure the vulnerability still exists in the current `master` branch before reporting.

## Reporting a Vulnerability

Please be as descriptive as possible!

## Older Libraries/Dependencies

Some of our libraries may not be used in a way that makes
them vulnerable, because we tend to only use a couple of
functions out of them. If that's the case and we think that
your vulnerability won't apply to our use-case, then
it may be closed, even if we're using an older version
of the library.
74 changes: 74 additions & 0 deletions code/__byond_version_compat.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
#if DM_VERSION >= 515
#error PLEASE MAKE SURE THAT 515 IS PROPERLY TESTED AND WORKS. ESPECIALLY THE SAVE-FILES HAVE TO WORK.
#error Additionally: Make sure that the GitHub Workflow was updated to BYOND 515 as well.
#endif

// These defines are from __513_compatibility.dm -- Please Sort
#define CLAMP(CLVALUE, CLMIN, CLMAX) clamp(CLVALUE, CLMIN, CLMAX)
#define TAN(x) tan(x)
#define ATAN2(x, y) arctan(x, y)
#define between(x, y, z) clamp(y, x, z)

// This file contains defines allowing targeting byond versions newer than the supported

//Update this whenever you need to take advantage of more recent byond features
#define MIN_COMPILER_VERSION 514
#define MIN_COMPILER_BUILD 1556
#if (DM_VERSION < MIN_COMPILER_VERSION || DM_BUILD < MIN_COMPILER_BUILD) && !defined(SPACEMAN_DMM)
//Don't forget to update this part
#error Your version of BYOND is too out-of-date to compile this project. Go to https://secure.byond.com/download and update.
#error You need version 514.1556 or higher
#endif

#if (DM_VERSION == 514 && DM_BUILD > 1575 && DM_BUILD <= 1577)
#error Your version of BYOND currently has a crashing issue that will prevent you from running Dream Daemon test servers.
#error We require developers to test their content, so an inability to test means we cannot allow the compile.
#error Please consider downgrading to 514.1575 or lower.
#endif

// Keep savefile compatibilty at minimum supported level
#if DM_VERSION >= 515
/savefile/byond_version = MIN_COMPILER_VERSION
#endif

// 515 split call for external libraries into call_ext
#if DM_VERSION < 515
#define LIBCALL call
#else
#define LIBCALL call_ext
#endif

// So we want to have compile time guarantees these methods exist on local type, unfortunately 515 killed the .proc/procname and .verb/verbname syntax so we have to use nameof()
// For the record: GLOBAL_VERB_REF would be useless as verbs can't be global.

#if DM_VERSION < 515

/// Call by name proc references, checks if the proc exists on either this type or as a global proc.
#define PROC_REF(X) (.proc/##X)
/// Call by name verb references, checks if the verb exists on either this type or as a global verb.
#define VERB_REF(X) (.verb/##X)

/// Call by name proc reference, checks if the proc exists on either the given type or as a global proc
#define TYPE_PROC_REF(TYPE, X) (##TYPE.proc/##X)
/// Call by name verb reference, checks if the verb exists on either the given type or as a global verb
#define TYPE_VERB_REF(TYPE, X) (##TYPE.verb/##X)

/// Call by name proc reference, checks if the proc is an existing global proc
#define GLOBAL_PROC_REF(X) (/proc/##X)

#else

/// Call by name proc references, checks if the proc exists on either this type or as a global proc.
#define PROC_REF(X) (nameof(.proc/##X))
/// Call by name verb references, checks if the verb exists on either this type or as a global verb.
#define VERB_REF(X) (nameof(.verb/##X))

/// Call by name proc reference, checks if the proc exists on either the given type or as a global proc
#define TYPE_PROC_REF(TYPE, X) (nameof(##TYPE.proc/##X))
/// Call by name verb reference, checks if the verb exists on either the given type or as a global verb
#define TYPE_VERB_REF(TYPE, X) (nameof(##TYPE.verb/##X))

/// Call by name proc reference, checks if the proc is an existing global proc
#define GLOBAL_PROC_REF(X) (/proc/##X)

#endif
33 changes: 0 additions & 33 deletions code/__defines/__513_compatibility.dm

This file was deleted.

8 changes: 0 additions & 8 deletions code/__defines/__outdated_compatibility.dm

This file was deleted.

3 changes: 2 additions & 1 deletion code/__defines/chemistry.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#define IS_TESHARI 7
#define IS_SLIME 8
#define IS_ZADDAT 9
#define IS_ZORREN 10

#define CE_STABLE "stable" // Inaprovaline
#define CE_ANTIBIOTIC "antibiotic" // Antibiotics
Expand Down Expand Up @@ -57,4 +58,4 @@ var/list/cheartstopper = list("potassium_chloride") // Thi
#define MAX_UNITS_PER_PILL 60 // Max amount of units in a pill
#define MAX_UNITS_PER_PATCH 60 // Max amount of units in a patch
#define MAX_UNITS_PER_BOTTLE 60 // Max amount of units in a bottle (it's volume)
#define MAX_CUSTOM_NAME_LEN 64 // Max length of a custom pill/condiment/whatever
#define MAX_CUSTOM_NAME_LEN 64 // Max length of a custom pill/condiment/whatever
2 changes: 1 addition & 1 deletion code/__defines/color.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define COLOR_MAROON "#800000"
#define COLOR_PURPLE "#800080"
#define COLOR_VIOLET "#9933ff"
#define COLOR_OLIVE "#52613b" // VOREStation Edit
#define COLOR_OLIVE "#52613b"
#define COLOR_BROWN_ORANGE "#824b28"
#define COLOR_DARK_ORANGE "#b95a00"
#define COLOR_GRAY40 "#666666"
Expand Down
1 change: 1 addition & 0 deletions code/__defines/damage_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#define ELECTROCUTE "electrocute"
#define BIOACID "bioacid"
#define SEARING "searing"
#define ELECTROMAG "electromagnetic"

#define CUT "cut"
#define BRUISE "bruise"
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/is_helpers.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define isdatum(D) istype(D, /datum)
#define isweakref(A) istype(A, /weakref)
#define isweakref(A) istype(A, /datum/weakref)

//#define islist(D) istype(D, /list) //Built in

Expand Down
1 change: 1 addition & 0 deletions code/__defines/materials.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define MAT_DEUTERIUM "deuterium"
#define MAT_CONCRETE "concrete"
#define MAT_PLASTEELREBAR "plasteel rebar"
#define MAT_GRASS "grass"


#define DEFAULT_TABLE_MATERIAL MAT_PLASTIC
Expand Down
1 change: 1 addition & 0 deletions code/__defines/math.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#define TICK_USAGE_TO_MS(starting_tickusage) (TICK_DELTA_TO_MS(world.tick_usage - starting_tickusage))

#define PERCENT(val) (round((val)*100, 0.1))
#define CLAMP01(x) clamp(x, 0, 1)

//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
Expand Down
1 change: 1 addition & 0 deletions code/__defines/mobs_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define SPECIES_XENOCHIMERA "Xenochimera"
#define SPECIES_ZORREN_HIGH "Zorren"
#define SPECIES_CUSTOM "Custom Species"
#define SPECIES_TAJARAN "Tajara"
//monkey species
#define SPECIES_MONKEY_AKULA "Sobaka"
#define SPECIES_MONKEY_NEVREAN "Sparra"
Expand Down
2 changes: 1 addition & 1 deletion code/__defines/plants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ GLOBAL_LIST_INIT(plant_item_products, list(
/obj/item/organ/internal/brain/grey = 1,
/obj/item/organ/internal/heart/grey = 1,
/obj/item/weapon/spacecash/c1 = 3,
/obj/item/weapon/spacecash/c10 = 1
/obj/item/weapon/spacecash/c5 = 1
))

GLOBAL_LIST_INIT(forbidden_plant_growth_sprites, list(
Expand Down
6 changes: 3 additions & 3 deletions code/__defines/qdel.dm
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)

//Qdel helper macros.
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE)
#define QDEL_IN_CLIENT_TIME(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE | TIMER_CLIENT_TIME)
#define QDEL_NULL(item) if(item) {qdel(item); item = null}
#define QDEL_NULL_LIST QDEL_LIST_NULL
#define QDEL_LIST_NULL(x) if(x) { for(var/y in x) { qdel(y) } ; x = null }
#define QDEL_LIST(L) if(L) { for(var/I in L) qdel(I); L.Cut(); }
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, .proc/______qdel_list_wrapper, L), time, TIMER_STOPPABLE)
#define QDEL_LIST_IN(L, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(______qdel_list_wrapper), L), time, TIMER_STOPPABLE)
#define QDEL_LIST_ASSOC(L) if(L) { for(var/I in L) { qdel(L[I]); qdel(I); } L.Cut(); }
#define QDEL_LIST_ASSOC_VAL(L) if(L) { for(var/I in L) qdel(L[I]); L.Cut(); }

Expand Down
52 changes: 26 additions & 26 deletions code/__defines/rust_g.dm
Original file line number Diff line number Diff line change
Expand Up @@ -42,26 +42,26 @@
#define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB"
#define RUSTG_JOB_ERROR "JOB PANICKED"

#define rustg_dmi_strip_metadata(fname) call(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) call(RUST_G, "dmi_create_png")(path, width, height, data)
#define rustg_dmi_strip_metadata(fname) LIBCALL(RUST_G, "dmi_strip_metadata")(fname)
#define rustg_dmi_create_png(path, width, height, data) LIBCALL(RUST_G, "dmi_create_png")(path, width, height, data)

#define rustg_noise_get_at_coordinates(seed, x, y) call(RUST_G, "noise_get_at_coordinates")(seed, x, y)
#define rustg_noise_get_at_coordinates(seed, x, y) LIBCALL(RUST_G, "noise_get_at_coordinates")(seed, x, y)

#define rustg_file_read(fname) call(RUST_G, "file_read")(fname)
#define rustg_file_exists(fname) call(RUST_G, "file_exists")(fname)
#define rustg_file_write(text, fname) call(RUST_G, "file_write")(text, fname)
#define rustg_file_append(text, fname) call(RUST_G, "file_append")(text, fname)
#define rustg_file_read(fname) LIBCALL(RUST_G, "file_read")(fname)
#define rustg_file_exists(fname) LIBCALL(RUST_G, "file_exists")(fname)
#define rustg_file_write(text, fname) LIBCALL(RUST_G, "file_write")(text, fname)
#define rustg_file_append(text, fname) LIBCALL(RUST_G, "file_append")(text, fname)

#ifdef RUSTG_OVERRIDE_BUILTINS
#define file2text(fname) rustg_file_read("[fname]")
#define text2file(text, fname) rustg_file_append(text, "[fname]")
#endif

#define rustg_git_revparse(rev) call(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) call(RUST_G, "rg_git_commit_date")(rev)
#define rustg_git_revparse(rev) LIBCALL(RUST_G, "rg_git_revparse")(rev)
#define rustg_git_commit_date(rev) LIBCALL(RUST_G, "rg_git_commit_date")(rev)

#define rustg_hash_string(algorithm, text) call(RUST_G, "hash_string")(algorithm, text)
#define rustg_hash_file(algorithm, fname) call(RUST_G, "hash_file")(algorithm, fname)
#define rustg_hash_string(algorithm, text) LIBCALL(RUST_G, "hash_string")(algorithm, text)
#define rustg_hash_file(algorithm, fname) LIBCALL(RUST_G, "hash_file")(algorithm, fname)

#define RUSTG_HASH_MD5 "md5"
#define RUSTG_HASH_SHA1 "sha1"
Expand All @@ -72,13 +72,13 @@
#define md5(thing) (isfile(thing) ? rustg_hash_file(RUSTG_HASH_MD5, "[thing]") : rustg_hash_string(RUSTG_HASH_MD5, thing))
#endif

#define rustg_json_is_valid(text) (call(RUST_G, "json_is_valid")(text) == "true")
#define rustg_json_is_valid(text) (LIBCALL(RUST_G, "json_is_valid")(text) == "true")

#define rustg_log_write(fname, text, format) call(RUST_G, "log_write")(fname, text, format)
/proc/rustg_log_close_all() return call(RUST_G, "log_close_all")()
#define rustg_log_write(fname, text, format) LIBCALL(RUST_G, "log_write")(fname, text, format)
/proc/rustg_log_close_all() return LIBCALL(RUST_G, "log_close_all")()

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

#ifdef RUSTG_OVERRIDE_BUILTINS
#define url_encode(text) rustg_url_encode(text)
Expand All @@ -91,13 +91,13 @@
#define RUSTG_HTTP_METHOD_PATCH "patch"
#define RUSTG_HTTP_METHOD_HEAD "head"
#define RUSTG_HTTP_METHOD_POST "post"
#define rustg_http_request_blocking(method, url, body, headers) call(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) call(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id)

#define rustg_sql_connect_pool(options) call(RUST_G, "sql_connect_pool")(options)
#define rustg_sql_query_async(handle, query, params) call(RUST_G, "sql_query_async")(handle, query, params)
#define rustg_sql_query_blocking(handle, query, params) call(RUST_G, "sql_query_blocking")(handle, query, params)
#define rustg_sql_connected(handle) call(RUST_G, "sql_connected")(handle)
#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_http_request_blocking(method, url, body, headers) LIBCALL(RUST_G, "http_request_blocking")(method, url, body, headers)
#define rustg_http_request_async(method, url, body, headers) LIBCALL(RUST_G, "http_request_async")(method, url, body, headers)
#define rustg_http_check_request(req_id) LIBCALL(RUST_G, "http_check_request")(req_id)

#define rustg_sql_connect_pool(options) LIBCALL(RUST_G, "sql_connect_pool")(options)
#define rustg_sql_query_async(handle, query, params) LIBCALL(RUST_G, "sql_query_async")(handle, query, params)
#define rustg_sql_query_blocking(handle, query, params) LIBCALL(RUST_G, "sql_query_blocking")(handle, query, params)
#define rustg_sql_connected(handle) LIBCALL(RUST_G, "sql_connected")(handle)
#define rustg_sql_disconnect_pool(handle) LIBCALL(RUST_G, "sql_disconnect_pool")(handle)
#define rustg_sql_check_query(job_id) LIBCALL(RUST_G, "sql_check_query")("[job_id]")
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
#define SHIFTED_OR_NOT 3

#define AB_PHASE_SHIFTED 0x1
#define AB_SHADE_REGEN 0x2
#define AB_PHASE_SHIFTING 0x2
#define AB_SHADE_REGEN 0x4

//Porting over the type system of the mobs
#define BLUE_EYES 1
Expand Down
1 change: 1 addition & 0 deletions code/__defines/span_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
#define span_interface(str) ("<span class='interface'>" + str + "</span>")
#define span_spacer(str) ("<span class='spacer'>" + str + "</span>")
#define span_blob(str) ("<span class='blob'>" + str + "</span>")
#define span_teppi(str) ("<span class='teppi'>" + str + "</span>")

#define span_debug_error(str) ("<span class='debug_error'>" + str + "</span>")
#define span_debug_warning(str) ("<span class='debug_warning'>" + str + "</span>")
Expand Down
1 change: 1 addition & 0 deletions code/__defines/species_languages.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#define ALLERGEN_SUGARS 0x400 // For unathi-like reactions
#define ALLERGEN_EGGS 0x800 // For Skrell eggs allergy
#define ALLERGEN_STIMULANT 0x1000 // Stimulants are what makes the Tajaran heart go ruh roh - not just coffee!
#define ALLERGEN_CHOCOLATE 0x2000 // Makes dogs die if they want to?

// Allergen reactions
#define AG_PHYS_DMG 0x1 // brute
Expand Down
Loading

0 comments on commit d7e6ffc

Please sign in to comment.