Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into how-deep-does-the…
Browse files Browse the repository at this point in the history
…-rabbit-hole-go
  • Loading branch information
MarkSuckerberg committed Sep 14, 2023
2 parents f7cca49 + 73d8c8b commit 79a7139
Show file tree
Hide file tree
Showing 136 changed files with 3,532 additions and 2,097 deletions.
2 changes: 1 addition & 1 deletion _maps/deprecated/Ruins/oldAIsat.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@
"bU" = (
/obj/effect/decal/cleanable/blood,
/obj/structure/chair,
/obj/item/clothing/under/rank/centcom/officer,
/obj/item/clothing/under/rank/centcom/official,
/obj/item/restraints/handcuffs,
/obj/effect/decal/remains/human,
/turf/open/floor/plating/airless,
Expand Down
7 changes: 3 additions & 4 deletions _maps/map_files/generic/CentCom.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@
"alS" = (
/obj/structure/fans/tiny/invisible,
/turf/open/floor/holofloor/hyperspace,
/area/centcom/supplypod/flyMeToTheMoon)
/area/centcom/supplypod/supplypod_temp_holding)
"alW" = (
/obj/structure/chair{
dir = 8
Expand Down Expand Up @@ -4244,7 +4244,7 @@
/area/centcom/ferry)
"aNE" = (
/turf/open/floor/plasteel,
/area/centcom/supplypod/podStorage)
/area/centcom/supplypod/pod_storage)
"aNF" = (
/obj/machinery/computer/communications{
dir = 1
Expand Down Expand Up @@ -9186,8 +9186,6 @@
/turf/open/floor/plasteel/dark,
/area/ctf)
"hYc" = (
/obj/structure/destructible/cult/tome,
/obj/item/book/codex_gigas,
/obj/machinery/airalarm/directional/east,
/obj/effect/turf_decal/corner/transparent/neutral{
dir = 1
Expand All @@ -9199,6 +9197,7 @@
/obj/effect/turf_decal/corner/transparent/neutral{
dir = 8
},
/obj/machinery/vending/wardrobe/cent_wardrobe,
/turf/open/floor/plasteel/dark,
/area/centcom/ferry)
"hZs" = (
Expand Down
2 changes: 1 addition & 1 deletion _maps/map_files/generic/blank.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"N" = (
/obj/structure/fans/tiny/invisible,
/turf/open/floor/holofloor/hyperspace,
/area/centcom/supplypod/flyMeToTheMoon)
/area/centcom/supplypod/supplypod_temp_holding)
"P" = (
/obj/structure/signpost/salvation{
icon = 'icons/obj/structures.dmi';
Expand Down
2 changes: 1 addition & 1 deletion check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ standards:

- exactly:
[
297,
298,
"non-bitwise << uses",
'(?<!\d)(?<!\d\s)(?<!<)<<(?!=|\s\d|\d|<|\/)',
]
Expand Down
60 changes: 41 additions & 19 deletions code/__DEFINES/cargo.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,23 +13,45 @@
#define STYLE_GONDOLA 13
#define STYLE_SEETHROUGH 14

#define POD_ICON_STATE 1
#define POD_NAME 2
#define POD_DESC 3
#define POD_SHAPE 1
#define POD_BASE 2
#define POD_DOOR 3
#define POD_DECAL 4
#define POD_GLOW 5
#define POD_RUBBLE_TYPE 6
#define POD_NAME 7
#define POD_DESC 8

#define POD_STYLES list( \
list("supplypod", "supply pod", "A Nanotrasen supply drop pod."), \
list("bluespacepod", "bluespace supply pod" , "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."), \
list("centcompod", "\improper CentCom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to CentCom after delivery."), \
list("syndiepod", "blood-red supply pod", "A dark, intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."), \
list("squadpod", "\improper MK. II supply pod", "A Nanotrasen supply pod. This one has been marked the markings of some sort of elite strike team."), \
list("cultpod", "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."), \
list("missilepod", "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."), \
list("smissilepod", "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."), \
list("boxpod", "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."), \
list("honkpod", "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."), \
list("fruitpod", "\improper Orange", "An angry orange."), \
list("", "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"), \
list("gondolapod", "gondola", "The silent walker. This one seems to be part of a delivery agency."), \
list("", "", "") \
)
#define RUBBLE_NONE 1
#define RUBBLE_NORMAL 2
#define RUBBLE_WIDE 3
#define RUBBLE_THIN 4

#define POD_SHAPE_NORML 1
#define POD_SHAPE_OTHER 2

#define POD_TRANSIT "1"
#define POD_FALLING "2"
#define POD_OPENING "3"
#define POD_LEAVING "4"

#define SUPPLYPOD_X_OFFSET -16

GLOBAL_LIST_EMPTY(supplypod_loading_bays)

GLOBAL_LIST_INIT(podstyles, list(\
list(POD_SHAPE_NORML, "pod", TRUE, "default", "yellow", RUBBLE_NORMAL, "supply pod", "A Nanotrasen supply drop pod."),\
list(POD_SHAPE_NORML, "advpod", TRUE, "bluespace", "blue", RUBBLE_NORMAL, "bluespace supply pod", "A Nanotrasen Bluespace supply pod. Teleports back to CentCom after delivery."),\
list(POD_SHAPE_NORML, "advpod", TRUE, "centcom", "blue", RUBBLE_NORMAL, "\improper CentCom supply pod", "A Nanotrasen supply pod, this one has been marked with Central Command's designations. Teleports back to CentCom after delivery."),\
list(POD_SHAPE_NORML, "darkpod", TRUE, "syndicate", "red", RUBBLE_NORMAL, "blood-red supply pod", "An intimidating supply pod, covered in the blood-red markings of the Syndicate. It's probably best to stand back from this."),\
list(POD_SHAPE_NORML, "darkpod", TRUE, "deathsquad", "blue", RUBBLE_NORMAL, "\improper Deathsquad drop pod", "A Nanotrasen drop pod. This one has been marked the markings of Nanotrasen's elite strike team."),\
list(POD_SHAPE_NORML, "pod", TRUE, "cultist", "red", RUBBLE_NORMAL, "bloody supply pod", "A Nanotrasen supply pod covered in scratch-marks, blood, and strange runes."),\
list(POD_SHAPE_OTHER, "missile", FALSE, FALSE, FALSE, RUBBLE_THIN, "cruise missile", "A big ass missile that didn't seem to fully detonate. It was likely launched from some far-off deep space missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
list(POD_SHAPE_OTHER, "smissile", FALSE, FALSE, FALSE, RUBBLE_THIN, "\improper Syndicate cruise missile", "A big ass, blood-red missile that didn't seem to fully detonate. It was likely launched from some deep space Syndicate missile silo. There appears to be an auxillery payload hatch on the side, though manually opening it is likely impossible."),\
list(POD_SHAPE_OTHER, "box", TRUE, FALSE, FALSE, RUBBLE_WIDE, "\improper Aussec supply crate", "An incredibly sturdy supply crate, designed to withstand orbital re-entry. Has 'Aussec Armory - 2532' engraved on the side."),\
list(POD_SHAPE_NORML, "clownpod", TRUE, "clown", "green", RUBBLE_NORMAL, "\improper HONK pod", "A brightly-colored supply pod. It likely originated from the Clown Federation."),\
list(POD_SHAPE_OTHER, "orange", TRUE, FALSE, FALSE, RUBBLE_NONE, "\improper Orange", "An angry orange."),\
list(POD_SHAPE_OTHER, FALSE, FALSE, FALSE, FALSE, RUBBLE_NONE, "\improper S.T.E.A.L.T.H. pod MKVII", "A supply pod that, under normal circumstances, is completely invisible to conventional methods of detection. How are you even seeing this?"),\
list(POD_SHAPE_OTHER, "gondola", FALSE, FALSE, FALSE, RUBBLE_NONE, "gondola", "The silent walker. This one seems to be part of a delivery agency."),\
list(POD_SHAPE_OTHER, FALSE, FALSE, FALSE, FALSE, RUBBLE_NONE, FALSE, FALSE, "rl_click", "give_po")\
))
6 changes: 1 addition & 5 deletions code/__DEFINES/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,8 @@
#define SHOVE_SLOWDOWN_LENGTH 30
#define SHOVE_SLOWDOWN_STRENGTH 0.85 //multiplier
//Shove disarming item list
GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(
/obj/item/gun)))


GLOBAL_LIST_INIT(shove_disarming_types, typecacheof(list(/obj/item/gun)))
//Combat object defines

//Embedded objects
#define EMBEDDED_PAIN_CHANCE 15 //Chance for embedded objects to cause pain (damage user)
#define EMBEDDED_ITEM_FALLOUT 5 //Chance for embedded object to fall out (causing pain but removing the object)
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/dcs/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
#define COMPONENT_GLOB_BLOCK_CINEMATIC 1
/// ingame button pressed (/obj/machinery/button/button)
#define COMSIG_GLOB_BUTTON_PRESSED "!button_pressed"
/// a client (re)connected, after all /client/New() checks have passed : (client/connected_client)
#define COMSIG_GLOB_CLIENT_CONNECT "!client_connect"

// signals from globally accessible objects
/// from SSsun when the sun changes position : (azimuth)
Expand Down Expand Up @@ -532,6 +534,8 @@
#define COMSIG_TOOL_START_USE "tool_start_use" ///from base of [/obj/item/proc/tool_start_check]: (mob/living/user)
#define COMSIG_ITEM_DISABLE_EMBED "item_disable_embed" ///from [/obj/item/proc/disableEmbedding]:
#define COMSIG_MINE_TRIGGERED "minegoboom" ///from [/obj/effect/mine/proc/triggermine]:
///from [/obj/structure/closet/supplypod/proc/endlaunch]:
#define COMSIG_SUPPLYPOD_LANDED "supplypodgoboom"

///Called when an item is being offered, from [/obj/item/proc/on_offered(mob/living/carbon/offerer)]
#define COMSIG_ITEM_OFFERING "item_offering"
Expand Down
1 change: 0 additions & 1 deletion code/__DEFINES/flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#define ALL (~0) //For convenience.
#define NONE 0


GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768))

