Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subsysteming Attempt 2...? #3912

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
13 changes: 13 additions & 0 deletions code/__DEFINES/MC.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#define MC_TICK_CHECK ((TICK_USAGE > Master.current_ticklimit || src.state != SS_RUNNING) ? pause() : 0)
#define MC_PAUSE_IF_TRUE(value) (value ? pause() : 0)

#define MC_TICK_REMAINING_MS ((Master.current_ticklimit - TICK_USAGE) * world.tick_lag)

Expand Down Expand Up @@ -117,3 +118,15 @@
}\
/datum/controller/subsystem/verb_manager/##X/fire() {..() /*just so it shows up on the profiler*/} \
/datum/controller/subsystem/verb_manager/##X

//If you use this, MAKE SURE that all shared data and calls in Fire() are on the main subsystem, otherwise, the background subsystem will do nothing.
#define BACKGROUND_SUBSYSTEM_DEF(X) /datum/controller/subsystem/##X/background/New(){\
PreInit();\
ss_id="background_[#X]";\
}\
/datum/controller/subsystem/##X/background/fire() {\
if(SS##X.can_fire) { ..() }\
}\
/datum/controller/subsystem/##X/background/Recover(){}\
/datum/controller/subsystem/##X/background/flags=SS_BACKGROUND|SS_NO_INIT;\
/datum/controller/subsystem/##X/background
2 changes: 1 addition & 1 deletion code/__DEFINES/dcs/signals/signals.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
#define COMSIG_ATOM_SET_OPACITY "atom_set_opacity"

/// from base of /atom/movable/proc/on_virtual_z_change(): (new_virtual_z, old_virtual_z)
#define COMSIG_ATOM_VIRTUAL_Z_CHANGE "atom_virtual_z_change"
#define COMSIG_MOVABLE_VIRTUAL_Z_CHANGE "atom_virtual_z_change"

//from base of atom/movable/on_enter_storage(): (datum/component/storage/concrete/master_storage)
#define COMSIG_STORAGE_ENTERED "storage_entered"
Expand Down
2 changes: 2 additions & 0 deletions code/__DEFINES/dcs/signals/signals_vlevels.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/// Sent when the vlevel is clearing itself, so spawners and such stop spawning, etc. in /datum/virtual_level/clear_reservation(): ()
#define COMSIG_VLEVEL_CLEARING "vlevel_clearing"
17 changes: 17 additions & 0 deletions code/__DEFINES/maps.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,23 @@ require only minor tweaks.


///Map generation defines

// These are used by SSmap_gen to run the phases of map generation in order.
// As they are numeric, they can also be used to estimate the progress a map
// has made towards generating, even in a queue.
#define MAPGEN_PHASE_GENERATE 0
#define MAPGEN_PHASE_AFTERCHANGE 1
#define MAPGEN_PHASE_RUIN_PLACE 2
#define MAPGEN_PHASE_RUIN_PLACING 3
#define MAPGEN_PHASE_POPULATE 4
#define MAPGEN_PHASE_FINISHED 5

// Map generation priorities. Lower numbers are higher priority
// as they are inserted at earlier positions in the queue.
#define MAPGEN_PRIORITY_HIGH 1
#define MAPGEN_PRIORITY_MED 2
#define MAPGEN_PRIORITY_LOW 3

#define BIOME_LOWEST_HUMIDITY "biome_lowest_humidity"
#define BIOME_LOW_HUMIDITY "biome_low_humidity"
#define BIOME_MEDIUM_HUMIDITY "biome_medium_humidity"
Expand Down
9 changes: 6 additions & 3 deletions code/__DEFINES/subsystems.dm
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@
#define INIT_ORDER_XKEYSCORE -10
#define INIT_ORDER_STICKY_BAN -10
#define INIT_ORDER_LIGHTING -20
#define INIT_ORDER_SHUTTLE -21
#define INIT_ORDER_MAP_GEN -21
#define INIT_ORDER_SHUTTLE -22
#define INIT_ORDER_OVERMAP -25
#define INIT_ORDER_PATH -50
#define INIT_ORDER_DISCORD -60
Expand All @@ -161,17 +162,19 @@
#define FIRE_PRIORITY_VIS 10
#define FIRE_PRIORITY_AMBIENCE 10
#define FIRE_PRIORITY_GARBAGE 15
#define FIRE_PRIORITY_MAP_GEN_BACKGROUND 17
#define FIRE_PRIORITY_WET_FLOORS 20
#define FIRE_PRIORITY_AIR 20
#define FIRE_PRIORITY_NPC 20
#define FIRE_PRIORITY_MAP_GEN 20
#define FIRE_PRIORITY_PROCESS 25
#define FIRE_PRIORITY_THROWING 25
#define FIRE_PRIORITY_SPACEDRIFT 30
#define FIRE_PRIOTITY_SMOOTHING 35
#define FIRE_PRIORITY_SMOOTHING 35
#define FIRE_PRIORITY_NETWORKS 40
#define FIRE_PRIORITY_OBJ 40
#define FIRE_PRIORITY_ACID 40
#define FIRE_PRIOTITY_BURNING 40
#define FIRE_PRIORITY_BURNING 40
#define FIRE_PRIORITY_DEFAULT 50
#define FIRE_PRIORITY_PARALLAX 65
#define FIRE_PRIORITY_INSTRUMENTS 80
Expand Down
Loading
Loading