Merge branch 'master' of https://github.com/tgstation/tgstation into upstream-sync

This commit is contained in:
xPokee
2025-10-04 05:28:09 -04:00
67 changed files with 1444 additions and 796 deletions
+4 -3
View File
@@ -755,10 +755,11 @@ SUBSYSTEM_DEF(job)
return joining_mob
/obj/structure/chair/JoinPlayerHere(mob/joining_mob, buckle)
. = ..()
var/mob/created_joining_mob = ..()
// Placing a mob in a chair will attempt to buckle it, or else fall back to default.
if(buckle && isliving(joining_mob))
buckle_mob(joining_mob, FALSE, FALSE)
if(buckle && isliving(created_joining_mob))
buckle_mob(created_joining_mob, FALSE, FALSE)
return created_joining_mob
/datum/controller/subsystem/job/proc/send_to_late_join(mob/M, buckle = TRUE)
var/atom/destination
@@ -22,12 +22,49 @@ SUBSYSTEM_DEF(ore_generation)
var/list/ore_vent_minerals = list()
/datum/controller/subsystem/ore_generation/Initialize()
/// First, lets sort each ore_vent here based on their distance to the landmark, then we'll assign sizes.
var/list/sort_vents = list()
for(var/obj/structure/ore_vent/vent as anything in possible_vents)
var/obj/landmark_anchor //We need to find the mining epicenter to gather distance from.
for(var/obj/possible_landmark as anything in GLOB.mining_center) // have to check multiple due to icebox
if(possible_landmark.z == vent.z)
landmark_anchor = possible_landmark
break
if(!landmark_anchor) //We're missing a mining epicenter landmark, but it's not crash-worthy.
vent.vent_size_setup(random = TRUE, force_size = null, map_loading = TRUE)
continue
sort_vents.Insert(length(sort_vents), vent)
sort_vents[vent] = get_dist(get_turf(vent),get_turf(landmark_anchor))
sortTim(sort_vents, GLOBAL_PROC_REF(cmp_numeric_asc), associative = TRUE) // Should sort list from closest to farthest.
possible_vents = sort_vents // Now we can work with the main list
var/cutoff = round((length(possible_vents) / 3))
var/vent_size_level = SMALL_VENT_TYPE
for(var/obj/structure/ore_vent/vent as anything in possible_vents)
vent.vent_size_setup(random = FALSE, force_size = vent_size_level, map_loading = TRUE)
cutoff--
if(cutoff > 0 || vent_size_level == LARGE_VENT_TYPE)
continue
cutoff = round((length(possible_vents) / 3))
switch(vent_size_level)
if(SMALL_VENT_TYPE)
vent_size_level = MEDIUM_VENT_TYPE
if(MEDIUM_VENT_TYPE)
vent_size_level = LARGE_VENT_TYPE
//Finally, we're going to round robin through the list of ore vents and assign a mineral to them until complete.
//Basically, we're going to round robin through the list of ore vents and assign a mineral to them until complete.
for(var/obj/structure/ore_vent/vent as anything in possible_vents)
if(vent.unique_vent)
continue //Ya'll already got your minerals.
vent.generate_mineral_breakdown(map_loading = TRUE)
/// Handles roundstart logging
logger.Log(
LOG_CATEGORY_CAVE_GENERATION,
@@ -19,6 +19,9 @@ PROCESSING_SUBSYSTEM_DEF(personalities)
/// Initialized personality singletons
/datum/controller/subsystem/processing/personalities/proc/init_personalities()
if(length(personalities_by_type))
return // Already initialized
personalities_by_type = list()
personalities_by_key = list()
incompatibilities_by_group = list()