Skip to content

Commit

Permalink
Merge branch 'release' of https://github.com/VOREStation/VOREStation
Browse files Browse the repository at this point in the history
…into voreupdate-515
  • Loading branch information
izac112 committed Apr 24, 2024
2 parents 71d320e + da8c2d7 commit 95279d3
Show file tree
Hide file tree
Showing 379 changed files with 53,764 additions and 2,270 deletions.
6 changes: 3 additions & 3 deletions _build_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# This file has all the information on what versions of libraries are thrown into the code
# For dreamchecker
export SPACEMAN_DMM_VERSION=suite-1.7
export SPACEMAN_DMM_VERSION=suite-1.8
# For NanoUI + TGUI
export NODE_VERSION=16
# Byond Major
export BYOND_MAJOR=514
export BYOND_MAJOR=515
# Byond Minor
export BYOND_MINOR=1589
export BYOND_MINOR=1630
# Macro Count
export MACRO_COUNT=4
2 changes: 1 addition & 1 deletion code/ATMOSPHERICS/_atmos_setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// atmospherics devices.
//--------------------------------------------

var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "purple" = PIPE_COLOR_PURPLE)
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "black" = PIPE_COLOR_BLACK, "orange" = PIPE_COLOR_ORANGE, "white" = PIPE_COLOR_WHITE, "purple" = PIPE_COLOR_PURPLE)

/proc/pipe_color_lookup(var/color)
for(var/C in pipe_colors)
Expand Down
5 changes: 4 additions & 1 deletion code/ATMOSPHERICS/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pipelines + Other Objects -> Pipe network
power_channel = ENVIRON
var/nodealert = 0
var/power_rating //the maximum amount of power the machine can use to do work, affects how powerful the machine is, in Watts

unacidable = TRUE
layer = ATMOS_LAYER
plane = PLATING_PLANE
Expand Down Expand Up @@ -171,6 +171,9 @@ Pipelines + Other Objects -> Pipe network
if(construction_type)
var/obj/item/pipe/I = new construction_type(loc, null, null, src)
I.setPipingLayer(piping_layer)
if(istype(I, /obj/item/pipe/trinary/flippable))
var/obj/item/pipe/trinary/flippable/flip = I
flip.icon_state = "[flip.icon_state][flip.mirrored ? "m" : ""]"
transfer_fingerprints_to(I)
qdel(src)

Expand Down
8 changes: 4 additions & 4 deletions code/ATMOSPHERICS/components/omni_devices/filter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@
if(portData.len)
data["ports"] = portData
if(output)
data["set_flow_rate"] = round(set_flow_rate*10) //because nanoui can't handle rounded decimals.
data["last_flow_rate"] = round(last_flow_rate*10)
data["set_flow_rate"] = round(set_flow_rate)
data["last_flow_rate"] = round(last_flow_rate)

return data

Expand All @@ -154,7 +154,7 @@
/obj/machinery/atmospherics/omni/atmos_filter/tgui_act(action, params)
if(..())
return TRUE

switch(action)
if("power")
if(!configuring)
Expand Down Expand Up @@ -266,4 +266,4 @@
else
initialize_directions |= P.dir
P.connect()
P.update = 1
P.update = 1
6 changes: 3 additions & 3 deletions code/ATMOSPHERICS/components/omni_devices/mixer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@
if(portData.len)
data["ports"] = portData
if(output)
data["set_flow_rate"] = round(set_flow_rate*10) //because nanoui can't handle rounded decimals.
data["last_flow_rate"] = round(last_flow_rate*10)
data["set_flow_rate"] = round(set_flow_rate)
data["last_flow_rate"] = round(last_flow_rate)

return data

