Merge remote-tracking branch 'upstream/master'

This commit is contained in:
Metis
2024-10-28 22:21:26 -04:00
9 changed files with 110 additions and 14 deletions
+4
View File
@@ -45,6 +45,10 @@
//#define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between
// If this is uncommented, will attempt to load and initialize prof.dll/libprof.so.
// We do not ship byond-tracy. Build it yourself here: https://github.com/mafemergency/byond-tracy/
//#define USE_BYOND_TRACY
#ifndef PRELOAD_RSC //set to:
#define PRELOAD_RSC 2 // 0 to allow using external resources or on-demand behaviour;
#endif // 1 to use the default behaviour;
+10 -7
View File
@@ -292,7 +292,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
SS.state = SS_IDLE
if (SS.flags & SS_TICKER)
tickersubsystems += SS
timer += world.tick_lag * rand(1, 5)
// Timer subsystems aren't allowed to bunch up, so we offset them a bit
timer += world.tick_lag * rand(0, 1)
SS.next_fire = timer
continue
@@ -371,14 +372,16 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/checking_runlevel = current_runlevel
if(cached_runlevel != checking_runlevel)
//resechedule subsystems
var/list/old_subsystems = current_runlevel_subsystems
cached_runlevel = checking_runlevel
current_runlevel_subsystems = runlevel_sorted_subsystems[cached_runlevel]
var/stagger = world.time
for(var/I in current_runlevel_subsystems)
var/datum/controller/subsystem/SS = I
if(SS.next_fire <= world.time)
stagger += world.tick_lag * rand(1, 5)
SS.next_fire = stagger
//now we'll go through all the subsystems we want to offset and give them a next_fire
for(var/datum/controller/subsystem/SS as anything in current_runlevel_subsystems)
//we only want to offset it if it's new and also behind
if(SS.next_fire > world.time || (SS in old_subsystems))
continue
SS.next_fire = world.time + world.tick_lag * rand(0, DS2TICKS(min(SS.wait, 2 SECONDS)))
subsystems_to_check = current_runlevel_subsystems
else
+7 -6
View File
@@ -57,12 +57,13 @@
user.log_message(msg, LOG_EMOTE)
msg = "<span class='emote'><b>[user]</b> [msg]</span>"
for(var/mob/M in GLOB.dead_mob_list)
if(!M.client || isnewplayer(M))
continue
var/T = get_turf(user)
if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)))
M.show_message(msg)
if(user.client)
for(var/mob/M in GLOB.dead_mob_list)
if(!M.client || isnewplayer(M))
continue
var/T = get_turf(user)
if(M.stat == DEAD && M.client && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(T, null)))
M.show_message(msg)
if(emote_type == EMOTE_AUDIBLE)
user.audible_message(msg)
+1 -1
View File
@@ -38,7 +38,7 @@ GLOBAL_DATUM_INIT(openspace_backdrop_one_for_all, /atom/movable/openspace_backdr
/turf/open/openspace/Initialize(mapload) // handle plane and layer here so that they don't cover other obs/turfs in Dream Maker
. = ..()
vis_contents += GLOB.openspace_backdrop_one_for_all //Special grey square for projecting backdrop darkness filter on it.
overlays += GLOB.openspace_backdrop_one_for_all //Special grey square for projecting backdrop darkness filter on it.
return INITIALIZE_HINT_LATELOAD
/turf/open/openspace/LateInitialize()
+21
View File
@@ -14,6 +14,11 @@ GLOBAL_LIST(topic_status_cache)
LIBCALL(dll, "auxtools_init")()
enable_debugging()
#ifdef USE_BYOND_TRACY
#warn USE_BYOND_TRACY is enabled
init_byond_tracy()
#endif
world.Profile(PROFILE_START)
log_world("World loaded at [TIME_STAMP("hh:mm:ss", FALSE)]!")
@@ -369,3 +374,19 @@ GLOBAL_LIST(topic_status_cache)
/world/proc/on_tickrate_change()
SStimer?.reset_buckets()
/world/proc/init_byond_tracy()
var/library
switch (system_type)
if (MS_WINDOWS)
library = "prof.dll"
if (UNIX)
library = "libprof.so"
else
CRASH("Unsupported platform: [system_type]")
var/init_result = call_ext(library, "init")("block")
if (init_result != "0")
CRASH("Error initializing byond-tracy: [init_result]")
@@ -8,6 +8,7 @@
category = EVENT_CATEGORY_ENTITIES
description = "Spawns a slaughter demon, to hunt by travelling through pools of blood."
/*
/datum/round_event_control/slaughter/canSpawnEvent()
weight = initial(src.weight)
var/list/allowed_turf_typecache = typecacheof(/turf/open) - typecacheof(/turf/open/space)
@@ -24,6 +25,7 @@
weight += 0.03
CHECK_TICK
return ..()
*/
/datum/round_event/ghost_role/slaughter
minimum_required = 1