Skip to content

Commit

Permalink
Merge pull request #1432 from Yawn-Wider/upstream-update
Browse files Browse the repository at this point in the history
Voreupdate [MDB IGNORE] [IDB IGNORE]
  • Loading branch information
izac112 authored Feb 17, 2024
2 parents 8871333 + c6151cf commit 54c6fad
Show file tree
Hide file tree
Showing 559 changed files with 11,015 additions and 11,925 deletions.
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
{
"eslint.nodePath": "./tgui/.yarn/sdks",
"eslint.workingDirectories": ["./tgui"],
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.js",
"prettier.prettierPath": "./tgui/.yarn/sdks/prettier/index.cjs",
"typescript.tsdk": "./tgui/.yarn/sdks/typescript/lib",
"typescript.enablePromptUseWorkspaceTsdk": true,
"search.exclude": {
"**/.yarn": true,
"**/.pnp.*": true
},
"workbench.editorAssociations": {
"*.dmi": "imagePreview.previewEditor"
},
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"files.eol": "\n",
"files.encoding": "utf8",
"files.insertFinalNewline": true,
Expand Down
6 changes: 5 additions & 1 deletion code/ZAS/Connection.dm
Original file line number Diff line number Diff line change
Expand Up @@ -165,4 +165,8 @@ Class Procs:
return


//to_world("valid.")
//to_world("valid.")

#undef CONNECTION_DIRECT
#undef CONNECTION_SPACE
#undef CONNECTION_INVALID
2 changes: 0 additions & 2 deletions code/ZAS/Fire.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ The more pressure, the more boom.
If it gains pressure too slowly, it may leak or just rupture instead of exploding.
*/

//#define FIREDBG

/turf/var/obj/fire/fire = null

//Some legacy definitions so fires can be started.
Expand Down
36 changes: 18 additions & 18 deletions code/__datastructures/globals.dm → code/__defines/__globals.dm
Original file line number Diff line number Diff line change
@@ -1,61 +1,61 @@
// See also controllers/globals.dm

// Creates a global initializer with a given InitValue expression, do not use outside this file
/// Creates a global initializer with a given InitValue expression, do not use
#define GLOBAL_MANAGED(X, InitValue)\
/datum/controller/global_vars/proc/InitGlobal##X(){\
##X = ##InitValue;\
gvars_datum_init_order += #X;\
}
// Creates an empty global initializer, do not use outside this file
/// Creates an empty global initializer, do not use
#define GLOBAL_UNMANAGED(X) /datum/controller/global_vars/proc/InitGlobal##X() { return; }

// Prevents a given global from being VV'd
/// Prevents a given global from being VV'd
#ifndef TESTING
#define GLOBAL_PROTECT(X)\
/datum/controller/global_vars/InitGlobal##X(){\
..();\
gvars_datum_protected_varlist += #X;\
gvars_datum_protected_varlist[#X] = TRUE;\
}
#else
#define GLOBAL_PROTECT(X)
#endif

// Standard BYOND global, do not use outside this file
/// Standard BYOND global, seriously do not use without an earthshakingly good reason
#define GLOBAL_REAL_VAR(X) var/global/##X

// Standard typed BYOND global, do not use outside this file

/// Standard typed BYOND global, seriously do not use without an earthshakingly good reason
#define GLOBAL_REAL(X, Typepath) var/global##Typepath/##X

// Defines a global var on the controller, do not use outside this file.
/// Defines a global var on the controller, do not use
#define GLOBAL_RAW(X) /datum/controller/global_vars/var/global##X

// Create an untyped global with an initializer expression
/// Create an untyped global with an initializer expression
#define GLOBAL_VAR_INIT(X, InitValue) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, InitValue)

// Create a global const var, do not use
/// Create a global const var, do not use
#define GLOBAL_VAR_CONST(X, InitValue) GLOBAL_RAW(/const/##X) = InitValue; GLOBAL_UNMANAGED(X)

// Create a list global with an initializer expression
/// Create a list global with an initializer expression
#define GLOBAL_LIST_INIT(X, InitValue) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, InitValue)

// Create a list global that is initialized as an empty list
/// Create a list global that is initialized as an empty list
#define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list())

// Create a typed list global with an initializer expression
/// Create a typed list global with an initializer expression
#define GLOBAL_LIST_INIT_TYPED(X, Typepath, InitValue) GLOBAL_RAW(/list##Typepath/X); GLOBAL_MANAGED(X, InitValue)

// Create a typed list global that is initialized as an empty list
/// Create a typed list global that is initialized as an empty list
#define GLOBAL_LIST_EMPTY_TYPED(X, Typepath) GLOBAL_LIST_INIT_TYPED(X, Typepath, list())

// Create a typed global with an initializer expression
/// Create a typed global with an initializer expression
#define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue)

// Create an untyped null global
/// Create an untyped null global
#define GLOBAL_VAR(X) GLOBAL_RAW(/##X); GLOBAL_UNMANAGED(X)

// Create a null global list
/// Create a null global list
#define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_UNMANAGED(X)