Expand Down Expand Up @@ -294,4 +294,4 @@
/obj/machinery/atmospherics/omni/mixer/proc/con_lock(var/port = NORTH)
for(var/datum/omni_port/P in inputs)
if(P.dir == port)
P.con_lock = !P.con_lock
P.con_lock = !P.con_lock
5 changes: 0 additions & 5 deletions code/__byond_version_compat.dm
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
#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)
Expand Down
2 changes: 2 additions & 0 deletions code/__defines/admin_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
#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_LIMIT_MODULES_ADD "Restrict Modules to"
#define MODIFIY_ROBOT_LIMIT_MODULES_REMOVE "Remove from restricted Modules"
#define MODIFIY_ROBOT_TOGGLE_STATION_ACCESS "Toggle All Station Access Codes"
#define MODIFIY_ROBOT_TOGGLE_CENT_ACCESS "Toggle Central Access Codes"
17 changes: 17 additions & 0 deletions code/__defines/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -779,3 +779,20 @@
#define ELEMENT_CONFLICT_FOUND (1<<0)
//From reagents touch_x.
#define COMSIG_REAGENTS_TOUCH "reagent_touch"


//Moved observer stuff to DCS
#define COMSIG_OBSERVER_MOVED "observer_move"
#define COMSIG_OBSERVER_DESTROYED "observer_destroyed"
#define COMSIG_OBSERVER_SHUTTLE_ADDED "observer_shuttle_added"
#define COMSIG_OBSERVER_SHUTTLE_PRE_MOVE "observer_shuttle_premove"
#define COMSIG_OBSERVER_SHUTTLE_MOVED "observer_shuttle_moved"
#define COMSIG_OBSERVER_TURF_ENTERED "observer_turf_entered"
#define COMSIG_OBSERVER_TURF_EXITED "observer_turf_exited"
#define COMSIG_OBSERVER_Z_MOVED "observer_z_moved"
#define COMSIG_OBSERVER_MOB_EQUIPPED "observer_mob_equipped"
#define COMSIG_OBSERVER_ITEM_EQUIPPED "observer_item_equipped"
#define COMSIG_OBSERVER_MOB_UNEQUIPPED "observer_mob_unequipped"
#define COMSIG_OBSERVER_ITEM_UNEQUIPPED "observer_item_unequipped"
#define COMSIG_OBSERVER_APC "observer_apc"
#define COMSIG_OBSERVER_GLOBALMOVED "observer_global_move"
5 changes: 3 additions & 2 deletions code/__defines/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
#define INVISIBILITY_LIGHTING 20
#define INVISIBILITY_LEVEL_ONE 35
#define INVISIBILITY_LEVEL_TWO 45
#define INVISIBILITY_SHADEKIN 55 //CHOMPStation change
#define INVISIBILITY_SHADEKIN 55
#define INVISIBILITY_OBSERVER 60
#define INVISIBILITY_EYE 61

#define SEE_INVISIBLE_LIVING 25
#define SEE_INVISIBLE_NOLIGHTING 15
#define SEE_INVISIBLE_NOLIGHTING 15
#define SEE_INVISIBLE_LEVEL_ONE 35
#define SEE_INVISIBLE_LEVEL_TWO 45
#define SEE_INVISIBILITY_SHADEKIN 55
#define SEE_INVISIBLE_CULT 60
#define SEE_INVISIBLE_OBSERVER 61

Expand Down
1 change: 1 addition & 0 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define BORGTHERM 0x2
#define BORGXRAY 0x4
#define BORGMATERIAL 0x8
#define BORGANOMALOUS 0x10

#define STANCE_ATTACK 11 // Backwards compatability
#define STANCE_ATTACKING 12 // Ditto
Expand Down
41 changes: 29 additions & 12 deletions code/__defines/qdel.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//defines that give qdel hints. these can be given as a return in destory() or by calling
//! Defines that give qdel hints.
//!
//! These can be given as a return in [/atom/proc/Destroy] or by calling [/proc/qdel].

/// `qdel` should queue the object for deletion.
#define QDEL_HINT_QUEUE 0
Expand All @@ -11,41 +13,56 @@
// Qdel should assume this object won't gc, and hard delete it posthaste.
#define QDEL_HINT_HARDDEL_NOW 4


