Fix conflicts

This commit is contained in:
Lzimann
2017-04-07 09:12:36 -03:00
825 changed files with 5432 additions and 6063 deletions
+22 -22
View File
@@ -38,8 +38,8 @@
MAP_JOB_CHECK
total_positions = 3
spawn_positions = 3
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons, access_forensics_lockers)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons, access_forensics_lockers)
access = list(GLOB.access_security, GLOB.access_sec_doors, GLOB.access_brig, GLOB.access_armory, GLOB.access_court, GLOB.access_maint_tunnels, GLOB.access_morgue, GLOB.access_weapons, GLOB.access_forensics_lockers)
minimal_access = list(GLOB.access_security, GLOB.access_sec_doors, GLOB.access_brig, GLOB.access_armory, GLOB.access_court, GLOB.access_maint_tunnels, GLOB.access_morgue, GLOB.access_weapons, GLOB.access_forensics_lockers)
/datum/outfit/job/officer/New()
..()
@@ -49,8 +49,8 @@
/datum/job/detective/New()
..()
MAP_JOB_CHECK
access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons, access_forensics_lockers)
minimal_access = list(access_security, access_sec_doors, access_brig, access_armory, access_court, access_maint_tunnels, access_morgue, access_weapons, access_forensics_lockers)
access = list(GLOB.access_security, GLOB.access_sec_doors, GLOB.access_brig, GLOB.access_armory, GLOB.access_court, GLOB.access_maint_tunnels, GLOB.access_morgue, GLOB.access_weapons, GLOB.access_forensics_lockers)
minimal_access = list(GLOB.access_security, GLOB.access_sec_doors, GLOB.access_brig, GLOB.access_armory, GLOB.access_court, GLOB.access_maint_tunnels, GLOB.access_morgue, GLOB.access_weapons, GLOB.access_forensics_lockers)
/datum/outfit/job/detective/New()
..()
@@ -65,8 +65,8 @@
selection_color = "#ffffff"
total_positions = 3
spawn_positions = 3
access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
minimal_access = list(access_medical, access_morgue, access_surgery, access_chemistry, access_virology, access_genetics)
access = list(GLOB.access_medical, GLOB.access_morgue, GLOB.access_surgery, GLOB.access_chemistry, GLOB.access_virology, GLOB.access_genetics)
minimal_access = list(GLOB.access_medical, GLOB.access_morgue, GLOB.access_surgery, GLOB.access_chemistry, GLOB.access_virology, GLOB.access_genetics)
//Engineering
@@ -75,8 +75,8 @@
MAP_JOB_CHECK
total_positions = 2
spawn_positions = 2
access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_tcomsat)
minimal_access = list(access_eva, access_engine, access_engine_equip, access_tech_storage, access_maint_tunnels, access_external_airlocks, access_construction, access_atmospherics, access_tcomsat)
access = list(GLOB.access_eva, GLOB.access_engine, GLOB.access_engine_equip, GLOB.access_tech_storage, GLOB.access_maint_tunnels, GLOB.access_external_airlocks, GLOB.access_construction, GLOB.access_atmospherics, GLOB.access_tcomsat)
minimal_access = list(GLOB.access_eva, GLOB.access_engine, GLOB.access_engine_equip, GLOB.access_tech_storage, GLOB.access_maint_tunnels, GLOB.access_external_airlocks, GLOB.access_construction, GLOB.access_atmospherics, GLOB.access_tcomsat)
/datum/outfit/job/engineer/New()
..()
@@ -96,8 +96,8 @@
MAP_JOB_CHECK
total_positions = 3
spawn_positions = 3
access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_mineral_storeroom, access_tech_storage)
minimal_access = list(access_robotics, access_tox, access_tox_storage, access_research, access_xenobiology, access_mineral_storeroom, access_tech_storage)
access = list(GLOB.access_robotics, GLOB.access_tox, GLOB.access_tox_storage, GLOB.access_research, GLOB.access_xenobiology, GLOB.access_mineral_storeroom, GLOB.access_tech_storage)
minimal_access = list(GLOB.access_robotics, GLOB.access_tox, GLOB.access_tox_storage, GLOB.access_research, GLOB.access_xenobiology, GLOB.access_mineral_storeroom, GLOB.access_tech_storage)
//Cargo
@@ -106,16 +106,16 @@
MAP_JOB_CHECK
total_positions = 2
spawn_positions = 2
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_mineral_storeroom)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_mineral_storeroom)
access = list(GLOB.access_maint_tunnels, GLOB.access_mailsorting, GLOB.access_cargo, GLOB.access_cargo_bot, GLOB.access_qm, GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
minimal_access = list(GLOB.access_maint_tunnels, GLOB.access_mailsorting, GLOB.access_cargo, GLOB.access_cargo_bot, GLOB.access_qm, GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
/datum/job/mining/New()
..()
MAP_JOB_CHECK
total_positions = 2
spawn_positions = 2
access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_mineral_storeroom)
minimal_access = list(access_maint_tunnels, access_mailsorting, access_cargo, access_cargo_bot, access_qm, access_mining, access_mining_station, access_mineral_storeroom)
access = list(GLOB.access_maint_tunnels, GLOB.access_mailsorting, GLOB.access_cargo, GLOB.access_cargo_bot, GLOB.access_qm, GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
minimal_access = list(GLOB.access_maint_tunnels, GLOB.access_mailsorting, GLOB.access_cargo, GLOB.access_cargo_bot, GLOB.access_qm, GLOB.access_mining, GLOB.access_mining_station, GLOB.access_mineral_storeroom)
/datum/outfit/job/mining/New()
..()
@@ -126,27 +126,27 @@
/datum/job/bartender/New()
..()
MAP_JOB_CHECK
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_weapons)
minimal_access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_weapons)
access = list(GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_weapons)
minimal_access = list(GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_weapons)
/datum/job/cook/New()
..()
MAP_JOB_CHECK
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_weapons)
minimal_access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_weapons)
access = list(GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_weapons)
minimal_access = list(GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_weapons)
/datum/job/hydro/New()
..()
MAP_JOB_CHECK
access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_maint_tunnels)
minimal_access = list(access_hydroponics, access_bar, access_kitchen, access_morgue, access_maint_tunnels)
access = list(GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_maint_tunnels)
minimal_access = list(GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_maint_tunnels)
// they get maint access because of all the hydro content in maint
/datum/job/janitor/New()
..()
MAP_JOB_CHECK
access = list(access_janitor, access_hydroponics, access_bar, access_kitchen, access_morgue, access_maint_tunnels)
minimal_access = list(access_janitor, access_hydroponics, access_bar, access_kitchen, access_morgue, access_maint_tunnels)
access = list(GLOB.access_janitor, GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_maint_tunnels)
minimal_access = list(GLOB.access_janitor, GLOB.access_hydroponics, GLOB.access_bar, GLOB.access_kitchen, GLOB.access_morgue, GLOB.access_maint_tunnels)
//Civilian
+6 -6
View File
@@ -3,20 +3,20 @@
/datum/job/hos/New()
..()
MAP_JOB_CHECK
access += access_crematorium
minimal_access += access_crematorium
access += GLOB.access_crematorium
minimal_access += GLOB.access_crematorium
/datum/job/warden/New()
..()
MAP_JOB_CHECK
access += access_crematorium
minimal_access += access_crematorium
access += GLOB.access_crematorium
minimal_access += GLOB.access_crematorium
/datum/job/officer/New()
..()
MAP_JOB_CHECK
access += access_crematorium
minimal_access += access_crematorium
access += GLOB.access_crematorium
minimal_access += GLOB.access_crematorium
MAP_REMOVE_JOB(librarian)
MAP_REMOVE_JOB(lawyer)
+37
View File
@@ -0,0 +1,37 @@
//See controllers/globals.dm
#define GLOBAL_MANAGED(X, InitValue)\
/datum/controller/global_vars/proc/InitGlobal##X(){\
##X = ##InitValue;\
gvars_datum_init_order += #X;\
}
#define GLOBAL_UNMANAGED(X, InitValue) /datum/controller/global_vars/proc/InitGlobal##X()
#ifndef TESTING
#define GLOBAL_PROTECT(X)\
/datum/controller/global_vars/InitGlobal##X(){\
..();\
gvars_datum_protected_varlist += #X;\
}
#else
#define GLOBAL_PROTECT(X)
#endif
#define GLOBAL_REAL(X, Typepath) var/global##Typepath/##X
#define GLOBAL_RAW(X) /datum/controller/global_vars/var/global##X
#define GLOBAL_VAR_INIT(X, InitValue) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, InitValue)
#define GLOBAL_VAR_CONST(X, InitValue) GLOBAL_RAW(/const/##X) = InitValue; GLOBAL_UNMANAGED(X, InitValue)
#define GLOBAL_LIST_INIT(X, InitValue) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, InitValue)
#define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list())
#define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue)
#define GLOBAL_VAR(X) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, null)
#define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, null)
#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, null)
+3 -3
View File
@@ -1,4 +1,4 @@
#define MC_TICK_CHECK ( ( world.tick_usage > CURRENT_TICKLIMIT || src.state != SS_RUNNING ) ? pause() : 0 )
#define MC_TICK_CHECK ( ( world.tick_usage > GLOB.CURRENT_TICKLIMIT || src.state != SS_RUNNING ) ? pause() : 0 )
// Used to smooth out costs to try and avoid oscillation.
#define MC_AVERAGE_FAST(average, current) (0.7 * (average) + 0.3 * (current))
#define MC_AVERAGE(average, current) (0.8 * (average) + 0.2 * (current))
@@ -52,14 +52,14 @@
#define SS_SLEEPING 4 //fire() slept.
#define SS_PAUSING 5 //in the middle of pausing
#define SUBSYSTEM_DEF(X) var/datum/controller/subsystem/##X/SS##X;\
#define SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/##X);\
/datum/controller/subsystem/##X/New(){\
NEW_SS_GLOBAL(SS##X);\
PreInit();\
}\
/datum/controller/subsystem/##X
#define PROCESSING_SUBSYSTEM_DEF(X) var/datum/controller/subsystem/processing/##X/SS##X;\
#define PROCESSING_SUBSYSTEM_DEF(X) GLOBAL_REAL(SS##X, /datum/controller/subsystem/processing/##X);\
/datum/controller/subsystem/processing/##X/New(){\
NEW_SS_GLOBAL(SS##X);\
PreInit();\
+11 -11
View File
@@ -5,17 +5,17 @@
#define REPLICANT_ALLOY "replicant_alloy"
#define HIEROPHANT_ANSIBLE "hierophant_ansible"
var/global/clockwork_construction_value = 0 //The total value of all structures built by the clockwork cult
var/global/clockwork_caches = 0 //How many clockwork caches exist in the world (not each individual)
var/global/clockwork_daemons = 0 //How many daemons exist in the world
var/global/list/clockwork_generals_invoked = list("nezbere" = FALSE, "sevtug" = FALSE, "nzcrentr" = FALSE, "inath-neq" = FALSE) //How many generals have been recently invoked
var/global/list/all_clockwork_objects = list() //All clockwork items, structures, and effects in existence
var/global/list/all_clockwork_mobs = list() //All clockwork SERVANTS (not creatures) in existence
var/global/list/clockwork_component_cache = list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0) //The pool of components that caches draw from
var/global/ratvar_awakens = 0 //If Ratvar has been summoned; not a boolean, for proper handling of multiple Ratvars
var/global/nezbere_invoked = 0 //If Nezbere has been invoked; not a boolean, for proper handling of multiple Nezberes
var/global/clockwork_gateway_activated = FALSE //if a gateway to the celestial derelict has ever been successfully activated
var/global/list/all_scripture = list() //a list containing scripture instances; not used to track existing scripture
GLOBAL_VAR_INIT(clockwork_construction_value, 0) //The total value of all structures built by the clockwork cult
GLOBAL_VAR_INIT(clockwork_caches, 0) //How many clockwork caches exist in the world (not each individual)
GLOBAL_VAR_INIT(clockwork_daemons, 0) //How many daemons exist in the world
GLOBAL_LIST_INIT(clockwork_generals_invoked, list("nezbere" = FALSE, "sevtug" = FALSE, "nzcrentr" = FALSE, "inath-neq" = FALSE)) //How many generals have been recently invoked
GLOBAL_LIST_EMPTY(all_clockwork_objects) //All clockwork items, structures, and effects in existence
GLOBAL_LIST_EMPTY(all_clockwork_mobs) //All clockwork SERVANTS (not creatures) in existence
GLOBAL_LIST_INIT(clockwork_component_cache, list(BELLIGERENT_EYE = 0, VANGUARD_COGWHEEL = 0, GEIS_CAPACITOR = 0, REPLICANT_ALLOY = 0, HIEROPHANT_ANSIBLE = 0)) //The pool of components that caches draw from
GLOBAL_VAR_INIT(ratvar_awakens, 0) //If Ratvar has been summoned; not a boolean, for proper handling of multiple Ratvars
GLOBAL_VAR_INIT(nezbere_invoked, 0) //If Nezbere has been invoked; not a boolean, for proper handling of multiple Nezberes
GLOBAL_VAR_INIT(clockwork_gateway_activated, FALSE) //if a gateway to the celestial derelict has ever been successfully activated
GLOBAL_LIST_EMPTY(all_scripture) //a list containing scripture instances; not used to track existing scripture
//Scripture tiers and requirements; peripherals should never be used
#define SCRIPTURE_PERIPHERAL "Peripheral"
+3 -3
View File
@@ -122,13 +122,13 @@
#define isorgan(A) (istype(A, /obj/item/organ))
var/list/static/global/pointed_types = typecacheof(list(
GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
/obj/item/weapon/pen,
/obj/item/weapon/screwdriver,
/obj/item/weapon/reagent_containers/syringe,
/obj/item/weapon/kitchen/fork))
/obj/item/weapon/kitchen/fork)))
#define is_pointed(W) (is_type_in_typecache(W, pointed_types))
#define is_pointed(W) (is_type_in_typecache(W, GLOB.pointed_types))
#define isbodypart(A) (istype(A, /obj/item/bodypart))
+43
View File
@@ -0,0 +1,43 @@
#define ENGSEC (1<<0)
#define CAPTAIN (1<<0)
#define HOS (1<<1)
#define WARDEN (1<<2)
#define DETECTIVE (1<<3)
#define OFFICER (1<<4)
#define CHIEF (1<<5)
#define ENGINEER (1<<6)
#define ATMOSTECH (1<<7)
#define ROBOTICIST (1<<8)
#define AI_JF (1<<9)
#define CYBORG (1<<10)
#define MEDSCI (1<<1)
#define RD_JF (1<<0)
#define SCIENTIST (1<<1)
#define CHEMIST (1<<2)
#define CMO_JF (1<<3)
#define DOCTOR (1<<4)
#define GENETICIST (1<<5)
#define VIROLOGIST (1<<6)
#define CIVILIAN (1<<2)
#define HOP (1<<0)
#define BARTENDER (1<<1)
#define BOTANIST (1<<2)
#define COOK (1<<3)
#define JANITOR (1<<4)
#define LIBRARIAN (1<<5)
#define QUARTERMASTER (1<<6)
#define CARGOTECH (1<<7)
#define MINER (1<<8)
#define LAWYER (1<<9)
#define CHAPLAIN (1<<10)
#define CLOWN (1<<11)
#define MIME (1<<12)
#define ASSISTANT (1<<13)
+3
View File
@@ -63,3 +63,6 @@
#define PROGRAM_STATE_KILLED 0
#define PROGRAM_STATE_BACKGROUND 1
#define PROGRAM_STATE_ACTIVE 2
#define FIREDOOR_OPEN 1
#define FIREDOOR_CLOSED 2
+1 -1
View File
@@ -22,4 +22,4 @@
//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
#define MIDNIGHT_ROLLOVER_CHECK ( rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : midnight_rollovers )
#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
+6 -6
View File
@@ -182,7 +182,7 @@
//Key:
//"entered-[blood_state]-[dir_of_image]"
//or: "exited-[blood_state]-[dir_of_image]"
var/list/bloody_footprints_cache = list()
GLOBAL_LIST_EMPTY(bloody_footprints_cache)
//Bloody shoes/footprints
#define MAX_SHOE_BLOODINESS 100
@@ -247,7 +247,7 @@ var/list/bloody_footprints_cache = list()
#define GHOST_ACCS_DEFAULT_OPTION GHOST_ACCS_FULL
var/global/list/ghost_accs_options = list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST_ACCS_FULL) //So save files can be sanitized properly.
GLOBAL_LIST_INIT(ghost_accs_options, list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST_ACCS_FULL)) //So save files can be sanitized properly.
#define GHOST_OTHERS_SIMPLE 1
#define GHOST_OTHERS_DEFAULT_SPRITE 50
@@ -263,7 +263,7 @@ var/global/list/ghost_accs_options = list(GHOST_ACCS_NONE, GHOST_ACCS_DIR, GHOST
#define GHOST_MAX_VIEW_RANGE_MEMBER 14
var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING) //Same as ghost_accs_options.
GLOBAL_LIST_INIT(ghost_others_options, list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DEFAULT_SPRITE, GHOST_OTHERS_THEIR_SETTING)) //Same as ghost_accs_options.
//Color Defines
#define OOC_COLOR "#002eb8"
@@ -326,9 +326,9 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects"
//debug printing macros
#define debug_world(msg) if (Debug2) to_chat(world, "DEBUG: [msg]")
#define debug_admins(msg) if (Debug2) to_chat(admins, "DEBUG: [msg]")
#define debug_world_log(msg) if (Debug2) log_world("DEBUG: [msg]")
#define debug_world(msg) if (GLOB.Debug2) to_chat(world, "DEBUG: [msg]")
#define debug_admins(msg) if (GLOB.Debug2) to_chat(GLOB.admins, "DEBUG: [msg]")
#define debug_world_log(msg) if (GLOB.Debug2) log_world("DEBUG: [msg]")
#define COORD(A) "([A.x],[A.y],[A.z])"
#define INCREMENT_TALLY(L, stat) if(L[stat]){L[stat]++}else{L[stat] = 1}
+10 -1
View File
@@ -107,4 +107,13 @@
#define INDIVIDUAL_SAY_LOG "Say log"
#define INDIVIDUAL_EMOTE_LOG "Emote log"
#define INDIVIDUAL_OOC_LOG "OOC log"
#define INDIVIDUAL_SHOW_ALL_LOG "All logs"
#define INDIVIDUAL_SHOW_ALL_LOG "All logs"
#define TK_MAXRANGE 15
#define NO_SLIP_WHEN_WALKING 1
#define SLIDE 2
#define GALOSHES_DONT_HELP 4
#define SLIDE_ICE 8
#define MAX_CHICKENS 50
+7 -1
View File
@@ -3,4 +3,10 @@
#define GAS 3
#define OPENCONTAINER 4096 // is an open container for chemistry purposes
#define TRANSPARENT 8192 //Used for non-open containers which you still want to be able to see the reagents off.
#define TRANSPARENT 8192 //Used for non-open containers which you still want to be able to see the reagents off.
#define TOUCH 1 //splashing
#define INGEST 2 //ingestion
#define VAPOR 3 //foam, spray, blob attack
#define PATCH 4 //patches
#define INJECT 5 //injection
+2 -2
View File
@@ -28,7 +28,7 @@
//Missing assignment means it's not a gamemode specific role, IT'S NOT A BUG OR ERROR.
//The gamemode specific ones are just so the gamemodes can query whether a player is old enough
//(in game days played) to play that role
var/global/list/special_roles = list(
GLOBAL_LIST_INIT(special_roles, list(
ROLE_TRAITOR = /datum/game_mode/traitor,
ROLE_OPERATIVE = /datum/game_mode/nuclear,
ROLE_CHANGELING = /datum/game_mode/changeling,
@@ -47,7 +47,7 @@ var/global/list/special_roles = list(
ROLE_DEVIL = /datum/game_mode/devil,
ROLE_SERVANT_OF_RATVAR = /datum/game_mode/clockwork_cult,
ROLE_BORER,
)
))
//Job defines for what happens when you fail to qualify for any job during job selection
#define BEASSISTANT 1
+3 -1
View File
@@ -43,4 +43,6 @@
#define HYPERSPACE_WARMUP 1
#define HYPERSPACE_LAUNCH 2
#define HYPERSPACE_END 3
#define HYPERSPACE_END 3
#define CALL_SHUTTLE_REASON_LENGTH 12
+1 -1
View File
@@ -5,4 +5,4 @@
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED
#define CHANNEL_HIGHEST_AVAILABLE 1021
#define CHANNEL_HIGHEST_AVAILABLE 1021
+1 -1
View File
@@ -3,5 +3,5 @@
#define TICK_LIMIT_MC 70
#define TICK_LIMIT_MC_INIT_DEFAULT 98
#define TICK_CHECK ( world.tick_usage > CURRENT_TICKLIMIT )
#define TICK_CHECK ( world.tick_usage > GLOB.CURRENT_TICKLIMIT )
#define CHECK_TICK if TICK_CHECK stoplag()
+1 -1
View File
@@ -281,7 +281,7 @@
//Specifically for record datums in a list.
/proc/sortRecord(list/L, field = "name", order = 1)
cmp_field = field
GLOB.cmp_field = field
return sortTim(L, order >= 0 ? /proc/cmp_records_asc : /proc/cmp_records_dsc)
//any value in a list
+19 -19
View File
@@ -18,15 +18,15 @@
#endif
/proc/log_admin(text)
admin_log.Add(text)
GLOB.admin_log.Add(text)
if (config.log_admin)
diary << "\[[time_stamp()]]ADMIN: [text]"
GLOB.diary << "\[[time_stamp()]]ADMIN: [text]"
//Items using this proc are stripped from public logs - use with caution
/proc/log_admin_private(text)
admin_log.Add(text)
GLOB.admin_log.Add(text)
if (config.log_admin)
diary << "\[[time_stamp()]]ADMINPRIVATE: [text]"
GLOB.diary << "\[[time_stamp()]]ADMINPRIVATE: [text]"
/proc/log_adminsay(text)
if (config.log_adminchat)
@@ -38,65 +38,65 @@
/proc/log_game(text)
if (config.log_game)
diary << "\[[time_stamp()]]GAME: [text]"
GLOB.diary << "\[[time_stamp()]]GAME: [text]"
/proc/log_vote(text)
if (config.log_vote)
diary << "\[[time_stamp()]]VOTE: [text]"
GLOB.diary << "\[[time_stamp()]]VOTE: [text]"
/proc/log_access(text)
if (config.log_access)
diary << "\[[time_stamp()]]ACCESS: [text]"
GLOB.diary << "\[[time_stamp()]]ACCESS: [text]"
/proc/log_say(text)
if (config.log_say)
diary << "\[[time_stamp()]]SAY: [text]"
GLOB.diary << "\[[time_stamp()]]SAY: [text]"
/proc/log_prayer(text)
if (config.log_prayer)
diary << "\[[time_stamp()]]PRAY: [text]"
GLOB.diary << "\[[time_stamp()]]PRAY: [text]"
/proc/log_law(text)
if (config.log_law)
diary << "\[[time_stamp()]]LAW: [text]"
GLOB.diary << "\[[time_stamp()]]LAW: [text]"
/proc/log_ooc(text)
if (config.log_ooc)
diary << "\[[time_stamp()]]OOC: [text]"
GLOB.diary << "\[[time_stamp()]]OOC: [text]"
/proc/log_whisper(text)
if (config.log_whisper)
diary << "\[[time_stamp()]]WHISPER: [text]"
GLOB.diary << "\[[time_stamp()]]WHISPER: [text]"
/proc/log_emote(text)
if (config.log_emote)
diary << "\[[time_stamp()]]EMOTE: [text]"
GLOB.diary << "\[[time_stamp()]]EMOTE: [text]"
/proc/log_attack(text)
if (config.log_attack)
diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
GLOB.diaryofmeanpeople << "\[[time_stamp()]]ATTACK: [text]"
/proc/log_pda(text)
if (config.log_pda)
diary << "\[[time_stamp()]]PDA: [text]"
GLOB.diary << "\[[time_stamp()]]PDA: [text]"
/proc/log_comment(text)
if (config.log_pda)
//reusing the PDA option because I really don't think news comments are worth a config option
diary << "\[[time_stamp()]]COMMENT: [text]"
GLOB.diary << "\[[time_stamp()]]COMMENT: [text]"
/proc/log_chat(text)
if (config.log_pda)
diary << "\[[time_stamp()]]CHAT: [text]"
GLOB.diary << "\[[time_stamp()]]CHAT: [text]"
/proc/log_sql(text)
if(config.sql_enabled)
diary << "\[[time_stamp()]]SQL: [text]"
GLOB.diary << "\[[time_stamp()]]SQL: [text]"
//This replaces world.log so it displays both in DD and the file
/proc/log_world(text)
if(config && config.log_runtimes)
world.log = runtime_diary
world.log = GLOB.runtime_diary
world.log << text
world.log = null
world.log << text
+12 -12
View File
@@ -2,15 +2,15 @@
#define pick_list_replacements(FILE, KEY) (strings_replacement(FILE, KEY))
#define json_load(FILE) (json_decode(file2text(FILE)))
var/global/list/string_cache
var/global/string_filename_current_key
GLOBAL_LIST(string_cache)
GLOBAL_VAR(string_filename_current_key)
/proc/strings_replacement(filename, key)
load_strings_file(filename)
if((filename in string_cache) && (key in string_cache[filename]))
var/response = pick(string_cache[filename][key])
if((filename in GLOB.string_cache) && (key in GLOB.string_cache[filename]))
var/response = pick(GLOB.string_cache[filename][key])
var/regex/r = regex("@pick\\((\\D+?)\\)", "g")
response = r.Replace(response, /proc/strings_subkey_lookup)
return response
@@ -19,23 +19,23 @@ var/global/string_filename_current_key
/proc/strings(filename as text, key as text)
load_strings_file(filename)
if((filename in string_cache) && (key in string_cache[filename]))
return string_cache[filename][key]
if((filename in GLOB.string_cache) && (key in GLOB.string_cache[filename]))
return GLOB.string_cache[filename][key]
else
CRASH("strings list not found: strings/[filename], index=[key]")
/proc/strings_subkey_lookup(match, group1)
return pick_list(string_filename_current_key, group1)
return pick_list(GLOB.string_filename_current_key, group1)
/proc/load_strings_file(filename)
string_filename_current_key = filename
if(filename in string_cache)
GLOB.string_filename_current_key = filename
if(filename in GLOB.string_cache)
return //no work to do
if(!string_cache)
string_cache = new
if(!GLOB.string_cache)
GLOB.string_cache = new
if(fexists("strings/[filename]"))
string_cache[filename] = json_load("strings/[filename]")
GLOB.string_cache[filename] = json_load("strings/[filename]")
else
CRASH("file not found: strings/[filename]")
+1 -1
View File
@@ -2,7 +2,7 @@
/client/proc/join_date_check(y,m,d)
var/DBQuery/query_datediff = dbcon.NewQuery("SELECT DATEDIFF(Now(),'[y]-[m]-[d]')")
var/DBQuery/query_datediff = GLOB.dbcon.NewQuery("SELECT DATEDIFF(Now(),'[y]-[m]-[d]')")
if(!query_datediff.Execute())
return FALSE
+3 -3
View File
@@ -16,12 +16,12 @@
/proc/cmp_name_dsc(atom/a, atom/b)
return sorttext(a.name, b.name)
var/cmp_field = "name"
GLOBAL_VAR_INIT(cmp_field, "name")
/proc/cmp_records_asc(datum/data/record/a, datum/data/record/b)
return sorttext(b.fields[cmp_field], a.fields[cmp_field])
return sorttext(b.fields[GLOB.cmp_field], a.fields[GLOB.cmp_field])
/proc/cmp_records_dsc(datum/data/record/a, datum/data/record/b)
return sorttext(a.fields[cmp_field], b.fields[cmp_field])
return sorttext(a.fields[GLOB.cmp_field], b.fields[GLOB.cmp_field])
/proc/cmp_ckey_asc(client/a, client/b)
return sorttext(b.ckey, a.ckey)
+2 -2
View File
@@ -51,11 +51,11 @@
PLEASE USE RESPONSIBLY, Some log files can reach sizes of 4MB! */
/client/proc/file_spam_check()
var/time_to_wait = fileaccess_timer - world.time
var/time_to_wait = GLOB.fileaccess_timer - world.time
if(time_to_wait > 0)
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [round(time_to_wait/10)] seconds.</font>")
return 1
fileaccess_timer = world.time + FTPDELAY
GLOB.fileaccess_timer = world.time + FTPDELAY
return 0
#undef FTPDELAY
+15 -15
View File
@@ -76,7 +76,7 @@
/proc/alone_in_area(area/the_area, mob/must_be_alone, check_type = /mob/living/carbon)
var/area/our_area = get_area(the_area)
for(var/C in living_mob_list)
for(var/C in GLOB.living_mob_list)
if(!istype(C, check_type))
continue
if(C == must_be_alone)
@@ -301,12 +301,12 @@
/proc/try_move_adjacent(atom/movable/AM)
var/turf/T = get_turf(AM)
for(var/direction in cardinal)
for(var/direction in GLOB.cardinal)
if(AM.Move(get_step(T, direction)))
break
/proc/get_mob_by_key(key)
for(var/mob/M in mob_list)
for(var/mob/M in GLOB.mob_list)
if(M.ckey == lowertext(key))
return M
return null
@@ -317,7 +317,7 @@
var/list/candidates = list()
// Keep looping until we find a non-afk candidate within the time bracket (we limit the bracket to 10 minutes (6000))
while(!candidates.len && afk_bracket < 6000)
for(var/mob/dead/observer/G in player_list)
for(var/mob/dead/observer/G in GLOB.player_list)
if(G.client != null)
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
if(!G.client.is_afk(afk_bracket) && (be_special_type in G.client.prefs.be_special))
@@ -358,8 +358,8 @@
/proc/get_active_player_count(var/alive_check = 0, var/afk_check = 0, var/human_check = 0)
// Get active players who are playing in the round
var/active_players = 0
for(var/i = 1; i <= player_list.len; i++)
var/mob/M = player_list[i]
for(var/i = 1; i <= GLOB.player_list.len; i++)
var/mob/M = GLOB.player_list[i]
if(M && M.client)
if(alive_check && M.stat)
continue
@@ -431,10 +431,10 @@
if(2)
to_chat(G, "<span class='danger'>Choice registered: No.</span>")
if(3)
var/list/L = poll_ignore[ignore_category]
var/list/L = GLOB.poll_ignore[ignore_category]
if(!L)
poll_ignore[ignore_category] = list()
poll_ignore[ignore_category] += G.ckey
GLOB.poll_ignore[ignore_category] = list()
GLOB.poll_ignore[ignore_category] += G.ckey
to_chat(G, "<span class='danger'>Choice registered: Never for this round.</span>")
/proc/pollCandidates(var/Question, var/jobbanType, var/datum/game_mode/gametypeCheck, var/be_special_flag = 0, var/poll_time = 300, var/ignore_category = null, flashwindow = TRUE)
@@ -443,8 +443,8 @@
if (!Question)
Question = "Would you like to be a special role?"
for(var/mob/dead/observer/G in player_list)
if(!G.key || !G.client || (ignore_category && poll_ignore[ignore_category] && G.ckey in poll_ignore[ignore_category]))
for(var/mob/dead/observer/G in GLOB.player_list)
if(!G.key || !G.client || (ignore_category && GLOB.poll_ignore[ignore_category] && G.ckey in GLOB.poll_ignore[ignore_category]))
continue
if(be_special_flag)
if(!(G.client.prefs) || !(be_special_flag in G.client.prefs.be_special))
@@ -490,7 +490,7 @@
return
//First we spawn a dude.
var/mob/living/carbon/human/new_character = new(pick(latejoin))//The mob being spawned.
var/mob/living/carbon/human/new_character = new(pick(GLOB.latejoin))//The mob being spawned.
G_found.client.prefs.copy_to(new_character)
new_character.dna.update_dna_identity()
@@ -499,7 +499,7 @@
return new_character
/proc/send_to_playing_players(thing) //sends a whatever to all playing players; use instead of to_chat(world, where needed)
for(var/M in player_list)
for(var/M in GLOB.player_list)
if(M && !isnewplayer(M))
to_chat(M, thing)
@@ -520,12 +520,12 @@
[character.real_name]</span> ([rank]) has arrived at the station at \
<span class='name'>[A.name]</span>.</span>"
deadchat_broadcast(message, follow_target = character, message_type=DEADCHAT_ARRIVALRATTLE)
if((!announcement_systems.len) || (!character.mind))
if((!GLOB.announcement_systems.len) || (!character.mind))
return
if((character.mind.assigned_role == "Cyborg") || (character.mind.assigned_role == character.mind.special_role))
return
var/obj/machinery/announcement_system/announcer = pick(announcement_systems)
var/obj/machinery/announcement_system/announcer = pick(GLOB.announcement_systems)
announcer.announce("ARRIVAL", character.real_name, rank, list()) //make the list empty to make it announce it in common
/proc/GetRedPart(const/hexa)
+27 -27
View File
@@ -4,60 +4,60 @@
/proc/make_datum_references_lists()
//hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, hair_styles_list, hair_styles_male_list, hair_styles_female_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
//facial hair
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, facial_hair_styles_list, facial_hair_styles_male_list, facial_hair_styles_female_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
//underwear
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, underwear_list, underwear_m, underwear_f)
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
//undershirt
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, undershirt_list, undershirt_m, undershirt_f)
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
//socks
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, socks_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
//lizard bodyparts (blizzard intensifies)
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, body_markings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, tails_list_lizard)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, animated_tails_list_lizard)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, tails_list_human)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, animated_tails_list_human)
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, snouts_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns, horns_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, ears_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, wings_open_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, frills_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, animated_spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, legs_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, r_wings_list,roundstart = TRUE)
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/lizard, GLOB.animated_tails_list_lizard)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails_animated/human, GLOB.animated_tails_list_human)
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns,GLOB.horns_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.ears_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings_open, GLOB.wings_open_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines_animated, GLOB.animated_spines_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.r_wings_list,roundstart = TRUE)
//Species
for(var/spath in subtypesof(/datum/species))
var/datum/species/S = new spath()
if(S.roundstart)
roundstart_species[S.id] = S.type
species_list[S.id] = S.type
GLOB.roundstart_species[S.id] = S.type
GLOB.species_list[S.id] = S.type
//Surgeries
for(var/path in subtypesof(/datum/surgery))
surgeries_list += new path()
GLOB.surgeries_list += new path()
//Materials
for(var/path in subtypesof(/datum/material))
var/datum/material/D = new path()
materials_list[D.id] = D
GLOB.materials_list[D.id] = D
//Techs
for(var/path in subtypesof(/datum/tech))
var/datum/tech/D = new path()
tech_list[D.id] = D
GLOB.tech_list[D.id] = D
//Emotes
for(var/path in subtypesof(/datum/emote))
var/datum/emote/E = new path()
emote_list[E.key] = E
E.emote_list[E.key] = E
init_subtypes(/datum/crafting_recipe, crafting_recipes)
init_subtypes(/datum/crafting_recipe, GLOB.crafting_recipes)
/* // Uncomment to debug chemical reaction list.
/client/verb/debug_chemical_list()
+1 -1
View File
@@ -67,7 +67,7 @@
if(AM.can_be_unanchored && !AM.anchored)
return 0
for(var/direction in cardinal)
for(var/direction in GLOB.cardinal)
AM = find_type_in_direction(A, direction)
if(AM == NULLTURF_BORDER)
if((A.smooth & SMOOTH_BORDER))
+8 -9
View File
@@ -15,7 +15,7 @@ CHANGING ICONS
Several new procs have been added to the /icon datum to simplify working with icons. To use them,
remember you first need to setup an /icon var like so:
var/icon/my_icon = new('iconfile.dmi')
GLOBAL_DATUM_INIT(my_icon, /icon, new('iconfile.dmi'))
icon/ChangeOpacity(amount = 1)
A very common operation in DM is to try to make an icon more or less transparent. Making an icon more
@@ -872,18 +872,18 @@ The _flatIcons list is a cache for generated icon files.
qdel(atom_icon)
return text_image
var/global/list/friendly_animal_types = list()
GLOBAL_LIST_EMPTY(friendly_animal_types)
// Pick a random animal instead of the icon, and use that instead
/proc/getRandomAnimalImage(atom/A)
if(!friendly_animal_types.len)
if(!GLOB.friendly_animal_types.len)
for(var/T in typesof(/mob/living/simple_animal))
var/mob/living/simple_animal/SA = T
if(initial(SA.gold_core_spawnable) == 2)
friendly_animal_types += SA
GLOB.friendly_animal_types += SA
var/mob/living/simple_animal/SA = pick(friendly_animal_types)
var/mob/living/simple_animal/SA = pick(GLOB.friendly_animal_types)
var/icon = initial(SA.icon)
var/icon_state = initial(SA.icon_state)
@@ -943,9 +943,9 @@ var/global/list/friendly_animal_types = list()
return J
return 0
var/global/list/humanoid_icon_cache = list()
//For creating consistent icons for human looking simple animals
/proc/get_flat_human_icon(var/icon_id,var/outfit,var/datum/preferences/prefs)
var/static/list/humanoid_icon_cache = list()
if(!icon_id || !humanoid_icon_cache[icon_id])
var/mob/living/carbon/human/dummy/body = new()
@@ -988,13 +988,12 @@ var/global/list/humanoid_icon_cache = list()
/image/proc/setDir(newdir)
dir = newdir
// Used to make the frozen item visuals for Freon.
var/list/freeze_item_icons = list()
/atom/proc/freeze_icon_index()
return "\ref[initial(icon)]-[initial(icon_state)]"
/obj/proc/make_frozen_visual()
// Used to make the frozen item visuals for Freon.
var/static/list/freeze_item_icons = list()
if(!HAS_SECONDARY_FLAG(src, FROZEN) && (initial(icon) && initial(icon_state)))
var/index = freeze_icon_index()
var/icon/IC
+5 -5
View File
@@ -1,13 +1,13 @@
// Credits to Nickr5 for the useful procs I've taken from his library resource.
var/const/E = 2.71828183
var/const/Sqrt2 = 1.41421356
GLOBAL_VAR_INIT(E, 2.71828183)
GLOBAL_VAR_INIT(Sqrt2, 1.41421356)
// List of square roots for the numbers 1-100.
var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10)
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10))
/proc/sign(x)
return x!=0?x/abs(x):0
@@ -150,9 +150,9 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
//68% chance that the number is within 1stddev
//95% chance that the number is within 2stddev
//98% chance that the number is within 3stddev...etc
var/gaussian_next
#define ACCURACY 10000
/proc/gaussian(mean, stddev)
var/static/gaussian_next
var/R1;var/R2;var/working
if(gaussian_next != null)
R1 = gaussian_next
+50 -50
View File
@@ -21,81 +21,81 @@
return "000"
/proc/random_underwear(gender)
if(!underwear_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, underwear_list, underwear_m, underwear_f)
if(!GLOB.underwear_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/underwear, GLOB.underwear_list, GLOB.underwear_m, GLOB.underwear_f)
switch(gender)
if(MALE)
return pick(underwear_m)
return pick(GLOB.underwear_m)
if(FEMALE)
return pick(underwear_f)
return pick(GLOB.underwear_f)
else
return pick(underwear_list)
return pick(GLOB.underwear_list)
/proc/random_undershirt(gender)
if(!undershirt_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, undershirt_list, undershirt_m, undershirt_f)
if(!GLOB.undershirt_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/undershirt, GLOB.undershirt_list, GLOB.undershirt_m, GLOB.undershirt_f)
switch(gender)
if(MALE)
return pick(undershirt_m)
return pick(GLOB.undershirt_m)
if(FEMALE)
return pick(undershirt_f)
return pick(GLOB.undershirt_f)
else
return pick(undershirt_list)
return pick(GLOB.undershirt_list)
/proc/random_socks()
if(!socks_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, socks_list)
return pick(socks_list)
if(!GLOB.socks_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/socks, GLOB.socks_list)
return pick(GLOB.socks_list)
/proc/random_features()
if(!tails_list_human.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, tails_list_human)
if(!tails_list_lizard.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, tails_list_lizard)
if(!snouts_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, snouts_list)
if(!horns_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns, horns_list)
if(!ears_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, horns_list)
if(!frills_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, frills_list)
if(!spines_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, spines_list)
if(!legs_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, legs_list)
if(!body_markings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, body_markings_list)
if(!wings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, wings_list)
if(!GLOB.tails_list_human.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/human, GLOB.tails_list_human)
if(!GLOB.tails_list_lizard.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/lizard, GLOB.tails_list_lizard)
if(!GLOB.snouts_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/snouts, GLOB.snouts_list)
if(!GLOB.horns_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/horns, GLOB.horns_list)
if(!GLOB.ears_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/ears, GLOB.horns_list)
if(!GLOB.frills_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/frills, GLOB.frills_list)
if(!GLOB.spines_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/spines, GLOB.spines_list)
if(!GLOB.legs_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/legs, GLOB.legs_list)
if(!GLOB.body_markings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/body_markings, GLOB.body_markings_list)
if(!GLOB.wings_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/wings, GLOB.wings_list)
//For now we will always return none for tail_human and ears.
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "tail_lizard" = pick(tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(snouts_list), "horns" = pick(horns_list), "ears" = "None", "frills" = pick(frills_list), "spines" = pick(spines_list), "body_markings" = pick(body_markings_list), "legs" = "Normal Legs"))
return(list("mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"), "tail_lizard" = pick(GLOB.tails_list_lizard), "tail_human" = "None", "wings" = "None", "snout" = pick(GLOB.snouts_list), "horns" = pick(GLOB.horns_list), "ears" = "None", "frills" = pick(GLOB.frills_list), "spines" = pick(GLOB.spines_list), "body_markings" = pick(GLOB.body_markings_list), "legs" = "Normal Legs"))
/proc/random_hair_style(gender)
switch(gender)
if(MALE)
return pick(hair_styles_male_list)
return pick(GLOB.hair_styles_male_list)
if(FEMALE)
return pick(hair_styles_female_list)
return pick(GLOB.hair_styles_female_list)
else
return pick(hair_styles_list)
return pick(GLOB.hair_styles_list)
/proc/random_facial_hair_style(gender)
switch(gender)
if(MALE)
return pick(facial_hair_styles_male_list)
return pick(GLOB.facial_hair_styles_male_list)
if(FEMALE)
return pick(facial_hair_styles_female_list)
return pick(GLOB.facial_hair_styles_female_list)
else
return pick(facial_hair_styles_list)
return pick(GLOB.facial_hair_styles_list)
/proc/random_unique_name(gender, attempts_to_find_unique_name=10)
for(var/i=1, i<=attempts_to_find_unique_name, i++)
if(gender==FEMALE)
. = capitalize(pick(first_names_female)) + " " + capitalize(pick(last_names))
. = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
else
. = capitalize(pick(first_names_male)) + " " + capitalize(pick(last_names))
. = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
if(i != attempts_to_find_unique_name && !findname(.))
break
@@ -115,9 +115,9 @@
break
/proc/random_skin_tone()
return pick(skin_tones)
return pick(GLOB.skin_tones)
var/list/skin_tones = list(
GLOBAL_LIST_INIT(skin_tones, list(
"albino",
"caucasian1",
"caucasian2",
@@ -130,10 +130,10 @@ var/list/skin_tones = list(
"indian",
"african1",
"african2"
)
))
var/global/list/species_list[0]
var/global/list/roundstart_species[0]
GLOBAL_LIST_EMPTY(species_list)
GLOBAL_LIST_EMPTY(roundstart_species)
/proc/age2agedescription(age)
switch(age)
@@ -170,8 +170,8 @@ Proc for attack log creation, because really why not
/proc/add_logs(mob/user, mob/target, what_done, object=null, addition=null)
var/turf/attack_location = get_turf(target)
var/is_mob_user = user && typecache_mob[user.type]
var/is_mob_target = target && typecache_mob[target.type]
var/is_mob_user = user && GLOB.typecache_mob[user.type]
var/is_mob_target = target && GLOB.typecache_mob[target.type]
var/mob/living/living_target
@@ -393,7 +393,7 @@ Proc for attack log creation, because really why not
step(X, pick(NORTH, SOUTH, EAST, WEST))
/proc/deadchat_broadcast(message, mob/follow_target=null, turf/turf_target=null, speaker_key=null, message_type=DEADCHAT_REGULAR)
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
var/datum/preferences/prefs
if(M.client && M.client.prefs)
prefs = M.client.prefs
+31 -31
View File
@@ -2,15 +2,15 @@
/proc/lizard_name(gender)
if(gender == MALE)
return "[pick(lizard_names_male)]-[pick(lizard_names_male)]"
return "[pick(GLOB.lizard_names_male)]-[pick(GLOB.lizard_names_male)]"
else
return "[pick(lizard_names_female)]-[pick(lizard_names_female)]"
return "[pick(GLOB.lizard_names_female)]-[pick(GLOB.lizard_names_female)]"
/proc/plasmaman_name()
return "[pick(plasmaman_names)] \Roman[rand(1,99)]"
return "[pick(GLOB.plasmaman_names)] \Roman[rand(1,99)]"
var/church_name = null
/proc/church_name()
var/static/church_name
if (church_name)
return church_name
@@ -26,24 +26,24 @@ var/church_name = null
return name
var/command_name = null
GLOBAL_VAR(command_name)
/proc/command_name()
if (command_name)
return command_name
if (GLOB.command_name)
return GLOB.command_name
var/name = "Central Command"
command_name = name
GLOB.command_name = name
return name
/proc/change_command_name(name)
command_name = name
GLOB.command_name = name
return name
var/religion_name = null
/proc/religion_name()
var/static/religion_name
if (religion_name)
return religion_name
@@ -55,20 +55,20 @@ var/religion_name = null
return capitalize(name)
/proc/station_name()
if(station_name)
return station_name
if(GLOB.station_name)
return GLOB.station_name
if(config && config.station_name)
station_name = config.station_name
GLOB.station_name = config.station_name
else
station_name = new_station_name()
GLOB.station_name = new_station_name()
if(config && config.server_name)
world.name = "[config.server_name][config.server_name==station_name ? "" : ": [station_name]"]"
world.name = "[config.server_name][config.server_name==GLOB.station_name ? "" : ": [GLOB.station_name]"]"
else
world.name = station_name
world.name = GLOB.station_name
return station_name
return GLOB.station_name
/proc/new_station_name()
var/random = rand(1,5)
@@ -77,7 +77,7 @@ var/religion_name = null
//Rare: Pre-Prefix
if (prob(10))
name = pick(station_prefixes)
name = pick(GLOB.station_prefixes)
new_station_name = name + " "
name = ""
@@ -89,12 +89,12 @@ var/religion_name = null
name = holiday.getStationPrefix()
//get normal name
if(!name)
name = pick(station_names)
name = pick(GLOB.station_names)
if(name)
new_station_name += name + " "
// Suffix
name = pick(station_suffixes)
name = pick(GLOB.station_suffixes)
new_station_name += name + " "
// ID Number
@@ -102,19 +102,19 @@ var/religion_name = null
if(1)
new_station_name += "[rand(1, 99)]"
if(2)
new_station_name += pick(greek_letters)
new_station_name += pick(GLOB.greek_letters)
if(3)
new_station_name += "\Roman[rand(1,99)]"
if(4)
new_station_name += pick(phonetic_alphabet)
new_station_name += pick(GLOB.phonetic_alphabet)
if(5)
new_station_name += pick(numbers_as_words)
new_station_name += pick(GLOB.numbers_as_words)
if(13)
new_station_name += pick("13","XIII","Thirteen")
return new_station_name
var/syndicate_name = null
/proc/syndicate_name()
var/static/syndicate_name
if (syndicate_name)
return syndicate_name
@@ -145,8 +145,8 @@ var/syndicate_name = null
//Traitors and traitor silicons will get these. Revs will not.
var/syndicate_code_phrase//Code phrase for traitors.
var/syndicate_code_response//Code response for traitors.
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
/*
Should be expanded.
@@ -179,10 +179,10 @@ var/syndicate_code_response//Code response for traitors.
var/threats = strings(ION_FILE, "ionthreats")
var/foods = strings(ION_FILE, "ionfood")
var/drinks = strings(ION_FILE, "iondrinks")
var/list/locations = teleportlocs.len ? teleportlocs : drinks //if null, defaults to drinks instead.
var/list/locations = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks //if null, defaults to drinks instead.
var/list/names = list()
for(var/datum/data/record/t in data_core.general)//Picks from crew manifest.
for(var/datum/data/record/t in GLOB.data_core.general)//Picks from crew manifest.
names += t.fields["name"]
var/maxwords = words//Extra var to check for duplicates.
@@ -204,9 +204,9 @@ var/syndicate_code_response//Code response for traitors.
if(prob(10))
code_phrase += pick(lizard_name(MALE),lizard_name(FEMALE))
else
code_phrase += pick(pick(first_names_male,first_names_female))
code_phrase += pick(pick(GLOB.first_names_male,GLOB.first_names_female))
code_phrase += " "
code_phrase += pick(last_names)
code_phrase += pick(GLOB.last_names)
if(2)
code_phrase += pick(get_all_jobs())//Returns a job.
safety -= 1
@@ -241,4 +241,4 @@ var/syndicate_code_response//Code response for traitors.
world.name = "[config.server_name]: [designation]"
else
world.name = designation
station_name = designation
GLOB.station_name = designation
+4 -4
View File
@@ -8,9 +8,9 @@
if(toIndex <= 0)
toIndex += L.len + 1
sortInstance.L = L
sortInstance.cmp = cmp
sortInstance.associative = associative
GLOB.sortInstance.L = L
GLOB.sortInstance.cmp = cmp
GLOB.sortInstance.associative = associative
sortInstance.binarySort(fromIndex, toIndex, fromIndex)
GLOB.sortInstance.binarySort(fromIndex, toIndex, fromIndex)
return L
+4 -4
View File
@@ -8,9 +8,9 @@
if(toIndex <= 0)
toIndex += L.len + 1
sortInstance.L = L
sortInstance.cmp = cmp
sortInstance.associative = associative
sortInstance.mergeSort(fromIndex, toIndex)
GLOB.sortInstance.L = L
GLOB.sortInstance.cmp = cmp
GLOB.sortInstance.associative = associative
GLOB.sortInstance.mergeSort(fromIndex, toIndex)
return L
+4 -4
View File
@@ -8,10 +8,10 @@
if(toIndex <= 0)
toIndex += L.len + 1
sortInstance.L = L
sortInstance.cmp = cmp
sortInstance.associative = associative
GLOB.sortInstance.L = L
GLOB.sortInstance.cmp = cmp
GLOB.sortInstance.associative = associative
sortInstance.timSort(fromIndex, toIndex)
GLOB.sortInstance.timSort(fromIndex, toIndex)
return L
+1 -1
View File
@@ -9,7 +9,7 @@
#define MIN_GALLOP 7
//This is a global instance to allow much of this code to be reused. The interfaces are kept seperately
var/datum/sortInstance/sortInstance = new()
GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
/datum/sortInstance
//The array being sorted.
var/list/L
+8 -8
View File
@@ -15,11 +15,11 @@
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
/proc/sanitizeSQL(t)
var/sqltext = dbcon.Quote("[t]");
var/sqltext = GLOB.dbcon.Quote("[t]");
return copytext(sqltext, 2, lentext(sqltext));//Quote() adds quotes around input, we already do that
/proc/format_table_name(table as text)
return sqlfdbktableprefix + table
return GLOB.sqlfdbktableprefix + table
/*
* Text sanitization
@@ -334,10 +334,10 @@
new_text += copytext(text, i, i+1)
return new_text
var/list/zero_character_only = list("0")
var/list/hex_characters = list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f")
var/list/alphabet = list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z")
var/list/binary = list("0","1")
GLOBAL_LIST_INIT(zero_character_only, list("0"))
GLOBAL_LIST_INIT(hex_characters, list("0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"))
GLOBAL_LIST_INIT(alphabet, list("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"))
GLOBAL_LIST_INIT(binary, list("0","1"))
/proc/random_string(length, list/characters)
. = ""
for(var/i=1, i<=length, i++)
@@ -349,10 +349,10 @@ var/list/binary = list("0","1")
. += string
/proc/random_short_color()
return random_string(3, hex_characters)
return random_string(3, GLOB.hex_characters)
/proc/random_color()
return random_string(6, hex_characters)
return random_string(6, GLOB.hex_characters)
/proc/add_zero2(t, u)
var/temp1
+6 -6
View File
@@ -9,7 +9,7 @@
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
if(!wtime)
wtime = world.time
return time2text(wtime - timezoneOffset + SSticker.gametime_offset - round_start_time, format)
return time2text(wtime - GLOB.timezoneOffset + SSticker.gametime_offset - SSticker.round_start_time, format)
/* Returns 1 if it is the selected month and day */
/proc/isDay(month, day)
@@ -30,10 +30,10 @@
return time2text(timevar, "YYYY-MM-DD hh:mm:ss")
/var/midnight_rollovers = 0
/var/rollovercheck_last_timeofday = 0
GLOBAL_VAR_INIT(midnight_rollovers, 0)
GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
/proc/update_midnight_rollover()
if (world.timeofday < rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
return midnight_rollovers++
return midnight_rollovers
if (world.timeofday < GLOB.rollovercheck_last_timeofday) //TIME IS GOING BACKWARDS!
return GLOB.midnight_rollovers++
return GLOB.midnight_rollovers
-9
View File
@@ -337,15 +337,6 @@
return "[year][seperator][((month < 10) ? "0[month]" : month)][seperator][((day < 10) ? "0[day]" : day)]"
/*
var/list/test_times = list("December" = 1323522004, "August" = 1123522004, "January" = 1011522004,
"Jan Leap" = 946684800, "Jan Normal" = 978307200, "New Years Eve" = 1009670400,
"New Years" = 1009836000, "New Years 2" = 1041372000, "New Years 3" = 1104530400,
"July Month End" = 744161003, "July Month End 12" = 1343777003, "End July" = 1091311200)
for(var/t in test_times)
world.log << "TEST: [t] is [unix2date(test_times[t])]"
*/
/proc/isLeap(y)
return ((y) % 4 == 0 && ((y) % 100 != 0 || (y) % 400 == 0))
+52 -52
View File
@@ -200,17 +200,17 @@ Turf and target are seperate in case you want to teleport some distance from a t
else
switch(role)
if("clown")
newname = pick(clown_names)
newname = pick(GLOB.clown_names)
if("mime")
newname = pick(mime_names)
newname = pick(GLOB.mime_names)
if("ai")
newname = pick(ai_names)
newname = pick(GLOB.ai_names)
if("deity")
newname = pick(clown_names|ai_names|mime_names) //pick any old name
newname = pick(GLOB.clown_names|GLOB.ai_names|GLOB.mime_names) //pick any old name
else
return
for(var/mob/living/M in player_list)
for(var/mob/living/M in GLOB.player_list)
if(M == src)
continue
if(!newname || M.real_name == newname)
@@ -231,7 +231,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Returns a list of unslaved cyborgs
/proc/active_free_borgs()
. = list()
for(var/mob/living/silicon/robot/R in living_mob_list)
for(var/mob/living/silicon/robot/R in GLOB.living_mob_list)
if(R.connected_ai || R.shell)
continue
if(R.stat == DEAD)
@@ -243,7 +243,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Returns a list of AI's
/proc/active_ais(check_mind=0)
. = list()
for(var/mob/living/silicon/ai/A in living_mob_list)
for(var/mob/living/silicon/ai/A in GLOB.living_mob_list)
if(A.stat == DEAD)
continue
if(A.control_disabled == 1)
@@ -305,7 +305,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
pois[name] = M
if(!mobs_only)
for(var/atom/A in poi_list)
for(var/atom/A in GLOB.poi_list)
if(!A || !A.loc)
continue
pois[avoid_assoc_duplicate_keys(A.name, namecounts)] = A
@@ -314,7 +314,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Orders mobs by type then by name
/proc/sortmobs()
var/list/moblist = list()
var/list/sortmob = sortNames(mob_list)
var/list/sortmob = sortNames(GLOB.mob_list)
for(var/mob/living/silicon/ai/M in sortmob)
moblist.Add(M)
for(var/mob/camera/M in sortmob)
@@ -378,7 +378,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
else if(istext(whom))
key = whom
ckey = ckey(whom)
C = directory[ckey]
C = GLOB.directory[ckey]
if(C)
M = C.mob
else
@@ -583,16 +583,16 @@ Turf and target are seperate in case you want to teleport some distance from a t
//Repopulates sortedAreas list
/proc/SortAreas()
sortedAreas = list()
GLOB.sortedAreas = list()
for(var/area/A in world)
sortedAreas.Add(A)
GLOB.sortedAreas.Add(A)
sortTim(sortedAreas, /proc/cmp_name_asc)
sortTim(GLOB.sortedAreas, /proc/cmp_name_asc)
/area/proc/addSorted()
sortedAreas.Add(src)
sortTim(sortedAreas, /proc/cmp_name_asc)
GLOB.sortedAreas.Add(src)
sortTim(GLOB.sortedAreas, /proc/cmp_name_asc)
//Takes: Area type as text string or as typepath OR an instance of the area.
//Returns: A list of all areas of that type in the world.
@@ -608,12 +608,12 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/areas = list()
if(subtypes)
var/list/cache = typecacheof(areatype)
for(var/V in sortedAreas)
for(var/V in GLOB.sortedAreas)
var/area/A = V
if(cache[A.type])
areas += V
else
for(var/V in sortedAreas)
for(var/V in GLOB.sortedAreas)
var/area/A = V
if(A.type == areatype)
areas += V
@@ -633,7 +633,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/list/turfs = list()
if(subtypes)
var/list/cache = typecacheof(areatype)
for(var/V in sortedAreas)
for(var/V in GLOB.sortedAreas)
var/area/A = V
if(!cache[A.type])
continue
@@ -641,7 +641,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
if(target_z == 0 || target_z == T.z)
turfs += T
else
for(var/V in sortedAreas)
for(var/V in GLOB.sortedAreas)
var/area/A = V
if(A.type != areatype)
continue
@@ -763,9 +763,9 @@ Turf and target are seperate in case you want to teleport some distance from a t
//For objects that should embed, but make no sense being is_sharp or is_pointed()
//e.g: rods
var/list/can_embed_types = typecacheof(list(
GLOBAL_LIST_INIT(can_embed_types, typecacheof(list(
/obj/item/stack/rods,
/obj/item/pipe))
/obj/item/pipe)))
/proc/can_embed(obj/item/W)
if(W.is_sharp())
@@ -773,14 +773,14 @@ var/list/can_embed_types = typecacheof(list(
if(is_pointed(W))
return 1
if(is_type_in_typecache(W, can_embed_types))
if(is_type_in_typecache(W, GLOB.can_embed_types))
return 1
/*
Checks if that loc and dir has a item on the wall
*/
var/list/WALLITEMS = typecacheof(list(
GLOBAL_LIST_INIT(WALLITEMS, typecacheof(list(
/obj/machinery/power/apc, /obj/machinery/airalarm, /obj/item/device/radio/intercom,
/obj/structure/extinguisher_cabinet, /obj/structure/reagent_dispensers/peppertank,
/obj/machinery/status_display, /obj/machinery/requests_console, /obj/machinery/light_switch, /obj/structure/sign,
@@ -788,22 +788,22 @@ var/list/WALLITEMS = typecacheof(list(
/obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/simple_vent_controller,
/obj/item/weapon/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth,
/obj/structure/mirror, /obj/structure/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment
))
)))
var/list/WALLITEMS_EXTERNAL = typecacheof(list(
GLOBAL_LIST_INIT(WALLITEMS_EXTERNAL, typecacheof(list(
/obj/machinery/camera, /obj/structure/camera_assembly,
/obj/structure/light_construct, /obj/machinery/light))
/obj/structure/light_construct, /obj/machinery/light)))
var/list/WALLITEMS_INVERSE = typecacheof(list(
/obj/structure/light_construct, /obj/machinery/light))
GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
/obj/structure/light_construct, /obj/machinery/light)))
/proc/gotwallitem(loc, dir, var/check_external = 0)
var/locdir = get_step(loc, dir)
for(var/obj/O in loc)
if(is_type_in_typecache(O, WALLITEMS) && check_external != 2)
if(is_type_in_typecache(O, GLOB.WALLITEMS) && check_external != 2)
//Direction works sometimes
if(is_type_in_typecache(O, WALLITEMS_INVERSE))
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
if(O.dir == turn(dir, 180))
return 1
else if(O.dir == dir)
@@ -814,8 +814,8 @@ var/list/WALLITEMS_INVERSE = typecacheof(list(
if(get_turf_pixel(O) == locdir)
return 1
if(is_type_in_typecache(O, WALLITEMS_EXTERNAL) && check_external)
if(is_type_in_typecache(O, WALLITEMS_INVERSE))
if(is_type_in_typecache(O, GLOB.WALLITEMS_EXTERNAL) && check_external)
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
if(O.dir == turn(dir, 180))
return 1
else if(O.dir == dir)
@@ -823,7 +823,7 @@ var/list/WALLITEMS_INVERSE = typecacheof(list(
//Some stuff is placed directly on the wallturf (signs)
for(var/obj/O in locdir)
if(is_type_in_typecache(O, WALLITEMS) && check_external != 2)
if(is_type_in_typecache(O, GLOB.WALLITEMS) && check_external != 2)
if(O.pixel_x == 0 && O.pixel_y == 0)
return 1
return 0
@@ -845,7 +845,7 @@ var/list/WALLITEMS_INVERSE = typecacheof(list(
for(var/id in cached_gases)
var/gas_concentration = cached_gases[id][MOLES]/total_moles
if(id in hardcoded_gases || gas_concentration > 0.001) //ensures the four primary gases are always shown.
if(id in GLOB.hardcoded_gases || gas_concentration > 0.001) //ensures the four primary gases are always shown.
to_chat(user, "<span class='notice'>[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] %</span>")
to_chat(user, "<span class='notice'>Temperature: [round(air_contents.temperature-T0C)] &deg;C</span>")
@@ -871,14 +871,14 @@ var/list/WALLITEMS_INVERSE = typecacheof(list(
var/initial_chance = chance
while(steps > 0)
if(prob(chance))
step(AM, pick(alldirs))
step(AM, pick(GLOB.alldirs))
chance = max(chance - (initial_chance / steps), 0)
steps--
/proc/living_player_count()
var/living_player_count = 0
for(var/mob in player_list)
if(mob in living_mob_list)
for(var/mob in GLOB.player_list)
if(mob in GLOB.living_mob_list)
living_player_count += 1
return living_player_count
@@ -1188,7 +1188,7 @@ B --><-- A
/proc/get_areas_in_z(zlevel)
. = list()
var/validarea = FALSE
for(var/V in sortedAreas)
for(var/V in GLOB.sortedAreas)
var/area/A = V
validarea = TRUE
for(var/turf/T in A)
@@ -1254,7 +1254,7 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
. += round(i*DELTA_CALC)
sleep(i*world.tick_lag*DELTA_CALC)
i *= 2
while (world.tick_usage > min(TICK_LIMIT_TO_RUN, CURRENT_TICKLIMIT))
while (world.tick_usage > min(TICK_LIMIT_TO_RUN, GLOB.CURRENT_TICKLIMIT))
#undef DELTA_CALC
@@ -1313,19 +1313,19 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
else
. = ""
var/mob/dview/dview_mob = new
GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
//Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
if(!center)
return
dview_mob.loc = center
GLOB.dview_mob.loc = center
dview_mob.see_invisible = invis_flags
GLOB.dview_mob.see_invisible = invis_flags
. = view(range, dview_mob)
dview_mob.loc = null
. = view(range, GLOB.dview_mob)
GLOB.dview_mob.loc = null
/mob/dview
name = "INTERNAL DVIEW MOB"
@@ -1343,14 +1343,14 @@ var/mob/dview/dview_mob = new
return QDEL_HINT_LETMELIVE
log_world("EVACUATE THE SHITCODE IS TRYING TO STEAL MUH JOBS")
dview_mob = new
GLOB.dview_mob = new
return ..()
#define FOR_DVIEW(type, range, center, invis_flags) \
dview_mob.loc = center; \
dview_mob.see_invisible = invis_flags; \
for(type in view(range, dview_mob))
GLOB.dview_mob.loc = center; \
GLOB.dview_mob.see_invisible = invis_flags; \
for(type in view(range, GLOB.dview_mob))
//can a window be here, or is there a window blocking it?
/proc/valid_window_location(turf/T, dir_to_check)
@@ -1375,17 +1375,17 @@ var/mob/dview/dview_mob = new
//Set this to TRUE before calling
//This prevents RCEs from badmins
//kevinz000 if you touch this I will hunt you down
var/valid_HTTPSGet = FALSE
GLOBAL_VAR_INIT(valid_HTTPSGet, FALSE)
/proc/HTTPSGet(url)
if(findtext(url, "\""))
valid_HTTPSGet = FALSE
GLOB.valid_HTTPSGet = FALSE
if(!valid_HTTPSGet)
if(!GLOB.valid_HTTPSGet)
if(usr)
CRASH("[usr.ckey]([usr]) just attempted an invalid HTTPSGet on: [url]!")
else
CRASH("Invalid HTTPSGet call on: [url]")
valid_HTTPSGet = FALSE
GLOB.valid_HTTPSGet = FALSE
//"This has got to be the ugliest hack I have ever done"
//warning, here be dragons
+34 -27
View File
@@ -1,40 +1,47 @@
var/datum/configuration/config = null
GLOBAL_REAL(config, /datum/configuration)
var/host = null
var/join_motd = null
var/station_name = null
var/game_version = "/tg/ Station 13"
var/changelog_hash = ""
GLOBAL_DATUM_INIT(revdata, /datum/getrev, new)
var/ooc_allowed = 1 // used with admin verbs to disable ooc - not a config option apparently
var/dooc_allowed = 1
var/abandon_allowed = 1
var/enter_allowed = 1
var/guests_allowed = 1
var/shuttle_frozen = 0
var/shuttle_left = 0
var/tinted_weldhelh = 1
GLOBAL_VAR(host)
GLOBAL_VAR(join_motd)
GLOBAL_VAR(station_name)
GLOBAL_VAR_INIT(game_version, "/tg/ Station 13")
GLOBAL_VAR_INIT(changelog_hash, "")
GLOBAL_VAR_INIT(ooc_allowed, TRUE) // used with admin verbs to disable ooc - not a config option apparently
GLOBAL_VAR_INIT(dooc_allowed, TRUE)
GLOBAL_VAR_INIT(abandon_allowed, TRUE)
GLOBAL_VAR_INIT(enter_allowed, TRUE)
GLOBAL_VAR_INIT(guests_allowed, TRUE)
GLOBAL_VAR_INIT(shuttle_frozen, FALSE)
GLOBAL_VAR_INIT(shuttle_left, FALSE)
GLOBAL_VAR_INIT(tinted_weldhelh, TRUE)
// Debug is used exactly once (in living.dm) but is commented out in a lot of places. It is not set anywhere and only checked.
// Debug2 is used in conjunction with a lot of admin verbs and therefore is actually legit.
var/Debug = 0 // global debug switch
var/Debug2 = 0
GLOBAL_VAR_INIT(Debug, FALSE) // global debug switch
GLOBAL_VAR_INIT(Debug2, FALSE)
//Server API key
var/global/comms_key = "default_pwd"
var/global/comms_allowed = 0 //By default, the server does not allow messages to be sent to it, unless the key is strong enough (this is to prevent misconfigured servers from becoming vulnerable)
GLOBAL_VAR_INIT(comms_key, "default_pwd")
GLOBAL_PROTECT(comms_key)
GLOBAL_VAR_INIT(comms_allowed, FALSE) //By default, the server does not allow messages to be sent to it, unless the key is strong enough (this is to prevent misconfigured servers from becoming vulnerable)
GLOBAL_PROTECT(comms_allowed)
var/global/medal_hub = null
var/global/medal_pass = " "
var/global/medals_enabled = TRUE //will be auto set to false if the game fails contacting the medal hub to prevent unneeded calls.
GLOBAL_VAR(medal_hub)
GLOBAL_PROTECT(medal_hub)
GLOBAL_VAR_INIT(medal_pass, " ")
GLOBAL_PROTECT(medal_pass)
GLOBAL_VAR_INIT(medals_enabled, TRUE) //will be auto set to false if the game fails contacting the medal hub to prevent unneeded calls.
GLOBAL_PROTECT(medals_enabled)
//This was a define, but I changed it to a variable so it can be changed in-game.(kept the all-caps definition because... code...) -Errorage
var/MAX_EX_DEVESTATION_RANGE = 3
var/MAX_EX_HEAVY_RANGE = 7
var/MAX_EX_LIGHT_RANGE = 14
var/MAX_EX_FLASH_RANGE = 14
var/MAX_EX_FLAME_RANGE = 14
var/DYN_EX_SCALE = 0.5
GLOBAL_VAR_INIT(MAX_EX_DEVESTATION_RANGE, 3)
GLOBAL_VAR_INIT(MAX_EX_HEAVY_RANGE, 7)
GLOBAL_VAR_INIT(MAX_EX_LIGHT_RANGE, 14)
GLOBAL_VAR_INIT(MAX_EX_FLASH_RANGE, 14)
GLOBAL_VAR_INIT(MAX_EX_FLAME_RANGE, 14)
GLOBAL_VAR_INIT(DYN_EX_SCALE, 0.5)
+14 -7
View File
@@ -1,12 +1,19 @@
// MySQL configuration
var/sqladdress = "localhost"
var/sqlport = "3306"
var/sqlfdbkdb = "test"
var/sqlfdbklogin = "root"
var/sqlfdbkpass = ""
var/sqlfdbktableprefix = "erro_" //backwords compatibility with downstream server hosts
GLOBAL_VAR_INIT(sqladdress, "localhost")
GLOBAL_PROTECT(sqladdress)
GLOBAL_VAR_INIT(sqlport, "3306")
GLOBAL_PROTECT(sqlport)
GLOBAL_VAR_INIT(sqlfdbkdb, "test")
GLOBAL_PROTECT(sqlfdbkdb)
GLOBAL_VAR_INIT(sqlfdbklogin, "root")
GLOBAL_PROTECT(sqlfdbklogin)
GLOBAL_VAR_INIT(sqlfdbkpass, "")
GLOBAL_PROTECT(sqlfdbkpass)
GLOBAL_VAR_INIT(sqlfdbktableprefix, "erro_") //backwords compatibility with downstream server hosts
GLOBAL_PROTECT(sqlfdbktableprefix)
//Database connections
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
var/DBConnection/dbcon = new() //Feedback database (New database)
GLOBAL_DATUM_INIT(dbcon, /DBConnection, new) //Feedback database (New database)
GLOBAL_PROTECT(dbcon)
+4 -4
View File
@@ -1,5 +1,5 @@
var/master_mode = "traitor"//"extended"
var/secret_force_mode = "secret" // if this is anything but "secret", the secret rotation will forceably choose this mode
GLOBAL_VAR_INIT(master_mode, "traitor") //"extended"
GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode
var/wavesecret = 0 // meteor mode, delays wave progression, terrible name
var/datum/station_state/start_state = null // Used in round-end report
GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name
GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report
+23 -23
View File
@@ -1,28 +1,28 @@
//////////////
var/NEARSIGHTBLOCK = 0
var/EPILEPSYBLOCK = 0
var/COUGHBLOCK = 0
var/TOURETTESBLOCK = 0
var/NERVOUSBLOCK = 0
var/BLINDBLOCK = 0
var/DEAFBLOCK = 0
var/HULKBLOCK = 0
var/TELEBLOCK = 0
var/FIREBLOCK = 0
var/XRAYBLOCK = 0
var/CLUMSYBLOCK = 0
var/STRANGEBLOCK = 0
var/RACEBLOCK = 0
GLOBAL_VAR_INIT(NEARSIGHTBLOCK, 0)
GLOBAL_VAR_INIT(EPILEPSYBLOCK, 0)
GLOBAL_VAR_INIT(COUGHBLOCK, 0)
GLOBAL_VAR_INIT(TOURETTESBLOCK, 0)
GLOBAL_VAR_INIT(NERVOUSBLOCK, 0)
GLOBAL_VAR_INIT(BLINDBLOCK, 0)
GLOBAL_VAR_INIT(DEAFBLOCK, 0)
GLOBAL_VAR_INIT(HULKBLOCK, 0)
GLOBAL_VAR_INIT(TELEBLOCK, 0)
GLOBAL_VAR_INIT(FIREBLOCK, 0)
GLOBAL_VAR_INIT(XRAYBLOCK, 0)
GLOBAL_VAR_INIT(CLUMSYBLOCK, 0)
GLOBAL_VAR_INIT(STRANGEBLOCK, 0)
GLOBAL_VAR_INIT(RACEBLOCK, 0)
var/list/bad_se_blocks
var/list/good_se_blocks
var/list/op_se_blocks
GLOBAL_LIST(bad_se_blocks)
GLOBAL_LIST(good_se_blocks)
GLOBAL_LIST(op_se_blocks)
var/NULLED_SE
var/NULLED_UI
GLOBAL_VAR(NULLED_SE)
GLOBAL_VAR(NULLED_UI)
var/list/global_mutations = list() // list of hidden mutation things
GLOBAL_LIST_EMPTY(global_mutations) // list of hidden mutation things
var/list/bad_mutations = list()
var/list/good_mutations = list()
var/list/not_good_mutations = list()
GLOBAL_LIST_EMPTY(bad_mutations)
GLOBAL_LIST_EMPTY(good_mutations)
GLOBAL_LIST_EMPTY(not_good_mutations)
+52 -52
View File
@@ -1,44 +1,44 @@
//Preferences stuff
//Hairstyles
var/global/list/hair_styles_list = list() //stores /datum/sprite_accessory/hair indexed by name
var/global/list/hair_styles_male_list = list() //stores only hair names
var/global/list/hair_styles_female_list = list() //stores only hair names
var/global/list/facial_hair_styles_list = list() //stores /datum/sprite_accessory/facial_hair indexed by name
var/global/list/facial_hair_styles_male_list = list() //stores only hair names
var/global/list/facial_hair_styles_female_list = list() //stores only hair names
GLOBAL_LIST_EMPTY(hair_styles_list) //stores /datum/sprite_accessory/hair indexed by name
GLOBAL_LIST_EMPTY(hair_styles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(hair_styles_female_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hair_styles_list) //stores /datum/sprite_accessory/facial_hair indexed by name
GLOBAL_LIST_EMPTY(facial_hair_styles_male_list) //stores only hair names
GLOBAL_LIST_EMPTY(facial_hair_styles_female_list) //stores only hair names
//Underwear
var/global/list/underwear_list = list() //stores /datum/sprite_accessory/underwear indexed by name
var/global/list/underwear_m = list() //stores only underwear name
var/global/list/underwear_f = list() //stores only underwear name
GLOBAL_LIST_EMPTY(underwear_list) //stores /datum/sprite_accessory/underwear indexed by name
GLOBAL_LIST_EMPTY(underwear_m) //stores only underwear name
GLOBAL_LIST_EMPTY(underwear_f) //stores only underwear name
//Undershirts
var/global/list/undershirt_list = list() //stores /datum/sprite_accessory/undershirt indexed by name
var/global/list/undershirt_m = list() //stores only undershirt name
var/global/list/undershirt_f = list() //stores only undershirt name
GLOBAL_LIST_EMPTY(undershirt_list) //stores /datum/sprite_accessory/undershirt indexed by name
GLOBAL_LIST_EMPTY(undershirt_m) //stores only undershirt name
GLOBAL_LIST_EMPTY(undershirt_f) //stores only undershirt name
//Socks
var/global/list/socks_list = list() //stores /datum/sprite_accessory/socks indexed by name
GLOBAL_LIST_EMPTY(socks_list) //stores /datum/sprite_accessory/socks indexed by name
//Lizard Bits (all datum lists indexed by name)
var/global/list/body_markings_list = list()
var/global/list/tails_list_lizard = list()
var/global/list/animated_tails_list_lizard = list()
var/global/list/snouts_list = list()
var/global/list/horns_list = list()
var/global/list/frills_list = list()
var/global/list/spines_list = list()
var/global/list/legs_list = list()
var/global/list/animated_spines_list = list()
GLOBAL_LIST_EMPTY(body_markings_list)
GLOBAL_LIST_EMPTY(tails_list_lizard)
GLOBAL_LIST_EMPTY(animated_tails_list_lizard)
GLOBAL_LIST_EMPTY(snouts_list)
GLOBAL_LIST_EMPTY(horns_list)
GLOBAL_LIST_EMPTY(frills_list)
GLOBAL_LIST_EMPTY(spines_list)
GLOBAL_LIST_EMPTY(legs_list)
GLOBAL_LIST_EMPTY(animated_spines_list)
//Mutant Human bits
var/global/list/tails_list_human = list()
var/global/list/animated_tails_list_human = list()
var/global/list/ears_list = list()
var/global/list/wings_list = list()
var/global/list/wings_open_list = list()
var/global/list/r_wings_list = list()
GLOBAL_LIST_EMPTY(tails_list_human)
GLOBAL_LIST_EMPTY(animated_tails_list_human)
GLOBAL_LIST_EMPTY(ears_list)
GLOBAL_LIST_EMPTY(wings_list)
GLOBAL_LIST_EMPTY(wings_open_list)
GLOBAL_LIST_EMPTY(r_wings_list)
var/global/list/ghost_forms_with_directions_list = list("ghost") //stores the ghost forms that support directional sprites
var/global/list/ghost_forms_with_accessories_list = list("ghost") //stores the ghost forms that support hair and other such things
GLOBAL_LIST_INIT(ghost_forms_with_directions_list, list("ghost")) //stores the ghost forms that support directional sprites
GLOBAL_LIST_INIT(ghost_forms_with_accessories_list, list("ghost")) //stores the ghost forms that support hair and other such things
var/global/list/security_depts_prefs = list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY)
GLOBAL_LIST_INIT(security_depts_prefs, list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_DEPT_ENGINEERING, SEC_DEPT_MEDICAL, SEC_DEPT_SCIENCE, SEC_DEPT_SUPPLY))
//Backpacks
#define GBACKPACK "Grey Backpack"
@@ -48,21 +48,21 @@ var/global/list/security_depts_prefs = list(SEC_DEPT_RANDOM, SEC_DEPT_NONE, SEC_
#define DBACKPACK "Department Backpack"
#define DSATCHEL "Department Satchel"
#define DDUFFLEBAG "Department Dufflebag"
var/global/list/backbaglist = list(DBACKPACK, DSATCHEL, DDUFFLEBAG, GBACKPACK, GSATCHEL, GDUFFLEBAG, LSATCHEL)
GLOBAL_LIST_INIT(backbaglist, list(DBACKPACK, DSATCHEL, DDUFFLEBAG, GBACKPACK, GSATCHEL, GDUFFLEBAG, LSATCHEL))
//Uplink spawn loc
#define UPLINK_PDA "PDA"
#define UPLINK_RADIO "Radio"
#define UPLINK_PEN "Pen" //like a real spy!
var/global/list/uplink_spawn_loc_list = list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN)
GLOBAL_LIST_INIT(uplink_spawn_loc_list, list(UPLINK_PDA, UPLINK_RADIO, UPLINK_PEN))
//Female Uniforms
var/global/list/female_clothing_icons = list()
GLOBAL_LIST_EMPTY(female_clothing_icons)
//radical shit
var/list/hit_appends = list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF")
GLOBAL_LIST_INIT(hit_appends, list("-OOF", "-ACK", "-UGH", "-HRNK", "-HURGH", "-GLORF"))
var/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
GLOBAL_LIST_INIT(scarySounds, list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.ogg','sound/weapons/armbomb.ogg','sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg','sound/voice/hiss5.ogg','sound/voice/hiss6.ogg','sound/effects/Glassbr1.ogg','sound/effects/Glassbr2.ogg','sound/effects/Glassbr3.ogg','sound/items/Welder.ogg','sound/items/Welder2.ogg','sound/machines/airlock.ogg','sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg'))
// Reference list for disposal sort junctions. Set the sortType variable on disposal sort junctions to
@@ -96,23 +96,23 @@ var/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons/Taser.
23 Genetics
*/
var/list/TAGGERLOCATIONS = list("Disposals",
GLOBAL_LIST_INIT(TAGGERLOCATIONS, list("Disposals",
"Cargo Bay", "QM Office", "Engineering", "CE Office",
"Atmospherics", "Security", "HoS Office", "Medbay",
"CMO Office", "Chemistry", "Research", "RD Office",
"Robotics", "HoP Office", "Library", "Chapel", "Theatre",
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics")
"Bar", "Kitchen", "Hydroponics", "Janitor Closet","Genetics"))
var/global/list/guitar_notes = flist("sound/guitar/")
GLOBAL_LIST_INIT(guitar_notes, flist("sound/guitar/"))
var/global/list/station_prefixes = list("", "Imperium", "Heretical", "Cuban",
GLOBAL_LIST_INIT(station_prefixes, list("", "Imperium", "Heretical", "Cuban",
"Psychic", "Elegant", "Common", "Uncommon", "Rare", "Unique",
"Houseruled", "Religious", "Atheist", "Traditional", "Houseruled",
"Mad", "Super", "Ultra", "Secret", "Top Secret", "Deep", "Death",
"Zybourne", "Central", "Main", "Government", "Uoi", "Fat",
"Automated", "Experimental", "Augmented")
"Automated", "Experimental", "Augmented"))
var/global/list/station_names = list("", "Stanford", "Dorf", "Alium",
GLOBAL_LIST_INIT(station_names, list("", "Stanford", "Dorf", "Alium",
"Prefix", "Clowning", "Aegis", "Ishimura", "Scaredy", "Death-World",
"Mime", "Honk", "Rogue", "MacRagge", "Ultrameens", "Safety", "Paranoia",
"Explosive", "Neckbear", "Donk", "Muppet", "North", "West", "East",
@@ -124,9 +124,9 @@ var/global/list/station_names = list("", "Stanford", "Dorf", "Alium",
"System", "Mining", "Neckbeard", "Research", "Supply", "Military",
"Orbital", "Battle", "Science", "Asteroid", "Home", "Production",
"Transport", "Delivery", "Extraplanetary", "Orbital", "Correctional",
"Robot", "Hats", "Pizza")
"Robot", "Hats", "Pizza"))
var/global/list/station_suffixes = list("Station", "Frontier",
GLOBAL_LIST_INIT(station_suffixes, list("Station", "Frontier",
"Suffix", "Death-trap", "Space-hulk", "Lab", "Hazard","Spess Junk",
"Fishery", "No-Moon", "Tomb", "Crypt", "Hut", "Monkey", "Bomb",
"Trade Post", "Fortress", "Village", "Town", "City", "Edition", "Hive",
@@ -135,23 +135,23 @@ var/global/list/station_suffixes = list("Station", "Frontier",
"Construct", "Hangar", "Prison", "Center", "Port", "Waystation",
"Factory", "Waypoint", "Stopover", "Hub", "HQ", "Office", "Object",
"Fortification", "Colony", "Planet-Cracker", "Roost", "Fat Camp",
"Airstrip")
"Airstrip"))
var/global/list/greek_letters = list("Alpha", "Beta", "Gamma", "Delta",
GLOBAL_LIST_INIT(greek_letters, list("Alpha", "Beta", "Gamma", "Delta",
"Epsilon", "Zeta", "Eta", "Theta", "Iota", "Kappa", "Lambda", "Mu",
"Nu", "Xi", "Omicron", "Pi", "Rho", "Sigma", "Tau", "Upsilon", "Phi",
"Chi", "Psi", "Omega")
"Chi", "Psi", "Omega"))
var/global/list/phonetic_alphabet = list("Alpha", "Bravo", "Charlie",
GLOBAL_LIST_INIT(phonetic_alphabet, list("Alpha", "Bravo", "Charlie",
"Delta", "Echo", "Foxtrot", "Golf", "Hotel", "India", "Juliet",
"Kilo", "Lima", "Mike", "November", "Oscar", "Papa", "Quebec",
"Romeo", "Sierra", "Tango", "Uniform", "Victor", "Whiskey", "X-ray",
"Yankee", "Zulu")
"Yankee", "Zulu"))
var/global/list/numbers_as_words = list("One", "Two", "Three", "Four",
GLOBAL_LIST_INIT(numbers_as_words, list("One", "Two", "Three", "Four",
"Five", "Six", "Seven", "Eight", "Nine", "Ten", "Eleven", "Twelve",
"Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen",
"Eighteen", "Nineteen")
"Eighteen", "Nineteen"))
/proc/generate_number_strings()
var/list/L
@@ -160,4 +160,4 @@ var/global/list/numbers_as_words = list("One", "Two", "Three", "Four",
L += "\Roman[i]"
return L
var/global/list/station_numerals = greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings()
GLOBAL_LIST_INIT(station_numerals, greek_letters + phonetic_alphabet + numbers_as_words + generate_number_strings())
+28 -28
View File
@@ -3,18 +3,18 @@
#define Z_SOUTH 3
#define Z_WEST 4
var/list/cardinal = list( NORTH, SOUTH, EAST, WEST )
var/list/alldirs = list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
var/list/diagonals = list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST)
GLOBAL_LIST_INIT(cardinal, list( NORTH, SOUTH, EAST, WEST ))
GLOBAL_LIST_INIT(alldirs, list(NORTH, SOUTH, EAST, WEST, NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
GLOBAL_LIST_INIT(diagonals, list(NORTHEAST, NORTHWEST, SOUTHEAST, SOUTHWEST))
//This list contains the z-level numbers which can be accessed via space travel and the percentile chances to get there.
//(Exceptions: extended, sandbox and nuke) -Errorage
//Was list("3" = 30, "4" = 70).
//Spacing should be a reliable method of getting rid of a body -- Urist.
//Go away Urist, I'm restoring this to the longer list. ~Errorage
var/list/accessable_z_levels = list(1,3,4,5,6,7) //Keep this to six maps, repeating z-levels is ok if needed
GLOBAL_LIST_INIT(accessable_z_levels, list(1,3,4,5,6,7)) //Keep this to six maps, repeating z-levels is ok if needed
var/global/list/global_map = null
GLOBAL_LIST(global_map)
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
//Resulting sector map looks like
//|_1_|_4_|
@@ -25,32 +25,32 @@ var/global/list/global_map = null
//3 - AI satellite
//5 - empty space
var/list/landmarks_list = list() //list of all landmarks created
var/list/start_landmarks_list = list() //list of all spawn points created
var/list/department_security_spawns = list() //list of all department security spawns
var/list/generic_event_spawns = list() //list of all spawns for events
GLOBAL_LIST_EMPTY(landmarks_list) //list of all landmarks created
GLOBAL_LIST_EMPTY(start_landmarks_list) //list of all spawn points created
GLOBAL_LIST_EMPTY(department_security_spawns) //list of all department security spawns
GLOBAL_LIST_EMPTY(generic_event_spawns) //list of all spawns for events
var/list/wizardstart = list()
var/list/newplayer_start = list()
var/list/latejoin = list()
var/list/prisonwarp = list() //prisoners go to these
var/list/holdingfacility = list() //captured people go here
var/list/xeno_spawn = list()//Aliens spawn at these.
var/list/tdome1 = list()
var/list/tdome2 = list()
var/list/tdomeobserve = list()
var/list/tdomeadmin = list()
var/list/prisonwarped = list() //list of players already warped
var/list/blobstart = list()
var/list/secequipment = list()
var/list/deathsquadspawn = list()
var/list/emergencyresponseteamspawn = list()
var/list/ruin_landmarks = list()
GLOBAL_LIST_EMPTY(wizardstart)
GLOBAL_LIST_EMPTY(newplayer_start)
GLOBAL_LIST_EMPTY(latejoin)
GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these
GLOBAL_LIST_EMPTY(holdingfacility) //captured people go here
GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these.
GLOBAL_LIST_EMPTY(tdome1)
GLOBAL_LIST_EMPTY(tdome2)
GLOBAL_LIST_EMPTY(tdomeobserve)
GLOBAL_LIST_EMPTY(tdomeadmin)
GLOBAL_LIST_EMPTY(prisonwarped) //list of players already warped
GLOBAL_LIST_EMPTY(blobstart)
GLOBAL_LIST_EMPTY(secequipment)
GLOBAL_LIST_EMPTY(deathsquadspawn)
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
GLOBAL_LIST_EMPTY(ruin_landmarks)
//away missions
var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to
GLOBAL_LIST_EMPTY(awaydestinations) //a list of landmarks that the warpgate can take you to
//used by jump-to-area etc. Updated by area/updateName()
var/list/sortedAreas = list()
GLOBAL_LIST_EMPTY(sortedAreas)
var/list/transit_markers = list()
GLOBAL_LIST_EMPTY(transit_markers)
+17 -14
View File
@@ -1,18 +1,21 @@
var/list/clients = list() //all clients
var/list/admins = list() //all clients whom are admins
var/list/deadmins = list() //all clients who have used the de-admin verb.
var/list/directory = list() //all ckeys with associated client
var/list/stealthminID = list() //reference list with IDs that store ckeys, for stealthmins
GLOBAL_LIST_EMPTY(clients) //all clients
GLOBAL_LIST_EMPTY(admins) //all clients whom are admins
GLOBAL_PROTECT(admins)
GLOBAL_LIST_EMPTY(deadmins) //all clients who have used the de-admin verb.
GLOBAL_PROTECT(deadmins)
GLOBAL_LIST_EMPTY(directory) //all ckeys with associated client
GLOBAL_LIST_EMPTY(stealthminID) //reference list with IDs that store ckeys, for stealthmins
//Since it didn't really belong in any other category, I'm putting this here
//This is for procs to replace all the goddamn 'in world's that are chilling around the code
var/global/list/player_list = list() //all mobs **with clients attached**. Excludes /mob/dead/new_player
var/global/list/mob_list = list() //all mobs, including clientless
var/global/list/living_mob_list = list() //all alive mobs, including clientless. Excludes /mob/dead/new_player
var/global/list/dead_mob_list = list() //all dead mobs, including clientless. Excludes /mob/dead/new_player
var/global/list/joined_player_list = list() //all clients that have joined the game at round-start or as a latejoin.
var/global/list/silicon_mobs = list() //all silicon mobs
var/global/list/pai_list = list()
var/global/list/available_ai_shells = list()
var/global/list/language_datums = list()
GLOBAL_LIST_EMPTY(player_list) //all mobs **with clients attached**. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(mob_list) //all mobs, including clientless
GLOBAL_LIST_EMPTY(living_mob_list) //all alive mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(dead_mob_list) //all dead mobs, including clientless. Excludes /mob/dead/new_player
GLOBAL_LIST_EMPTY(joined_player_list) //all clients that have joined the game at round-start or as a latejoin.
GLOBAL_LIST_EMPTY(silicon_mobs) //all silicon mobs
GLOBAL_LIST_EMPTY(ai_list)
GLOBAL_LIST_EMPTY(pai_list)
GLOBAL_LIST_EMPTY(available_ai_shells)
GLOBAL_LIST_EMPTY(language_datums)
+19 -19
View File
@@ -1,23 +1,23 @@
var/list/ai_names = file2list("config/names/ai.txt")
var/list/wizard_first = file2list("config/names/wizardfirst.txt")
var/list/wizard_second = file2list("config/names/wizardsecond.txt")
var/list/ninja_titles = file2list("config/names/ninjatitle.txt")
var/list/ninja_names = file2list("config/names/ninjaname.txt")
var/list/commando_names = file2list("config/names/death_commando.txt")
var/list/first_names_male = file2list("config/names/first_male.txt")
var/list/first_names_female = file2list("config/names/first_female.txt")
var/list/last_names = file2list("config/names/last.txt")
var/list/lizard_names_male = file2list("config/names/lizard_male.txt")
var/list/lizard_names_female = file2list("config/names/lizard_female.txt")
var/list/clown_names = file2list("config/names/clown.txt")
var/list/mime_names = file2list("config/names/mime.txt")
var/list/carp_names = file2list("config/names/carp.txt")
var/list/golem_names = file2list("config/names/golem.txt")
var/list/plasmaman_names = file2list("config/names/plasmaman.txt")
var/list/posibrain_names = list("PBU","HIU","SINA","ARMA","OSI","HBL","MSO","RR","CHRI","CDB","HG","XSI","ORNG","GUN","KOR","MET","FRE","XIS","SLI","PKP","HOG","RZH","GOOF","MRPR","JJR","FIRC","INC","PHL","BGB","ANTR","MIW","WJ","JRD","CHOC","ANCL","JLLO","JNLG","KOS","TKRG","XAL","STLP","CBOS","DUNC","FXMC","DRSD","COI")
GLOBAL_LIST_INIT(ai_names, file2list("config/names/ai.txt"))
GLOBAL_LIST_INIT(wizard_first, file2list("config/names/wizardfirst.txt"))
GLOBAL_LIST_INIT(wizard_second, file2list("config/names/wizardsecond.txt"))
GLOBAL_LIST_INIT(ninja_titles, file2list("config/names/ninjatitle.txt"))
GLOBAL_LIST_INIT(ninja_names, file2list("config/names/ninjaname.txt"))
GLOBAL_LIST_INIT(commando_names, file2list("config/names/death_commando.txt"))
GLOBAL_LIST_INIT(first_names_male, file2list("config/names/first_male.txt"))
GLOBAL_LIST_INIT(first_names_female, file2list("config/names/first_female.txt"))
GLOBAL_LIST_INIT(last_names, file2list("config/names/last.txt"))
GLOBAL_LIST_INIT(lizard_names_male, file2list("config/names/lizard_male.txt"))
GLOBAL_LIST_INIT(lizard_names_female, file2list("config/names/lizard_female.txt"))
GLOBAL_LIST_INIT(clown_names, file2list("config/names/clown.txt"))
GLOBAL_LIST_INIT(mime_names, file2list("config/names/mime.txt"))
GLOBAL_LIST_INIT(carp_names, file2list("config/names/carp.txt"))
GLOBAL_LIST_INIT(golem_names, file2list("config/names/golem.txt"))
GLOBAL_LIST_INIT(plasmaman_names, file2list("config/names/plasmaman.txt"))
GLOBAL_LIST_INIT(posibrain_names, list("PBU","HIU","SINA","ARMA","OSI","HBL","MSO","RR","CHRI","CDB","HG","XSI","ORNG","GUN","KOR","MET","FRE","XIS","SLI","PKP","HOG","RZH","GOOF","MRPR","JJR","FIRC","INC","PHL","BGB","ANTR","MIW","WJ","JRD","CHOC","ANCL","JLLO","JNLG","KOS","TKRG","XAL","STLP","CBOS","DUNC","FXMC","DRSD","COI"))
var/list/verbs = file2list("config/names/verbs.txt")
var/list/adjectives = file2list("config/names/adjectives.txt")
GLOBAL_LIST_INIT(verbs, file2list("config/names/verbs.txt"))
GLOBAL_LIST_INIT(adjectives, file2list("config/names/adjectives.txt"))
//loaded on startup because of "
//would include in rsc if ' was used
+33 -30
View File
@@ -1,31 +1,34 @@
var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time
var/global/list/portals = list() //list of all /obj/effect/portal
var/global/list/airlocks = list() //list of all airlocks
var/global/list/mechas_list = list() //list of all mechs. Used by hostile mobs target tracking.
var/global/list/shuttle_caller_list = list() //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
var/global/list/machines = list() //NOTE: this is a list of ALL machines now. The processing machines list is SSmachines.processing !
var/global/list/syndicate_shuttle_boards = list() //important to keep track of for managing nukeops war declarations.
var/global/list/navbeacons = list() //list of all bot nagivation beacons, used for patrolling.
var/global/list/teleportbeacons = list() //list of all tracking beacons used by teleporters
var/global/list/deliverybeacons = list() //list of all MULEbot delivery beacons.
var/global/list/deliverybeacontags = list() //list of all tags associated with delivery beacons.
var/global/list/nuke_list = list()
var/global/list/alarmdisplay = list() //list of all machines or programs that can display station alerts
var/global/list/singularities = list() //list of all singularities on the station (actually technically all engines)
GLOBAL_LIST_EMPTY(cable_list) //Index for all cables, so that powernets don't have to look through the entire world all the time
GLOBAL_LIST_EMPTY(portals) //list of all /obj/effect/portal
GLOBAL_LIST_EMPTY(airlocks) //list of all airlocks
GLOBAL_LIST_EMPTY(mechas_list) //list of all mechs. Used by hostile mobs target tracking.
GLOBAL_LIST_EMPTY(shuttle_caller_list) //list of all communication consoles and AIs, for automatic shuttle calls when there are none.
GLOBAL_LIST_EMPTY(machines) //NOTE: this is a list of ALL machines now. The processing machines list is SSmachine.processing !
GLOBAL_LIST_EMPTY(syndicate_shuttle_boards) //important to keep track of for managing nukeops war declarations.
GLOBAL_LIST_EMPTY(navbeacons) //list of all bot nagivation beacons, used for patrolling.
GLOBAL_LIST_EMPTY(teleportbeacons) //list of all tracking beacons used by teleporters
GLOBAL_LIST_EMPTY(deliverybeacons) //list of all MULEbot delivery beacons.
GLOBAL_LIST_EMPTY(deliverybeacontags) //list of all tags associated with delivery beacons.
GLOBAL_LIST_EMPTY(nuke_list)
GLOBAL_LIST_EMPTY(alarmdisplay) //list of all machines or programs that can display station alerts
GLOBAL_LIST_EMPTY(singularities) //list of all singularities on the station (actually technically all engines)
var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions
var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
var/global/list/materials_list = list() //list of all /datum/material datums indexed by material id.
var/global/list/tech_list = list() //list of all /datum/tech datums indexed by id.
var/global/list/surgeries_list = list() //list of all surgeries by name, associated with their path.
var/global/list/crafting_recipes = list() //list of all table craft recipes
var/global/list/rcd_list = list() //list of Rapid Construction Devices.
var/global/list/apcs_list = list() //list of all Area Power Controller machines, seperate from machines for powernet speeeeeeed.
var/global/list/tracked_implants = list() //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
var/global/list/tracked_chem_implants = list() //list of implants the prisoner console can track and send inject commands too
var/global/list/poi_list = list() //list of points of interest for observe/follow
var/global/list/pinpointer_list = list() //list of all pinpointers. Used to change stuff they are pointing to all at once.
var/global/list/zombie_infection_list = list() // A list of all zombie_infection organs, for any mass "animation"
var/global/list/meteor_list = list() // List of all meteors.
var/global/list/active_jammers = list() // List of active radio jammers
var/global/list/ladders = list() // List of ladders
GLOBAL_LIST(chemical_reactions_list) //list of all /datum/chemical_reaction datums. Used during chemical reactions
GLOBAL_LIST(chemical_reagents_list) //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff
GLOBAL_LIST_EMPTY(materials_list) //list of all /datum/material datums indexed by material id.
GLOBAL_LIST_EMPTY(tech_list) //list of all /datum/tech datums indexed by id.
GLOBAL_LIST_EMPTY(surgeries_list) //list of all surgeries by name, associated with their path.
GLOBAL_LIST_EMPTY(crafting_recipes) //list of all table craft recipes
GLOBAL_LIST_EMPTY(rcd_list) //list of Rapid Construction Devices.
GLOBAL_LIST_EMPTY(apcs_list) //list of all Area Power Controller machines, seperate from machines for powernet speeeeeeed.
GLOBAL_LIST_EMPTY(tracked_implants) //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented...
GLOBAL_LIST_EMPTY(tracked_chem_implants) //list of implants the prisoner console can track and send inject commands too
GLOBAL_LIST_EMPTY(poi_list) //list of points of interest for observe/follow
GLOBAL_LIST_EMPTY(pinpointer_list) //list of all pinpointers. Used to change stuff they are pointing to all at once.
GLOBAL_LIST_EMPTY(zombie_infection_list) // A list of all zombie_infection organs, for any mass "animation"
GLOBAL_LIST_EMPTY(meteor_list) // List of all meteors.
GLOBAL_LIST_EMPTY(active_jammers) // List of active radio jammers
GLOBAL_LIST_EMPTY(ladders)
GLOBAL_LIST_EMPTY(wire_color_directory)
GLOBAL_LIST_EMPTY(wire_name_directory)
+1 -1
View File
@@ -6,4 +6,4 @@
#define POLL_IGNORE_ALIEN_LARVA "alien_larva"
#define POLL_IGNORE_CLOCKWORK_MARAUDER "clockwork_marauder"
var/list/poll_ignore = list()
GLOBAL_LIST_EMPTY(poll_ignore)
+1 -1
View File
@@ -3,7 +3,7 @@
//Note: typecache can only replace istype if you know for sure the thing is at least a datum.
var/list/typecache_mob = typecacheof(list(/mob))
GLOBAL_LIST_INIT(typecache_mob, typecacheof(list(/mob)))
+25 -13
View File
@@ -1,16 +1,28 @@
var/diary = null
var/runtime_diary = null
var/diaryofmeanpeople = null
var/href_logfile = null
GLOBAL_VAR(diary)
GLOBAL_PROTECT(diary)
GLOBAL_VAR(runtime_diary)
GLOBAL_PROTECT(runtime_diary)
GLOBAL_VAR(diaryofmeanpeople)
GLOBAL_PROTECT(diaryofmeanpeople)
GLOBAL_VAR(href_logfile)
GLOBAL_PROTECT(href_logfile)
var/list/bombers = list( )
var/list/admin_log = list ( )
var/list/lastsignalers = list( ) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
var/list/lawchanges = list( ) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
GLOBAL_LIST_EMPTY(bombers)
GLOBAL_PROTECT(bombers)
GLOBAL_LIST_EMPTY(admin_log)
GLOBAL_PROTECT(admin_log)
GLOBAL_LIST_EMPTY(lastsignalers) //keeps last 100 signals here in format: "[src] used \ref[src] @ location [src.loc]: [freq]/[code]"
GLOBAL_PROTECT(lastsignalers)
GLOBAL_LIST_EMPTY(lawchanges) //Stores who uploaded laws to which silicon-based lifeform, and what the law was
GLOBAL_PROTECT(lawchanges)
var/list/combatlog = list()
var/list/IClog = list()
var/list/OOClog = list()
var/list/adminlog = list()
GLOBAL_LIST_EMPTY(combatlog)
GLOBAL_PROTECT(combatlog)
GLOBAL_LIST_EMPTY(IClog)
GLOBAL_PROTECT(IClog)
GLOBAL_LIST_EMPTY(OOClog)
GLOBAL_PROTECT(OOClog)
GLOBAL_LIST_EMPTY(adminlog)
GLOBAL_PROTECT(adminlog)
var/list/active_turfs_startlist = list()
GLOBAL_LIST_EMPTY(active_turfs_startlist)
+4 -4
View File
@@ -1,9 +1,9 @@
var/admin_notice = "" // Admin notice that all clients see when joining the server
GLOBAL_VAR_INIT(admin_notice, "") // Admin notice that all clients see when joining the server
var/timezoneOffset = 0 // The difference betwen midnight (of the host computer) and 0 world.ticks.
GLOBAL_VAR_INIT(timezoneOffset, 0) // The difference betwen midnight (of the host computer) and 0 world.ticks.
// For FTP requests. (i.e. downloading runtime logs.)
// However it'd be ok to use for accessing attack logs and such too, which are even laggier.
var/fileaccess_timer = 0
GLOBAL_VAR_INIT(fileaccess_timer, 0)
var/TAB = "&nbsp;&nbsp;&nbsp;&nbsp;"
GLOBAL_VAR_INIT(TAB, "&nbsp;&nbsp;&nbsp;&nbsp;")
+4 -6
View File
@@ -1,8 +1,6 @@
var/global/datum/datacore/data_core = null
//var/global/defer_powernet_rebuild = 0 // true if net rebuild will be called manually after an event
//Noble idea, but doing this made GC fail. The gains from waiting on deffering are lost by using del()
GLOBAL_DATUM(data_core, /datum/datacore)
var/CELLRATE = 0.002 // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
var/CHARGELEVEL = 0.001 // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
GLOBAL_VAR_INIT(CELLRATE, 0.002) // multiplier for watts per tick <> cell storage (eg: .002 means if there is a load of 1000 watts, 20 units will be taken from a cell per second)
GLOBAL_VAR_INIT(CHARGELEVEL, 0.001) // Cap for how fast cells charge, as a percentage-per-tick (.001 means cellcharge is capped to 1% per second)
var/list/powernets = list()
GLOBAL_LIST_EMPTY(powernets)
+1 -1
View File
@@ -1,5 +1,5 @@
//this function places received data into element with specified id.
var/const/js_byjax = {"
#define js_byjax {"
function replaceContent() {
var args = Array.prototype.slice.call(arguments);
+1 -1
View File
@@ -1,4 +1,4 @@
var/const/js_dropdowns = {"
#define js_dropdowns {"
function dropdowns() {
var divs = document.getElementsByTagName('div');
var headers = new Array();
+2 -2
View File
@@ -37,7 +37,7 @@
var/turf/pixel_turf = get_turf_pixel(A)
var/turf_visible
if(pixel_turf)
turf_visible = cameranet.checkTurfVis(pixel_turf)
turf_visible = GLOB.cameranet.checkTurfVis(pixel_turf)
if(!turf_visible)
if(istype(loc, /obj/item/device/aicard) && (pixel_turf in view(client.view, loc)))
turf_visible = TRUE
@@ -190,4 +190,4 @@
//
/mob/living/silicon/ai/TurfAdjacent(var/turf/T)
return (cameranet && cameranet.checkTurfVis(T))
return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T))
+1 -1
View File
@@ -53,7 +53,7 @@
if(..())
return
var/mob/living/silicon/ai/AI = usr
crewmonitor.show(AI)
GLOB.crewmonitor.show(AI)
/obj/screen/ai/crew_manifest
name = "Crew Manifest"
+18 -18
View File
@@ -276,7 +276,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
return ..()
/obj/screen/alert/clockwork/scripture_reqs/process()
if(clockwork_gateway_activated)
if(GLOB.clockwork_gateway_activated)
qdel(src)
return
var/current_state
@@ -288,7 +288,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "no"
if(!current_state)
name = "Current Objective"
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in GLOB.all_clockwork_objects)
var/area/gate_area = get_area(G)
desc = "<b>Protect the Ark at [gate_area.map_name]!</b>"
return
@@ -298,7 +298,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
name = "Next Tier Requirements"
var/validservants = 0
var/unconverted_ais_exist = get_unconverted_ais()
for(var/mob/living/L in living_mob_list)
for(var/mob/living/L in GLOB.living_mob_list)
if(is_servant_of_ratvar(L) && (ishuman(L) || issilicon(L)))
validservants++
var/req_servants = 0
@@ -328,14 +328,14 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state += "-servants" //in this manner, generate an icon key based on what we're missing
else
textlist += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
textlist += "<br><b>[clockwork_caches]/[req_caches]</b> Tinkerer's Caches"
if(clockwork_caches < req_caches)
textlist += "<br><b>[GLOB.clockwork_caches]/[req_caches]</b> Tinkerer's Caches"
if(GLOB.clockwork_caches < req_caches)
icon_state += "-caches"
else
textlist += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
if(req_cv) //cv only shows up if the tier requires it
textlist += "<br><b>[clockwork_construction_value]/[req_cv]</b> Construction Value"
if(clockwork_construction_value < req_cv)
textlist += "<br><b>[GLOB.clockwork_construction_value]/[req_cv]</b> Construction Value"
if(GLOB.clockwork_construction_value < req_cv)
icon_state += "-cv"
else
textlist += ": <b><font color=#5A6068>\[CHECK\]</font></b>"
@@ -356,7 +356,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "clockinfo"
/obj/screen/alert/clockwork/infodump/MouseEntered(location,control,params)
if(ratvar_awakens)
if(GLOB.ratvar_awakens)
desc = "<font size=3><b>CHETR<br>NYY<br>HAGEHUGF-NAQ-UBABE<br>RATVAR.</b></font>"
else
var/servants = 0
@@ -364,7 +364,7 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
var/unconverted_ais_exist = get_unconverted_ais()
var/list/scripture_states = scripture_unlock_check()
var/list/textlist
for(var/mob/living/L in living_mob_list)
for(var/mob/living/L in GLOB.living_mob_list)
if(is_servant_of_ratvar(L))
servants++
if(ishuman(L) || issilicon(L))
@@ -376,13 +376,13 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
textlist = list("<b>[servants]</b> Servants, [validservants ? "<b>[validservants]</b> of which counts":"none of which count"] towards scripture.<br>")
else
textlist = list("<b>[servants]</b> Servant, who [validservants ? "counts":"does not count"] towards scripture.<br>")
textlist += "<b>[clockwork_caches ? "[clockwork_caches]</b> Tinkerer's Caches.":"No Tinkerer's Caches, construct one!</b>"]<br>\
<b>[clockwork_construction_value]</b> Construction Value.<br>"
if(clockwork_daemons)
textlist += "<b>[clockwork_daemons]</b> Tinkerer's Daemons: <b>[servants * 0.2 < clockwork_daemons ? "DISABLED":"ACTIVE"]</b><br>"
textlist += "<b>[GLOB.clockwork_caches ? "[GLOB.clockwork_caches]</b> Tinkerer's Caches.":"No Tinkerer's Caches, construct one!</b>"]<br>\
<b>[GLOB.clockwork_construction_value]</b> Construction Value.<br>"
if(GLOB.clockwork_daemons)
textlist += "<b>[GLOB.clockwork_daemons]</b> Tinkerer's Daemons: <b>[servants * 0.2 < GLOB.clockwork_daemons ? "DISABLED":"ACTIVE"]</b><br>"
else
textlist += "No Tinkerer's Daemons.<br>"
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in all_clockwork_objects)
for(var/obj/structure/destructible/clockwork/massive/celestial_gateway/G in GLOB.all_clockwork_objects)
var/area/gate_area = get_area(G)
textlist += "Ark Location: <b>[uppertext(gate_area.map_name)]</b><br>"
if(G.still_needs_components())
@@ -399,10 +399,10 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
else
textlist += "<b>An unconverted AI exists!</b><br>"
if(scripture_states[SCRIPTURE_REVENANT])
var/inathneq_available = clockwork_generals_invoked["inath-neq"] <= world.time
var/sevtug_available = clockwork_generals_invoked["sevtug"] <= world.time
var/nezbere_available = clockwork_generals_invoked["nezbere"] <= world.time
var/nezcrentr_available = clockwork_generals_invoked["nzcrentr"] <= world.time
var/inathneq_available = GLOB.clockwork_generals_invoked["inath-neq"] <= world.time
var/sevtug_available = GLOB.clockwork_generals_invoked["sevtug"] <= world.time
var/nezbere_available = GLOB.clockwork_generals_invoked["nezbere"] <= world.time
var/nezcrentr_available = GLOB.clockwork_generals_invoked["nzcrentr"] <= world.time
if(inathneq_available || sevtug_available || nezbere_available || nezcrentr_available)
textlist += "Generals available:<b>[inathneq_available ? "<br><font color=#1E8CE1>INATH-NEQ</font>":""][sevtug_available ? "<br><font color=#AF0AAF>SEVTUG</font>":""]\
[nezbere_available ? "<br><font color=#5A6068>NEZBERE</font>":""][nezcrentr_available ? "<br><font color=#DAAA18>NZCRENTR</font>":""]</b><br>"
+1 -2
View File
@@ -3,7 +3,6 @@
This needs more thinking out, but I might as well.
*/
var/const/tk_maxrange = 15
/*
Telekinetic attack:
@@ -136,7 +135,7 @@ var/const/tk_maxrange = 15
/proc/tkMaxRangeCheck(mob/user, atom/target)
var/d = get_dist(user, target)
if(d > tk_maxrange)
if(d > TK_MAXRANGE)
to_chat(user, "<span class ='warning'>Your mind won't reach that far.</span>")
return
return TRUE
+35 -35
View File
@@ -267,7 +267,7 @@
if(M.config_tag)
if(!(M.config_tag in modes)) // ensure each mode is added only once
diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
GLOB.diary << "Adding game mode [M.name] ([M.config_tag]) to configuration."
modes += M.config_tag
mode_names[M.config_tag] = M.name
probabilities[M.config_tag] = M.probability
@@ -391,7 +391,7 @@
if("guest_jobban")
config.guest_jobban = 1
if("guest_ban")
guests_allowed = 0
GLOB.guests_allowed = 0
if("usewhitelist")
config.usewhitelist = TRUE
if("allow_metadata")
@@ -421,9 +421,9 @@
if("automute_on")
automute_on = 1
if("comms_key")
global.comms_key = value
GLOB.comms_key = value
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
global.comms_allowed = 1
GLOB.comms_allowed = 1
if("cross_server_address")
cross_address = value
if(value != "byond:\\address:port")
@@ -437,9 +437,9 @@
if(value != "byond:\\address:port")
allow_panic_bunker_bounce = 1
if("medal_hub_address")
global.medal_hub = value
GLOB.medal_hub = value
if("medal_hub_password")
global.medal_pass = value
GLOB.medal_pass = value
if("show_irc_name")
config.showircname = 1
if("see_own_notes")
@@ -480,9 +480,9 @@
if("log_runtimes")
log_runtimes = TRUE
var/newlog = file("data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log")
if(runtime_diary != newlog)
if(GLOB.runtime_diary != newlog)
world.log << "Now logging runtimes to data/logs/runtimes/runtime-[time2text(world.realtime, "YYYY-MM-DD")].log"
runtime_diary = newlog
GLOB.runtime_diary = newlog
if("autoconvert_notes")
config.autoconvert_notes = 1
if("allow_webclient")
@@ -526,7 +526,7 @@
if("error_msg_delay")
error_msg_delay = text2num(value)
else
diary << "Unknown setting in configuration: '[name]'"
GLOB.diary << "Unknown setting in configuration: '[name]'"
else if(type == "game_options")
switch(name)
@@ -589,13 +589,13 @@
if(mode_name in config.modes)
config.continuous[mode_name] = 1
else
diary << "Unknown continuous configuration definition: [mode_name]."
GLOB.diary << "Unknown continuous configuration definition: [mode_name]."
if("midround_antag")
var/mode_name = lowertext(value)
if(mode_name in config.modes)
config.midround_antag[mode_name] = 1
else
diary << "Unknown midround antagonist configuration definition: [mode_name]."
GLOB.diary << "Unknown midround antagonist configuration definition: [mode_name]."
if("midround_antag_time_check")
config.midround_antag_time_check = text2num(value)
if("midround_antag_life_check")
@@ -611,9 +611,9 @@
if(mode_name in config.modes)
config.min_pop[mode_name] = text2num(mode_value)
else
diary << "Unknown minimum population configuration definition: [mode_name]."
GLOB.diary << "Unknown minimum population configuration definition: [mode_name]."
else
diary << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
GLOB.diary << "Incorrect minimum population configuration definition: [mode_name] [mode_value]."
if("max_pop")
var/pop_pos = findtext(value, " ")
var/mode_name = null
@@ -625,9 +625,9 @@
if(mode_name in config.modes)
config.max_pop[mode_name] = text2num(mode_value)
else
diary << "Unknown maximum population configuration definition: [mode_name]."
GLOB.diary << "Unknown maximum population configuration definition: [mode_name]."
else
diary << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
GLOB.diary << "Incorrect maximum population configuration definition: [mode_name] [mode_value]."
if("shuttle_refuel_delay")
config.shuttle_refuel_delay = text2num(value)
if("show_game_type_odds")
@@ -655,9 +655,9 @@
if(prob_name in config.modes)
config.probabilities[prob_name] = text2num(prob_value)
else
diary << "Unknown game mode probability configuration definition: [prob_name]."
GLOB.diary << "Unknown game mode probability configuration definition: [prob_name]."
else
diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
GLOB.diary << "Incorrect probability configuration definition: [prob_name] [prob_value]."
if("protect_roles_from_antagonist")
config.protect_roles_from_antagonist = 1
@@ -704,7 +704,7 @@
// Value is in the form "LAWID,NUMBER"
var/list/L = splittext(value, ",")
if(L.len != 2)
diary << "Invalid LAW_WEIGHT: " + t
GLOB.diary << "Invalid LAW_WEIGHT: " + t
continue
var/lawid = L[1]
var/weight = text2num(L[2])
@@ -716,10 +716,10 @@
config.mutant_races = 1
if("roundstart_races")
var/race_id = lowertext(value)
for(var/species_id in species_list)
for(var/species_id in GLOB.species_list)
if(species_id == race_id)
roundstart_races += species_list[species_id]
roundstart_species[species_id] = species_list[species_id]
roundstart_races += GLOB.species_list[species_id]
GLOB.roundstart_species[species_id] = GLOB.species_list[species_id]
if("join_with_mutant_humans")
config.mutant_humans = 1
if("assistant_cap")
@@ -747,17 +747,17 @@
if (BombCap < 4)
BombCap = 4
MAX_EX_DEVESTATION_RANGE = round(BombCap/4)
MAX_EX_HEAVY_RANGE = round(BombCap/2)
MAX_EX_LIGHT_RANGE = BombCap
MAX_EX_FLASH_RANGE = BombCap
MAX_EX_FLAME_RANGE = BombCap
GLOB.MAX_EX_DEVESTATION_RANGE = round(BombCap/4)
GLOB.MAX_EX_HEAVY_RANGE = round(BombCap/2)
GLOB.MAX_EX_LIGHT_RANGE = BombCap
GLOB.MAX_EX_FLASH_RANGE = BombCap
GLOB.MAX_EX_FLAME_RANGE = BombCap
if("arrivals_shuttle_dock_window")
config.arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value))
if("arrivals_shuttle_require_safe_latejoin")
config.arrivals_shuttle_require_safe_latejoin = text2num(value)
else
diary << "Unknown setting in configuration: '[name]'"
GLOB.diary << "Unknown setting in configuration: '[name]'"
fps = round(fps)
if(fps <= 0)
@@ -811,7 +811,7 @@
config.maplist[currentmap.map_name] = currentmap
currentmap = null
else
diary << "Unknown command in map vote config: '[command]'"
GLOB.diary << "Unknown command in map vote config: '[command]'"
/datum/configuration/proc/loadsql(filename)
@@ -843,19 +843,19 @@
if("sql_enabled")
config.sql_enabled = 1
if("address")
sqladdress = value
GLOB.sqladdress = value
if("port")
sqlport = value
GLOB.sqlport = value
if("feedback_database")
sqlfdbkdb = value
GLOB.sqlfdbkdb = value
if("feedback_login")
sqlfdbklogin = value
GLOB.sqlfdbklogin = value
if("feedback_password")
sqlfdbkpass = value
GLOB.sqlfdbkpass = value
if("feedback_tableprefix")
sqlfdbktableprefix = value
GLOB.sqlfdbktableprefix = value
else
diary << "Unknown setting in configuration: '[name]'"
GLOB.diary << "Unknown setting in configuration: '[name]'"
/datum/configuration/proc/pick_mode(mode_name)
// I wish I didn't have to instance the game modes in order to look up
+7 -7
View File
@@ -4,7 +4,7 @@
* Pretty much pokes the MC to make sure it's still alive.
**/
var/datum/controller/failsafe/Failsafe
GLOBAL_REAL(Failsafe, /datum/controller/failsafe)
/datum/controller/failsafe // This thing pretty much just keeps poking the master controller
name = "Failsafe"
@@ -56,23 +56,23 @@ var/datum/controller/failsafe/Failsafe
if(4,5)
--defcon
if(3)
to_chat(admins, "<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.")
to_chat(GLOB.admins, "<span class='adminnotice'>Notice: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks.")
--defcon
if(2)
to_chat(admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has not fired in the last [(5-defcon) * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</span>")
--defcon
if(1)
to_chat(admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>Warning: DEFCON [defcon_pretty()]. The Master Controller has still not fired within the last [(5-defcon) * processing_interval] ticks. Killing and restarting...</span>")
--defcon
var/rtn = Recreate_MC()
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(admins, "<span class='adminnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
else if(rtn < 0)
log_game("FailSafe: Could not restart MC, runtime encountered. Entering defcon 0")
to_chat(admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>ERROR: DEFCON [defcon_pretty()]. Could not restart MC, runtime encountered. I will silently keep retrying.</span>")
//if the return number was 0, it just means the mc was restarted too recently, and it just needs some time before we try again
//no need to handle that specially when defcon 0 can handle it
if(0) //DEFCON 0! (mc failed to restart)
@@ -80,7 +80,7 @@ var/datum/controller/failsafe/Failsafe
if(rtn > 0)
defcon = 4
master_iteration = 0
to_chat(admins, "<span class='adminnotice'>MC restarted successfully</span>")
to_chat(GLOB.admins, "<span class='adminnotice'>MC restarted successfully</span>")
else
defcon = min(defcon + 1,5)
master_iteration = Master.iteration
+62
View File
@@ -0,0 +1,62 @@
GLOBAL_REAL(GLOB, /datum/controller/global_vars)
/datum/controller/global_vars
name = "Global Variables"
var/list/gvars_datum_protected_varlist
var/list/gvars_datum_in_built_vars
var/list/gvars_datum_init_order
/datum/controller/global_vars/New()
if(GLOB)
CRASH("Multiple instances of global variable controller created")
GLOB = src
var/datum/controller/exclude_these = new
gvars_datum_in_built_vars = exclude_these.vars + list("gvars_datum_protected_varlist", "gvars_datum_in_built_vars", "gvars_datum_init_order")
qdel(exclude_these)
Initialize()
/datum/controller/global_vars/Destroy(force)
if(!force)
return QDEL_HINT_LETMELIVE
stack_trace("Some fucker deleted the global holder!")
QDEL_NULL(statclick)
gvars_datum_protected_varlist.Cut()
gvars_datum_in_built_vars.Cut()
GLOB = null
return ..()
/datum/controller/global_vars/stat_entry()
if(!statclick)
statclick = new/obj/effect/statclick/debug(null, "Initializing...", src)
var/static/num_globals
if(!num_globals)
num_globals = vars.len - gvars_datum_in_built_vars.len
stat("Globals:", statclick.update("Count: [num_globals]"))
/datum/controller/global_vars/vv_get_var(var_name)
if(var_name in gvars_datum_protected_varlist)
return debug_variable(var_name, "SECRET", 0, src)
return ..()
/datum/controller/global_vars/vv_edit_var(var_name, var_value)
if((var_name in gvars_datum_protected_varlist))
return FALSE
return ..()
/datum/controller/global_vars/Initialize()
gvars_datum_init_order = list()
gvars_datum_protected_varlist = list("gvars_datum_protected_varlist")
for(var/I in vars - gvars_datum_in_built_vars)
var/start_tick = world.time
call(src, "InitGlobal[I]")()
var/end_tick = world.time
if(end_tick - start_tick)
warning("Global [I] slept during initialization!")
+26 -20
View File
@@ -6,15 +6,18 @@
* Odds are, there is a reason
*
**/
var/datum/controller/master/Master = new()
var/MC_restart_clear = 0
var/MC_restart_timeout = 0
var/MC_restart_count = 0
//This is the ABSOLUTE ONLY THING that should init globally like this
GLOBAL_REAL(Master, /datum/controller/master) = new
GLOBAL_VAR_INIT(MC_restart_clear, 0)
GLOBAL_VAR_INIT(MC_restart_timeout, 0)
GLOBAL_VAR_INIT(MC_restart_count, 0)
//current tick limit, assigned by the queue controller before running a subsystem.
//used by check_tick as well so that the procs subsystems call can obey that SS's tick limits
var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
GLOBAL_VAR_INIT(CURRENT_TICKLIMIT, TICK_LIMIT_RUNNING)
/datum/controller/master
name = "Master"
@@ -62,6 +65,9 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
else
init_subtypes(/datum/controller/subsystem, subsystems)
Master = src
if(!GLOB)
new /datum/controller/global_vars
/datum/controller/master/Destroy()
..()
@@ -77,14 +83,14 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
// -1 if we encountered a runtime trying to recreate it
/proc/Recreate_MC()
. = -1 //so if we runtime, things know we failed
if (world.time < MC_restart_timeout)
if (world.time < GLOB.MC_restart_timeout)
return 0
if (world.time < MC_restart_clear)
MC_restart_count *= 0.5
if (world.time < GLOB.MC_restart_clear)
GLOB.MC_restart_count *= 0.5
var/delay = 50 * ++MC_restart_count
MC_restart_timeout = world.time + delay
MC_restart_clear = world.time + (delay * 2)
var/delay = 50 * ++GLOB.MC_restart_count
GLOB.MC_restart_timeout = world.time + delay
GLOB.MC_restart_clear = world.time + (delay * 2)
Master.processing = 0 //stop ticking this one
try
new/datum/controller/master()
@@ -120,7 +126,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined."
BadBoy.flags |= SS_NO_FIRE
if(msg)
to_chat(admins, "<span class='boldannounce'>[msg]</span>")
to_chat(GLOB.admins, "<span class='boldannounce'>[msg]</span>")
log_world(msg)
if (istype(Master.subsystems))
@@ -151,13 +157,13 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
var/start_timeofday = REALTIMEOFDAY
// Initialize subsystems.
CURRENT_TICKLIMIT = config.tick_limit_mc_init
GLOB.CURRENT_TICKLIMIT = config.tick_limit_mc_init
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags & SS_NO_INIT)
continue
SS.Initialize(REALTIMEOFDAY)
CHECK_TICK
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
var/time = (REALTIMEOFDAY - start_timeofday) / 10
var/msg = "Initializations complete within [time] second[time == 1 ? "" : "s"]!"
@@ -260,7 +266,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
while (1)
tickdrift = max(0, MC_AVERAGE_FAST(tickdrift, (((REALTIMEOFDAY - init_timeofday) - (world.time - init_time)) / world.tick_lag)))
if (processing <= 0)
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
sleep(10)
continue
@@ -268,7 +274,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
// because sleeps are processed in the order received, so longer sleeps are more likely to run first
if (world.tick_usage > TICK_LIMIT_MC)
sleep_delta += 2
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING - (TICK_LIMIT_RUNNING * 0.5)
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING - (TICK_LIMIT_RUNNING * 0.5)
sleep(world.tick_lag * (processing + sleep_delta))
continue
@@ -297,7 +303,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
if (!error_level)
iteration++
error_level++
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
sleep(10)
continue
@@ -309,7 +315,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
if (!error_level)
iteration++
error_level++
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
sleep(10)
continue
error_level--
@@ -320,7 +326,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
iteration++
last_run = world.time
src.sleep_delta = MC_AVERAGE_FAST(src.sleep_delta, sleep_delta)
CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING - (TICK_LIMIT_RUNNING * 0.25) //reserve the tail 1/4 of the next tick for the mc.
GLOB.CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING - (TICK_LIMIT_RUNNING * 0.25) //reserve the tail 1/4 of the next tick for the mc.
sleep(world.tick_lag * (processing + sleep_delta))
@@ -409,7 +415,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
else
tick_precentage = tick_remaining
CURRENT_TICKLIMIT = world.tick_usage + tick_precentage
GLOB.CURRENT_TICKLIMIT = world.tick_usage + tick_precentage
if (!(queue_node_flags & SS_TICKER))
ran_non_ticker = TRUE
+1 -1
View File
@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(acid)
if(O.acid_level && O.acid_processing())
else
O.cut_overlay(acid_overlay, TRUE)
O.cut_overlay(GLOB.acid_overlay, TRUE)
processing -= O
if (MC_TICK_CHECK)
+1 -1
View File
@@ -299,7 +299,7 @@ SUBSYSTEM_DEF(air)
var/timer = world.timeofday
warning("There are [starting_ats] active turfs at roundstart, this is a mapping error caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required)")
for(var/turf/T in active_turfs)
active_turfs_startlist += text("[T.x], [T.y], [T.z]\n")
GLOB.active_turfs_startlist += text("[T.x], [T.y], [T.z]\n")
//now lets clear out these active turfs
var/list/turfs_to_check = active_turfs.Copy()
+1 -1
View File
@@ -9,6 +9,6 @@ SUBSYSTEM_DEF(assets)
var/datum/asset/A = new type()
A.register()
for(var/client/C in clients)
for(var/client/C in GLOB.clients)
addtimer(CALLBACK(GLOBAL_PROC, .proc/getFilesSlow, C, cache, FALSE), 10)
..()
+4 -4
View File
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(atoms)
var/list/late_loaders
/datum/controller/subsystem/atoms/Initialize(timeofday)
fire_overlay.appearance_flags = RESET_COLOR
GLOB.fire_overlay.appearance_flags = RESET_COLOR
setupGenetics() //to set the mutations' place in structural enzymes, so monkey.initialize() knows where to put the monkey mutation.
initialized = INITIALIZATION_INNEW_MAPLOAD
InitializeAtoms()
@@ -103,9 +103,9 @@ SUBSYSTEM_DEF(atoms)
continue
B.dna_block = pick_n_take(avnums)
if(B.quality == POSITIVE)
good_mutations |= B
GLOB.good_mutations |= B
else if(B.quality == NEGATIVE)
bad_mutations |= B
GLOB.bad_mutations |= B
else if(B.quality == MINOR_NEGATIVE)
not_good_mutations |= B
GLOB.not_good_mutations |= B
CHECK_TICK
+1 -1
View File
@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(augury)
biggest_threat = threat
if(doombringers.len)
for(var/i in player_list)
for(var/i in GLOB.player_list)
if(isobserver(i) && (!(observers_given_action[i])))
var/datum/action/innate/augury/A = new
A.Grant(i)
+15
View File
@@ -5,6 +5,21 @@ SUBSYSTEM_DEF(disease)
var/list/currentrun = list()
var/list/processing = list()
var/list/diseases
var/list/archive_diseases = list()
var/static/list/list_symptoms = subtypesof(/datum/symptom)
/datum/controller/subsystem/disease/PreInit()
if(!diseases)
diseases = subtypesof(/datum/disease)
/datum/controller/subsystem/disease/Recover()
currentrun = SSdisease.currentrun
processing = SSdisease.processing
diseases = SSdisease.diseases
archive_diseases = SSdisease.archive_diseases
/datum/controller/subsystem/disease/stat_entry(msg)
..("P:[processing.len]")
+1 -1
View File
@@ -107,7 +107,7 @@ SUBSYSTEM_DEF(events)
/area/engine/chiefs_office)
//Need to locate() as it's just a list of paths.
return locate(pick((the_station_areas - safe_areas) + danger_areas))
return locate(pick((GLOB.the_station_areas - safe_areas) + danger_areas))
//allows a client to trigger an event
+1 -675
View File
@@ -259,7 +259,7 @@ SUBSYSTEM_DEF(garbage)
testing("Beginning search for references to a [type].")
last_find_references = world.time
find_references_in_globals()
DoSearchVar(GLOB)
for(var/datum/thing in world)
DoSearchVar(thing, "WorldRef: [thing]")
testing("Completed search for references to a [type].")
@@ -309,8 +309,6 @@ SUBSYSTEM_DEF(garbage)
usr << browse(dat, "window=qdeletedlog")
#define SearchVar(X) DoSearchVar(X, "Global: " + #X)
/datum/proc/DoSearchVar(X, Xname)
if(usr && usr.client && !usr.client.running_find_references) return
if(istype(X, /datum))
@@ -341,676 +339,4 @@ SUBSYSTEM_DEF(garbage)
#else
CHECK_TICK
#endif
//if find_references isn't working for some datum
//update this list using tools/DMTreeToGlobalsList
/datum/proc/find_references_in_globals()
SearchVar(clockwork_construction_value)
SearchVar(clockwork_caches)
SearchVar(clockwork_daemons)
SearchVar(clockwork_generals_invoked)
SearchVar(all_clockwork_objects)
SearchVar(all_clockwork_mobs)
SearchVar(clockwork_component_cache)
SearchVar(ratvar_awakens)
SearchVar(clockwork_gateway_activated)
SearchVar(all_scripture)
SearchVar(pointed_types)
SearchVar(bloody_footprints_cache)
SearchVar(ghost_accs_options)
SearchVar(ghost_others_options)
SearchVar(special_roles)
SearchVar(string_cache)
SearchVar(string_filename_current_key)
SearchVar(cmp_field)
SearchVar(friendly_animal_types)
SearchVar(humanoid_icon_cache)
SearchVar(freeze_item_icons)
SearchVar(E)
SearchVar(Sqrt2)
SearchVar(sqrtTable)
SearchVar(gaussian_next)
SearchVar(skin_tones)
SearchVar(species_list)
SearchVar(roundstart_species)
SearchVar(church_name)
SearchVar(command_name)
SearchVar(religion_name)
SearchVar(syndicate_name)
SearchVar(syndicate_code_phrase)
SearchVar(syndicate_code_response)
SearchVar(zero_character_only)
SearchVar(hex_characters)
SearchVar(alphabet)
SearchVar(binary)
SearchVar(can_embed_types)
SearchVar(WALLITEMS)
SearchVar(WALLITEMS_EXTERNAL)
SearchVar(WALLITEMS_INVERSE)
SearchVar(sortInstance)
SearchVar(config)
SearchVar(host)
SearchVar(join_motd)
SearchVar(station_name)
SearchVar(game_version)
SearchVar(changelog_hash)
SearchVar(ooc_allowed)
SearchVar(dooc_allowed)
SearchVar(abandon_allowed)
SearchVar(enter_allowed)
SearchVar(guests_allowed)
SearchVar(shuttle_frozen)
SearchVar(shuttle_left)
SearchVar(tinted_weldhelh)
SearchVar(Debug)
SearchVar(Debug2)
SearchVar(comms_key)
SearchVar(comms_allowed)
SearchVar(medal_hub)
SearchVar(medal_pass)
SearchVar(medals_enabled)
SearchVar(MAX_EX_DEVESTATION_RANGE)
SearchVar(MAX_EX_HEAVY_RANGE)
SearchVar(MAX_EX_LIGHT_RANGE)
SearchVar(MAX_EX_FLASH_RANGE)
SearchVar(MAX_EX_FLAME_RANGE)
SearchVar(DYN_EX_SCALE)
SearchVar(sqladdress)
SearchVar(sqlport)
SearchVar(sqlfdbkdb)
SearchVar(sqlfdbklogin)
SearchVar(sqlfdbkpass)
SearchVar(sqlfdbktableprefix)
SearchVar(dbcon)
SearchVar(master_mode)
SearchVar(secret_force_mode)
SearchVar(wavesecret)
SearchVar(start_state)
SearchVar(NEARSIGHTBLOCK)
SearchVar(EPILEPSYBLOCK)
SearchVar(COUGHBLOCK)
SearchVar(TOURETTESBLOCK)
SearchVar(NERVOUSBLOCK)
SearchVar(BLINDBLOCK)
SearchVar(DEAFBLOCK)
SearchVar(HULKBLOCK)
SearchVar(TELEBLOCK)
SearchVar(FIREBLOCK)
SearchVar(XRAYBLOCK)
SearchVar(CLUMSYBLOCK)
SearchVar(STRANGEBLOCK)
SearchVar(RACEBLOCK)
SearchVar(bad_se_blocks)
SearchVar(good_se_blocks)
SearchVar(op_se_blocks)
SearchVar(NULLED_SE)
SearchVar(NULLED_UI)
SearchVar(global_mutations)
SearchVar(bad_mutations)
SearchVar(good_mutations)
SearchVar(not_good_mutations)
SearchVar(diary)
SearchVar(diaryofmeanpeople)
SearchVar(href_logfile)
SearchVar(bombers)
SearchVar(admin_log)
SearchVar(lastsignalers)
SearchVar(lawchanges)
SearchVar(combatlog)
SearchVar(IClog)
SearchVar(OOClog)
SearchVar(adminlog)
SearchVar(active_turfs_startlist)
SearchVar(admin_notice)
SearchVar(timezoneOffset)
SearchVar(fileaccess_timer)
SearchVar(TAB)
SearchVar(data_core)
SearchVar(CELLRATE)
SearchVar(CHARGELEVEL)
SearchVar(powernets)
SearchVar(hair_styles_list)
SearchVar(hair_styles_male_list)
SearchVar(hair_styles_female_list)
SearchVar(facial_hair_styles_list)
SearchVar(facial_hair_styles_male_list)
SearchVar(facial_hair_styles_female_list)
SearchVar(underwear_list)
SearchVar(underwear_m)
SearchVar(underwear_f)
SearchVar(undershirt_list)
SearchVar(undershirt_m)
SearchVar(undershirt_f)
SearchVar(socks_list)
SearchVar(body_markings_list)
SearchVar(tails_list_lizard)
SearchVar(animated_tails_list_lizard)
SearchVar(snouts_list)
SearchVar(horns_list)
SearchVar(frills_list)
SearchVar(spines_list)
SearchVar(legs_list)
SearchVar(animated_spines_list)
SearchVar(tails_list_human)
SearchVar(animated_tails_list_human)
SearchVar(ears_list)
SearchVar(wings_list)
SearchVar(wings_open_list)
SearchVar(r_wings_list)
SearchVar(ghost_forms_with_directions_list)
SearchVar(ghost_forms_with_accessories_list)
SearchVar(security_depts_prefs)
SearchVar(backbaglist)
SearchVar(uplink_spawn_loc_list)
SearchVar(female_clothing_icons)
SearchVar(hit_appends)
SearchVar(scarySounds)
SearchVar(TAGGERLOCATIONS)
SearchVar(guitar_notes)
SearchVar(station_prefixes)
SearchVar(station_names)
SearchVar(station_suffixes)
SearchVar(greek_letters)
SearchVar(phonetic_alphabet)
SearchVar(numbers_as_words)
SearchVar(station_numerals)
SearchVar(cardinal)
SearchVar(alldirs)
SearchVar(diagonals)
SearchVar(accessable_z_levels)
SearchVar(global_map)
SearchVar(landmarks_list)
SearchVar(start_landmarks_list)
SearchVar(department_security_spawns)
SearchVar(generic_event_spawns)
SearchVar(wizardstart)
SearchVar(newplayer_start)
SearchVar(latejoin)
SearchVar(prisonwarp)
SearchVar(holdingfacility)
SearchVar(xeno_spawn)
SearchVar(tdome1)
SearchVar(tdome2)
SearchVar(tdomeobserve)
SearchVar(tdomeadmin)
SearchVar(prisonwarped)
SearchVar(blobstart)
SearchVar(secequipment)
SearchVar(deathsquadspawn)
SearchVar(emergencyresponseteamspawn)
SearchVar(ruin_landmarks)
SearchVar(awaydestinations)
SearchVar(sortedAreas)
SearchVar(transit_markers)
SearchVar(clients)
SearchVar(admins)
SearchVar(deadmins)
SearchVar(directory)
SearchVar(stealthminID)
SearchVar(player_list)
SearchVar(mob_list)
SearchVar(living_mob_list)
SearchVar(dead_mob_list)
SearchVar(joined_player_list)
SearchVar(silicon_mobs)
SearchVar(pai_list)
SearchVar(ai_names)
SearchVar(wizard_first)
SearchVar(wizard_second)
SearchVar(ninja_titles)
SearchVar(ninja_names)
SearchVar(commando_names)
SearchVar(first_names_male)
SearchVar(first_names_female)
SearchVar(last_names)
SearchVar(lizard_names_male)
SearchVar(lizard_names_female)
SearchVar(clown_names)
SearchVar(mime_names)
SearchVar(carp_names)
SearchVar(golem_names)
SearchVar(plasmaman_names)
SearchVar(verbs)
SearchVar(adjectives)
SearchVar(cable_list)
SearchVar(portals)
SearchVar(airlocks)
SearchVar(mechas_list)
SearchVar(shuttle_caller_list)
SearchVar(machines)
SearchVar(syndicate_shuttle_boards)
SearchVar(navbeacons)
SearchVar(teleportbeacons)
SearchVar(deliverybeacons)
SearchVar(deliverybeacontags)
SearchVar(nuke_list)
SearchVar(alarmdisplay)
SearchVar(chemical_reactions_list)
SearchVar(chemical_reagents_list)
SearchVar(materials_list)
SearchVar(tech_list)
SearchVar(surgeries_list)
SearchVar(crafting_recipes)
SearchVar(rcd_list)
SearchVar(apcs_list)
SearchVar(tracked_implants)
SearchVar(tracked_chem_implants)
SearchVar(poi_list)
SearchVar(pinpointer_list)
SearchVar(zombie_infection_list)
SearchVar(meteor_list)
SearchVar(poll_ignore)
SearchVar(typecache_mob)
SearchVar(tk_maxrange)
SearchVar(Failsafe)
SearchVar(Master)
SearchVar(MC_restart_clear)
SearchVar(MC_restart_timeout)
SearchVar(MC_restart_count)
SearchVar(CURRENT_TICKLIMIT)
SearchVar(SSacid)
SearchVar(SSair)
SearchVar(SSassets)
SearchVar(SSaugury)
SearchVar(SScommunications)
SearchVar(SSdisease)
SearchVar(SSevents)
SearchVar(SSfire_burning)
SearchVar(SSgarbage)
SearchVar(SSicon_smooth)
SearchVar(SSipintel)
SearchVar(SSjob)
SearchVar(SSlighting)
SearchVar(SSmachines)
SearchVar(SSmapping)
SearchVar(SSminimap)
SearchVar(SSmobs)
SearchVar(SSnpcpool)
SearchVar(SSorbit)
SearchVar(SSpai)
SearchVar(pai_card_list)
SearchVar(SSparallax)
SearchVar(SSpersistence)
SearchVar(SSping)
SearchVar(SSradio)
SearchVar(SSreligion)
SearchVar(SSserver_maint)
SearchVar(SSshuttle)
SearchVar(SSspacedrift)
SearchVar(SSsqueak)
SearchVar(SSstickyban)
SearchVar(SSsun)
SearchVar(SStgui)
SearchVar(SSthrowing)
SearchVar(round_start_time)
SearchVar(SSticker)
SearchVar(SStimer)
SearchVar(SSvote)
SearchVar(SSweather)
SearchVar(SSfastprocess)
SearchVar(SSflightpacks)
SearchVar(SSobj)
SearchVar(SSprocessing)
SearchVar(record_id_num)
SearchVar(emote_list)
SearchVar(huds)
SearchVar(diseases)
SearchVar(archive_diseases)
SearchVar(advance_cures)
SearchVar(list_symptoms)
SearchVar(dictionary_symptoms)
SearchVar(SYMPTOM_ACTIVATION_PROB)
SearchVar(revdata)
SearchVar(all_status_effects)
SearchVar(wire_colors)
SearchVar(wire_color_directory)
SearchVar(wire_name_directory)
SearchVar(blood_splatter_icons)
SearchVar(all_radios)
SearchVar(radiochannels)
SearchVar(radiochannelsreverse)
SearchVar(SYND_FREQ)
SearchVar(SUPP_FREQ)
SearchVar(SERV_FREQ)
SearchVar(SCI_FREQ)
SearchVar(COMM_FREQ)
SearchVar(MED_FREQ)
SearchVar(ENG_FREQ)
SearchVar(SEC_FREQ)
SearchVar(CENTCOM_FREQ)
SearchVar(AIPRIV_FREQ)
SearchVar(RADIO_TO_AIRALARM)
SearchVar(RADIO_FROM_AIRALARM)
SearchVar(RADIO_CHAT)
SearchVar(RADIO_ATMOSIA)
SearchVar(RADIO_NAVBEACONS)
SearchVar(RADIO_AIRLOCK)
SearchVar(RADIO_MAGNETS)
SearchVar(pointers)
SearchVar(freqtospan)
SearchVar(teleportlocs)
SearchVar(the_station_areas)
SearchVar(possible_items)
SearchVar(possible_items_special)
SearchVar(blobs)
SearchVar(blob_cores)
SearchVar(overminds)
SearchVar(blob_nodes)
SearchVar(blobs_legit)
SearchVar(possible_changeling_IDs)
SearchVar(slots)
SearchVar(slot2slot)
SearchVar(slot2type)
SearchVar(hivemind_bank)
SearchVar(blacklisted_pylon_turfs)
SearchVar(non_revealed_runes)
SearchVar(teleport_runes)
SearchVar(wall_runes)
SearchVar(whiteness)
SearchVar(allDevils)
SearchVar(lawlorify)
SearchVar(gang_name_pool)
SearchVar(gang_colors_pool)
SearchVar(borers)
SearchVar(total_borer_hosts_needed)
SearchVar(bomb_set)
SearchVar(hsboxspawn)
SearchVar(multiverse)
SearchVar(announcement_systems)
SearchVar(doppler_arrays)
SearchVar(HOLOPAD_MODE)
SearchVar(holopads)
SearchVar(news_network)
SearchVar(allCasters)
SearchVar(SAFETY_COOLDOWN)
SearchVar(req_console_assistance)
SearchVar(req_console_supplies)
SearchVar(req_console_information)
SearchVar(allConsoles)
SearchVar(time_last_changed_position)
SearchVar(CALL_SHUTTLE_REASON_LENGTH)
SearchVar(crewmonitor)
SearchVar(possible_uplinker_IDs)
SearchVar(airlock_overlays)
SearchVar(pipeID2State)
SearchVar(telecomms_list)
SearchVar(recentmessages)
SearchVar(message_delay)
SearchVar(year)
SearchVar(year_integer)
SearchVar(explosionid)
SearchVar(fire_overlay)
SearchVar(acid_overlay)
SearchVar(BUMP_TELEPORTERS)
SearchVar(blacklisted_glowshroom_turfs)
SearchVar(PDAs)
SearchVar(rod_recipes)
SearchVar(glass_recipes)
SearchVar(reinforced_glass_recipes)
SearchVar(human_recipes)
SearchVar(corgi_recipes)
SearchVar(monkey_recipes)
SearchVar(xeno_recipes)
SearchVar(sinew_recipes)
SearchVar(sandstone_recipes)
SearchVar(sandbag_recipes)
SearchVar(diamond_recipes)
SearchVar(uranium_recipes)
SearchVar(plasma_recipes)
SearchVar(gold_recipes)
SearchVar(silver_recipes)
SearchVar(clown_recipes)
SearchVar(titanium_recipes)
SearchVar(plastitanium_recipes)
SearchVar(snow_recipes)
SearchVar(abductor_recipes)
SearchVar(metal_recipes)
SearchVar(plasteel_recipes)
SearchVar(wood_recipes)
SearchVar(cloth_recipes)
SearchVar(cardboard_recipes)
SearchVar(runed_metal_recipes)
SearchVar(brass_recipes)
SearchVar(disposalpipeID2State)
SearchVar(RPD_recipes)
SearchVar(biblenames)
SearchVar(biblestates)
SearchVar(bibleitemstates)
SearchVar(globalBlankCanvases)
SearchVar(crematoriums)
SearchVar(icons_to_ignore_at_floor_init)
SearchVar(js_byjax)
SearchVar(js_dropdowns)
SearchVar(BSACooldown)
SearchVar(admin_ranks)
SearchVar(admin_verbs_default)
SearchVar(admin_verbs_admin)
SearchVar(admin_verbs_ban)
SearchVar(admin_verbs_sounds)
SearchVar(admin_verbs_fun)
SearchVar(admin_verbs_spawn)
SearchVar(admin_verbs_server)
SearchVar(admin_verbs_debug)
SearchVar(admin_verbs_possess)
SearchVar(admin_verbs_permissions)
SearchVar(admin_verbs_rejuv)
SearchVar(admin_verbs_hideable)
SearchVar(create_object_html)
SearchVar(create_object_forms)
SearchVar(admin_datums)
SearchVar(CMinutes)
SearchVar(Banlist)
SearchVar(whitelist)
SearchVar(TYPES_SHORTCUTS)
SearchVar(intercom_range_display_status)
SearchVar(admin_verbs_debug_mapping)
SearchVar(say_disabled)
SearchVar(VVlocked)
SearchVar(VVicon_edit_lock)
SearchVar(VVckey_edit)
SearchVar(VVpixelmovement)
SearchVar(highlander)
SearchVar(admin_sound)
SearchVar(custom_outfits)
SearchVar(meta_gas_info)
SearchVar(gaslist_cache)
SearchVar(hardcoded_gases)
SearchVar(pipenetwarnings)
SearchVar(the_gateway)
SearchVar(potentialRandomZlevels)
SearchVar(use_preloader)
SearchVar(_preloader)
SearchVar(sc_safecode1)
SearchVar(sc_safecode2)
SearchVar(sc_safecode3)
SearchVar(sc_safecode4)
SearchVar(sc_safecode5)
SearchVar(exports_list)
SearchVar(clientmessages)
SearchVar(preferences_datums)
SearchVar(ghost_forms)
SearchVar(ghost_orbits)
SearchVar(normal_ooc_colour)
SearchVar(damaged_clothes_icons)
SearchVar(emojis)
SearchVar(non_fakeattack_weapons)
SearchVar(cards_against_space)
SearchVar(chem_t1_reagents)
SearchVar(chem_t2_reagents)
SearchVar(chem_t3_reagents)
SearchVar(chem_t4_reagents)
SearchVar(ENGSEC)
SearchVar(CAPTAIN)
SearchVar(HOS)
SearchVar(WARDEN)
SearchVar(DETECTIVE)
SearchVar(OFFICER)
SearchVar(CHIEF)
SearchVar(ENGINEER)
SearchVar(ATMOSTECH)
SearchVar(ROBOTICIST)
SearchVar(AI)
SearchVar(CYBORG)
SearchVar(MEDSCI)
SearchVar(RD)
SearchVar(SCIENTIST)
SearchVar(CHEMIST)
SearchVar(CMO)
SearchVar(DOCTOR)
SearchVar(GENETICIST)
SearchVar(VIROLOGIST)
SearchVar(CIVILIAN)
SearchVar(HOP)
SearchVar(BARTENDER)
SearchVar(BOTANIST)
SearchVar(COOK)
SearchVar(JANITOR)
SearchVar(LIBRARIAN)
SearchVar(QUARTERMASTER)
SearchVar(CARGOTECH)
SearchVar(MINER)
SearchVar(LAWYER)
SearchVar(CHAPLAIN)
SearchVar(CLOWN)
SearchVar(MIME)
SearchVar(ASSISTANT)
SearchVar(assistant_occupations)
SearchVar(command_positions)
SearchVar(engineering_positions)
SearchVar(medical_positions)
SearchVar(science_positions)
SearchVar(supply_positions)
SearchVar(civilian_positions)
SearchVar(security_positions)
SearchVar(nonhuman_positions)
SearchVar(cap_expand)
SearchVar(cmo_expand)
SearchVar(hos_expand)
SearchVar(hop_expand)
SearchVar(rd_expand)
SearchVar(ce_expand)
SearchVar(qm_expand)
SearchVar(sec_expand)
SearchVar(engi_expand)
SearchVar(atmos_expand)
SearchVar(doc_expand)
SearchVar(mine_expand)
SearchVar(chef_expand)
SearchVar(borg_expand)
SearchVar(available_depts)
SearchVar(cachedbooks)
SearchVar(total_extraction_beacons)
SearchVar(next_mob_id)
SearchVar(firstname)
SearchVar(ghost_darkness_images)
SearchVar(ghost_images_full)
SearchVar(ghost_images_default)
SearchVar(ghost_images_simple)
SearchVar(department_radio_keys)
SearchVar(crit_allowed_modes)
SearchVar(ventcrawl_machinery)
SearchVar(posibrain_notif_cooldown)
SearchVar(NO_SLIP_WHEN_WALKING)
SearchVar(SLIDE)
SearchVar(GALOSHES_DONT_HELP)
SearchVar(SLIDE_ICE)
SearchVar(limb_icon_cache)
SearchVar(default_martial_art)
SearchVar(plasmaman_on_fire)
SearchVar(ai_list)
SearchVar(announcing_vox)
SearchVar(VOX_DELAY)
SearchVar(vox_sounds)
SearchVar(CHUNK_SIZE)
SearchVar(cameranet)
SearchVar(mulebot_count)
SearchVar(MAX_CHICKENS)
SearchVar(chicken_count)
SearchVar(parasites)
SearchVar(protected_objects)
SearchVar(AISwarmers)
SearchVar(AISwarmersByType)
SearchVar(AISwarmerCapsByType)
SearchVar(slime_colours)
SearchVar(global_modular_computers)
SearchVar(file_uid)
SearchVar(nttransfer_uid)
SearchVar(ntnet_card_uid)
SearchVar(ntnet_global)
SearchVar(ntnrc_uid)
SearchVar(employmentCabinets)
SearchVar(cable_coil_recipes)
SearchVar(gravity_generators)
SearchVar(POWER_IDLE)
SearchVar(POWER_UP)
SearchVar(POWER_DOWN)
SearchVar(GRAV_NEEDS_SCREWDRIVER)
SearchVar(GRAV_NEEDS_WELDING)
SearchVar(GRAV_NEEDS_PLASTEEL)
SearchVar(GRAV_NEEDS_WRENCH)
SearchVar(rad_collectors)
SearchVar(blacklisted_tesla_types)
SearchVar(TOUCH)
SearchVar(INGEST)
SearchVar(VAPOR)
SearchVar(PATCH)
SearchVar(INJECT)
SearchVar(chemical_mob_spawn_meancritters)
SearchVar(chemical_mob_spawn_nicecritters)
SearchVar(message_servers)
SearchVar(blackbox)
SearchVar(keycard_events)
SearchVar(blacklisted_cargo_types)
SearchVar(z_levels_list)
SearchVar(spells)
SearchVar(non_simple_animals)
SearchVar(FrozenAccounts)
SearchVar(stockExchange)
SearchVar(stun_words)
SearchVar(weaken_words)
SearchVar(sleep_words)
SearchVar(vomit_words)
SearchVar(silence_words)
SearchVar(hallucinate_words)
SearchVar(wakeup_words)
SearchVar(heal_words)
SearchVar(hurt_words)
SearchVar(bleed_words)
SearchVar(burn_words)
SearchVar(hot_words)
SearchVar(cold_words)
SearchVar(repulse_words)
SearchVar(attract_words)
SearchVar(whoareyou_words)
SearchVar(saymyname_words)
SearchVar(knockknock_words)
SearchVar(statelaws_words)
SearchVar(move_words)
SearchVar(left_words)
SearchVar(right_words)
SearchVar(up_words)
SearchVar(down_words)
SearchVar(walk_words)
SearchVar(run_words)
SearchVar(helpintent_words)
SearchVar(disarmintent_words)
SearchVar(grabintent_words)
SearchVar(harmintent_words)
SearchVar(throwmode_words)
SearchVar(flip_words)
SearchVar(speak_words)
SearchVar(rest_words)
SearchVar(getup_words)
SearchVar(sit_words)
SearchVar(stand_words)
SearchVar(dance_words)
SearchVar(jump_words)
SearchVar(salute_words)
SearchVar(deathgasp_words)
SearchVar(clap_words)
SearchVar(honk_words)
SearchVar(multispin_words)
SearchVar(GPS_list)
SearchVar(uplinks)
SearchVar(uplink_items)
#endif
+12 -12
View File
@@ -46,7 +46,7 @@ SUBSYSTEM_DEF(job)
/datum/controller/subsystem/job/proc/Debug(text)
if(!Debug2)
if(!GLOB.Debug2)
return 0
job_debug.Add(text)
return 1
@@ -118,7 +118,7 @@ SUBSYSTEM_DEF(job)
if(istype(job, GetJob("Assistant"))) // We don't want to give him assistant, that's boring!
continue
if(job.title in command_positions) //If you want a command position, select it!
if(job.title in GLOB.command_positions) //If you want a command position, select it!
continue
if(jobban_isbanned(player, job.title))
@@ -144,7 +144,7 @@ SUBSYSTEM_DEF(job)
return TRUE
/datum/controller/subsystem/job/proc/ResetOccupations()
for(var/mob/dead/new_player/player in player_list)
for(var/mob/dead/new_player/player in GLOB.player_list)
if((player) && (player.mind))
player.mind.assigned_role = null
player.mind.special_role = null
@@ -158,7 +158,7 @@ SUBSYSTEM_DEF(job)
//This is basically to ensure that there's atleast a few heads in the round
/datum/controller/subsystem/job/proc/FillHeadPosition()
for(var/level = 1 to 3)
for(var/command_position in command_positions)
for(var/command_position in GLOB.command_positions)
var/datum/job/job = GetJob(command_position)
if(!job)
continue
@@ -176,7 +176,7 @@ SUBSYSTEM_DEF(job)
//This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
//This is also to ensure we get as many heads as possible
/datum/controller/subsystem/job/proc/CheckHeadPositions(level)
for(var/command_position in command_positions)
for(var/command_position in GLOB.command_positions)
var/datum/job/job = GetJob(command_position)
if(!job)
continue
@@ -222,7 +222,7 @@ SUBSYSTEM_DEF(job)
A.spawn_positions = 3
//Get the players who are ready
for(var/mob/dead/new_player/player in player_list)
for(var/mob/dead/new_player/player in GLOB.player_list)
if(player.ready && player.mind && !player.mind.assigned_role)
unassigned += player
@@ -370,7 +370,7 @@ SUBSYSTEM_DEF(job)
//If we joined at roundstart we should be positioned at our workstation
if(!joined_late)
var/obj/S = null
for(var/obj/effect/landmark/start/sloc in start_landmarks_list)
for(var/obj/effect/landmark/start/sloc in GLOB.start_landmarks_list)
if(sloc.name != rank)
S = sloc //so we can revert to spawning them on top of eachother if something goes wrong
continue
@@ -380,7 +380,7 @@ SUBSYSTEM_DEF(job)
break
if(!S) //if there isn't a spawnpoint send them to latejoin, if there's no latejoin go yell at your mapper
log_world("Couldn't find a round start spawn point for [rank]")
S = get_turf(pick(latejoin))
S = get_turf(pick(GLOB.latejoin))
if(!S) //final attempt, lets find some area in the arrivals shuttle to spawn them in to.
log_world("Couldn't find a round start latejoin spawn point.")
for(var/turf/T in get_area_turfs(/area/shuttle/arrival))
@@ -439,10 +439,10 @@ SUBSYSTEM_DEF(job)
if(equip_needed < 0) // -1: infinite available slots
equip_needed = 12
for(var/i=equip_needed-5, i>0, i--)
if(secequipment.len)
var/spawnloc = secequipment[1]
if(GLOB.secequipment.len)
var/spawnloc = GLOB.secequipment[1]
new /obj/structure/closet/secure_closet/security/sec(spawnloc)
secequipment -= spawnloc
GLOB.secequipment -= spawnloc
else //We ran out of spare locker spawns!
break
@@ -465,7 +465,7 @@ SUBSYSTEM_DEF(job)
var/level4 = 0 //never
var/level5 = 0 //banned
var/level6 = 0 //account too young
for(var/mob/dead/new_player/player in player_list)
for(var/mob/dead/new_player/player in GLOB.player_list)
if(!(player.ready && player.mind && !player.mind.assigned_role))
continue //This player is not ready
if(jobban_isbanned(player, job.title))
+17 -17
View File
@@ -1,6 +1,6 @@
var/list/lighting_update_lights = list() // List of lighting sources queued for update.
var/list/lighting_update_corners = list() // List of lighting corners queued for update.
var/list/lighting_update_objects = list() // List of lighting objects queued for update.
GLOBAL_LIST_EMPTY(lighting_update_lights) // List of lighting sources queued for update.
GLOBAL_LIST_EMPTY(lighting_update_corners) // List of lighting corners queued for update.
GLOBAL_LIST_EMPTY(lighting_update_objects) // List of lighting objects queued for update.
SUBSYSTEM_DEF(lighting)
name = "Lighting"
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(lighting)
var/initialized = FALSE
/datum/controller/subsystem/lighting/stat_entry()
..("L:[lighting_update_lights.len]|C:[lighting_update_corners.len]|O:[lighting_update_objects.len]")
..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]")
/datum/controller/subsystem/lighting/Initialize(timeofday)
@@ -30,11 +30,11 @@ SUBSYSTEM_DEF(lighting)
/datum/controller/subsystem/lighting/fire(resumed, init_tick_checks)
var/real_tick_limit
if(!init_tick_checks)
real_tick_limit = CURRENT_TICKLIMIT
CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage) / 3) + world.tick_usage
real_tick_limit = GLOB.CURRENT_TICKLIMIT
GLOB.CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage) / 3) + world.tick_usage
var/i = 0
for (i in 1 to lighting_update_lights.len)
var/datum/light_source/L = lighting_update_lights[i]
for (i in 1 to GLOB.lighting_update_lights.len)
var/datum/light_source/L = GLOB.lighting_update_lights[i]
if (L.check() || L.destroyed || L.force_update)
L.remove_lum()
@@ -53,14 +53,14 @@ SUBSYSTEM_DEF(lighting)
else if (MC_TICK_CHECK)
break
if (i)
lighting_update_lights.Cut(1, i+1)
GLOB.lighting_update_lights.Cut(1, i+1)
i = 0
if(!init_tick_checks)
CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage)/2)+world.tick_usage
GLOB.CURRENT_TICKLIMIT = ((real_tick_limit - world.tick_usage)/2)+world.tick_usage
for (i in 1 to lighting_update_corners.len)
var/datum/lighting_corner/C = lighting_update_corners[i]
for (i in 1 to GLOB.lighting_update_corners.len)
var/datum/lighting_corner/C = GLOB.lighting_update_corners[i]
C.update_objects()
C.needs_update = FALSE
@@ -69,15 +69,15 @@ SUBSYSTEM_DEF(lighting)
else if (MC_TICK_CHECK)
break
if (i)
lighting_update_corners.Cut(1, i+1)
GLOB.lighting_update_corners.Cut(1, i+1)
i = 0
if(!init_tick_checks)
CURRENT_TICKLIMIT = real_tick_limit
GLOB.CURRENT_TICKLIMIT = real_tick_limit
for (i in 1 to lighting_update_objects.len)
var/atom/movable/lighting_object/O = lighting_update_objects[i]
for (i in 1 to GLOB.lighting_update_objects.len)
var/atom/movable/lighting_object/O = GLOB.lighting_update_objects[i]
if (QDELETED(O))
continue
@@ -89,7 +89,7 @@ SUBSYSTEM_DEF(lighting)
else if (MC_TICK_CHECK)
break
if (i)
lighting_update_objects.Cut(1, i+1)
GLOB.lighting_update_objects.Cut(1, i+1)
/datum/controller/subsystem/lighting/Recover()
+1 -1
View File
@@ -16,7 +16,7 @@ SUBSYSTEM_DEF(machines)
qdel(PN)
powernets.Cut()
for(var/obj/structure/cable/PC in cable_list)
for(var/obj/structure/cable/PC in GLOB.cable_list)
if(!PC.powernet)
var/datum/powernet/NewPN = new()
NewPN.add_cable(PC)
+2 -2
View File
@@ -133,11 +133,11 @@ SUBSYSTEM_DEF(mapping)
#undef INIT_ANNOUNCE
/datum/controller/subsystem/mapping/proc/maprotate()
var/players = clients.len
var/players = GLOB.clients.len
var/list/mapvotes = list()
//count votes
if(global.config.allow_map_voting)
for (var/client/c in clients)
for (var/client/c in GLOB.clients)
var/vote = c.prefs.preferred_map
if (!vote)
if (global.config.defaultmap)
+3 -3
View File
@@ -7,13 +7,13 @@ SUBSYSTEM_DEF(mobs)
var/list/currentrun = list()
/datum/controller/subsystem/mobs/stat_entry()
..("P:[mob_list.len]")
..("P:[GLOB.mob_list.len]")
/datum/controller/subsystem/mobs/fire(resumed = 0)
var/seconds = wait * 0.1
if (!resumed)
src.currentrun = mob_list.Copy()
src.currentrun = GLOB.mob_list.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
@@ -24,6 +24,6 @@ SUBSYSTEM_DEF(mobs)
if(M)
M.Life(seconds)
else
mob_list.Remove(M)
GLOB.mob_list.Remove(M)
if (MC_TICK_CHECK)
return
+4 -4
View File
@@ -1,4 +1,3 @@
var/list/obj/item/device/paicard/pai_card_list = list()
SUBSYSTEM_DEF(pai)
name = "pAI"
@@ -7,6 +6,7 @@ SUBSYSTEM_DEF(pai)
var/list/candidates = list()
var/ghost_spam = FALSE
var/spam_delay = 100
var/list/pai_card_list = list()
/datum/controller/subsystem/pai/Topic(href, href_list[])
if(href_list["download"])
@@ -19,7 +19,7 @@ SUBSYSTEM_DEF(pai)
return FALSE
var/mob/living/silicon/pai/pai = new(card)
if(!candidate.name)
pai.name = pick(ninja_names)
pai.name = pick(GLOB.ninja_names)
else
pai.name = candidate.name
pai.real_name = pai.name
@@ -136,7 +136,7 @@ SUBSYSTEM_DEF(pai)
/datum/controller/subsystem/pai/proc/check_ready(var/datum/paiCandidate/C)
if(!C.ready)
return FALSE
for(var/mob/dead/observer/O in player_list)
for(var/mob/dead/observer/O in GLOB.player_list)
if(O.key == C.key)
return C
return FALSE
@@ -144,7 +144,7 @@ SUBSYSTEM_DEF(pai)
/datum/controller/subsystem/pai/proc/findPAI(obj/item/device/paicard/p, mob/user)
if(!ghost_spam)
ghost_spam = TRUE
for(var/mob/dead/observer/G in player_list)
for(var/mob/dead/observer/G in GLOB.player_list)
if(!G.key || !G.client)
continue
if(!(ROLE_PAI in G.client.prefs.be_special))
+1 -1
View File
@@ -7,7 +7,7 @@ SUBSYSTEM_DEF(parallax)
/datum/controller/subsystem/parallax/fire(resumed = 0)
if (!resumed)
src.currentrun = clients.Copy()
src.currentrun = GLOB.clients.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
+1 -1
View File
@@ -66,7 +66,7 @@ SUBSYSTEM_DEF(persistence)
return 1
/datum/controller/subsystem/persistence/proc/LoadPoly()
for(var/mob/living/simple_animal/parrot/Poly/P in living_mob_list)
for(var/mob/living/simple_animal/parrot/Poly/P in GLOB.living_mob_list)
twitterize(P.speech_buffer, "polytalk")
break //Who's been duping the bird?!
+1 -1
View File
@@ -9,7 +9,7 @@ SUBSYSTEM_DEF(ping)
/datum/controller/subsystem/ping/fire(resumed = FALSE)
if (!resumed)
src.currentrun = clients.Copy()
src.currentrun = GLOB.clients.Copy()
var/list/currentrun = src.currentrun
while (length(currentrun))
@@ -1,4 +1,3 @@
PROCESSING_SUBSYSTEM_DEF(flightpacks)
name = "Flightpack Movement"
priority = 30
+1 -1
View File
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(server_maint)
/datum/controller/subsystem/server_maint/fire()
//handle kicking inactive players
if(config.kick_inactive > 0)
for(var/client/C in clients)
for(var/client/C in GLOB.clients)
if(C.is_afk(INACTIVITY_KICK))
if(!istype(C.mob, /mob/dead))
log_access("AFK: [key_name(C)]")
+9 -9
View File
@@ -71,12 +71,12 @@ SUBSYSTEM_DEF(shuttle)
..()
/datum/controller/subsystem/shuttle/proc/setup_transit_zone()
if(transit_markers.len == 0)
if(GLOB.transit_markers.len == 0)
WARNING("No /obj/effect/landmark/transit placed on the map!")
return
// transit zone
var/turf/A = get_turf(transit_markers[1])
var/turf/B = get_turf(transit_markers[2])
var/turf/A = get_turf(GLOB.transit_markers[1])
var/turf/B = get_turf(GLOB.transit_markers[2])
for(var/i in block(A, B))
var/turf/T = i
T.ChangeTurf(/turf/open/space)
@@ -85,11 +85,11 @@ SUBSYSTEM_DEF(shuttle)
#ifdef HIGHLIGHT_DYNAMIC_TRANSIT
/datum/controller/subsystem/shuttle/proc/color_space()
if(transit_markers.len == 0)
if(GLOB.transit_markers.len == 0)
WARNING("No /obj/effect/landmark/transit placed on the map!")
return
var/turf/A = get_turf(transit_markers[1])
var/turf/B = get_turf(transit_markers[2])
var/turf/A = get_turf(GLOB.transit_markers[1])
var/turf/B = get_turf(GLOB.transit_markers[2])
for(var/i in block(A, B))
var/turf/T = i
// Only dying the "pure" space, not the transit tiles
@@ -174,8 +174,8 @@ SUBSYSTEM_DEF(shuttle)
return
emergency = backup_shuttle
if(world.time - round_start_time < config.shuttle_refuel_delay)
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
if(world.time - SSticker.round_start_time < config.shuttle_refuel_delay)
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
return
switch(emergency.mode)
@@ -253,7 +253,7 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/proc/autoEvac()
var/callShuttle = 1
for(var/thing in shuttle_caller_list)
for(var/thing in GLOB.shuttle_caller_list)
if(isAI(thing))
var/mob/living/silicon/ai/AI = thing
if(AI.stat || !AI.client)
+50 -46
View File
@@ -1,7 +1,5 @@
#define ROUND_START_MUSIC_LIST "strings/round_start_sounds.txt"
var/round_start_time = 0
SUBSYSTEM_DEF(ticker)
name = "Ticker"
init_order = 13
@@ -58,16 +56,17 @@ SUBSYSTEM_DEF(ticker)
var/late_join_disabled
var/round_start_time = 0
var/list/round_start_events
/datum/controller/subsystem/ticker/Initialize(timeofday)
var/list/music = file2list(ROUND_START_MUSIC_LIST, "\n")
login_music = pick(music)
if(!syndicate_code_phrase)
syndicate_code_phrase = generate_code_phrase()
if(!syndicate_code_response)
syndicate_code_response = generate_code_phrase()
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase()
if(!GLOB.syndicate_code_response)
GLOB.syndicate_code_response = generate_code_phrase()
..()
start_at = world.time + (config.lobby_countdown * 10)
@@ -76,7 +75,7 @@ SUBSYSTEM_DEF(ticker)
if(GAME_STATE_STARTUP)
if(Master.initializations_finished_with_no_players_logged_in)
start_at = world.time + (config.lobby_countdown * 10)
for(var/client/C in clients)
for(var/client/C in GLOB.clients)
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
to_chat(world, "<span class='boldnotice'>Welcome to [station_name()]!</span>")
current_state = GAME_STATE_PREGAME
@@ -87,7 +86,7 @@ SUBSYSTEM_DEF(ticker)
timeLeft = max(0,start_at - world.time)
totalPlayers = 0
totalPlayersReady = 0
for(var/mob/dead/new_player/player in player_list)
for(var/mob/dead/new_player/player in GLOB.player_list)
++totalPlayers
if(player.ready)
++totalPlayersReady
@@ -130,15 +129,15 @@ SUBSYSTEM_DEF(ticker)
var/init_start = world.timeofday
//Create and announce mode
var/list/datum/game_mode/runnable_modes
if(master_mode == "random" || master_mode == "secret")
if(GLOB.master_mode == "random" || GLOB.master_mode == "secret")
runnable_modes = config.get_runnable_modes()
if(master_mode == "secret")
if(GLOB.master_mode == "secret")
hide_mode = 1
if(secret_force_mode != "secret")
var/datum/game_mode/smode = config.pick_mode(secret_force_mode)
if(GLOB.secret_force_mode != "secret")
var/datum/game_mode/smode = config.pick_mode(GLOB.secret_force_mode)
if(!smode.can_start())
message_admins("\blue Unable to force secret [secret_force_mode]. [smode.required_players] players and [smode.required_enemies] eligible antagonists needed.")
message_admins("\blue Unable to force secret [GLOB.secret_force_mode]. [smode.required_players] players and [smode.required_enemies] eligible antagonists needed.")
else
mode = smode
@@ -149,7 +148,7 @@ SUBSYSTEM_DEF(ticker)
mode = pickweight(runnable_modes)
else
mode = config.pick_mode(master_mode)
mode = config.pick_mode(GLOB.master_mode)
if(!mode.can_start())
to_chat(world, "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players and [mode.required_enemies] eligible antagonists needed. Reverting to pre-game lobby.")
qdel(mode)
@@ -165,11 +164,11 @@ SUBSYSTEM_DEF(ticker)
SSjob.DivideOccupations() //Distribute jobs
CHECK_TICK
if(!Debug2)
if(!GLOB.Debug2)
if(!can_continue)
qdel(mode)
mode = null
to_chat(world, "<B>Error setting up [master_mode].</B> Reverting to pre-game lobby.")
to_chat(world, "<B>Error setting up [GLOB.master_mode].</B> Reverting to pre-game lobby.")
SSjob.ResetOccupations()
return 0
else
@@ -189,14 +188,14 @@ SUBSYSTEM_DEF(ticker)
toggle_ooc(0) // Turn it off
CHECK_TICK
start_landmarks_list = shuffle(start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left
GLOB.start_landmarks_list = shuffle(GLOB.start_landmarks_list) //Shuffle the order of spawn points so they dont always predictably spawn bottom-up and right-to-left
create_characters() //Create player characters
collect_minds()
equip_characters()
SSoverlays.Flush() //Flush the majority of the shit
data_core.manifest()
GLOB.data_core.manifest()
transfer_characters() //transfer keys to the new mobs
@@ -229,7 +228,7 @@ SUBSYSTEM_DEF(ticker)
set waitfor = 0
mode.post_setup()
//Cleanup some stuff
for(var/obj/effect/landmark/start/S in landmarks_list)
for(var/obj/effect/landmark/start/S in GLOB.landmarks_list)
//Deleting Startpoints but we need the ai point to AI-ize people later
if(S.name != "AI")
qdel(S)
@@ -256,7 +255,7 @@ SUBSYSTEM_DEF(ticker)
if( cinematic )
return //already a cinematic in progress!
for (var/datum/html_interface/hi in html_interfaces)
for (var/datum/html_interface/hi in GLOB.html_interfaces)
hi.closeAll()
SStgui.close_all_uis()
@@ -268,7 +267,7 @@ SUBSYSTEM_DEF(ticker)
//initialise our cinematic screen object
cinematic = new /obj/screen{icon='icons/effects/station_explosion.dmi';icon_state="station_intact";layer=21;mouse_opacity=0;screen_loc="1,0";}(src)
for(var/mob/M in mob_list)
for(var/mob/M in GLOB.mob_list)
M.notransform = TRUE //stop everything moving
if(M.client)
M.client.screen += cinematic //show every client the cinematic
@@ -370,22 +369,22 @@ SUBSYSTEM_DEF(ticker)
if(cinematic)
qdel(cinematic) //end the cinematic
cinematic = null
for(var/mob/M in mob_list)
for(var/mob/M in GLOB.mob_list)
M.notransform = FALSE
if(actually_blew_up && !isnull(killz) && M.stat != DEAD && M.z == killz)
M.gib()
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/mob/dead/new_player/player in player_list)
for(var/mob/dead/new_player/player in GLOB.player_list)
if(player.ready && player.mind)
joined_player_list += player.ckey
GLOB.joined_player_list += player.ckey
player.create_character(FALSE)
else
player.new_player_panel()
CHECK_TICK
/datum/controller/subsystem/ticker/proc/collect_minds()
for(var/mob/dead/new_player/P in player_list)
for(var/mob/dead/new_player/P in GLOB.player_list)
if(P.new_character && P.new_character.mind)
SSticker.minds += P.new_character.mind
CHECK_TICK
@@ -393,7 +392,7 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/equip_characters()
var/captainless=1
for(var/mob/dead/new_player/N in player_list)
for(var/mob/dead/new_player/N in GLOB.player_list)
var/mob/living/carbon/human/player = N.new_character
if(istype(player) && player.mind && player.mind.assigned_role)
if(player.mind.assigned_role == "Captain")
@@ -402,14 +401,14 @@ SUBSYSTEM_DEF(ticker)
SSjob.EquipRank(N, player.mind.assigned_role, 0)
CHECK_TICK
if(captainless)
for(var/mob/dead/new_player/N in player_list)
for(var/mob/dead/new_player/N in GLOB.player_list)
if(N.new_character)
to_chat(N, "Captainship not forced on anyone.")
CHECK_TICK
/datum/controller/subsystem/ticker/proc/transfer_characters()
var/list/livings = list()
for(var/mob/dead/new_player/player in player_list)
for(var/mob/dead/new_player/player in GLOB.player_list)
var/mob/living = player.transfer_character()
if(living)
qdel(player)
@@ -436,7 +435,7 @@ SUBSYSTEM_DEF(ticker)
to_chat(world, "<BR><BR><BR><FONT size=3><B>The round has ended.</B></FONT>")
//Player status report
for(var/mob/Player in mob_list)
for(var/mob/Player in GLOB.mob_list)
if(Player.mind && !isnewplayer(Player))
if(Player.stat != DEAD && !isbrain(Player))
num_survivors++
@@ -461,28 +460,28 @@ SUBSYSTEM_DEF(ticker)
//Round statistics report
var/datum/station_state/end_state = new /datum/station_state()
end_state.count()
var/station_integrity = min(PERCENT(start_state.score(end_state)), 100)
var/station_integrity = min(PERCENT(GLOB.start_state.score(end_state)), 100)
to_chat(world, "<BR>[TAB]Shift Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B>")
to_chat(world, "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>")
to_chat(world, "<BR>[GLOB.TAB]Shift Duration: <B>[round(world.time / 36000)]:[add_zero("[world.time / 600 % 60]", 2)]:[world.time / 100 % 6][world.time / 100 % 10]</B>")
to_chat(world, "<BR>[GLOB.TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>")
if(mode.station_was_nuked)
SSticker.news_report = STATION_DESTROYED_NUKE
var/total_players = joined_player_list.len
if(joined_player_list.len)
to_chat(world, "<BR>[TAB]Total Population: <B>[total_players]</B>")
var/total_players = GLOB.joined_player_list.len
if(total_players)
to_chat(world, "<BR>[GLOB.TAB]Total Population: <B>[total_players]</B>")
if(station_evacuated)
to_chat(world, "<BR>[TAB]Evacuation Rate: <B>[num_escapees] ([PERCENT(num_escapees/total_players)]%)</B>")
to_chat(world, "<BR>[TAB](on emergency shuttle): <B>[num_shuttle_escapees] ([PERCENT(num_shuttle_escapees/total_players)]%)</B>")
to_chat(world, "<BR>[GLOB.TAB]Evacuation Rate: <B>[num_escapees] ([PERCENT(num_escapees/total_players)]%)</B>")
to_chat(world, "<BR>[GLOB.TAB](on emergency shuttle): <B>[num_shuttle_escapees] ([PERCENT(num_shuttle_escapees/total_players)]%)</B>")
news_report = STATION_EVACUATED
if(SSshuttle.emergency.is_hijacked())
news_report = SHUTTLE_HIJACK
to_chat(world, "<BR>[TAB]Survival Rate: <B>[num_survivors] ([PERCENT(num_survivors/total_players)]%)</B>")
to_chat(world, "<BR>[GLOB.TAB]Survival Rate: <B>[num_survivors] ([PERCENT(num_survivors/total_players)]%)</B>")
to_chat(world, "<BR>")
CHECK_TICK
//Silicon laws report
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
for (var/mob/living/silicon/ai/aiPlayer in GLOB.mob_list)
if (aiPlayer.stat != 2 && aiPlayer.mind)
to_chat(world, "<b>[aiPlayer.name] (Played by: [aiPlayer.mind.key])'s laws at the end of the round were:</b>")
aiPlayer.show_laws(1)
@@ -501,7 +500,7 @@ SUBSYSTEM_DEF(ticker)
CHECK_TICK
for (var/mob/living/silicon/robot/robo in mob_list)
for (var/mob/living/silicon/robot/robo in GLOB.mob_list)
if (!robo.connected_ai && robo.mind)
if (robo.stat != 2)
to_chat(world, "<b>[robo.name] (Played by: [robo.mind.key]) survived as an AI-less borg! Its laws were:</b>")
@@ -552,9 +551,9 @@ SUBSYSTEM_DEF(ticker)
//Borers
var/borerwin = FALSE
if(borers.len)
if(GLOB.borers.len)
var/borertext = "<br><font size=3><b>The borers were:</b></font>"
for(var/mob/living/simple_animal/borer/B in borers)
for(var/mob/living/simple_animal/borer/B in GLOB.borers)
if((B.key || B.controlling) && B.stat != DEAD)
borertext += "<br>[B.controlling ? B.victim.key : B.key] was [B.truename] ("
var/turf/location = get_turf(B)
@@ -566,20 +565,20 @@ SUBSYSTEM_DEF(ticker)
to_chat(world, borertext)
var/total_borers = 0
for(var/mob/living/simple_animal/borer/B in borers)
for(var/mob/living/simple_animal/borer/B in GLOB.borers)
if((B.key || B.victim) && B.stat != DEAD)
total_borers++
if(total_borers)
var/total_borer_hosts = 0
for(var/mob/living/carbon/C in mob_list)
for(var/mob/living/carbon/C in GLOB.mob_list)
var/mob/living/simple_animal/borer/D = C.has_brain_worms()
var/turf/location = get_turf(C)
if(location.z == ZLEVEL_CENTCOM && D && D.stat != DEAD)
total_borer_hosts++
if(total_borer_hosts_needed <= total_borer_hosts)
if(GLOB.total_borer_hosts_needed <= total_borer_hosts)
borerwin = TRUE
to_chat(world, "<b>There were [total_borers] borers alive at round end!</b>")
to_chat(world, "<b>A total of [total_borer_hosts] borers with hosts escaped on the shuttle alive. The borers needed [total_borer_hosts_needed] hosts to escape.</b>")
to_chat(world, "<b>A total of [total_borer_hosts] borers with hosts escaped on the shuttle alive. The borers needed [GLOB.total_borer_hosts_needed] hosts to escape.</b>")
if(borerwin)
to_chat(world, "<b><font color='green'>The borers were successful!</font></b>")
else
@@ -706,7 +705,12 @@ SUBSYSTEM_DEF(ticker)
queued_players = SSticker.queued_players
cinematic = SSticker.cinematic
maprotatechecked = SSticker.maprotatechecked
round_start_time = SSticker.round_start_time
queue_delay = SSticker.queue_delay
queued_players = SSticker.queued_players
cinematic = SSticker.cinematic
maprotatechecked = SSticker.maprotatechecked
/datum/controller/subsystem/ticker/proc/send_news_report()
var/news_message
+11 -11
View File
@@ -53,7 +53,7 @@ SUBSYSTEM_DEF(vote)
greatest_votes = votes
//default-vote for everyone who didn't vote
if(!config.vote_no_default && choices.len)
var/list/non_voters = directory.Copy()
var/list/non_voters = GLOB.directory.Copy()
non_voters -= voted
for (var/non_voter_ckey in non_voters)
var/client/C = non_voters[non_voter_ckey]
@@ -65,10 +65,10 @@ SUBSYSTEM_DEF(vote)
if(choices["Continue Playing"] >= greatest_votes)
greatest_votes = choices["Continue Playing"]
else if(mode == "gamemode")
if(master_mode in choices)
choices[master_mode] += non_voters.len
if(choices[master_mode] >= greatest_votes)
greatest_votes = choices[master_mode]
if(GLOB.master_mode in choices)
choices[GLOB.master_mode] += non_voters.len
if(choices[GLOB.master_mode] >= greatest_votes)
greatest_votes = choices[GLOB.master_mode]
//get all options with that many votes and return them in a list
. = list()
if(greatest_votes)
@@ -98,7 +98,7 @@ SUBSYSTEM_DEF(vote)
. = pick(winners)
text += "\n<b>Vote Result: [.]</b>"
else
text += "\n<b>Did not vote:</b> [clients.len-voted.len]"
text += "\n<b>Did not vote:</b> [GLOB.clients.len-voted.len]"
else
text += "<b>Vote Result: Inconclusive - No Votes!</b>"
log_vote(text)
@@ -115,15 +115,15 @@ SUBSYSTEM_DEF(vote)
if(. == "Restart Round")
restart = 1
if("gamemode")
if(master_mode != .)
if(GLOB.master_mode != .)
world.save_mode(.)
if(SSticker && SSticker.mode)
restart = 1
else
master_mode = .
GLOB.master_mode = .
if(restart)
var/active_admins = 0
for(var/client/C in admins)
for(var/client/C in GLOB.admins)
if(!C.is_afk() && check_rights_for(C, R_SERVER))
active_admins = 1
break
@@ -156,7 +156,7 @@ SUBSYSTEM_DEF(vote)
var/admin = FALSE
var/ckey = ckey(initiator_key)
if((admin_datums[ckey]) || (ckey in deadmins))
if((GLOB.admin_datums[ckey]) || (ckey in GLOB.deadmins))
admin = TRUE
if(next_allowed_time > world.time && !admin)
@@ -189,7 +189,7 @@ SUBSYSTEM_DEF(vote)
log_vote(text)
to_chat(world, "\n<font color='purple'><b>[text]</b>\nType <b>vote</b> or click <a href='?src=\ref[src]'>here</a> to place your votes.\nYou have [config.vote_period/10] seconds to vote.</font>")
time_remaining = round(config.vote_period/10)
for(var/c in clients)
for(var/c in GLOB.clients)
var/client/C = c
var/datum/action/vote/V = new
if(question)
+1 -2
View File
@@ -1,5 +1,4 @@
//Used for all kinds of weather, ex. lavaland ash storms.
SUBSYSTEM_DEF(weather)
name = "Weather"
flags = SS_BACKGROUND
@@ -13,7 +12,7 @@ SUBSYSTEM_DEF(weather)
var/datum/weather/W = V
if(W.aesthetic)
continue
for(var/mob/living/L in mob_list)
for(var/mob/living/L in GLOB.mob_list)
if(W.can_impact(L))
W.impact(L)
for(var/Z in eligible_zlevels)
+4 -4
View File
@@ -68,7 +68,7 @@
C.present_tasks(owner) //Memorize the objectives
/datum/antagonist/clockcultist/apply_innate_effects()
all_clockwork_mobs += owner
GLOB.all_clockwork_mobs += owner
owner.faction |= "ratvar"
owner.grant_language(/datum/language/ratvar)
owner.update_action_buttons_icon() //because a few clockcult things are action buttons and we may be wearing/holding them for whatever reason, we need to update buttons
@@ -84,7 +84,7 @@
A.can_be_carded = FALSE
A.requires_power = POWER_REQ_CLOCKCULT
var/list/AI_frame = list(image('icons/mob/clockwork_mobs.dmi', A, "aiframe")) //make the AI's cool frame
for(var/d in cardinal)
for(var/d in GLOB.cardinal)
AI_frame += image('icons/mob/clockwork_mobs.dmi', A, "eye[rand(1, 10)]", dir = d) //the eyes are randomly fast or slow
A.add_overlay(AI_frame)
if(!A.lacks_power())
@@ -117,12 +117,12 @@
hierophant_network.span_for_name = "nezbere"
hierophant_network.span_for_message = "brass"
owner.throw_alert("clockinfo", /obj/screen/alert/clockwork/infodump)
if(!clockwork_gateway_activated)
if(!GLOB.clockwork_gateway_activated)
owner.throw_alert("scripturereq", /obj/screen/alert/clockwork/scripture_reqs)
..()
/datum/antagonist/clockcultist/remove_innate_effects()
all_clockwork_mobs -= owner
GLOB.all_clockwork_mobs -= owner
owner.faction -= "ratvar"
owner.remove_language(/datum/language/ratvar)
owner.clear_alert("clockinfo")
+20 -20
View File
@@ -17,14 +17,14 @@
var/list/fields = list()
/datum/data/record/Destroy()
if(src in data_core.medical)
data_core.medical -= src
if(src in data_core.security)
data_core.security -= src
if(src in data_core.general)
data_core.general -= src
if(src in data_core.locked)
data_core.locked -= src
if(src in GLOB.data_core.medical)
GLOB.data_core.medical -= src
if(src in GLOB.data_core.security)
GLOB.data_core.security -= src
if(src in GLOB.data_core.general)
GLOB.data_core.general -= src
if(src in GLOB.data_core.locked)
GLOB.data_core.locked -= src
. = ..()
/datum/data/crime
@@ -77,13 +77,13 @@
return
/datum/datacore/proc/manifest()
for(var/mob/dead/new_player/N in player_list)
for(var/mob/dead/new_player/N in GLOB.player_list)
if(ishuman(N.new_character))
manifest_inject(N.new_character, N.client)
CHECK_TICK
/datum/datacore/proc/manifest_modify(name, assignment)
var/datum/data/record/foundrecord = find_record("name", name, data_core.general)
var/datum/data/record/foundrecord = find_record("name", name, GLOB.data_core.general)
if(foundrecord)
foundrecord.fields["rank"] = assignment
@@ -111,32 +111,32 @@
"}
var/even = 0
// sort mobs
for(var/datum/data/record/t in data_core.general)
for(var/datum/data/record/t in GLOB.data_core.general)
var/name = t.fields["name"]
var/rank = t.fields["rank"]
var/department = 0
if(rank in command_positions)
if(rank in GLOB.command_positions)
heads[name] = rank
department = 1
if(rank in security_positions)
if(rank in GLOB.security_positions)
sec[name] = rank
department = 1
if(rank in engineering_positions)
if(rank in GLOB.engineering_positions)
eng[name] = rank
department = 1
if(rank in medical_positions)
if(rank in GLOB.medical_positions)
med[name] = rank
department = 1
if(rank in science_positions)
if(rank in GLOB.science_positions)
sci[name] = rank
department = 1
if(rank in supply_positions)
if(rank in GLOB.supply_positions)
sup[name] = rank
department = 1
if(rank in civilian_positions)
if(rank in GLOB.civilian_positions)
civ[name] = rank
department = 1
if(rank in nonhuman_positions)
if(rank in GLOB.nonhuman_positions)
bot[name] = rank
department = 1
if(!department && !(name in heads))
@@ -195,7 +195,6 @@
return dat
var/record_id_num = 1001
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H, client/C)
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
var/assignment
@@ -206,6 +205,7 @@ var/record_id_num = 1001
else
assignment = "Unassigned"
var/static/record_id_num = 1001
var/id = num2hex(record_id_num++,6)
if(!C)
C = H.client
+3 -3
View File
@@ -850,7 +850,7 @@
if(A.reagents)
var/chosen_id
var/list/reagent_options = sortList(chemical_reagents_list)
var/list/reagent_options = sortList(GLOB.chemical_reagents_list)
switch(alert(usr, "Choose a method.", "Add Reagents", "Enter ID", "Choose ID"))
if("Enter ID")
var/valid_id
@@ -1031,14 +1031,14 @@
to_chat(usr, "This can only be done to instances of type /mob/living/carbon/human")
return
var/result = input(usr, "Please choose a new species","Species") as null|anything in species_list
var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list
if(!H)
to_chat(usr, "Mob doesn't exist anymore")
return
if(result)
var/newtype = species_list[result]
var/newtype = GLOB.species_list[result]
H.set_species(newtype)
else if(href_list["editbodypart"])
-4
View File
@@ -26,10 +26,6 @@
#define DANGEROUS "Dangerous!"
#define BIOHAZARD "BIOHAZARD THREAT!"
var/list/diseases = subtypesof(/datum/disease)
/datum/disease
//Flags
var/visibility_flags = 0
+16 -23
View File
@@ -9,15 +9,7 @@
#define SYMPTOM_LIMIT 8
var/list/archive_diseases = list()
// The order goes from easy to cure to hard to cure.
var/list/advance_cures = list(
"sodiumchloride", "sugar", "orangejuice",
"spaceacillin", "salglu_solution", "ethanol",
"leporazine", "synaptizine", "lipolicide",
"silver", "gold"
)
/*
@@ -40,6 +32,14 @@ var/list/advance_cures = list(
var/list/symptoms = list() // The symptoms of the disease.
var/id = ""
var/processing = 0
// The order goes from easy to cure to hard to cure.
var/static/list/advance_cures = list(
"sodiumchloride", "sugar", "orangejuice",
"spaceacillin", "salglu_solution", "ethanol",
"leporazine", "synaptizine", "lipolicide",
"silver", "gold"
)
/*
@@ -48,13 +48,6 @@ var/list/advance_cures = list(
*/
/datum/disease/advance/New(var/process = 1, var/datum/disease/advance/D)
// Setup our dictionary if it hasn't already.
if(!dictionary_symptoms.len)
for(var/symp in list_symptoms)
var/datum/symptom/S = new symp
dictionary_symptoms[S.id] = symp
if(!istype(D))
D = null
// Generate symptoms if we weren't given any.
@@ -141,7 +134,7 @@ var/list/advance_cures = list(
// Generate symptoms. By default, we only choose non-deadly symptoms.
var/list/possible_symptoms = list()
for(var/symp in list_symptoms)
for(var/symp in SSdisease.list_symptoms)
var/datum/symptom/S = new symp
if(S.level >= level_min && S.level <= level_max)
if(!HasSymptom(S))
@@ -168,13 +161,13 @@ var/list/advance_cures = list(
AssignProperties()
id = null
if(!archive_diseases[GetDiseaseID()])
if(!SSdisease.archive_diseases[GetDiseaseID()])
if(new_name)
AssignName()
archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
SSdisease.archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
SSdisease.archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
var/datum/disease/advance/A = archive_diseases[GetDiseaseID()]
var/datum/disease/advance/A = SSdisease.archive_diseases[GetDiseaseID()]
AssignName(A.name)
//Generate disease properties based on the effects. Returns an associated list.
@@ -259,7 +252,7 @@ var/list/advance_cures = list(
cures = list(advance_cures[res])
// Get the cure name from the cure_id
var/datum/reagent/D = chemical_reagents_list[cures[1]]
var/datum/reagent/D = GLOB.chemical_reagents_list[cures[1]]
cure_text = D.name
@@ -379,7 +372,7 @@ var/list/advance_cures = list(
var/list/symptoms = list()
symptoms += "Done"
symptoms += list_symptoms.Copy()
symptoms += SSdisease.list_symptoms.Copy()
do
if(user)
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
@@ -405,7 +398,7 @@ var/list/advance_cures = list(
for(var/datum/disease/advance/AD in SSdisease.processing)
AD.Refresh()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
if(H.z != 1)
continue
if(!H.HasDisease(D))
@@ -42,7 +42,7 @@ Bonus
// Archive their DNA before they were infected.
/datum/symptom/genetic_mutation/Start(datum/disease/advance/A)
possible_mutations = (bad_mutations | not_good_mutations) - mutations_list[RACEMUT]
possible_mutations = (GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT]
var/mob/living/carbon/M = A.affected_mob
if(M)
if(!M.has_dna())
@@ -282,7 +282,7 @@ Bonus
var/amt_healed = 1
M.adjustBrainLoss(-amt_healed)
//Non-power mutations, excluding race, so the virus does not force monkey -> human transformations.
var/list/unclean_mutations = (not_good_mutations|bad_mutations) - mutations_list[RACEMUT]
var/list/unclean_mutations = (GLOB.not_good_mutations|GLOB.bad_mutations) - GLOB.mutations_list[RACEMUT]
M.dna.remove_mutation_group(unclean_mutations)
M.radiation = max(M.radiation - (2 * amt_healed), 0)
return 1
@@ -1,10 +1,5 @@
// Symptoms are the effects that engineered advanced diseases do.
var/list/list_symptoms = subtypesof(/datum/symptom)
var/list/dictionary_symptoms = list()
var/global/const/SYMPTOM_ACTIVATION_PROB = 5
/datum/symptom
// Buffs/Debuffs the symptom has to the overall engineered disease.
var/name = ""
@@ -18,9 +13,10 @@ var/global/const/SYMPTOM_ACTIVATION_PROB = 5
var/severity = 0
// The hash tag for our diseases, we will add it up with our other symptoms to get a unique id! ID MUST BE UNIQUE!!!
var/id = ""
var/static/SYMPTOM_ACTIVATION_PROB = 5
/datum/symptom/New()
var/list/S = list_symptoms
var/list/S = SSdisease.list_symptoms
for(var/i = 1; i <= S.len; i++)
if(src.type == S[i])
id = "[i]"
+26 -26
View File
@@ -41,15 +41,15 @@
new_dna.mutations = mutations.Copy()
/datum/dna/proc/add_mutation(mutation_name)
var/datum/mutation/human/HM = mutations_list[mutation_name]
var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name]
HM.on_acquiring(holder)
/datum/dna/proc/remove_mutation(mutation_name)
var/datum/mutation/human/HM = mutations_list[mutation_name]
var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name]
HM.on_losing(holder)
/datum/dna/proc/check_mutation(mutation_name)
var/datum/mutation/human/HM = mutations_list[mutation_name]
var/datum/mutation/human/HM = GLOB.mutations_list[mutation_name]
return mutations.Find(HM)
/datum/dna/proc/remove_all_mutations()
@@ -68,28 +68,28 @@
L[DNA_GENDER_BLOCK] = construct_block((holder.gender!=MALE)+1, 2)
if(ishuman(holder))
var/mob/living/carbon/human/H = holder
if(!hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair, hair_styles_list, hair_styles_male_list, hair_styles_female_list)
L[DNA_HAIR_STYLE_BLOCK] = construct_block(hair_styles_list.Find(H.hair_style), hair_styles_list.len)
if(!GLOB.hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/hair,GLOB.hair_styles_list, GLOB.hair_styles_male_list, GLOB.hair_styles_female_list)
L[DNA_HAIR_STYLE_BLOCK] = construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len)
L[DNA_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.hair_color)
if(!facial_hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, facial_hair_styles_list, facial_hair_styles_male_list, facial_hair_styles_female_list)
L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(facial_hair_styles_list.Find(H.facial_hair_style), facial_hair_styles_list.len)
if(!GLOB.facial_hair_styles_list.len)
init_sprite_accessory_subtypes(/datum/sprite_accessory/facial_hair, GLOB.facial_hair_styles_list, GLOB.facial_hair_styles_male_list, GLOB.facial_hair_styles_female_list)
L[DNA_FACIAL_HAIR_STYLE_BLOCK] = construct_block(GLOB.facial_hair_styles_list.Find(H.facial_hair_style), GLOB.facial_hair_styles_list.len)
L[DNA_FACIAL_HAIR_COLOR_BLOCK] = sanitize_hexcolor(H.facial_hair_color)
L[DNA_SKIN_TONE_BLOCK] = construct_block(skin_tones.Find(H.skin_tone), skin_tones.len)
L[DNA_SKIN_TONE_BLOCK] = construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len)
L[DNA_EYE_COLOR_BLOCK] = sanitize_hexcolor(H.eye_color)
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
if(L[i])
. += L[i]
else
. += random_string(DNA_BLOCK_SIZE,hex_characters)
. += random_string(DNA_BLOCK_SIZE,GLOB.hex_characters)
return .
/datum/dna/proc/generate_struc_enzymes()
var/list/sorting = new /list(DNA_STRUC_ENZYMES_BLOCKS)
var/result = ""
for(var/datum/mutation/human/A in good_mutations + bad_mutations + not_good_mutations)
for(var/datum/mutation/human/A in GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations)
if(A.name == RACEMUT && ismonkey(holder))
sorting[A.dna_block] = num2hex(A.lowest_value + rand(0, 256 * 6), DNA_BLOCK_SIZE)
mutations |= A
@@ -106,7 +106,7 @@
real_name = holder.real_name
. += md5(holder.real_name)
else
. += random_string(DNA_UNIQUE_ENZYMES_LEN, hex_characters)
. += random_string(DNA_UNIQUE_ENZYMES_LEN, GLOB.hex_characters)
return .
/datum/dna/proc/update_ui_block(blocknumber)
@@ -119,15 +119,15 @@
if(DNA_FACIAL_HAIR_COLOR_BLOCK)
setblock(uni_identity, blocknumber, sanitize_hexcolor(H.facial_hair_color))
if(DNA_SKIN_TONE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(skin_tones.Find(H.skin_tone), skin_tones.len))
setblock(uni_identity, blocknumber, construct_block(GLOB.skin_tones.Find(H.skin_tone), GLOB.skin_tones.len))
if(DNA_EYE_COLOR_BLOCK)
setblock(uni_identity, blocknumber, sanitize_hexcolor(H.eye_color))
if(DNA_GENDER_BLOCK)
setblock(uni_identity, blocknumber, construct_block((H.gender!=MALE)+1, 2))
if(DNA_FACIAL_HAIR_STYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(facial_hair_styles_list.Find(H.facial_hair_style), facial_hair_styles_list.len))
setblock(uni_identity, blocknumber, construct_block(GLOB.facial_hair_styles_list.Find(H.facial_hair_style), GLOB.facial_hair_styles_list.len))
if(DNA_HAIR_STYLE_BLOCK)
setblock(uni_identity, blocknumber, construct_block(hair_styles_list.Find(H.hair_style), hair_styles_list.len))
setblock(uni_identity, blocknumber, construct_block(GLOB.hair_styles_list.Find(H.hair_style), GLOB.hair_styles_list.len))
/datum/dna/proc/mutations_say_mods(message)
if(message)
@@ -271,10 +271,10 @@
var/structure = dna.uni_identity
hair_color = sanitize_hexcolor(getblock(structure, DNA_HAIR_COLOR_BLOCK))
facial_hair_color = sanitize_hexcolor(getblock(structure, DNA_FACIAL_HAIR_COLOR_BLOCK))
skin_tone = skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), skin_tones.len)]
skin_tone = GLOB.skin_tones[deconstruct_block(getblock(structure, DNA_SKIN_TONE_BLOCK), GLOB.skin_tones.len)]
eye_color = sanitize_hexcolor(getblock(structure, DNA_EYE_COLOR_BLOCK))
facial_hair_style = facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), facial_hair_styles_list.len)]
hair_style = hair_styles_list[deconstruct_block(getblock(structure, DNA_HAIR_STYLE_BLOCK), hair_styles_list.len)]
facial_hair_style = GLOB.facial_hair_styles_list[deconstruct_block(getblock(structure, DNA_FACIAL_HAIR_STYLE_BLOCK), GLOB.facial_hair_styles_list.len)]
hair_style = GLOB.hair_styles_list[deconstruct_block(getblock(structure, DNA_HAIR_STYLE_BLOCK), GLOB.hair_styles_list.len)]
if(icon_update)
update_body()
update_hair()
@@ -291,7 +291,7 @@
if(!has_dna())
return
for(var/datum/mutation/human/A in good_mutations | bad_mutations | not_good_mutations)
for(var/datum/mutation/human/A in GLOB.good_mutations | GLOB.bad_mutations | GLOB.not_good_mutations)
if(ismob(A.check_block(src, force_powers)))
return //we got monkeyized/humanized, this mob will be deleted, no need to continue.
@@ -325,26 +325,26 @@
/mob/living/carbon/proc/randmutb()
if(!has_dna())
return
var/datum/mutation/human/HM = pick((bad_mutations | not_good_mutations) - mutations_list[RACEMUT])
var/datum/mutation/human/HM = pick((GLOB.bad_mutations | GLOB.not_good_mutations) - GLOB.mutations_list[RACEMUT])
. = HM.force_give(src)
/mob/living/carbon/proc/randmutg()
if(!has_dna())
return
var/datum/mutation/human/HM = pick(good_mutations)
var/datum/mutation/human/HM = pick(GLOB.good_mutations)
. = HM.force_give(src)
/mob/living/carbon/proc/randmutvg()
if(!has_dna())
return
var/datum/mutation/human/HM = pick((good_mutations) - mutations_list[HULK] - mutations_list[DWARFISM])
var/datum/mutation/human/HM = pick((GLOB.good_mutations) - GLOB.mutations_list[HULK] - GLOB.mutations_list[DWARFISM])
. = HM.force_give(src)
/mob/living/carbon/proc/randmuti()
if(!has_dna())
return
var/num = rand(1, DNA_UNI_IDENTITY_BLOCKS)
var/newdna = setblock(dna.uni_identity, num, random_string(DNA_BLOCK_SIZE, hex_characters))
var/newdna = setblock(dna.uni_identity, num, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
dna.uni_identity = newdna
updateappearance(mutations_overlay_update=1)
@@ -363,12 +363,12 @@
if(se)
for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++)
if(prob(probability))
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, random_string(DNA_BLOCK_SIZE, hex_characters))
M.dna.struc_enzymes = setblock(M.dna.struc_enzymes, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
M.domutcheck()
if(ui)
for(var/i=1, i<=DNA_UNI_IDENTITY_BLOCKS, i++)
if(prob(probability))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, hex_characters))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
M.updateappearance(mutations_overlay_update=1)
return 1
+2 -3
View File
@@ -1,8 +1,6 @@
#define EMOTE_VISIBLE 1
#define EMOTE_AUDIBLE 2
var/global/list/emote_list = list()
/datum/emote
var/key = "" //What calls the emote
var/key_third_person = "" //This will also call the emote
@@ -21,6 +19,7 @@ var/global/list/emote_list = list()
var/list/mob_type_allowed_typecache = list() //Types that are allowed to use that emote
var/list/mob_type_blacklist_typecache = list() //Types that are NOT allowed to use that emote
var/stat_allowed = CONSCIOUS
var/static/list/emote_list = list()
/datum/emote/New()
..()
@@ -53,7 +52,7 @@ var/global/list/emote_list = list()
user.log_message(msg, INDIVIDUAL_EMOTE_LOG)
msg = "<b>[user]</b> " + msg
for(var/mob/M in dead_mob_list)
for(var/mob/M in GLOB.dead_mob_list)
if(!M.client || isnewplayer(M))
continue
var/T = get_turf(src)
+6 -8
View File
@@ -1,5 +1,3 @@
var/global/datum/getrev/revdata = new()
/datum/getrev
var/parentcommit
var/commit
@@ -46,7 +44,7 @@ var/global/datum/getrev/revdata = new()
return
var/url = "https://api.github.com/repositories/[config.githubrepoid]/pulls/[line].json"
valid_HTTPSGet = TRUE
GLOB.valid_HTTPSGet = TRUE
var/json = HTTPSGet(url)
if(!json)
return
@@ -75,12 +73,12 @@ var/global/datum/getrev/revdata = new()
set name = "Show Server Revision"
set desc = "Check the current server code revision"
if(revdata.parentcommit)
to_chat(src, "<b>Server revision compiled on:</b> [revdata.date]")
if(revdata.testmerge.len)
to_chat(src, revdata.GetTestMergeInfo())
if(GLOB.revdata.parentcommit)
to_chat(src, "<b>Server revision compiled on:</b> [GLOB.revdata.date]")
if(GLOB.revdata.testmerge.len)
to_chat(src, GLOB.revdata.GetTestMergeInfo())
to_chat(src, "Based off master commit:")
to_chat(src, "<a href='[config.githuburl]/commit/[revdata.parentcommit]'>[revdata.parentcommit]</a>")
to_chat(src, "<a href='[config.githuburl]/commit/[GLOB.revdata.parentcommit]'>[GLOB.revdata.parentcommit]</a>")
else
to_chat(src, "Revision unknown")
to_chat(src, "<b>Current Infomational Settings:</b>")
+1 -1
View File
@@ -195,7 +195,7 @@
var/list/A_gases = A.gases
var/trace_gases
for(var/id in A_gases)
if(id in hardcoded_gases)
if(id in GLOB.hardcoded_gases)
continue
trace_gases = TRUE
break
+21 -21
View File
@@ -1,26 +1,26 @@
/* HUD DATUMS */
//GLOBAL HUD LIST
var/datum/atom_hud/huds = list( \
DATA_HUD_SECURITY_BASIC = new/datum/atom_hud/data/human/security/basic(), \
DATA_HUD_SECURITY_ADVANCED = new/datum/atom_hud/data/human/security/advanced(), \
DATA_HUD_MEDICAL_BASIC = new/datum/atom_hud/data/human/medical/basic(), \
DATA_HUD_MEDICAL_ADVANCED = new/datum/atom_hud/data/human/medical/advanced(), \
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(), \
ANTAG_HUD_CULT = new/datum/atom_hud/antag(), \
ANTAG_HUD_REV = new/datum/atom_hud/antag(), \
ANTAG_HUD_OPS = new/datum/atom_hud/antag(), \
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(), \
ANTAG_HUD_SHADOW = new/datum/atom_hud/antag(), \
ANTAG_HUD_TRAITOR = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_NINJA = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_CHANGELING = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_DEVIL = new/datum/atom_hud/antag(),\
ANTAG_HUD_SINTOUCHED = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),\
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),\
)
GLOBAL_LIST_INIT(huds, list(
DATA_HUD_SECURITY_BASIC = new/datum/atom_hud/data/human/security/basic(),
DATA_HUD_SECURITY_ADVANCED = new/datum/atom_hud/data/human/security/advanced(),
DATA_HUD_MEDICAL_BASIC = new/datum/atom_hud/data/human/medical/basic(),
DATA_HUD_MEDICAL_ADVANCED = new/datum/atom_hud/data/human/medical/advanced(),
DATA_HUD_DIAGNOSTIC = new/datum/atom_hud/data/diagnostic(),
ANTAG_HUD_CULT = new/datum/atom_hud/antag(),
ANTAG_HUD_REV = new/datum/atom_hud/antag(),
ANTAG_HUD_OPS = new/datum/atom_hud/antag(),
ANTAG_HUD_WIZ = new/datum/atom_hud/antag(),
ANTAG_HUD_SHADOW = new/datum/atom_hud/antag(),
ANTAG_HUD_TRAITOR = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_NINJA = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_CHANGELING = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_ABDUCTOR = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_DEVIL = new/datum/atom_hud/antag(),
ANTAG_HUD_SINTOUCHED = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_SOULLESS = new/datum/atom_hud/antag/hidden(),
ANTAG_HUD_CLOCKWORK = new/datum/atom_hud/antag(),
))
/datum/atom_hud
var/list/atom/hudatoms = list() //list of all atoms which display this hud
@@ -77,7 +77,7 @@ var/datum/atom_hud/huds = list( \
for(var/datum/gang/G in SSticker.mode.gangs)
gang_huds += G.ganghud
for(var/datum/atom_hud/hud in (huds|gang_huds))
for(var/datum/atom_hud/hud in (GLOB.huds|gang_huds))
if(src in hud.hudusers)
hud.add_hud_to(src)
+4 -4
View File
@@ -71,9 +71,9 @@
D.visible_message("<span class='danger'>[A] has weakened [D]!!</span>", \
"<span class='userdanger'>[A] has weakened [D]!</span>")
D.apply_effect(4, WEAKEN, armor_block)
D.forcesay(hit_appends)
D.forcesay(GLOB.hit_appends)
else if(D.lying)
D.forcesay(hit_appends)
D.forcesay(GLOB.hit_appends)
return 1
/datum/martial_art/proc/teach(mob/living/carbon/human/H,make_temporary=0)
@@ -137,10 +137,10 @@
"<span class='userdanger'>[A] has knocked [D] out with a haymaker!</span>")
D.apply_effect(10,WEAKEN,armor_block)
D.SetSleeping(5)
D.forcesay(hit_appends)
D.forcesay(GLOB.hit_appends)
add_logs(A, D, "knocked out (boxing) ")
else if(D.lying)
D.forcesay(hit_appends)
D.forcesay(GLOB.hit_appends)
return 1
/mob/living/carbon/human/proc/wrestling_help()
+15 -15
View File
@@ -283,7 +283,7 @@
if (SSticker.mode.config_tag=="revolution")
text = uppertext(text)
text = "<i><b>[text]</b></i>: "
if (assigned_role in command_positions)
if (assigned_role in GLOB.command_positions)
text += "<b>HEAD</b>|loyal|employee|headrev|rev"
else if (src in SSticker.mode.head_revolutionaries)
text += "head|loyal|<a href='?src=\ref[src];revolution=clear'>employee</a>|<b>HEADREV</b>|<a href='?src=\ref[src];revolution=rev'>rev</a>"
@@ -351,7 +351,7 @@
text += "<a href='?src=\ref[src];gangboss=\ref[G]'>gang leader</a>"
text += "<BR>"
if(gang_colors_pool.len)
if(GLOB.gang_colors_pool.len)
text += "<a href='?src=\ref[src];gang=new'>Create New Gang</a>"
sections["gang"] = text
@@ -383,7 +383,7 @@
text += "<b>OPERATIVE</b>|<a href='?src=\ref[src];nuclear=clear'>nanotrasen</a>"
text += "<br><a href='?src=\ref[src];nuclear=lair'>To shuttle</a>, <a href='?src=\ref[src];common=undress'>undress</a>, <a href='?src=\ref[src];nuclear=dressup'>dress up</a>."
var/code
for (var/obj/machinery/nuclearbomb/bombue in machines)
for (var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
code = bombue.r_code
break
@@ -898,11 +898,11 @@
qdel(SC)
if("new")
if(gang_colors_pool.len)
var/list/names = list("Random") + gang_name_pool
if(GLOB.gang_colors_pool.len)
var/list/names = list("Random") + GLOB.gang_name_pool
var/gangname = input("Pick a gang name.","Select Name") as null|anything in names
if(gangname && gang_colors_pool.len) //Check again just in case another admin made max gangs at the same time
if(!(gangname in gang_name_pool))
if(gangname && GLOB.gang_colors_pool.len) //Check again just in case another admin made max gangs at the same time
if(!(gangname in GLOB.gang_name_pool))
gangname = null
var/datum/gang/newgang = new(null,gangname)
SSticker.mode.gangs += newgang
@@ -990,7 +990,7 @@
log_admin("[key_name(usr)] has wizard'ed [current].")
SSticker.mode.update_wiz_icons_added(src)
if("lair")
current.loc = pick(wizardstart)
current.loc = pick(GLOB.wizardstart)
if("dressup")
SSticker.mode.equip_wizard(current)
if("name")
@@ -1069,7 +1069,7 @@
to_chat(usr, "<span class='danger'>Equipping a syndicate failed!</span>")
if("tellcode")
var/code
for (var/obj/machinery/nuclearbomb/bombue in machines)
for (var/obj/machinery/nuclearbomb/bombue in GLOB.machines)
if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN")
code = bombue.r_code
break
@@ -1352,7 +1352,7 @@
store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke_code]", 0, 0)
to_chat(current, "The nuclear authorization code is: <B>[nuke_code]</B>")
else
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in GLOB.nuke_list
if(nuke)
store_memory("<B>Syndicate Nuclear Bomb Code</B>: [nuke.r_code]", 0, 0)
to_chat(current, "The nuclear authorization code is: <B>nuke.r_code</B>")
@@ -1378,11 +1378,11 @@
SSticker.mode.wizards += src
special_role = "Wizard"
assigned_role = "Wizard"
if(!wizardstart.len)
current.loc = pick(latejoin)
if(!GLOB.wizardstart.len)
current.loc = pick(GLOB.latejoin)
to_chat(current, "HOT INSERTION, GO GO GO")
else
current.loc = pick(wizardstart)
current.loc = pick(GLOB.wizardstart)
SSticker.mode.equip_wizard(current)
SSticker.mode.name_wizard(current)
@@ -1479,7 +1479,7 @@
var/list/obj/effect/landmark/abductor/scientist_landmarks = new
agent_landmarks.len = 4
scientist_landmarks.len = 4
for(var/obj/effect/landmark/abductor/A in landmarks_list)
for(var/obj/effect/landmark/abductor/A in GLOB.landmarks_list)
if(istype(A,/obj/effect/landmark/abductor/agent))
agent_landmarks[text2num(A.team)] = A
else if(istype(A,/obj/effect/landmark/abductor/scientist))
@@ -1532,7 +1532,7 @@
INVOKE_ASYNC(S, /obj/effect/proc_holder/spell.proc/start_recharge)
/datum/mind/proc/get_ghost(even_if_they_cant_reenter)
for(var/mob/dead/observer/G in dead_mob_list)
for(var/mob/dead/observer/G in GLOB.dead_mob_list)
if(G.mind == src)
if(G.can_reenter_corpse || even_if_they_cant_reenter)
return G
+4 -4
View File
@@ -1,11 +1,11 @@
/var/global/list/mutations_list = list()
GLOBAL_LIST_EMPTY(mutations_list)
/datum/mutation
var/name
/datum/mutation/New()
mutations_list[name] = src
GLOB.mutations_list[name] = src
/datum/mutation/human
@@ -536,9 +536,9 @@
if(message)
message = replacetext(message,"w","v")
message = replacetext(message,"j","y")
message = replacetext(message,"a",pick("å","ä","æ","a"))
message = replacetext(message,"a",pick("","","","a"))
message = replacetext(message,"bo","bjo")
message = replacetext(message,"o",pick("ö","ø","o"))
message = replacetext(message,"o",pick("","","o"))
if(prob(30))
message += " Bork[pick("",", bork",", bork, bork")]!"
return message

Some files were not shown because too many files have changed in this diff Show More