// Create a typed null global
/// Create a typed null global
#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_UNMANAGED(X)

1 change: 1 addition & 0 deletions code/__defines/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

// ZAS Compile Options
//#define FIREDBG // Uncomment to turn on ZAS debugging related to fire stuff.
//#define ZASDBG // Uncomment to turn on super detailed ZAS debugging that probably won't even compile.
#define MULTIZAS // Uncomment to turn on Multi-Z ZAS Support!

Expand Down
3 changes: 3 additions & 0 deletions code/__defines/admin_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@
#define MODIFIY_ROBOT_RADIOC_REMOVE "Remove a Radio Channel"
#define MODIFIY_ROBOT_COMP_ADD "Replace a Component"
#define MODIFIY_ROBOT_COMP_REMOVE "Remove a Component"
#define MODIFIY_ROBOT_SWAP_MODULE "Swap a Robot Module"
#define MODIFIY_ROBOT_RESET_MODULE "Fully Reset Robot Module"
#define MODIFIY_ROBOT_TOGGLE_ERT "Toggle ERT Module Overwrite"
#define MODIFIY_ROBOT_TOGGLE_CENT_ACCESS "Toggle Central Access Codes"
1 change: 1 addition & 0 deletions code/__defines/chat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define MESSAGE_TYPE_LOCALCHAT "localchat"
#define MESSAGE_TYPE_NPCEMOTE "npcemote"
#define MESSAGE_TYPE_PLOCALCHAT "plocalchat"
#define MESSAGE_TYPE_HIVEMIND "hivemind"
#define MESSAGE_TYPE_RADIO "radio"
#define MESSAGE_TYPE_NIF "nif"
#define MESSAGE_TYPE_INFO "info"
Expand Down
10 changes: 10 additions & 0 deletions code/__defines/projectiles.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
//Designed for things that need precision trajectories like projectiles.
//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels.

//You might see places where it does - 16 - 1. This is intentionally 17 instead of 16, because of how byond's tiles work and how not doing it will result in rounding errors like things getting put on the wrong turf.

#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point(A)

#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED))
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT))
5 changes: 5 additions & 0 deletions code/__defines/span_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@
#define span_srvradio(str) ("<span class='srvradio'>" + str + "</span>")
#define span_expradio(str) ("<span class='expradio'>" + str + "</span>")

#define span_binary(str) ("<span class='binarysay'>" + str + "</span>")
#define span_hivemind(str) ("<span class='hivemind'>" + str + "</span>")

#define span_name(str) ("<span class='name'>" + str + "</span>")
#define span_say(str) ("<span class='say'>" + str + "</span>")
#define span_alert(str) ("<span class='alert'>" + str + "</span>")
#define span_ghostalert(str) ("<span class='ghostalert'>" + str + "</span>")
#define span_npc_say(str) ("<span class='npcsay'>" + str + "</span>")


#define span_emote(str) ("<span class='emote'>" + str + "</span>")
#define span_emote_subtle(str) ("<span class='emotesubtle'>" + str + "</span>")
#define span_npc_emote(str) ("<span class='npcemote'>" + str + "</span>")

#define span_attack(str) ("<span class='attack'>" + str + "</span>")
#define span_moderate(str) ("<span class='moderate'>" + str + "</span>")
Expand Down
15 changes: 15 additions & 0 deletions code/__defines/vore.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#define VORE_SOUND_FALLOFF 0.1
#define VORE_SOUND_RANGE 3

#define HOLO_ORIGINAL_COLOR null //Original hologram color: "#7db4e1"
#define HOLO_HARDLIGHT_COLOR "#d97de0"
#define HOLO_ORIGINAL_ALPHA 120
#define HOLO_HARDLIGHT_ALPHA 200

#define BELLIES_MAX 40
#define BELLIES_NAME_MIN 2
#define BELLIES_NAME_MAX 40
#define BELLIES_DESC_MAX 4096
#define FLAVOR_MAX 400

#define VORE_VERSION 2 //This is a Define so you don't have to worry about magic numbers.
2 changes: 1 addition & 1 deletion code/_global_vars/sensitive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ GLOBAL_REAL_VAR(sqlpass) = ""
GLOBAL_REAL_VAR(sqlfdbkdb) = "test"
GLOBAL_REAL_VAR(sqlfdbklogin) = "root"
GLOBAL_REAL_VAR(sqlfdbkpass) = ""
GLOBAL_REAL_VAR(sqllogging) = 0 // Should we log deaths, population stats, etc.?
GLOBAL_REAL_VAR(sqllogging) = 0 // Should we log deaths, population stats, etc.?
24 changes: 24 additions & 0 deletions code/datums/chat_message.dm
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ var/list/runechat_image_cache = list()
if(5)
return rgb(c,m,x)

#undef CM_COLOR_SAT_MIN
#undef CM_COLOR_SAT_MAX
#undef CM_COLOR_LUM_MIN
#undef CM_COLOR_LUM_MAX

