Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into meta-botany
Browse files Browse the repository at this point in the history
  • Loading branch information
Gw0sty committed Sep 30, 2024
2 parents d74e0ea + 3955a09 commit aa855d8
Show file tree
Hide file tree
Showing 78 changed files with 602 additions and 228 deletions.
37 changes: 33 additions & 4 deletions _maps/map_files/tramstation/tramstation.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -2526,6 +2526,11 @@
"ajF" = (
/turf/open/floor/iron,
/area/station/engineering/gravity_generator)
"ajG" = (
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/effect/landmark/start/scientist,
/turf/open/floor/iron/dark,
/area/station/science/explab)
"ajI" = (
/obj/effect/spawner/structure/window,
/turf/open/floor/plating,
Expand Down Expand Up @@ -6708,6 +6713,10 @@
},
/turf/open/floor/iron,
/area/station/hallway/secondary/entry)
"bax" = (
/obj/effect/landmark/start/scientist,
/turf/open/floor/glass/reinforced,
/area/station/science/research)
"bay" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
Expand Down Expand Up @@ -7863,6 +7872,7 @@
/obj/effect/turf_decal/trimline/purple/filled/line{
dir = 1
},
/obj/effect/landmark/start/roboticist,
/turf/open/floor/iron,
/area/station/science/robotics/lab)
"buQ" = (
Expand Down Expand Up @@ -16035,6 +16045,7 @@
},
/obj/effect/turf_decal/trimline/red/filled/line,
/obj/item/radio/intercom/directional/south,
/obj/effect/landmark/start/depsec/science,
/turf/open/floor/iron,
/area/station/security/checkpoint/science)
"eal" = (
Expand Down Expand Up @@ -26974,6 +26985,7 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{
dir = 8
},
/obj/effect/landmark/start/scientist,
/turf/open/floor/iron/cafeteria,
/area/station/science/breakroom)
"hFJ" = (
Expand Down Expand Up @@ -29737,6 +29749,7 @@
/obj/structure/chair/office,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/structure/cable,
/obj/effect/landmark/start/scientist,
/turf/open/floor/iron,
/area/station/science/lower)
"iyi" = (
Expand Down Expand Up @@ -33425,6 +33438,10 @@
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/turf/open/floor/iron,
/area/station/hallway/primary/tram/left)
"jFW" = (
/obj/effect/landmark/start/roboticist,
/turf/open/floor/iron/white,
/area/station/science/robotics/lab)
"jGa" = (
/obj/effect/turf_decal/trimline/brown/filled/line{
dir = 1
Expand Down Expand Up @@ -35771,6 +35788,10 @@
},
/turf/open/floor/iron,
/area/station/engineering/atmos)
"ksh" = (
/obj/effect/landmark/start/scientist,
/turf/open/floor/iron/white,
/area/station/science/ordnance)
"ksq" = (
/obj/effect/mapping_helpers/airlock/access/all/service/general,
/obj/effect/turf_decal/trimline/neutral/filled/line,
Expand Down Expand Up @@ -43617,6 +43638,7 @@
/obj/structure/chair/office/light{
dir = 8
},
/obj/effect/landmark/start/scientist,
/turf/open/floor/iron/dark,
/area/station/science/ordnance/testlab)
"mQa" = (
Expand Down Expand Up @@ -43907,6 +43929,7 @@
"mWe" = (
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2,
/obj/effect/turf_decal/tile/neutral/fourcorners,
/obj/effect/landmark/start/roboticist,
/turf/open/floor/iron/dark,
/area/station/science/robotics/lab)
"mWj" = (
Expand Down Expand Up @@ -46231,6 +46254,7 @@
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/obj/effect/landmark/start/depsec/science,
/turf/open/floor/iron,
/area/station/security/checkpoint/science)
"nHW" = (
Expand Down Expand Up @@ -47704,6 +47728,7 @@
/obj/structure/disposalpipe/segment{
dir = 6
},
/obj/effect/landmark/start/roboticist,
/turf/open/floor/iron,
/area/station/science/robotics/mechbay)
"ogp" = (
Expand Down Expand Up @@ -56384,6 +56409,7 @@
/obj/structure/chair/office/light{
dir = 1
},
/obj/effect/landmark/start/research_director,
/turf/open/floor/glass/reinforced,
/area/station/command/heads_quarters/rd)
"qUF" = (
Expand Down Expand Up @@ -62792,6 +62818,7 @@
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{
dir = 4
},
/obj/effect/landmark/start/depsec/science,
/turf/open/floor/iron,
/area/station/security/checkpoint/science)
"sVV" = (
Expand Down Expand Up @@ -77539,6 +77566,7 @@
/obj/structure/disposalpipe/segment{
dir = 4
},
/obj/effect/landmark/start/scientist,
/turf/open/floor/iron/white,
/area/station/science/ordnance/office)
"xBD" = (
Expand Down Expand Up @@ -78996,6 +79024,7 @@
/obj/machinery/atmospherics/components/unary/vent_pump/on/layer4{
dir = 1
},
/obj/effect/landmark/start/depsec/science,
/turf/open/floor/iron,
/area/station/security/checkpoint/science)
"ybX" = (
Expand Down Expand Up @@ -131564,7 +131593,7 @@ lkK
aeg
gPB
qOo
qOo
ksh
jGx
aej
oAn
Expand Down Expand Up @@ -132848,7 +132877,7 @@ dWM
frV
frV
rsQ
rmr
ajG
xLN
tho
sQZ
Expand Down Expand Up @@ -187578,7 +187607,7 @@ dzu
doK
uJH
uJH
uJH
jFW
ukS
soq
rsL
Expand Down Expand Up @@ -191690,7 +191719,7 @@ cli
oPf
jRy
odC
dzx
bax
tqA
rBb
rrL
Expand Down
8 changes: 7 additions & 1 deletion code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,13 @@ GLOBAL_LIST_INIT(human_invader_antagonists, list(
#define HUNTER_PACK_PSYKER "Psyker Shikaris"

// This flag disables certain checks that presume antagonist datums mean 'baddie'.
#define FLAG_FAKE_ANTAG (1 << 0)
#define FLAG_FAKE_ANTAG (1 << 0)
/// monkestation addition: Whether the antagonist can see exploitable info on people they examine.
#define FLAG_CAN_SEE_EXPOITABLE_INFO (1 << 1)
// monkestation addition: The storyteller will ignore this antag datum as counting against the antag cap.
#define FLAG_ANTAG_CAP_IGNORE (1 << 2)
// monkestation addition: The storyteller will count everyone on this antag's team as a singular antag instead.
#define FLAG_ANTAG_CAP_TEAM (1 << 3)

#define FREEDOM_IMPLANT_CHARGES 4

Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/dcs/signals/signals_turf.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,6 @@
#define COMSIG_TURF_RESET_ELEVATION "turf_reset_elevation"
#define ELEVATION_CURRENT_PIXEL_SHIFT 1
#define ELEVATION_MAX_PIXEL_SHIFT 2

///Called when turf no longer blocks light from passing through
#define COMSIG_TURF_NO_LONGER_BLOCK_LIGHT "turf_no_longer_block_light"
11 changes: 6 additions & 5 deletions code/__DEFINES/spatial_gridmap.dm
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
///each cell in a spatial_grid is this many turfs in length and width
/// each cell in a spatial_grid is this many turfs in length and width (with world.max(x or y) being 255, 15 of these fit on each side of a z level)
#define SPATIAL_GRID_CELLSIZE 17
///Takes a coordinate, and spits out the spatial grid index (x or y) it's inside
/// Takes a coordinate, and spits out the spatial grid index (x or y) it's inside
#define GET_SPATIAL_INDEX(coord) ROUND_UP((coord) / SPATIAL_GRID_CELLSIZE)
#define GRID_INDEX_TO_COORDS(index) (index * SPATIAL_GRID_CELLSIZE)
/// changes the cell_(x or y) vars on /datum/spatial_grid_cell to the x or y coordinate on the map for the LOWER LEFT CORNER of the grid cell.
/// index is from 1 to SPATIAL_GRID_CELLS_PER_SIDE
#define GRID_INDEX_TO_COORDS(index) ((((index) - 1) * SPATIAL_GRID_CELLSIZE) + 1)
/// number of grid cells per x or y side of all z levels. pass in world.maxx or world.maxy
#define SPATIAL_GRID_CELLS_PER_SIDE(world_bounds) GET_SPATIAL_INDEX(world_bounds)

#define SPATIAL_GRID_CHANNELS 2

//grid contents channels

///everything that is hearing sensitive is stored in this channel
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/surgery.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#define ORGAN_HIDDEN (1<<7)
/// Synthetic organ granted by a species (for use for organ replacements between species)
#define ORGAN_SYNTHETIC_FROM_SPECIES (1<<8)
/// This organ has no impact on conversion via flash, such as revs or bbs. Doesn't affect hypnosis and whatnot, though. MONKESTATION EDIT
#define ORGAN_DOESNT_PROTECT_AGAINST_CONVERSION (1<<9)

// Flags for the bodypart_flags var on /obj/item/bodypart
/// Bodypart cannot be dismembered or amputated
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/traits/monkestation/declarations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
#define TRAIT_REVIVES_BY_HEALING "trait_revives_by_healing"
/// This mob is a ghost critter.
#define TRAIT_GHOST_CRITTER "ghost_critter"
/// This mob is *currently* being flashed by someone with CAN_BYPASS_INNATE_FLASH_RESISTANCE returning TRUE. Used to make IPCs not immune to rev and bb conversions.
#define TRAIT_CONVERSION_FLASHED "conversion_flashed"

// /datum/mind + /mob/living
/// Prevents the user from casting spells using sign language. Works on both /datum/mind and /mob/living.
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/~monkestation/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
/// is something a worm
#define iscorticalborer(A) (istype(A, /mob/living/basic/cortical_borer))

/// Is the mob a blood brother
#define IS_BROTHER(mob) (mob?.mind?.has_antag_datum(/datum/antagonist/brother))

/// Whether the mob can convert others through innate flash shielding like IPCs (head revolutionaries and blood brothers)
#define CAN_BYPASS_INNATE_FLASH_RESISTANCE(mob) (IS_BROTHER(mob) || IS_HEAD_REVOLUTIONARY(mob))

// Borer evolution defines
// The three primary paths that eventually diverge
#define BORER_EVOLUTION_SYMBIOTE "Symbiote"
Expand Down
4 changes: 4 additions & 0 deletions code/__HELPERS/~monkestation-helpers/cmp.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@
/// Use when you want a list of most to least severe wounds.
/proc/cmp_wound_severity_dsc(datum/wound/a, datum/wound/b)
return cmp_numeric_dsc(a.severity, b.severity)

/// Used to sort overtime in profiling data.
/proc/sort_overtime_dsc(list/a, list/b)
return b["over"] - a["over"]
1 change: 1 addition & 0 deletions code/_globalvars/traits/_traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_CLUMSY" = TRAIT_CLUMSY,
"TRAIT_COAGULATING" = TRAIT_COAGULATING,
"TRAIT_COLDBLOODED" = TRAIT_COLDBLOODED,
"TRAIT_CONVERSION_FLASHED" = TRAIT_CONVERSION_FLASHED,
"TRAIT_CORPSELOCKED" = TRAIT_CORPSELOCKED,
"TRAIT_CRITICAL_CONDITION" = TRAIT_CRITICAL_CONDITION,
"TRAIT_CULT_HALO" = TRAIT_CULT_HALO,
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/master.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ GLOBAL_REAL(Master, /datum/controller/master)
if(sleep_offline_after_initializations && CONFIG_GET(flag/resume_after_initializations))
world.sleep_offline = FALSE
initializations_finished_with_no_players_logged_in = initialized_tod < REALTIMEOFDAY - 10
SSgamemode.handle_picking_stroyteller() //monkestation edit
SSgamemode.handle_picking_storyteller() //monkestation edit

/**
* Initialize a given subsystem and handle the results.
Expand Down
2 changes: 2 additions & 0 deletions code/controllers/subsystem/init_profiler.dm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* monkestation edit: reimplemented in [monkestation\code\controllers\subsystem\init_profiler.dm]
#define INIT_PROFILE_NAME "init_profiler.json"
///Subsystem exists so we can separately log init time costs from the costs of general operation
Expand Down Expand Up @@ -26,3 +27,4 @@ SUBSYSTEM_DEF(init_profiler)
world.Profile(PROFILE_CLEAR) //Now that we're written this data out, dump it. We don't want it getting mixed up with our current round data
#undef INIT_PROFILE_NAME
monkestation end */
5 changes: 4 additions & 1 deletion code/controllers/subsystem/profiler.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ SUBSYSTEM_DEF(profiler)
var/fetch_cost = 0
var/write_cost = 0

/* monkestation edit: reimplemented in [monkestation\code\controllers\subsystem\profiler.dm]
/datum/controller/subsystem/profiler/stat_entry(msg)
msg += "F:[round(fetch_cost,1)]ms"
msg += "|W:[round(write_cost,1)]ms"
return msg
monkestation end */

/datum/controller/subsystem/profiler/Initialize()
if(CONFIG_GET(flag/auto_profile))
Expand Down Expand Up @@ -37,6 +39,7 @@ SUBSYSTEM_DEF(profiler)
world.Profile(PROFILE_STOP, type = "sendmaps")


/* monkestation edit: reimplemented in [monkestation\code\controllers\subsystem\profiler.dm]
/datum/controller/subsystem/profiler/proc/DumpFile()
var/timer = TICK_USAGE_REAL
var/current_profile_data = world.Profile(PROFILE_REFRESH, format = "json")
Expand All @@ -59,4 +62,4 @@ SUBSYSTEM_DEF(profiler)
WRITE_FILE(prof_file, current_profile_data)
WRITE_FILE(sendmaps_file, current_sendmaps_data)
write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))

monkestation end */
28 changes: 14 additions & 14 deletions code/controllers/subsystem/spatial_gridmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -435,18 +435,18 @@ SUBSYSTEM_DEF(spatial_grid)
for(var/type in spatial_grid_categories[old_target.spatial_grid_key])
switch(type)
if(SPATIAL_GRID_CONTENTS_TYPE_CLIENTS)
var/list/old_target_contents = old_target.important_recursive_contents //cache for sanic speeds (lists are references anyways)
GRID_CELL_REMOVE(intersecting_cell.client_contents, old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_CLIENTS])
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(SPATIAL_GRID_CONTENTS_TYPE_CLIENTS), old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_CLIENTS])
var/list/old_target_contents = old_target.important_recursive_contents?[type] || old_target
GRID_CELL_REMOVE(intersecting_cell.client_contents, old_target_contents)
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(type), old_target_contents)

