Skip to content

Commit

Permalink
Merge branch 'BeeStation:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DrDuckedGoose authored Jul 14, 2024
2 parents e1dc4d9 + 035bc7e commit 7f5827a
Show file tree
Hide file tree
Showing 136 changed files with 8,607 additions and 6,963 deletions.
576 changes: 288 additions & 288 deletions _maps/RandomRuins/SpaceRuins/oldAIsat.dmm

Large diffs are not rendered by default.

10,082 changes: 5,041 additions & 5,041 deletions _maps/map_files/Deltastation/DeltaStation2.dmm

Large diffs are not rendered by default.

3,452 changes: 2,401 additions & 1,051 deletions _maps/shuttles/pirate/pirate_default.dmm

Large diffs are not rendered by default.

180 changes: 90 additions & 90 deletions _maps/shuttles/whiteship/whiteship_delta.dmm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions beestation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,7 @@
#include "code\controllers\subsystem\hub.dm"
#include "code\controllers\subsystem\icon_smooth.dm"
#include "code\controllers\subsystem\idlenpcpool.dm"
#include "code\controllers\subsystem\init_profiler.dm"
#include "code\controllers\subsystem\input.dm"
#include "code\controllers\subsystem\ipintel.dm"
#include "code\controllers\subsystem\job.dm"
Expand Down
14 changes: 12 additions & 2 deletions code/__DEFINES/MC.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@
#define STOP_PROCESSING(Processor, Datum) Datum.datum_flags &= ~DF_ISPROCESSING;Processor.processing -= Datum

//some arbitrary defines to be used by self-pruning global lists. (see master_controller)
/// Used to trigger object removal from a processing list
#define PROCESS_KILL 26

/// Returns true if the MC is initialized and running.
/// Optional argument init_stage controls what stage the mc must have initializted to count as initialized. Defaults to INITSTAGE_MAX if not specified.
#define MC_RUNNING(INIT_STAGE...) (Master && Master.processing > 0 && Master.current_runlevel && Master.init_stage_completed == (max(min(INITSTAGE_MAX, ##INIT_STAGE), 1)))

#define MC_LOOP_RTN_NEWSTAGES 1
#define MC_LOOP_RTN_GRACEFUL_EXIT 2

//! SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)

Expand Down Expand Up @@ -72,6 +77,11 @@
#define SS_SLEEPING 4 /// fire() slept.
#define SS_PAUSING 5 /// in the middle of pausing

// Subsystem init stages
#define INITSTAGE_EARLY 1 //! Early init stuff that doesn't need to wait for mapload
#define INITSTAGE_MAIN 2 //! Main init stage
#define INITSTAGE_MAX 2 //! Highest initstage.

#define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\
/datum/controller/subsystem/##X/New(){\
NEW_SS_GLOBAL(SS##X);\
Expand Down
2 changes: 0 additions & 2 deletions code/__DEFINES/_tick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
#define TICK_LIMIT_TO_RUN 70
// Tick limit for MC while running
#define TICK_LIMIT_MC 70
// Tick limit while initializing
#define TICK_LIMIT_MC_INIT_DEFAULT (100 - TICK_BYOND_RESERVE)

//for general usage
#define TICK_USAGE world.tick_usage
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals_datum/signals_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
#define COMSIG_CLOCKWORK_SIGNAL_RECEIVED "clock_received" //! When anything the trap is attatched to is triggered

///Subsystem signals
///From base of datum/controller/subsystem/Initialize: (start_timeofday)
///From base of datum/controller/subsystem/Initialize
#define COMSIG_SUBSYSTEM_POST_INITIALIZE "subsystem_post_initialize"

/// a weather event of some kind occured
Expand Down
27 changes: 27 additions & 0 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@
///Empty ID define
#define TIMER_ID_NULL -1

/// Used to trigger object removal from a processing list
#define PROCESS_KILL 26

//! ## Initialization subsystem

///New should not call Initialize
Expand Down Expand Up @@ -97,6 +100,25 @@
}\
}

//! ### SS initialization hints
/**
* Negative values incidate a failure or warning of some kind, positive are good.
* 0 and 1 are unused so that TRUE and FALSE are guarenteed to be invalid values.
*/

/// Subsystem failed to initialize entirely. Print a warning, log, and disable firing.
#define SS_INIT_FAILURE -2

/// The default return value which must be overriden. Will succeed with a warning.
#define SS_INIT_NONE -1

/// Subsystem initialized sucessfully.
#define SS_INIT_SUCCESS 2

/// Successful, but don't print anything. Useful if subsystem was disabled.
#define SS_INIT_NO_NEED 3

//! ### SS initialization load orders
// Subsystem init_order, from highest priority to lowest priority
// Subsystems shutdown in the reverse of the order they initialize in
// The numbers just define the ordering, they are meaningless otherwise.
Expand Down Expand Up @@ -152,6 +174,8 @@
#define INIT_ORDER_EXPLOSIONS -69
#define INIT_ORDER_ELEVATOR -70
#define INIT_ORDER_BAN_CACHE -98
//Near the end, logs the costs of initialize
#define INIT_ORDER_INIT_PROFILER -99
#define INIT_ORDER_NATURAL_LIGHT -120
#define INIT_ORDER_CHAT -150 //Should be last to ensure chat remains smooth during init.

Expand Down Expand Up @@ -282,3 +306,6 @@
#define SSMACHINES_DT (SSmachines.wait/10)
#define SSMOBS_DT (SSmobs.wait/10)
#define SSOBJ_DT (SSobj.wait/10)

/// The timer key used to know how long subsystem initialization takes
#define SS_INIT_TIMER_KEY "ss_init"
2 changes: 1 addition & 1 deletion code/__HELPERS/stoplag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/// Returns the number of ticks slept
/proc/stoplag(initial_delay)
//No master controller active, sleep for the tick lag to allow other things to run
if (!Master || !(Master.current_runlevel & RUNLEVELS_DEFAULT))
if (!Master || Master.init_stage_completed < INITSTAGE_MAX)
sleep(world.tick_lag)
return 1
//Set the default initial delay, if one isn't provided
Expand Down
Loading

0 comments on commit 7f5827a

Please sign in to comment.