/atom/proc/runechat_message(message, range = world.view, italics, list/classes = list(), audible = TRUE, list/specific_viewers)
var/hearing_mobs
if(islist(specific_viewers))
Expand Down Expand Up @@ -369,3 +374,22 @@ var/list/runechat_image_cache = list()
if(istype(loc, /obj/item/weapon/holder))
return loc
return ..()

#undef CHAT_MESSAGE_SPAWN_TIME
#undef CHAT_MESSAGE_LIFESPAN
#undef CHAT_MESSAGE_EOL_FADE
#undef CHAT_MESSAGE_EXP_DECAY
#undef CHAT_MESSAGE_HEIGHT_DECAY
#undef CHAT_MESSAGE_APPROX_LHEIGHT

#undef CHAT_MESSAGE_WIDTH
#undef CHAT_MESSAGE_EXT_WIDTH
#undef CHAT_MESSAGE_LENGTH
#undef CHAT_MESSAGE_EXT_LENGTH

#undef CHAT_MESSAGE_MOB
#undef CHAT_MESSAGE_OBJ
#undef WXH_TO_HEIGHT

#undef CHAT_RUNE_EMOTE
#undef CHAT_RUNE_RADIO
13 changes: 1 addition & 12 deletions code/datums/position_point_vector.dm
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
//Designed for things that need precision trajectories like projectiles.
//Don't use this for anything that you don't absolutely have to use this with (like projectiles!) because it isn't worth using a datum unless you need accuracy down to decimal places in pixels.

//You might see places where it does - 16 - 1. This is intentionally 17 instead of 16, because of how byond's tiles work and how not doing it will result in rounding errors like things getting put on the wrong turf.

#define RETURN_PRECISE_POSITION(A) new /datum/position(A)
#define RETURN_PRECISE_POINT(A) new /datum/point(A)

#define RETURN_POINT_VECTOR(ATOM, ANGLE, SPEED) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED))
#define RETURN_POINT_VECTOR_INCREMENT(ATOM, ANGLE, SPEED, AMT) (new /datum/point/vector(ATOM, null, null, null, null, ANGLE, SPEED, AMT))

/datum/position //For positions with map x/y/z and pixel x/y so you don't have to return lists. Could use addition/subtraction in the future I guess.
var/x = 0
var/y = 0
Expand Down Expand Up @@ -224,4 +213,4 @@
var/needed_time = world.time - last_move
last_process = world.time
last_move = world.time
increment(needed_time / SSprojectiles.wait)
increment(needed_time / SSprojectiles.wait)
4 changes: 2 additions & 2 deletions code/game/machinery/air_alarm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature)
var/input_temperature = tgui_input_number(usr, "What temperature would you like the system to mantain? (Capped between [min_temperature] and [max_temperature]C)", "Thermostat Controls", target_temperature - T0C, max_temperature, min_temperature, round_value = FALSE)
if(isnum(input_temperature))
if(input_temperature > max_temperature || input_temperature < min_temperature)
to_chat(usr, "Temperature must be between [min_temperature]C and [max_temperature]C")
Expand Down Expand Up @@ -736,7 +736,7 @@
var/env = params["env"]

var/name = params["var"]
var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name])
var/value = tgui_input_number(usr, "New [name] for [env]:", name, TLV[env][name], round_value = FALSE)
if(!isnull(value) && !..())
if(value < 0)
TLV[env][name] = -1
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/airconditioner_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
turn_off()
return
if(istype(I, /obj/item/device/multitool))
var/new_temp = tgui_input_number(usr, "Input a new target temperature, in degrees C.","Target Temperature", 20)
var/new_temp = tgui_input_number(usr, "Input a new target temperature, in degrees C.","Target Temperature", convert_k2c(target_temp), round_value = FALSE)
if(!Adjacent(user) || user.incapacitated())
return
new_temp = convert_c2k(new_temp)
Expand Down Expand Up @@ -157,4 +157,4 @@

#undef MODE_IDLE
#undef MODE_HEATING
#undef MODE_COOLING
#undef MODE_COOLING
3 changes: 3 additions & 0 deletions code/game/machinery/biogenerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,6 @@

build_eff = man_rating
eat_eff = bin_rating

#undef BIOGEN_ITEM
#undef BIOGEN_REAGENT
9 changes: 8 additions & 1 deletion code/game/machinery/doors/firedoor.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

#define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa
#define FIREDOOR_MAX_TEMP 50 // °C
#define FIREDOOR_MIN_TEMP 0
Expand Down Expand Up @@ -519,3 +518,11 @@
icon = 'icons/obj/doors/DoorHazardGlass.dmi'
icon_state = "door_open"
glass = 1

#undef FIREDOOR_MAX_PRESSURE_DIFF
#undef FIREDOOR_MAX_TEMP
#undef FIREDOOR_MIN_TEMP

#undef FIREDOOR_ALERT_HOT
#undef FIREDOOR_ALERT_COLD
// Not used #undef FIREDOOR_ALERT_LOWPRESS
Loading

0 comments on commit 54c6fad

Please sign in to comment.