if(SPATIAL_GRID_CONTENTS_TYPE_HEARING)
var/list/old_target_contents = old_target.important_recursive_contents //cache for sanic speeds (lists are references anyways)
GRID_CELL_REMOVE(intersecting_cell.hearing_contents, old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_HEARING])
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(SPATIAL_GRID_CONTENTS_TYPE_HEARING), old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_HEARING])
var/list/old_target_contents = old_target.important_recursive_contents?[type] || old_target
GRID_CELL_REMOVE(intersecting_cell.hearing_contents, old_target_contents)
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(type), old_target_contents)

if(SPATIAL_GRID_CONTENTS_TYPE_ATMOS)
GRID_CELL_REMOVE(intersecting_cell.atmos_contents, old_target)
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(SPATIAL_GRID_CONTENTS_TYPE_ATMOS), old_target)
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(type), old_target)

return TRUE

Expand All @@ -467,14 +467,14 @@ SUBSYSTEM_DEF(spatial_grid)

switch(exclusive_type)
if(SPATIAL_GRID_CONTENTS_TYPE_CLIENTS)
var/list/old_target_contents = old_target.important_recursive_contents //cache for sanic speeds (lists are references anyways)
GRID_CELL_REMOVE(intersecting_cell.client_contents, old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_CLIENTS])
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(exclusive_type), old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_CLIENTS])
var/list/old_target_contents = old_target.important_recursive_contents?[exclusive_type] || old_target //cache for sanic speeds (lists are references anyways)
GRID_CELL_REMOVE(intersecting_cell.client_contents, old_target_contents)
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(exclusive_type), old_target_contents)

