mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* storytellers * Update _base_event.dm * Update _base_event.dm * storytellers and midround events * work * antags * last * Update vote.dm * fixes * Update backrooms.dm * so long gay dynamic * Update vote.dm * dynamic unit test * cleanup * delete minimum pop * fix * storyteller tweaks * traitor awakening * Update traitor.dm * Update _basemap.dm * Update ghost.dm * oh god so much stuff * Update _logging.dm * buh bye events * Update nuclearbomb.dm * Update collections.ts * Revert "Update collections.ts" This reverts commitff93cf170a. * maybe * fix * fix * Update game_mode.dm * fixes * fixes and more logging * oh good gravy * Update portal_storm.dm * bring them back * Update gamemode_subsystem.dm * Update admin_verbs.dm * Update force_event.dm * damnit * Update _base_event.dm * fixes * more * it compiles :) * more * passes linter * Update radiation_leak.dm * Update dolphin_migration.dm * Update brother.dm * Update gamemode_subsystem.dm * Update _base_event.dm * Update _base_event.dm * updates * fixup * add vampire remove prompt * Update vampire.dm * Update vampire.dm * Update vampire.dm * Update _base_event.dm * Update gamemode_subsystem.dm * Update gamemode_subsystem.dm * Update dolphin_migration.dm * fix migration * title icon * fixes * formatting * Update gamemode_subsystem.dm * Update tzimisce.dm * Update tzimisce.dm * Update gamemode_subsystem.dm * Update storytellers.dm * tweak for our pop * Update darkspawn.dm * Update gamemode_subsystem.dm * tweaks and fixes * more and less roundstart * Update ghost.dm * lol lets just port the voting system * Update scrubber_overflow.dm * fix scrubber * bye gamemode * cleanup * Update clown_operative.dm * Update clown_operative.dm * Update _base_event.dm * probably fixed * Update supermatter_surge.dm * buh bye * Update brain_trauma.dm * more * new pseudogamemode vote * tweaks * Update gamemode_subsystem.dm * Update high_priority_bounty.dm * Update gamemode_subsystem.dm * Update storytellers.dm * Update high_priority_bounty.dm * tweaks * Update high_priority_bounty.dm * Update high_priority_bounty.dm * fixes * fixes * tweak * Update obsessed.dm * so long pal * Update battleroyale.dm * deletions * Update implant_dusting.dm * bye * uplinks fix * Update uplink_items.dm * Update uplink_items.dm * delete more gamemodes * more * lol one ctrl f change * hm what * Update antagonists.dm * Revert "Update antagonists.dm" This reverts commitc3c2ee192e. * Revert "hm what" This reverts commit43dbbcebcf. * Revert "lol one ctrl f change" This reverts commit95e28f5221. * cleanup * more stuff * more deletion * this one gone too * you and only you i shall save * Update revolution.dm * hold this please * it's done * bye admin stuff * Update uplink.dm * Update alert.dm * should be fine * fixes * tweaks * fixes * fixes * Update ticker.dm * this is important * Update heretic.dm * Update clown_operative.dm * rewrite * fixes * Update clockwork_cult.dm * fixes * Update uplink_items.dm * reorganize * Update objective.dm * rewrite nightmare * Update storytellers.dm * tweak * tweaks * Update stray_cargo.dm * Update stray_cargo.dm * Update stray_cargo.dm * delete unneeded tgui * Update ticker.dm * Update roundend.dm * Update anomaly_grav.dm * Update gamemode_subsystem.dm * Update statpanel.dm * Update statpanel.dm * no additional delay * clean up * Update _base_event.dm * Update _event.dm * antag token and brothers * no token picked * Update _base_event.dm --------- Co-authored-by: Byemoh <baiomurang@gmail.com>
352 lines
12 KiB
Plaintext
352 lines
12 KiB
Plaintext
//! Defines for subsystems and overlays
|
|
//!
|
|
//! Lots of important stuff in here, make sure you have your brain switched on
|
|
//! when editing this file
|
|
|
|
//! ## DB defines
|
|
/**
|
|
* DB major schema version
|
|
*
|
|
* Update this whenever the db schema changes
|
|
*
|
|
* make sure you add an update to the schema_version stable in the db changelog
|
|
*/
|
|
#define DB_MAJOR_VERSION 5
|
|
|
|
/**
|
|
* DB minor schema version
|
|
*
|
|
* Update this whenever the db schema changes
|
|
*
|
|
* make sure you add an update to the schema_version stable in the db changelog
|
|
*/
|
|
|
|
#define DB_MINOR_VERSION 14
|
|
#define DB_BOUND_CREDENTIALS_FLAG_BYPASS_BANS "bypass_bans"
|
|
#define DB_BOUND_CREDENTIALS_FLAG_ALLOW_PROXIES "allow_proxies"
|
|
|
|
//! ## Timing subsystem
|
|
/**
|
|
* Don't run if there is an identical unique timer active
|
|
*
|
|
* if the arguments to addtimer are the same as an existing timer, it doesn't create a new timer,
|
|
* and returns the id of the existing timer
|
|
*/
|
|
#define TIMER_UNIQUE (1<<0)
|
|
|
|
///For unique timers: Replace the old timer rather then not start this one
|
|
#define TIMER_OVERRIDE (1<<1)
|
|
|
|
/**
|
|
* Timing should be based on how timing progresses on clients, not the server.
|
|
*
|
|
* Tracking this is more expensive,
|
|
* should only be used in conjuction with things that have to progress client side, such as
|
|
* animate() or sound()
|
|
*/
|
|
#define TIMER_CLIENT_TIME (1<<2)
|
|
|
|
///Timer can be stopped using deltimer()
|
|
#define TIMER_STOPPABLE (1<<3)
|
|
|
|
///prevents distinguishing identical timers with the wait variable
|
|
///
|
|
///To be used with TIMER_UNIQUE
|
|
#define TIMER_NO_HASH_WAIT (1<<4)
|
|
|
|
///Loops the timer repeatedly until qdeleted
|
|
///
|
|
///In most cases you want a subsystem instead, so don't use this unless you have a good reason
|
|
#define TIMER_LOOP (1<<5)
|
|
|
|
///Delete the timer on parent datum Destroy() and when deltimer'd
|
|
#define TIMER_DELETE_ME (1<<6)
|
|
|
|
///Empty ID define
|
|
#define TIMER_ID_NULL -1
|
|
|
|
//! ## Initialization subsystem
|
|
|
|
///New should not call Initialize
|
|
#define INITIALIZATION_INSSATOMS 0
|
|
///New should call Initialize(TRUE)
|
|
#define INITIALIZATION_INNEW_MAPLOAD 2
|
|
///New should call Initialize(FALSE)
|
|
#define INITIALIZATION_INNEW_REGULAR 1
|
|
|
|
//! ### Initialization hints
|
|
|
|
///Nothing happens
|
|
#define INITIALIZE_HINT_NORMAL 0
|
|
/**
|
|
* call LateInitialize at the end of all atom Initalization
|
|
*
|
|
* The item will be added to the late_loaders list, this is iterated over after
|
|
* initalization of subsystems is complete and calls LateInitalize on the atom
|
|
* see [this file for the LateIntialize proc](atom.html#proc/LateInitialize)
|
|
*/
|
|
#define INITIALIZE_HINT_LATELOAD 1
|
|
|
|
///Call qdel on the atom after intialization
|
|
#define INITIALIZE_HINT_QDEL 2
|
|
|
|
///type and all subtypes should always immediately call Initialize in New()
|
|
#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
|
|
..();\
|
|
if(!(flags_1 & INITIALIZED_1)) {\
|
|
var/previous_initialized_value = SSatoms.initialized;\
|
|
SSatoms.initialized = INITIALIZATION_INNEW_MAPLOAD;\
|
|
args[1] = TRUE;\
|
|
SSatoms.InitAtom(src, FALSE, args);\
|
|
SSatoms.initialized = previous_initialized_value;\
|
|
}\
|
|
}
|
|
|
|
//! ### 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
|
|
|
|
/// Succesfully initialized, BUT do not announce it to players (generally to hide game mechanics it would otherwise spoil)
|
|
#define SS_INIT_NO_MESSAGE 4
|
|
|
|
//! ### 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.
|
|
|
|
#define INIT_ORDER_PROFILER 101
|
|
#define INIT_ORDER_TITLE 100
|
|
#define INIT_ORDER_GARBAGE 99
|
|
#define INIT_ORDER_DBCORE 95
|
|
#define INIT_ORDER_BLACKBOX 94
|
|
#define INIT_ORDER_SERVER_MAINT 93
|
|
#define INIT_ORDER_INPUT 85
|
|
#define INIT_ORDER_SOUNDS 83
|
|
#define INIT_ORDER_INSTRUMENTS 82
|
|
#define INIT_ORDER_GREYSCALE 81
|
|
#define INIT_ORDER_VIS 80
|
|
#define INIT_ORDER_SECURITY_LEVEL 79
|
|
#define INIT_ORDER_MATERIALS 76
|
|
#define INIT_ORDER_STATION 75
|
|
#define INIT_ORDER_RESEARCH 74
|
|
#define INIT_ORDER_QUIRKS 73
|
|
#define INIT_ORDER_JOBS 65
|
|
#define INIT_ORDER_PATH 61
|
|
#define INIT_ORDER_TICKER 55
|
|
#define INIT_ORDER_MAPPING 50
|
|
#define INIT_ORDER_EARLY_ASSETS 48
|
|
#define INIT_ORDER_ECONOMY 40
|
|
#define INIT_ORDER_OUTPUTS 35
|
|
#define INIT_ORDER_ATOMS 30
|
|
#define INIT_ORDER_LANGUAGE 25
|
|
#define INIT_ORDER_MACHINES 20
|
|
#define INIT_ORDER_CIRCUIT 15
|
|
#define INIT_ORDER_TIMER 1
|
|
#define INIT_ORDER_DEFAULT 0
|
|
#define INIT_ORDER_AIR_MACHINERY -0.5
|
|
#define INIT_ORDER_AIR -1
|
|
#define INIT_ORDER_PERSISTENCE -2
|
|
#define INIT_ORDER_PERSISTENT_PAINTINGS -3 // Assets relies on this
|
|
#define INIT_ORDER_VOTE -4 // Needs to be after persistence so that recent maps are not loaded. (yogs: technically not, since we don't have map blocking like tg does)
|
|
#define INIT_ORDER_ASSETS -5
|
|
#define INIT_ORDER_ICON_SMOOTHING -6
|
|
#define INIT_ORDER_OVERLAY -7
|
|
#define INIT_ORDER_XKEYSCORE -10
|
|
#define INIT_ORDER_STICKY_BAN -10
|
|
#define INIT_ORDER_ECHELON -10
|
|
#define INIT_ORDER_LIGHTING -20
|
|
#define INIT_ORDER_SHUTTLE -21
|
|
#define INIT_ORDER_BACKROOMS -30 // relies on basically everything to be initialized first
|
|
#define INIT_ORDER_MINOR_MAPPING -40
|
|
#define INIT_ORDER_BLUESPACE_LOCKER -45
|
|
#define INIT_ORDER_DISCORD -60
|
|
#define INIT_ORDER_EXPLOSIONS -69
|
|
#define INIT_ORDER_STATPANELS -97
|
|
#define INIT_ORDER_INIT_PROFILER -98 //Near the end, logs the costs of initialize
|
|
#define INIT_ORDER_DEMO -99 // To avoid a bunch of changes related to initialization being written, do this last
|
|
#define INIT_ORDER_CHAT -100 //Should be last to ensure chat remains smooth during init.
|
|
|
|
// Subsystem fire priority, from lowest to highest priority
|
|
// If the subsystem isn't listed here it's either DEFAULT or PROCESS (if it's a processing subsystem child)
|
|
|
|
#define FIRE_PRIORITY_AMBIENCE 10
|
|
#define FIRE_PRIORITY_IDLE_NPC 10
|
|
#define FIRE_PRIORITY_SERVER_MAINT 10
|
|
#define FIRE_PRIORITY_RESEARCH 10
|
|
#define FIRE_PRIORITY_VIS 10
|
|
#define FIRE_PRIORITY_GARBAGE 15
|
|
#define FIRE_PRIORITY_ECHOLOCATION 15
|
|
#define FIRE_PRIORITY_WET_FLOORS 20
|
|
#define FIRE_PRIORITY_FLUIDS 20
|
|
#define FIRE_PRIORITY_AIR 20
|
|
#define FIRE_PRIORITY_NPC 20
|
|
#define FIRE_PRIORITY_PROCESS 25
|
|
#define FIRE_PRIORITY_THROWING 25
|
|
#define FIRE_PRIORITY_SPACEDRIFT 30
|
|
#define FIRE_PRIORITY_FIELDS 30
|
|
#define FIRE_PRIORITY_SMOOTHING 35
|
|
#define FIRE_PRIORITY_OBJ 40
|
|
#define FIRE_PRIORITY_MECHA 40
|
|
#define FIRE_PRIORITY_ACID 40
|
|
#define FIRE_PRIORITY_BURNING 40
|
|
#define FIRE_PRIORITY_DEFAULT 50
|
|
#define FIRE_PRIORITY_PARALLAX 65
|
|
#define FIRE_PRIORITY_INSTRUMENTS 80
|
|
#define FIRE_PRIORITY_CALLBACKS 90
|
|
#define FIRE_PRIORITY_MOBS 100
|
|
#define FIRE_PRIORITY_ASSETS 105
|
|
#define FIRE_PRIORITY_TGUI 110
|
|
#define FIRE_PRIORITY_TICKER 200
|
|
#define FIRE_PRIORITY_ATMOS_ADJACENCY 300
|
|
#define FIRE_PRIORITY_CHAT 400
|
|
#define FIRE_PRIORITY_RUNECHAT 410
|
|
#define FIRE_PRIORITY_OVERLAYS 500
|
|
#define FIRE_PRIORITY_EXPLOSIONS 666
|
|
#define FIRE_PRIORITY_TIMER 700
|
|
#define FIRE_PRIORITY_INPUT 1000 // This must always always be the max highest priority. Player input must never be lost.
|
|
|
|
// SS runlevels
|
|
|
|
#define RUNLEVEL_LOBBY (1<<0)
|
|
#define RUNLEVEL_SETUP (1<<1)
|
|
#define RUNLEVEL_GAME (1<<2)
|
|
#define RUNLEVEL_POSTGAME (1<<3)
|
|
|
|
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
|
|
|
|
//SSticker.current_state values
|
|
/// Game is loading
|
|
#define GAME_STATE_STARTUP 0
|
|
/// Game is loaded and in pregame lobby
|
|
#define GAME_STATE_PREGAME 1
|
|
/// Game is attempting to start the round
|
|
#define GAME_STATE_SETTING_UP 2
|
|
/// Game has round in progress
|
|
#define GAME_STATE_PLAYING 3
|
|
/// Game has round finished
|
|
#define GAME_STATE_FINISHED 4
|
|
|
|
// Used for SSticker.force_ending
|
|
/// Default, round is not being forced to end.
|
|
#define END_ROUND_AS_NORMAL 0
|
|
/// End the round now as normal
|
|
#define FORCE_END_ROUND 1
|
|
/// For admin forcing roundend, can be used to distinguish the two
|
|
#define ADMIN_FORCE_END_ROUND 2
|
|
|
|
// SSair run section
|
|
#define SSAIR_PIPENETS 1
|
|
#define SSAIR_ATMOSMACHINERY 2
|
|
#define SSAIR_EXCITEDGROUPS 3
|
|
#define SSAIR_HIGHPRESSURE 4
|
|
#define SSAIR_HOTSPOTS 5
|
|
#define SSAIR_TURF_CONDUCTION 6
|
|
#define SSAIR_REBUILD_PIPENETS 7
|
|
#define SSAIR_EQUALIZE 8
|
|
#define SSAIR_ACTIVETURFS 9
|
|
#define SSAIR_TURF_POST_PROCESS 10
|
|
#define SSAIR_FINALIZE_TURFS 11
|
|
#define SSAIR_ATMOSMACHINERY_AIR 12
|
|
#define SSAIR_DEFERRED_AIRS 13
|
|
|
|
//Pipeline rebuild helper defines, these suck but it'll do for now //Fools you actually merged it
|
|
#define SSAIR_REBUILD_PIPELINE 1
|
|
#define SSAIR_REBUILD_QUEUE 2
|
|
|
|
// Truly disgusting, TG. Truly disgusting.
|
|
//! ## Overlays subsystem
|
|
|
|
#define POST_OVERLAY_CHANGE(changed_on) \
|
|
if(length(changed_on.overlays) >= MAX_ATOM_OVERLAYS) { \
|
|
var/text_lays = overlays2text(changed_on.overlays); \
|
|
stack_trace("Too many overlays on [changed_on.type] - [length(changed_on.overlays)], refusing to update and cutting.\
|
|
\n What follows is a printout of all existing overlays at the time of the overflow \n[text_lays]"); \
|
|
changed_on.overlays.Cut(); \
|
|
changed_on.add_overlay(mutable_appearance('icons/Testing/greyscale_error.dmi')); \
|
|
} \
|
|
if(alternate_appearances) { \
|
|
for(var/I in changed_on.alternate_appearances){\
|
|
var/datum/atom_hud/alternate_appearance/AA = changed_on.alternate_appearances[I];\
|
|
if(AA.transfer_overlays){\
|
|
AA.copy_overlays(changed_on, TRUE);\
|
|
}\
|
|
} \
|
|
}\
|
|
if(isturf(changed_on)){SSdemo.mark_turf(changed_on);}\
|
|
if(isobj(changed_on) || ismob(changed_on)){SSdemo.mark_dirty(changed_on);}\
|
|
|
|
/**
|
|
Create a new timer and add it to the queue.
|
|
* Arguments:
|
|
* * callback the callback to call on timer finish
|
|
* * wait deciseconds to run the timer for
|
|
* * flags flags for this timer, see: code\__DEFINES\subsystems.dm
|
|
* * timer_subsystem the subsystem to insert this timer into
|
|
*/
|
|
#define addtimer(args...) _addtimer(args, file = __FILE__, line = __LINE__)
|
|
|
|
// Explosion Subsystem subtasks
|
|
#define SSEXPLOSIONS_MOVABLES 1
|
|
#define SSEXPLOSIONS_TURFS 2
|
|
#define SSEXPLOSIONS_THROWS 3
|
|
|
|
// Subsystem delta times or tickrates, in seconds. I.e, how many seconds in between each process() call for objects being processed by that subsystem.
|
|
// Only use these defines if you want to access some other objects processing delta_time, otherwise use the delta_time that is sent as a parameter to process()
|
|
#define SSFLUIDS_DT (SSplumbing.wait/10)
|
|
#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"
|
|
|
|
|
|
// Wardrobe subsystem tasks
|
|
#define SSWARDROBE_STOCK 1
|
|
#define SSWARDROBE_INSPECT 2
|
|
|
|
//Wardrobe cache metadata indexes
|
|
#define WARDROBE_CACHE_COUNT 1
|
|
#define WARDROBE_CACHE_LAST_INSPECT 2
|
|
#define WARDROBE_CACHE_CALL_INSERT 3
|
|
#define WARDROBE_CACHE_CALL_REMOVAL 4
|
|
|
|
//Wardrobe preloaded stock indexes
|
|
#define WARDROBE_STOCK_CONTENTS 1
|
|
#define WARDROBE_STOCK_CALL_INSERT 2
|
|
#define WARDROBE_STOCK_CALL_REMOVAL 3
|
|
|
|
//Wardrobe callback master list indexes
|
|
#define WARDROBE_CALLBACK_INSERT 1
|
|
#define WARDROBE_CALLBACK_REMOVE 2
|
|
|
|
// Vote subsystem counting methods
|
|
/// First past the post. One selection per person, and the selection with the most votes wins.
|
|
#define VOTE_COUNT_METHOD_SINGLE 1
|
|
/// Approval voting. Any number of selections per person, and the selection with the most votes wins.
|
|
#define VOTE_COUNT_METHOD_MULTI 2
|
|
|
|
///liquid defines
|
|
#define SSLIQUIDS_RUN_TYPE_TURFS 1
|
|
#define SSLIQUIDS_RUN_TYPE_GROUPS 2
|
|
#define SSLIQUIDS_RUN_TYPE_IMMUTABLES 3
|
|
#define SSLIQUIDS_RUN_TYPE_EVAPORATION 4
|
|
#define SSLIQUIDS_RUN_TYPE_FIRE 5
|
|
#define SSLIQUIDS_RUN_TYPE_OCEAN 6
|
|
#define SSLIQUIDS_RUN_TYPE_TEMPERATURE 7
|
|
#define SSLIQUIDS_RUN_TYPE_CACHED_EDGES 8
|