#ifdef REFERENCE_TRACKING
/** If REFERENCE_TRACKING is enabled, qdel will call this object's find_references() verb.
*
* Functionally identical to [QDEL_HINT_QUEUE] if [GC_FAILURE_HARD_LOOKUP] is not enabled in _compiler_options.dm.
*/
#warn TG0001 qdel REFERENCE_TRACKING enabled
#define QDEL_HINT_FINDREFERENCE 5
/// Behavior as [QDEL_HINT_FINDREFERENCE], but only if the GC fails and a hard delete is forced.
#define QDEL_HINT_IFFAIL_FINDREFERENCE 6
#endif

#define GC_QUEUE_CHECK 1
#define GC_QUEUE_HARDDELETE 2
#define GC_QUEUE_COUNT 2 //increase this when adding more steps.
// Defines for the ssgarbage queues
#define GC_QUEUE_FILTER 1 //! short queue to filter out quick gc successes so they don't hang around in the main queue for 5 minutes
#define GC_QUEUE_CHECK 2 //! main queue that waits 5 minutes because thats the longest byond can hold a reference to our shit.
#define GC_QUEUE_HARDDELETE 3 //! short queue for things that hard delete instead of going thru the gc subsystem, this is purely so if they *can* softdelete, they will soft delete rather then wasting time with a hard delete.
#define GC_QUEUE_COUNT 3 //! Number of queues, used for allocating the nested lists. Don't forget to increase this if you add a new queue stage


// Defines for the ssgarbage queue items
#define GC_QUEUE_ITEM_QUEUE_TIME 1 //! Time this item entered the queue
#define GC_QUEUE_ITEM_REF 2 //! Ref to the item
#define GC_QUEUE_ITEM_GCD_DESTROYED 3 //! Item's gc_destroyed var value. Used to detect ref reuse.
#define GC_QUEUE_ITEM_INDEX_COUNT 3 //! Number of item indexes, used for allocating the nested lists. Don't forget to increase this if you add a new queue item index

// Defines for the time an item has to get its reference cleaned before it fails the queue and moves to the next.
#define GC_FILTER_QUEUE (1 SECONDS)
#define GC_CHECK_QUEUE (5 MINUTES)
#define GC_DEL_QUEUE (10 SECONDS)


#define QDEL_ITEM_ADMINS_WARNED (1<<0) //! Set when admins are told about lag causing qdels in this type.
#define QDEL_ITEM_SUSPENDED_FOR_LAG (1<<1) //! Set when a type can no longer be hard deleted on failure because of lag it causes while this happens.

// Defines for the [gc_destroyed][/datum/var/gc_destroyed] var.
#define GC_QUEUED_FOR_QUEUING -1
#define GC_CURRENTLY_BEING_QDELETED -2

#define QDELING(X) (X.gc_destroyed)
#define QDELETED(X) (!X || X.gc_destroyed)
#define QDELETED(X) (isnull(X) || QDELING(X))
#define QDESTROYING(X) (!X || X.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)

//Qdel helper macros.
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), item), time, TIMER_STOPPABLE)
// This is a bit hacky, we do it to avoid people relying on a return value for the macro
// If you need that you should use QDEL_IN_STOPPABLE instead
#define QDEL_IN(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : item), time);
#define QDEL_IN_STOPPABLE(item, time) addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(qdel), (time) > GC_FILTER_QUEUE ? WEAKREF(item) : 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(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, 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(); }

/proc/______qdel_list_wrapper(list/L) //the underscores are to encourage people not to use this directly.
QDEL_LIST(L)
6 changes: 6 additions & 0 deletions code/__defines/span_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@

#define span_reflex_shoot(str) ("<span class='reflex_shoot'>" + str + "</span>")

/* Vore messages */