if(SPATIAL_GRID_CONTENTS_TYPE_HEARING)
var/list/old_target_contents = old_target.important_recursive_contents
GRID_CELL_REMOVE(intersecting_cell.hearing_contents, old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_HEARING])
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(exclusive_type), old_target_contents[SPATIAL_GRID_CONTENTS_TYPE_HEARING])
var/list/old_target_contents = old_target.important_recursive_contents?[exclusive_type] || old_target
GRID_CELL_REMOVE(intersecting_cell.hearing_contents, old_target_contents)
SEND_SIGNAL(intersecting_cell, SPATIAL_GRID_CELL_EXITED(exclusive_type), old_target_contents)

if(SPATIAL_GRID_CONTENTS_TYPE_ATMOS)
GRID_CELL_REMOVE(intersecting_cell.atmos_contents, old_target)
Expand Down Expand Up @@ -565,7 +565,7 @@ SUBSYSTEM_DEF(spatial_grid)

#ifdef UNIT_TESTS
if(untracked_movable_error(to_remove))
find_hanging_cell_refs_for_movable(to_remove, remove_from_cells=TRUE)
find_hanging_cell_refs_for_movable(to_remove, remove_from_cells=FALSE) //dont remove from cells because we should be able to see 2 errors
return
#endif

Expand Down
5 changes: 2 additions & 3 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@
if(spatial_grid_key)
SSspatial_grid.force_remove_from_cell(src)

LAZYCLEARLIST(client_mobs_in_contents)
LAZYNULL(client_mobs_in_contents)

. = ..()

Expand All @@ -225,7 +225,7 @@
//This absolutely must be after moveToNullspace()
//We rely on Entered and Exited to manage this list, and the copy of this list that is on any /atom/movable "Containers"
//If we clear this before the nullspace move, a ref to this object will be hung in any of its movable containers
LAZYCLEARLIST(important_recursive_contents)
LAZYNULL(important_recursive_contents)


vis_locs = null //clears this atom out of all viscontents
Expand Down Expand Up @@ -775,7 +775,6 @@
pulling.move_from_pull(src, target_turf, glide_size)
check_pulling()


//glide_size strangely enough can change mid movement animation and update correctly while the animation is playing
//This means that if you don't override it late like this, it will just be set back by the movement update that's called when you move turfs.
if(glide_size_override)
Expand Down
Loading

0 comments on commit aa855d8

Please sign in to comment.