/* Directions */
Expand Down
4 changes: 4 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ GLOBAL_LIST_INIT(turfs_without_ground, typecacheof(list(

#define islandmine(A) (istype(A, /obj/effect/mine))

#define issupplypod(A) (istype(A, /obj/structure/closet/supplypod))

#define isammocasing(A) (istype(A, /obj/item/ammo_casing))

#define isidcard(I) (istype(I, /obj/item/card/id))
Expand Down Expand Up @@ -227,6 +229,8 @@ GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(

#define isshuttleturf(T) (length(T.baseturfs) && (/turf/baseturf_skipover/shuttle in T.baseturfs))

#define isProbablyWallMounted(O) (O.pixel_x > 20 || O.pixel_x < -20 || O.pixel_y > 20 || O.pixel_y < -20)

#define isbook(O) (is_type_in_typecache(O, GLOB.book_types))

GLOBAL_LIST_INIT(book_types, typecacheof(list(
Expand Down
24 changes: 24 additions & 0 deletions code/__DEFINES/lag_switch.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// All of the possible Lag Switch lag mitigation measures
// If you add more do not forget to update MEASURES_AMOUNT accordingly
/// Stops ghosts flying around freely, they can still jump and orbit, staff exempted
#define DISABLE_DEAD_KEYLOOP 1
/// Stops ghosts using zoom/t-ray verbs and resets their view if zoomed out, staff exempted
#define DISABLE_GHOST_ZOOM_TRAY 2
/// Disable runechat and enable the bubbles, speaking mobs with TRAIT_BYPASS_MEASURES exempted
#define DISABLE_RUNECHAT 3
/// Disable icon2html procs from verbs like examine, mobs calling with TRAIT_BYPASS_MEASURES exempted
#define DISABLE_USR_ICON2HTML 4
/// Prevents anyone from joining the game as anything but observer
#define DISABLE_NON_OBSJOBS 5
/// Limit IC/dchat spam to one message every x seconds per client, TRAIT_BYPASS_MEASURES exempted
#define SLOWMODE_SAY 6
/// Disables parallax, as if everyone had disabled their preference, TRAIT_BYPASS_MEASURES exempted
#define DISABLE_PARALLAX 7
/// Disables footsteps, TRAIT_BYPASS_MEASURES exempted
#define DISABLE_FOOTSTEPS 8
/// Disables planet deletion
#define DISABLE_PLANETDEL 9
/// Disables ALL new planet generation, TRAIT_BYPASS_MEASURES exempted
#define DISABLE_PLANETGEN 10

#define MEASURES_AMOUNT 10 // The total number of switches defined above
4 changes: 4 additions & 0 deletions code/__DEFINES/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,7 @@
#define ORGAN_VITAL (1<<4) //Currently only the brain
#define ORGAN_EDIBLE (1<<5) //is a snack? :D
#define ORGAN_SYNTHETIC_EMP (1<<6) //Synthetic organ affected by an EMP. Deteriorates over time.

/// Flags for the pod_flags var on /obj/structure/closet/supplypod

#define FIRST_SOUNDS (1<<0) // If it shouldn't play sounds the first time it lands, used for reverse mode
1 change: 0 additions & 1 deletion code/__DEFINES/role_preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ GLOBAL_LIST_INIT(special_roles, list(
ROLE_NINJA,
ROLE_OBSESSED,
ROLE_SPACE_DRAGON,
ROLE_MONKEY = /datum/game_mode/monkey,
ROLE_REVENANT,
ROLE_ABDUCTOR,
ROLE_DEVIL = /datum/game_mode/devil,
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_SCOOPABLE "scoopable"
//your smooches actually deal damage to their target
#define TRAIT_KISS_OF_DEATH "kiss_of_death"
/// This mob overrides certian SSlag_switch measures with this special trait
#define TRAIT_BYPASS_MEASURES "bypass_lagswitch_measures"
//non-mob traits
/// Used for limb-based paralysis, where replacing the limb will fix it.
#define TRAIT_PARALYSIS "paralysis"
Expand Down
9 changes: 9 additions & 0 deletions code/__HELPERS/datums.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
///Check if a datum has not been deleted and is a valid source
/proc/is_valid_src(datum/source_datum)
if(istype(source_datum))
return !QDELETED(source_datum)
return FALSE

/proc/call_async(datum/source, proc_type, list/arguments)
set waitfor = FALSE
return call(source, proc_type)(arglist(arguments))
4 changes: 4 additions & 0 deletions code/__HELPERS/icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1244,6 +1244,8 @@ GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of ico
/proc/icon2html(atom/thing, client/target, icon_state, dir = SOUTH, frame = 1, moving = FALSE, sourceonly = FALSE, extra_classes = null)
if (!thing)
return
if(SSlag_switch.measures[DISABLE_USR_ICON2HTML] && usr && !HAS_TRAIT(usr, TRAIT_BYPASS_MEASURES))
return

var/key
var/icon/icon2collapse = thing
Expand Down Expand Up @@ -1354,6 +1356,8 @@ GLOBAL_DATUM_INIT(dummySave, /savefile, new("tmp/dummySave.sav")) //Cache of ico
/proc/costly_icon2html(thing, target, sourceonly = FALSE)
if (!thing)
return
if(SSlag_switch.measures[DISABLE_USR_ICON2HTML] && usr && !HAS_TRAIT(usr, TRAIT_BYPASS_MEASURES))
return

if (isicon(thing))
return icon2html(thing, target)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/lists/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys,
//This is for procs to replace all the goddamn 'in world's that are chilling around the code

GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**.
GLOBAL_LIST_EMPTY(keyloop_list) //as above but can be limited to boost performance
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
GLOBAL_LIST_EMPTY(mob_directory) //mob_id -> mob
GLOBAL_LIST_EMPTY(alive_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CANNOT_OPEN_PRESENTS" = TRAIT_CANNOT_OPEN_PRESENTS,
"TRAIT_PRESENT_VISION" = TRAIT_PRESENT_VISION,
"TRAIT_DISK_VERIFIER" = TRAIT_DISK_VERIFIER,
"TRAIT_BYPASS_MEASURES" = TRAIT_BYPASS_MEASURES,
"TRAIT_NOMOBSWAP" = TRAIT_NOMOBSWAP,
"TRAIT_XRAY_VISION" = TRAIT_XRAY_VISION,
"TRAIT_THERMAL_VISION" = TRAIT_THERMAL_VISION,
Expand Down
4 changes: 4 additions & 0 deletions code/_onclick/hud/parallax.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@

/datum/hud/proc/apply_parallax_pref(mob/viewmob)
var/mob/screenmob = viewmob || mymob

if (SSlag_switch.measures[DISABLE_PARALLAX] && !HAS_TRAIT(viewmob, TRAIT_BYPASS_MEASURES))
return FALSE

var/client/C = screenmob.client
if(C.prefs)
var/pref = C.prefs.parallax
Expand Down
4 changes: 4 additions & 0 deletions code/controllers/configuration/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,10 @@

/datum/config_entry/flag/maprotation

/datum/config_entry/number/auto_lag_switch_pop //Number of clients at which drastic lag mitigation measures kick in
config_entry_value = null
min_val = 0

/datum/config_entry/number/soft_popcap
config_entry_value = null
min_val = 0
Expand Down
6 changes: 2 additions & 4 deletions code/controllers/subsystem/input.dm
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,5 @@ SUBSYSTEM_DEF(input)
user.set_macros()

/datum/controller/subsystem/input/fire()
var/list/clients = GLOB.clients // Let's sing the list cache song
for(var/i in 1 to clients.len)
var/client/C = clients[i]
C.keyLoop()
for(var/mob/user as anything in GLOB.keyloop_list)
user.focus?.keyLoop(user.client)
Loading

0 comments on commit 79a7139

Please sign in to comment.