#define span_vdanger(str) ("<span class='vdanger'>" + str + "</span>")
#define span_vwarning(str) ("<span class='vwarning'>" + str + "</span>")
#define span_vnotice(str) ("<span class='vnotice'>" + str + "</span>")

/* Languages */

#define span_alien(str) ("<span class='alien'>" + str + "</span>")
Expand Down
1 change: 1 addition & 0 deletions code/__defines/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ var/global/list/runlevel_flags = list(RUNLEVEL_LOBBY, RUNLEVEL_SETUP, RUNLEVEL_G
#define FIRE_PRIORITY_PING 10
#define FIRE_PRIORITY_AI 10
#define FIRE_PRIORITY_GARBAGE 15
#define FIRE_PRIORITY_ASSETS 20
#define FIRE_PRIORITY_ALARM 20
#define FIRE_PRIORITY_CHARSETUP 25
#define FIRE_PRIORITY_AIRFLOW 30
Expand Down
6 changes: 3 additions & 3 deletions code/_global_vars/misc.dm
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
GLOBAL_LIST_EMPTY(error_last_seen)
GLOBAL_LIST_EMPTY(error_cooldown)

GLOBAL_DATUM_INIT(all_observable_events, /datum/all_observable_events, new) // This is a datum. It is not a list.
GLOBAL_DATUM_INIT(destroyed_event, /decl/observ/destroyed, new())
//GLOBAL_DATUM_INIT(all_observable_events, /datum/all_observable_events, new) // This is a datum. It is not a list.
//GLOBAL_DATUM_INIT(destroyed_event, /decl/observ/destroyed, new())

GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the host computer) and 0 world.ticks.

GLOBAL_VAR_INIT(TAB, "&nbsp;&nbsp;&nbsp;&nbsp;")
GLOBAL_VAR_INIT(TAB, "&nbsp;&nbsp;&nbsp;&nbsp;")
2 changes: 1 addition & 1 deletion code/_helpers/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// atoms/items/objects can be pretty and whatnot
var/atom/A = item
if(output_icons && isicon(A.icon) && !ismob(A)) // mobs tend to have unusable icons
item_str += "\icon[A][bicon(A)]&nbsp;"
item_str += "[bicon(A)]&nbsp;"
switch(determiners)
if(DET_NONE) item_str += A.name
if(DET_DEFINITE) item_str += "\the [A]"
Expand Down
29 changes: 29 additions & 0 deletions code/_helpers/global_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -327,3 +327,32 @@ GLOBAL_LIST_EMPTY(mannequins)
*/
//Hexidecimal numbers
var/global/list/hexNums = list("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "A", "B", "C", "D", "E", "F")

// Many global vars aren't GLOB type. This puts them there to be more easily inspected.
GLOBAL_LIST_EMPTY(legacy_globals)

/proc/populate_legacy_globals()
//Note: these lists cannot be changed to a new list anywhere in code!
//If they are, these will cause the old list to stay around!
//Check by searching for "<GLOBAL_NAME> =" in the entire codebase
GLOB.legacy_globals["player_list"] = player_list
GLOB.legacy_globals["mob_list"] = mob_list
GLOB.legacy_globals["human_mob_list"] = human_mob_list
GLOB.legacy_globals["silicon_mob_list"] = silicon_mob_list
GLOB.legacy_globals["ai_list"] = ai_list
GLOB.legacy_globals["living_mob_list"] = living_mob_list
GLOB.legacy_globals["dead_mob_list"] = dead_mob_list
GLOB.legacy_globals["observer_mob_list"] = observer_mob_list
GLOB.legacy_globals["listening_objects"] = listening_objects
GLOB.legacy_globals["cleanbot_reserved_turfs"] = cleanbot_reserved_turfs
GLOB.legacy_globals["cable_list"] = cable_list
GLOB.legacy_globals["landmarks_list"] = landmarks_list
GLOB.legacy_globals["event_triggers"] = event_triggers
GLOB.legacy_globals["side_effects"] = side_effects
GLOB.legacy_globals["mechas_list"] = mechas_list
GLOB.legacy_globals["mannequins_"] = mannequins_
//visual nets
GLOB.legacy_globals["visual_nets"] = visual_nets
GLOB.legacy_globals["cameranet"] = cameranet
GLOB.legacy_globals["cultnet"] = cultnet
GLOB.legacy_globals["existing_solargrubs"] = existing_solargrubs
1 change: 1 addition & 0 deletions code/_helpers/global_lists_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ var/global/list/edible_trash = list(/obj/item/broken_device,
/obj/item/weapon/storage/wallet,
/obj/item/weapon/storage/vore_egg,
/obj/item/weapon/bikehorn/tinytether,
/obj/item/weapon/entrepreneur,
/obj/item/capture_crystal,
/obj/item/roulette_ball,
/obj/item/pizzabox
Expand Down
23 changes: 15 additions & 8 deletions code/_helpers/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,13 @@ GLOBAL_LIST_EMPTY(cached_examine_icons)
CRASH("get_dummy_savefile failed to create a dummy savefile: '[error]'")
return get_dummy_savefile(from_failure = TRUE)


/// Generate a filename for this asset
/// The same asset will always lead to the same asset name
/// (Generated names do not include file extention.)
/proc/generate_asset_name(file)
return "asset.[md5(fcopy_rsc(file))]"

/**
* Converts an icon to base64. Operates by putting the icon in the iconCache savefile,
* exporting it as text, and then parsing the base64 from that.
Expand Down Expand Up @@ -655,12 +662,12 @@ GLOBAL_LIST_EMPTY(cached_examine_icons)
//var/name = SANITIZE_FILENAME("[generate_asset_name(thing)].png")
var/name = "[generate_asset_name(thing)].png"
if (!SSassets.cache[name])
register_asset(name, thing)
SSassets.transport.register_asset(name, thing)
for (var/thing2 in targets)
send_asset(thing2, name)
SSassets.transport.send_assets(thing2, name)
if(sourceonly)
return get_asset_url(name)
return "<img class='[extra_classes] icon icon-misc' src='[get_asset_url(name)]'>"
return SSassets.transport.get_asset_url(name)
return "<img class='[extra_classes] icon icon-misc' src='[SSassets.transport.get_asset_url(name)]'>"

//its either an atom, image, or mutable_appearance, we want its icon var
icon2collapse = thing.icon
Expand Down Expand Up @@ -697,12 +704,12 @@ GLOBAL_LIST_EMPTY(cached_examine_icons)
key = "[name_and_ref[3]].png"

if(!SSassets.cache[key])
register_asset(key, rsc_ref, file_hash, icon_path)
SSassets.transport.register_asset(key, rsc_ref, file_hash, icon_path)
for (var/client_target in targets)
send_asset(client_target, key)
SSassets.transport.send_assets(client_target, key)
if(sourceonly)
return get_asset_url(key)
return "<img class='[extra_classes] icon icon-[icon_state]' src='[get_asset_url(key)]'>"
return SSassets.transport.get_asset_url(key)
return "<img class='[extra_classes] icon icon-[icon_state]' src='[SSassets.transport.get_asset_url(key)]'>"

/proc/icon2base64html(target, var/custom_classes = "")
if (!target)
Expand Down
12 changes: 8 additions & 4 deletions code/_helpers/sorts/TimSort.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@
if(toIndex <= 0)
toIndex += L.len + 1

sortInstance.L = L
sortInstance.cmp = cmp
sortInstance.associative = associative
var/datum/sort_instance/SI = GLOB.sortInstance
if(!SI)
SI = new

sortInstance.timSort(fromIndex, toIndex)
SI.L = L
SI.cmp = cmp
SI.associative = associative

SI.timSort(fromIndex, toIndex)

return L
Loading

0 comments on commit 95279d3

Please sign in to comment.