April sync (#360)
* Maps and things no code/icons * helpers defines globalvars * Onclick world.dm orphaned_procs * subsystems Round vote and shuttle autocall done here too * datums * Game folder * Admin - chatter modules * clothing - mining * modular computers - zambies * client * mob level 1 * mob stage 2 + simple_animal * silicons n brains * mob stage 3 + Alien/Monkey * human mobs * icons updated * some sounds * emitter y u no commit * update tgstation.dme * compile fixes * travis fixes Also removes Fast digest mode, because reasons. * tweaks for travis Mentors are broke again Also fixes Sizeray guns * oxygen loss fix for vore code. * removes unused code * some code updates * bulk fixes * further fixes * outside things * whoops. * Maint bar ported * GLOBs.
This commit is contained in:
37
code/__DATASTRUCTURES/globals.dm
Normal file
37
code/__DATASTRUCTURES/globals.dm
Normal 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)
|
||||
@@ -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,18 +52,16 @@
|
||||
#define SS_SLEEPING 4 //fire() slept.
|
||||
#define SS_PAUSING 5 //in the middle of pausing
|
||||
|
||||
#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
|
||||
|
||||
//Timing subsystem
|
||||
//Don't run if there is an identical unique timer active
|
||||
#define TIMER_UNIQUE 0x1
|
||||
//For unique timers: Replace the old timer rather then not start this one
|
||||
#define TIMER_OVERRIDE 0x2
|
||||
//Timing should be based on how timing progresses on clients, not the sever.
|
||||
// tracking this is more expensive,
|
||||
// should only be used in conjuction with things that have to progress client side, such as animate() or sound()
|
||||
#define TIMER_CLIENT_TIME 0x4
|
||||
//Timer can be stopped using deltimer()
|
||||
#define TIMER_STOPPABLE 0x8
|
||||
//To be used with TIMER_UNIQUE
|
||||
//prevents distinguishing identical timers with the wait variable
|
||||
#define TIMER_NO_HASH_WAIT 0x10
|
||||
#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();\
|
||||
}\
|
||||
/datum/controller/subsystem/processing/##X
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
#define ADMIN_VV(atom) "(<a href='?_src_=vars;Vars=\ref[atom]'>VV</a>)"
|
||||
#define ADMIN_SM(user) "(<a href='?_src_=holder;subtlemessage=\ref[user]'>SM</a>)"
|
||||
#define ADMIN_TP(user) "(<a href='?_src_=holder;traitor=\ref[user]'>TP</a>)"
|
||||
#define ADMIN_BSA(user) "(<a href='?_src_=holder;BlueSpaceArtillery=\ref[user]'>BSA</a>)"
|
||||
#define ADMIN_KICK(user) "(<a href='?_src_=holder;boot2=\ref[user]'>KICK</a>)"
|
||||
#define ADMIN_CENTCOM_REPLY(user) "(<a href='?_src_=holder;CentcommReply=\ref[user]'>RPLY</a>)"
|
||||
#define ADMIN_SYNDICATE_REPLY(user) "(<a href='?_src_=holder;SyndicateReply=\ref[user]'>RPLY</a>)"
|
||||
@@ -52,11 +51,14 @@
|
||||
#define ADMIN_LOOKUP(user) "[key_name_admin(user)][ADMIN_QUE(user)]"
|
||||
#define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)][ADMIN_QUE(user)] [ADMIN_FLW(user)]"
|
||||
#define ADMIN_SET_SD_CODE "(<a href='?_src_=holder;set_selfdestruct_code=1'>SETCODE</a>)"
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)]"
|
||||
#define ADMIN_FULLMONTY_NONAME(user) "[ADMIN_QUE(user)] [ADMIN_PP(user)] [ADMIN_VV(user)] [ADMIN_SM(user)] [ADMIN_FLW(user)] [ADMIN_TP(user)] [ADMIN_INDIVIDUALLOG(user)]"
|
||||
#define ADMIN_FULLMONTY(user) "[key_name_admin(user)] [ADMIN_FULLMONTY_NONAME(user)]"
|
||||
#define ADMIN_JMP(src) "(<a href='?_src_=holder;adminplayerobservecoodjump=1;X=[src.x];Y=[src.y];Z=[src.z]'>JMP</a>)"
|
||||
#define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]"
|
||||
#define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]"
|
||||
#define ADMIN_INDIVIDUALLOG(user) "(<a href='?_src_=holder;individuallog=\ref[user]'>LOGS</a>)"
|
||||
|
||||
#define ADMIN_PUNISHMENT_LIGHTNING "Lightning bolt"
|
||||
#define ADMIN_PUNISHMENT_BRAINDAMAGE "Brain damage"
|
||||
#define ADMIN_PUNISHMENT_GIB "Gib"
|
||||
#define ADMIN_PUNISHMENT_GIB "Gib"
|
||||
#define ADMIN_PUNISHMENT_BSA "Bluespace Artillery Device"
|
||||
@@ -65,18 +65,6 @@
|
||||
#define MILK_RATE_MULT 1
|
||||
#define MILK_EFFICIENCY 1
|
||||
|
||||
|
||||
// Admin ticket things
|
||||
#define TICKET_RESOLVED "Yes"
|
||||
#define TICKET_UNRESOLVED "No"
|
||||
#define TICKET_UNASSIGNED "N/A"
|
||||
|
||||
#define TICKET_REPLIED "Yes"
|
||||
#define TICKET_UNREPLIED "No"
|
||||
|
||||
#define TICKET_INACTIVE "No"
|
||||
#define TICKET_ACTIVE "Yes"
|
||||
|
||||
//Individual logging define
|
||||
#define INDIVIDUAL_LOOC_LOG "LOOC log"
|
||||
|
||||
|
||||
@@ -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"
|
||||
@@ -43,7 +43,9 @@ var/global/list/all_scripture = list() //a list containing scripture instances;
|
||||
|
||||
#define SLAB_SLOWDOWN_MAXIMUM 2700 //maximum slowdown from additional servants; defaults to 4 minutes 30 seconds
|
||||
|
||||
#define CACHE_PRODUCTION_TIME 900 //how long(deciseconds) caches require to produce a component; defaults to 1 minute 30 seconds
|
||||
#define CACHE_PRODUCTION_TIME 600 //how long(deciseconds) caches require to produce a component; defaults to 1 minute
|
||||
|
||||
#define ACTIVE_CACHE_SLOWDOWN 100 //how many additional deciseconds caches take to produce a component for each linked cache; defaults to 10 seconds
|
||||
|
||||
#define LOWER_PROB_PER_COMPONENT 10 //how much each component in the cache reduces the weight of getting another of that component type
|
||||
|
||||
@@ -85,10 +87,12 @@ var/global/list/all_scripture = list() //a list containing scripture instances;
|
||||
|
||||
#define GATEWAY_RATVAR_ARRIVAL 300 //when progress is at or above this, game over ratvar's here everybody go home
|
||||
|
||||
//Objective defines
|
||||
#define CLOCKCULT_GATEWAY "summon ratvar"
|
||||
#define ARK_SUMMON_COST 3 //how many of each component an Ark costs to summon
|
||||
|
||||
#define CLOCKCULT_ESCAPE "proselytize the station"
|
||||
#define ARK_CONSUME_COST 7 //how many of each component an Ark needs to consume to activate
|
||||
|
||||
//Objective text define
|
||||
#define CLOCKCULT_OBJECTIVE "Construct the Ark of the Clockwork Justicar and free Ratvar."
|
||||
|
||||
//misc clockcult stuff
|
||||
#define MARAUDER_EMERGE_THRESHOLD 65 //marauders cannot emerge unless host is at this% or less health
|
||||
|
||||
@@ -60,6 +60,12 @@
|
||||
#define GEAR_SECURE 1
|
||||
#define GEAR_LOOSE 2
|
||||
|
||||
//floodlights because apparently we use defines now
|
||||
#define FLOODLIGHT_NEEDS_WIRES 0
|
||||
#define FLOODLIGHT_NEEDS_LIGHTS 1
|
||||
#define FLOODLIGHT_NEEDS_SECURING 2
|
||||
#define FLOODLIGHT_NEEDS_WRENCHING 3
|
||||
|
||||
//other construction-related things
|
||||
|
||||
//windows affected by nar-sie turn this color.
|
||||
|
||||
@@ -19,10 +19,11 @@
|
||||
#define ON_BORDER 512 // item has priority to check when entering or leaving
|
||||
|
||||
#define NOSLIP 1024 //prevents from slipping on wet floors, in space etc
|
||||
#define CLEAN_ON_MOVE 2048
|
||||
|
||||
// BLOCK_GAS_SMOKE_EFFECT only used in masks at the moment.
|
||||
#define BLOCK_GAS_SMOKE_EFFECT 8192 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY! (NOTE: flag shared with THICKMATERIAL)
|
||||
#define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body. (NOTE: flag shared with BLOCK_GAS_SMOKE_EFFECT)
|
||||
#define BLOCK_GAS_SMOKE_EFFECT 4096 // blocks the effect that chemical clouds would have on a mob --glasses, mask and helmets ONLY!
|
||||
#define THICKMATERIAL 8192 //prevents syringes, parapens and hypos if the external suit or helmet (if targeting head) has this flag. Example: space suits, biosuit, bombsuits, thick suits that cover your body.
|
||||
#define DROPDEL 16384 // When dropped, it calls qdel on itself
|
||||
|
||||
/* Secondary atom flags, access using the SECONDARY_FLAG macros */
|
||||
@@ -35,6 +36,12 @@
|
||||
#define INFORM_ADMINS_ON_RELOCATE "inform_admins_on_relocate"
|
||||
#define BANG_PROTECT "bang_protect"
|
||||
|
||||
// A mob with OMNITONGUE has no restriction in the ability to speak
|
||||
// languages that they know. So even if they wouldn't normally be able to
|
||||
// through mob or tongue restrictions, this flag allows them to ignore
|
||||
// those restrictions.
|
||||
#define OMNITONGUE "omnitongue"
|
||||
|
||||
//turf-only flags
|
||||
#define NOJAUNT 1
|
||||
#define UNUSED_TRANSIT_TURF 2
|
||||
@@ -59,20 +66,6 @@
|
||||
#define GROUND 1
|
||||
#define FLYING 2
|
||||
|
||||
|
||||
/*
|
||||
These defines are used specifically with the atom/movable/languages bitmask.
|
||||
They are used in atom/movable/Hear() and atom/movable/say() to determine whether hearers can understand a message.
|
||||
*/
|
||||
#define HUMAN 1
|
||||
#define MONKEY 2
|
||||
#define ALIEN 4
|
||||
#define ROBOT 8
|
||||
#define SLIME 16
|
||||
#define DRONE 32
|
||||
#define SWARMER 64
|
||||
#define RATVAR 128
|
||||
|
||||
// Flags for reagents
|
||||
#define REAGENT_NOREACT 1
|
||||
|
||||
@@ -84,3 +77,5 @@
|
||||
#define UNACIDABLE 16 //acid can't even appear on it, let alone melt it.
|
||||
#define ACID_PROOF 32 //acid stuck on it doesn't melt it.
|
||||
#define INDESTRUCTIBLE 64 //doesn't take damage
|
||||
|
||||
// language secondary flags for atoms
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
#define ismineralturf(A) (istype(A, /turf/closed/mineral))
|
||||
|
||||
#define islava(A) (istype(A, /turf/open/floor/plating/lava))
|
||||
|
||||
//Mobs
|
||||
#define isliving(A) (istype(A, /mob/living))
|
||||
|
||||
@@ -120,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
code/__DEFINES/jobs.dm
Normal file
43
code/__DEFINES/jobs.dm
Normal 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)
|
||||
2
code/__DEFINES/language.dm
Normal file
2
code/__DEFINES/language.dm
Normal file
@@ -0,0 +1,2 @@
|
||||
#define NO_STUTTER 1
|
||||
#define TONGUELESS_SPEECH 2
|
||||
@@ -4,9 +4,9 @@
|
||||
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
|
||||
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
|
||||
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
|
||||
#define LIGHTING_ROUND_VALUE 1 / 128 //Value used to round lumcounts, values smaller than 1/255 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
||||
#define LIGHTING_ROUND_VALUE 1 / 64 //Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
|
||||
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_object.png' // icon used for lighting shading effects
|
||||
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
|
||||
|
||||
// If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting objects.
|
||||
// Set to zero to disable soft lighting. Luminosity changes then work if it's lit at all.
|
||||
@@ -67,3 +67,8 @@
|
||||
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B" //Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
|
||||
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
|
||||
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
|
||||
|
||||
#define LIGHTING_PLANE_ALPHA_VISIBLE 255
|
||||
#define LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE 192
|
||||
#define LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE 128 //For lighting alpha, small amounts lead to big changes. even at 128 its hard to figure out what is dark and what is light, at 64 you almost can't even tell.
|
||||
#define LIGHTING_PLANE_ALPHA_INVISIBLE 0
|
||||
@@ -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
|
||||
@@ -41,4 +41,6 @@ Last space-z level = empty
|
||||
#define ZLEVEL_EMPTY_SPACE 11
|
||||
|
||||
#define ZLEVEL_SPACEMIN 3
|
||||
#define ZLEVEL_SPACEMAX 11
|
||||
#define ZLEVEL_SPACEMAX 11
|
||||
|
||||
#define SPACERUIN_MAP_EDGE_PAD 15
|
||||
@@ -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 )
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
#define STAGE_FIVE 9
|
||||
#define STAGE_SIX 11 //From supermatter shard
|
||||
|
||||
//ticker.current_state values
|
||||
//SSticker.current_state values
|
||||
#define GAME_STATE_STARTUP 0
|
||||
#define GAME_STATE_PREGAME 1
|
||||
#define GAME_STATE_SETTING_UP 2
|
||||
@@ -188,7 +188,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
|
||||
@@ -253,7 +253,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
|
||||
@@ -269,7 +269,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"
|
||||
@@ -332,9 +332,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}
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -34,3 +34,9 @@
|
||||
#define FLOOR_BOT 4 // Floorbots
|
||||
#define CLEAN_BOT 8 // Cleanbots
|
||||
#define MED_BOT 16 // Medibots
|
||||
|
||||
//AI notification defines
|
||||
#define NEW_BORG 1
|
||||
#define NEW_MODULE 2
|
||||
#define RENAME 3
|
||||
#define AI_SHELL 4
|
||||
@@ -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
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#define MODE_INTERCOM "intercom"
|
||||
#define MODE_BINARY "binary"
|
||||
#define MODE_WHISPER "whisper"
|
||||
#define MODE_WHISPER_CRIT "whispercrit"
|
||||
#define MODE_DEPARTMENT "department"
|
||||
#define MODE_ALIEN "alientalk"
|
||||
#define MODE_HOLOPAD "holopad"
|
||||
@@ -32,6 +33,9 @@
|
||||
#define REDUCE_RANGE 2
|
||||
#define NOPASS 4
|
||||
|
||||
//Eavesdropping
|
||||
#define EAVESDROP_EXTRA_RANGE 1 //how much past the specified message_range does the message get starred, whispering only
|
||||
|
||||
// A link given to ghost alice to follow bob
|
||||
#define FOLLOW_LINK(alice, bob) "<a href=?src=\ref[alice];follow=\ref[bob]>(F)</a>"
|
||||
#define TURF_LINK(alice, turfy) "<a href=?src=\ref[alice];x=[turfy.x];y=[turfy.y];z=[turfy.z]>(T)</a>"
|
||||
|
||||
@@ -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,8 +1,5 @@
|
||||
|
||||
#define SEE_INVISIBLE_MINIMUM 5
|
||||
|
||||
#define SEE_INVISIBLE_NOLIGHTING 15 //to not see the lighting objects. Used for nightvision and observer with darkness toggled.
|
||||
|
||||
#define INVISIBILITY_LIGHTING 20
|
||||
|
||||
#define SEE_INVISIBLE_LIVING 25
|
||||
|
||||
8
code/__DEFINES/sound.dm
Normal file
8
code/__DEFINES/sound.dm
Normal file
@@ -0,0 +1,8 @@
|
||||
//max channel is 1024. Only go lower from here, because byond tends to pick the first availiable channel to play sounds on
|
||||
#define CHANNEL_LOBBYMUSIC 1024
|
||||
#define CHANNEL_ADMIN 1023
|
||||
#define CHANNEL_VOX 1022
|
||||
|
||||
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
|
||||
//KEEP IT UPDATED
|
||||
#define CHANNEL_HIGHEST_AVAILABLE 1021
|
||||
@@ -1,6 +1,12 @@
|
||||
|
||||
//These are all the different status effects. Use the paths for each effect in the defines.
|
||||
|
||||
#define STATUS_EFFECT_MULTIPLE 0 //if it allows multiple instances of the effect
|
||||
|
||||
#define STATUS_EFFECT_UNIQUE 1 //if it allows only one, preventing new instances
|
||||
|
||||
#define STATUS_EFFECT_REPLACE 2 //if it allows only one, but new instances replace
|
||||
|
||||
#define BASIC_STATUS_EFFECT /datum/status_effect //Has no effect.
|
||||
|
||||
///////////
|
||||
|
||||
21
code/__DEFINES/subsystems.dm
Normal file
21
code/__DEFINES/subsystems.dm
Normal file
@@ -0,0 +1,21 @@
|
||||
|
||||
//Timing subsystem
|
||||
//Don't run if there is an identical unique timer active
|
||||
#define TIMER_UNIQUE 0x1
|
||||
//For unique timers: Replace the old timer rather then not start this one
|
||||
#define TIMER_OVERRIDE 0x2
|
||||
//Timing should be based on how timing progresses on clients, not the sever.
|
||||
// tracking this is more expensive,
|
||||
// should only be used in conjuction with things that have to progress client side, such as animate() or sound()
|
||||
#define TIMER_CLIENT_TIME 0x4
|
||||
//Timer can be stopped using deltimer()
|
||||
#define TIMER_STOPPABLE 0x8
|
||||
//To be used with TIMER_UNIQUE
|
||||
//prevents distinguishing identical timers with the wait variable
|
||||
#define TIMER_NO_HASH_WAIT 0x10
|
||||
|
||||
#define TIMER_NO_INVOKE_WARNING 600 //number of byond ticks that are allowed to pass before the timer subsystem thinks it hung on something
|
||||
|
||||
//For servers that can't do with any additional lag, set this to none in flightpacks.dm in subsystem/processing.
|
||||
#define FLIGHTSUIT_PROCESSING_NONE 0
|
||||
#define FLIGHTSUIT_PROCESSING_FULL 1
|
||||
@@ -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 CHECK_TICK if (world.tick_usage > CURRENT_TICKLIMIT) stoplag()
|
||||
#define TICK_CHECK ( world.tick_usage > GLOB.CURRENT_TICKLIMIT )
|
||||
#define CHECK_TICK if TICK_CHECK stoplag()
|
||||
|
||||
@@ -1,66 +0,0 @@
|
||||
// Overhauled vore system
|
||||
#define DM_HOLD "Hold"
|
||||
#define DM_DIGEST "Digest"
|
||||
#define DM_HEAL "Heal"
|
||||
#define DM_DIGESTF "Fast Digest"
|
||||
|
||||
#define VORE_STRUGGLE_EMOTE_CHANCE 40
|
||||
|
||||
// Stance for hostile mobs to be in while devouring someone.
|
||||
#define HOSTILE_STANCE_EATING 99
|
||||
|
||||
/*
|
||||
var/global/list/player_sizes_list = list("Macro" = SIZESCALE_HUGE, "Big" = SIZESCALE_BIG, "Normal" = SIZESCALE_NORMAL, "Small" = SIZESCALE_SMALL, "Tiny" = SIZESCALE_TINY)
|
||||
// moved to sound.dm
|
||||
|
||||
var/global/list/digestion_sounds = list(
|
||||
'sound/vore/digest1.ogg',
|
||||
'sound/vore/digest2.ogg',
|
||||
'sound/vore/digest3.ogg',
|
||||
'sound/vore/digest4.ogg',
|
||||
'sound/vore/digest5.ogg',
|
||||
'sound/vore/digest6.ogg',
|
||||
'sound/vore/digest7.ogg',
|
||||
'sound/vore/digest8.ogg',
|
||||
'sound/vore/digest9.ogg',
|
||||
'sound/vore/digest10.ogg',
|
||||
'sound/vore/digest11.ogg',
|
||||
'sound/vore/digest12.ogg')
|
||||
|
||||
var/global/list/death_sounds = list(
|
||||
'sound/vore/death1.ogg',
|
||||
'sound/vore/death2.ogg',
|
||||
'sound/vore/death3.ogg',
|
||||
'sound/vore/death4.ogg',
|
||||
'sound/vore/death5.ogg',
|
||||
'sound/vore/death6.ogg',
|
||||
'sound/vore/death7.ogg',
|
||||
'sound/vore/death8.ogg',
|
||||
'sound/vore/death9.ogg',
|
||||
'sound/vore/death10.ogg') */
|
||||
|
||||
var/global/list/vore_sounds = list(
|
||||
"Gulp" = 'sound/vore/gulp.ogg',
|
||||
"Insert" = 'sound/vore/insert.ogg',
|
||||
"Insertion1" = 'sound/vore/insertion1.ogg',
|
||||
"Insertion2" = 'sound/vore/insertion2.ogg',
|
||||
"Insertion3" = 'sound/vore/insertion3.ogg',
|
||||
"Schlorp" = 'sound/vore/schlorp.ogg',
|
||||
"Squish1" = 'sound/vore/squish1.ogg',
|
||||
"Squish2" = 'sound/vore/squish2.ogg',
|
||||
"Squish3" = 'sound/vore/squish3.ogg',
|
||||
"Squish4" = 'sound/vore/squish4.ogg')
|
||||
/* also moved to sound.dmi
|
||||
var/global/list/struggle_sounds = list(
|
||||
"Squish1" = 'sound/vore/squish1.ogg',
|
||||
"Squish2" = 'sound/vore/squish2.ogg',
|
||||
"Squish3" = 'sound/vore/squish3.ogg',
|
||||
"Squish4" = 'sound/vore/squish4.ogg')
|
||||
|
||||
/proc/log_debug(text)
|
||||
if (config.log_debug)
|
||||
diary << "\[[time_stamp()]]DEBUG: [text][log_end]"
|
||||
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.toggles & CHAT_DEBUGLOGS)
|
||||
C << "DEBUG: [text]" */
|
||||
@@ -65,7 +65,10 @@
|
||||
if(!L || !L.len || !A)
|
||||
|
||||
return 0
|
||||
return L[A.type]
|
||||
if(ispath(A))
|
||||
. = L[A]
|
||||
else
|
||||
. = L[A.type]
|
||||
|
||||
//Checks for a string in a list
|
||||
/proc/is_string_in_list(string, list/L)
|
||||
@@ -278,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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#define HAS_SECONDARY_FLAG(atom, sflag) (atom.secondary_flags ? atom.secondary_flags[sflag] : FALSE)
|
||||
#define SET_SECONDARY_FLAG(atom, sflag) if(!atom.secondary_flags) { atom.secondary_flags = list(); } atom.secondary_flags[sflag] = TRUE;
|
||||
#define CLEAR_SECONDARY_FLAG(atom, sflag) if(atom.secondary_flags) atom.secondary_flags[sflag] = null
|
||||
#define TOGGLE_SECONDARY_FLAG(atom, sflag) if(HAS_SECONDARY_FLAG(atom, sflag)) { CLEAR_SECONDARY_FLAG(atom, sflag); } else {SET_SECONDARY_FLAG(atom, sflag) ; }
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -513,19 +513,19 @@
|
||||
winset(C, "mainwindow", "flash=5")
|
||||
|
||||
/proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank)
|
||||
if(ticker.current_state != GAME_STATE_PLAYING || !character)
|
||||
if(SSticker.current_state != GAME_STATE_PLAYING || !character)
|
||||
return
|
||||
var/area/A = get_area(character)
|
||||
var/message = "<span class='game deadsay'><span class='name'>\
|
||||
[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)
|
||||
@@ -535,4 +535,4 @@
|
||||
return hex2num(copytext(hexa, 4, 6))
|
||||
|
||||
/proc/GetBluePart(const/hexa)
|
||||
return hex2num(copytext(hexa, 6, 8))
|
||||
return hex2num(copytext(hexa, 6, 8))
|
||||
|
||||
@@ -4,86 +4,79 @@
|
||||
|
||||
/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)
|
||||
|
||||
//human mutant bodyparts
|
||||
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/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/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)
|
||||
|
||||
//citadel code
|
||||
//mammal bodyparts (fucking furries)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, taur_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_body_markings, GLOB.mam_body_markings_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails, GLOB.mam_tails_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_ears, GLOB.mam_ears_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/mam_tails_animated, GLOB.mam_tails_animated_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/taur, GLOB.taur_list)
|
||||
//avian bodyparts (i swear this isn't starbound)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/beaks/avian, avian_beaks_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/avian, avian_tails_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_wings, avian_wings_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_open_wings, avian_open_wings_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/beaks/avian, GLOB.avian_beaks_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/tails/avian, GLOB.avian_tails_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_wings, GLOB.avian_wings_list)
|
||||
// init_sprite_accessory_subtypes(/datum/sprite_accessory/avian_open_wings, GLOB.avian_open_wings_list)
|
||||
//xeno parts (hiss?)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, xeno_head_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, xeno_tail_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, xeno_dorsal_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_head, GLOB.xeno_head_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_tail, GLOB.xeno_tail_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/xeno_dorsal, GLOB.xeno_dorsal_list)
|
||||
//genitals
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, cock_shapes_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, breasts_size_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/breasts, GLOB.breasts_size_list)
|
||||
|
||||
//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()
|
||||
|
||||
@@ -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))
|
||||
@@ -259,7 +259,7 @@
|
||||
A.cut_overlay(A.bottom_left_corner)
|
||||
A.bottom_left_corner = se
|
||||
LAZYADD(New, se)
|
||||
|
||||
|
||||
if(New)
|
||||
A.add_overlay(New)
|
||||
|
||||
|
||||
@@ -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,16 +943,16 @@ 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)
|
||||
/proc/get_flat_human_icon(icon_id, datum/job/J, 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()
|
||||
|
||||
if(prefs)
|
||||
prefs.copy_to(body)
|
||||
if(outfit)
|
||||
body.equipOutfit(outfit, TRUE)
|
||||
if(J)
|
||||
J.equip(body, TRUE, FALSE)
|
||||
|
||||
SSoverlays.Flush()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -21,58 +21,59 @@
|
||||
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(penis=0,balls=0,vagina=0,womb=0,breasts=0)
|
||||
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(!cock_shapes_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, cock_shapes_list)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.gender == MALE)
|
||||
/proc/random_features()
|
||||
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)
|
||||
|
||||
if(!GLOB.cock_shapes_list.len)
|
||||
init_sprite_accessory_subtypes(/datum/sprite_accessory/penis, GLOB.cock_shapes_list)
|
||||
// if(ishuman(src))
|
||||
// var/mob/living/carbon/human/H = src
|
||||
/* if(H.gender == MALE) Fuck if I know how to fix this.
|
||||
penis = 1
|
||||
balls = 1
|
||||
vagina = 0
|
||||
@@ -83,21 +84,21 @@
|
||||
balls = 0
|
||||
vagina = 1
|
||||
womb = 1
|
||||
breasts = 1
|
||||
breasts = 1 */
|
||||
|
||||
return(list(
|
||||
"mcolor" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
"mcolor2" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
"mcolor3" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
"tail_lizard" = pick(tails_list_lizard),
|
||||
"tail_lizard" = pick(GLOB.tails_list_lizard),
|
||||
"tail_human" = "None",
|
||||
"wings" = "None",
|
||||
"snout" = pick(snouts_list),
|
||||
"horns" = pick(horns_list),
|
||||
"snout" = pick(GLOB.snouts_list),
|
||||
"horns" = pick(GLOB.horns_list),
|
||||
"ears" = "None",
|
||||
"frills" = pick(frills_list),
|
||||
"spines" = pick(spines_list),
|
||||
"body_markings" = pick(body_markings_list),
|
||||
"frills" = pick(GLOB.frills_list),
|
||||
"spines" = pick(GLOB.spines_list),
|
||||
"body_markings" = pick(GLOB.body_markings_list),
|
||||
"legs" = "Normal Legs",
|
||||
"taur" = "None",
|
||||
"mam_body_markings" = "None",
|
||||
@@ -137,7 +138,7 @@
|
||||
"eggsack_egg_size" = EGG_GIRTH_DEF,
|
||||
"has_breasts" = FALSE,
|
||||
"breasts_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
"breasts_size" = pick(breasts_size_list),
|
||||
"breasts_size" = pick(GLOB.breasts_size_list),
|
||||
"breasts_fluid" = "milk",
|
||||
"has_vag" = FALSE,
|
||||
"vag_color" = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F"),
|
||||
@@ -153,27 +154,27 @@
|
||||
/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
|
||||
@@ -193,9 +194,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",
|
||||
@@ -208,10 +209,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)
|
||||
@@ -241,32 +242,56 @@ Proc for attack log creation, because really why not
|
||||
1 argument is the actor
|
||||
2 argument is the target of action
|
||||
3 is the description of action(like punched, throwed, or any other verb)
|
||||
4 should it make adminlog note or not
|
||||
5 is the tool with which the action was made(usually item) 5 and 6 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
|
||||
6 is additional information, anything that needs to be added
|
||||
4 is the tool with which the action was made(usually item) 4 and 5 are very similar(5 have "by " before it, that it) and are separated just to keep things in a bit more in order
|
||||
5 is additional information, anything that needs to be added
|
||||
*/
|
||||
|
||||
/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
|
||||
|
||||
|
||||
if(target && isliving(target))
|
||||
living_target = target
|
||||
|
||||
var/hp =" "
|
||||
if(living_target)
|
||||
hp = "(NEWHP: [living_target.health])"
|
||||
|
||||
var/starget = "NON-EXISTENT SUBJECT"
|
||||
if(target)
|
||||
if(is_mob_target && target.ckey)
|
||||
starget = "[target.name]([target.ckey])"
|
||||
else
|
||||
starget = "[target.name]"
|
||||
|
||||
var/ssource = "NON-EXISTENT USER" //How!?
|
||||
if(user)
|
||||
if(is_mob_user && user.ckey)
|
||||
ssource = "[user.name]([user.ckey])"
|
||||
else
|
||||
ssource = "[user.name]"
|
||||
|
||||
var/sobject = ""
|
||||
if(object)
|
||||
sobject = "[object]"
|
||||
|
||||
var/sattackloc = ""
|
||||
if(attack_location)
|
||||
sattackloc = "([attack_location.x],[attack_location.y],[attack_location.z])"
|
||||
|
||||
if(is_mob_user)
|
||||
var/message = "<font color='red'>has [what_done] [target ? "[target.name][(is_mob_target && target.ckey) ? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][(living_target) ? " (NEWHP: [living_target.health])" : ""][(attack_location) ? "([attack_location.x],[attack_location.y],[attack_location.z])" : ""]</font>"
|
||||
var/message = "<font color='red'>has [what_done] [starget] with [sobject][addition] [hp] [sattackloc]</font>"
|
||||
user.log_message(message, INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
if(is_mob_target)
|
||||
var/message = "<font color='orange'>has been [what_done] by [user ? "[user.name][(is_mob_user && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][(living_target) ? " (NEWHP: [living_target.health])" : ""][(attack_location) ? "([attack_location.x],[attack_location.y],[attack_location.z])" : ""]</font>"
|
||||
var/message = "<font color='orange'>has been [what_done] by [ssource] with [sobject][addition] [hp] [sattackloc]</font>"
|
||||
target.log_message(message, INDIVIDUAL_ATTACK_LOG)
|
||||
|
||||
log_attack("[user ? "[user.name][(is_mob_user && user.ckey) ? "([user.ckey])" : ""]" : "NON-EXISTANT SUBJECT"] [what_done] [target ? "[target.name][(is_mob_target && target.ckey)? "([target.ckey])" : ""]" : "NON-EXISTANT SUBJECT"][object ? " with [object]" : " "][addition][(living_target) ? " (NEWHP: [living_target.health])" : ""][(attack_location) ? "([attack_location.x],[attack_location.y],[attack_location.z])" : ""]")
|
||||
log_attack("[ssource] [what_done] [starget] with [sobject][addition] [hp] [sattackloc]")
|
||||
|
||||
|
||||
/proc/do_mob(mob/user , mob/target, time = 30, uninterruptible = 0, progress = 1, datum/callback/extra_checks = null)
|
||||
@@ -292,7 +317,7 @@ Proc for attack log creation, because really why not
|
||||
stoplag()
|
||||
if (progress)
|
||||
progbar.update(world.time - starttime)
|
||||
if(!user || !target)
|
||||
if(QDELETED(user) || QDELETED(target))
|
||||
. = 0
|
||||
break
|
||||
if(uninterruptible)
|
||||
@@ -344,11 +369,11 @@ Proc for attack log creation, because really why not
|
||||
drifting = 0
|
||||
Uloc = user.loc
|
||||
|
||||
if(!user || user.stat || user.weakened || user.stunned || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
|
||||
if(QDELETED(user) || user.stat || user.weakened || user.stunned || (!drifting && user.loc != Uloc) || (extra_checks && !extra_checks.Invoke()))
|
||||
. = 0
|
||||
break
|
||||
|
||||
if(Tloc && (!target || Tloc != target.loc))
|
||||
if(!QDELETED(Tloc) && (QDELETED(target) || Tloc != target.loc))
|
||||
if((Uloc != Tloc || Tloc != user) && !drifting)
|
||||
. = 0
|
||||
break
|
||||
@@ -394,7 +419,7 @@ Proc for attack log creation, because really why not
|
||||
sleep(1)
|
||||
if(progress)
|
||||
progbar.update(world.time - starttime)
|
||||
if(!user || !targets)
|
||||
if(QDELETED(user) || !targets)
|
||||
. = 0
|
||||
break
|
||||
if(uninterruptible)
|
||||
@@ -405,7 +430,7 @@ Proc for attack log creation, because really why not
|
||||
user_loc = user.loc
|
||||
|
||||
for(var/atom/target in targets)
|
||||
if((!drifting && user_loc != user.loc) || originalloc[target] != target.loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying || (extra_checks && !extra_checks.Invoke()))
|
||||
if((!drifting && user_loc != user.loc) || QDELETED(target) || originalloc[target] != target.loc || user.get_active_held_item() != holding || user.incapacitated() || user.lying || (extra_checks && !extra_checks.Invoke()))
|
||||
. = 0
|
||||
break mainloop
|
||||
if(progbar)
|
||||
@@ -447,7 +472,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
|
||||
|
||||
@@ -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,24 +77,24 @@ var/religion_name = null
|
||||
|
||||
//Rare: Pre-Prefix
|
||||
if (prob(10))
|
||||
name = pick(station_prefixes)
|
||||
name = pick(GLOB.station_prefixes)
|
||||
new_station_name = name + " "
|
||||
name = ""
|
||||
|
||||
// Prefix
|
||||
for(var/holiday_name in SSevent.holidays)
|
||||
for(var/holiday_name in SSevents.holidays)
|
||||
if(holiday_name == "Friday the 13th")
|
||||
random = 13
|
||||
var/datum/holiday/holiday = SSevent.holidays[holiday_name]
|
||||
var/datum/holiday/holiday = SSevents.holidays[holiday_name]
|
||||
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
|
||||
@@ -217,7 +217,7 @@ var/syndicate_code_response//Code response for traitors.
|
||||
if(2)
|
||||
code_phrase += lowertext(pick(foods))
|
||||
if(3)
|
||||
code_phrase += pick(locations)
|
||||
code_phrase += lowertext(pick(locations))
|
||||
safety -= 2
|
||||
if(3)
|
||||
switch(rand(1,4))//Abstract nouns, objects, adjectives, threats. Can be selected more than once.
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,9 +17,11 @@ proc/TextPreview(var/string,var/len=40)
|
||||
else
|
||||
return "[copytext(string, 1, 37)]..."
|
||||
|
||||
var/list/mentor_log = list ( )
|
||||
//var/list/admintickets = list()
|
||||
var/global/list/whitelisted_species_list[0]
|
||||
GLOBAL_LIST_EMPTY(mentor_log)
|
||||
GLOBAL_PROTECT(mentor_log)
|
||||
|
||||
GLOBAL_LIST_EMPTY(whitelisted_species_list)
|
||||
|
||||
/proc/log_mentor(text)
|
||||
mentor_log.Add(text)
|
||||
diary << "\[[time_stamp()]]MENTOR: [text]"
|
||||
GLOB.mentor_log.Add(text)
|
||||
GLOB.diary << "\[[time_stamp()]]MENTOR: [text]"
|
||||
@@ -1,13 +1,15 @@
|
||||
//Returns the world time in english
|
||||
/proc/worldtime2text()
|
||||
return gameTimestamp("hh:mm:ss")
|
||||
return gameTimestamp("hh:mm:ss", world.time)
|
||||
|
||||
/proc/time_stamp(format = "hh:mm:ss", show_ds)
|
||||
var/time_string = time2text(world.timeofday, format)
|
||||
return show_ds ? "[time_string]:[world.timeofday % 10]" : time_string
|
||||
|
||||
/proc/gameTimestamp(format = "hh:mm:ss") // Get the game time in text
|
||||
return time2text(world.time - timezoneOffset + 432000 - round_start_time, format)
|
||||
/proc/gameTimestamp(format = "hh:mm:ss", wtime=null)
|
||||
if(!wtime)
|
||||
wtime = world.time
|
||||
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)
|
||||
@@ -28,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
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
@@ -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,8 +231,8 @@ 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)
|
||||
if(R.connected_ai)
|
||||
for(var/mob/living/silicon/robot/R in GLOB.living_mob_list)
|
||||
if(R.connected_ai || R.shell)
|
||||
continue
|
||||
if(R.stat == DEAD)
|
||||
continue
|
||||
@@ -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)] °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,41 +1313,44 @@ 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"
|
||||
invisibility = 101
|
||||
density = 0
|
||||
density = FALSE
|
||||
see_in_dark = 1e6
|
||||
anchored = 1
|
||||
anchored = TRUE
|
||||
var/ready_to_die = FALSE
|
||||
|
||||
/mob/dview/Destroy(force=0)
|
||||
stack_trace("ALRIGHT WHICH FUCKER TRIED TO DELETE *MY* DVIEW?")
|
||||
/mob/dview/Destroy(force = FALSE)
|
||||
if(!ready_to_die)
|
||||
stack_trace("ALRIGHT WHICH FUCKER TRIED TO DELETE *MY* DVIEW?")
|
||||
|
||||
if (!force)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
if (!force)
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
world.log << "EVACUATE THE SHITCODE IS TRYING TO STEAL MUH JOBS"
|
||||
global.dview_mob = new
|
||||
return QDEL_HINT_QUEUE
|
||||
log_world("EVACUATE THE SHITCODE IS TRYING TO STEAL MUH JOBS")
|
||||
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)
|
||||
@@ -1372,17 +1375,17 @@ proc/pick_closest_path(value, list/matches = get_fancy_list_of_atom_types())
|
||||
//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
|
||||
@@ -1407,15 +1410,15 @@ var/valid_HTTPSGet = FALSE
|
||||
else
|
||||
CRASH("Invalid world.system_type ([world.system_type])? Yell at Lummox.")
|
||||
|
||||
world.log << "HTTPSGet: [url]"
|
||||
log_world("HTTPSGet: [url]")
|
||||
var/result = shell(command)
|
||||
if(result != 0)
|
||||
world.log << "Download failed: shell exited with code: [result]"
|
||||
log_world("Download failed: shell exited with code: [result]")
|
||||
return
|
||||
|
||||
var/f = file(temp_file)
|
||||
if(!f)
|
||||
world.log << "Download failed: Temp file not found"
|
||||
log_world("Download failed: Temp file not found")
|
||||
return
|
||||
|
||||
. = file2text(f)
|
||||
@@ -1426,3 +1429,6 @@ var/valid_HTTPSGet = FALSE
|
||||
|
||||
/proc/to_chat(target, message)
|
||||
target << message
|
||||
|
||||
/proc/pass()
|
||||
return
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
|
||||
This is a smart+stupid method of maintaining paths during refactors.
|
||||
At this point in time we have more maps than ever, and our tools just aren't that great.
|
||||
So instead of repathing all the maps...
|
||||
|
||||
Keep the old path defined, just as an empty type with that path, and then define it's
|
||||
parent_type as the new path, effectively maintaining the object/mob w/e without having
|
||||
to touch all the maps, avoiding all those nasty conflicts!
|
||||
|
||||
Ideally the old paths would be cleaned out as mappers go about their usual routine of
|
||||
updating old maps.
|
||||
|
||||
tl;dr TYPEFUCKERY, because fuck updating all these maps
|
||||
|
||||
Example:
|
||||
|
||||
/obj/structure/bed/chair/janicart/secway
|
||||
parent_type = /obj/vehicle/secway
|
||||
|
||||
*/
|
||||
@@ -7,6 +7,8 @@
|
||||
//#define GC_FAILURE_HARD_LOOKUP //makes paths that fail to GC call find_references before del'ing.
|
||||
//Also allows for recursive reference searching of datums.
|
||||
//Sets world.loop_checks to false and prevents find references from sleeping
|
||||
|
||||
//#define VISUALIZE_ACTIVE_TURFS //Highlights atmos active turfs in green
|
||||
#endif
|
||||
|
||||
#define PRELOAD_RSC 1 /*set to:
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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())
|
||||
|
||||
@@ -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,34 +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/monkeystart = list()
|
||||
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/prisonsecuritywarp = list() //prison security goes to these
|
||||
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)
|
||||
|
||||
@@ -1,16 +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()
|
||||
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)
|
||||
@@ -1,22 +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")
|
||||
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
|
||||
|
||||
@@ -1,30 +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 SSmachine.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
|
||||
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)
|
||||
@@ -4,5 +4,6 @@
|
||||
#define POLL_IGNORE_SENTIENCE_POTION "sentience_potion"
|
||||
#define POLL_IGNORE_POSSESSED_BLADE "possessed_blade"
|
||||
#define POLL_IGNORE_ALIEN_LARVA "alien_larva"
|
||||
#define POLL_IGNORE_CLOCKWORK_MARAUDER "clockwork_marauder"
|
||||
|
||||
var/list/poll_ignore = list()
|
||||
GLOBAL_LIST_EMPTY(poll_ignore)
|
||||
|
||||
@@ -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)))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +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()
|
||||
var/list/mentorlog = 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)
|
||||
@@ -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 = " "
|
||||
GLOBAL_VAR_INIT(TAB, " ")
|
||||
@@ -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,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,4 +1,4 @@
|
||||
var/const/js_dropdowns = {"
|
||||
#define js_dropdowns {"
|
||||
function dropdowns() {
|
||||
var divs = document.getElementsByTagName('div');
|
||||
var headers = new Array();
|
||||
@@ -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
|
||||
@@ -45,7 +45,9 @@
|
||||
if (pixel_turf.obscured)
|
||||
log_admin("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)])")
|
||||
message_admins("[key_name_admin(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([ADMIN_COORDJMP(pixel_turf)]))")
|
||||
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
|
||||
if(REALTIMEOFDAY >= chnotify + 9000)
|
||||
chnotify = REALTIMEOFDAY
|
||||
send2irc_adminless_only("NOCHEAT", "[key_name(src)] might be running a modified client! (failed checkTurfVis on AI click of [A]([COORD(pixel_turf)]))")
|
||||
return
|
||||
|
||||
var/list/modifiers = params2list(params)
|
||||
@@ -188,4 +190,4 @@
|
||||
//
|
||||
|
||||
/mob/living/silicon/ai/TurfAdjacent(var/turf/T)
|
||||
return (cameranet && cameranet.checkTurfVis(T))
|
||||
return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T))
|
||||
|
||||
@@ -31,13 +31,16 @@
|
||||
Note that this proc can be overridden, and is in the case of screen objects.
|
||||
*/
|
||||
/atom/Click(location,control,params)
|
||||
usr.ClickOn(src, params)
|
||||
if(initialized)
|
||||
usr.ClickOn(src, params)
|
||||
|
||||
/atom/DblClick(location,control,params)
|
||||
usr.DblClickOn(src,params)
|
||||
if(initialized)
|
||||
usr.DblClickOn(src,params)
|
||||
|
||||
/atom/MouseWheel(delta_x,delta_y,location,control,params)
|
||||
usr.MouseWheelOn(src, delta_x, delta_y, params)
|
||||
if(initialized)
|
||||
usr.MouseWheelOn(src, delta_x, delta_y, params)
|
||||
|
||||
/*
|
||||
Standard mob ClickOn()
|
||||
@@ -114,10 +117,7 @@
|
||||
if(A.ClickAccessible(src, depth=INVENTORY_DEPTH))
|
||||
// No adjacency needed
|
||||
if(W)
|
||||
if(W.pre_attackby(A,src,params))
|
||||
var/resolved = A.attackby(W,src)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1 indicates adjacency
|
||||
melee_item_attack_chain(src, W, A, params)
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -131,11 +131,7 @@
|
||||
if(isturf(A) || isturf(A.loc) || (A.loc && isturf(A.loc.loc)))
|
||||
if(Adjacent(A) || (W && CheckReach(src, A, W.reach))) //Adjacent or reaching attacks
|
||||
if(W)
|
||||
if(W.pre_attackby(A,src,params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = A.attackby(W,src,params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params) // 1: clicking something Adjacent
|
||||
melee_item_attack_chain(src, W, A, params)
|
||||
else
|
||||
if(ismob(A))
|
||||
changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -163,7 +159,7 @@
|
||||
if(dummy.loc == there.loc)
|
||||
qdel(dummy)
|
||||
return 1
|
||||
if(there.density && dummy in range(1, there)) //For windows and
|
||||
if(there.density && dummy in range(1, there)) //For windows and suchlike
|
||||
qdel(dummy)
|
||||
return 1
|
||||
if(!dummy.Move(T)) //we're blocked!
|
||||
|
||||
@@ -68,11 +68,7 @@
|
||||
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc in contents)
|
||||
if(A == loc || (A in loc) || (A in contents))
|
||||
// No adjacency checks
|
||||
if(W.pre_attackby(A,src,params))
|
||||
var/resolved = A.attackby(W,src, params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A,src,1,params)
|
||||
melee_item_attack_chain(src, W, A, params)
|
||||
return
|
||||
|
||||
if(!isturf(loc))
|
||||
@@ -81,10 +77,7 @@
|
||||
// cyborgs are prohibited from using storage items so we can I think safely remove (A.loc && isturf(A.loc.loc))
|
||||
if(isturf(A) || isturf(A.loc))
|
||||
if(A.Adjacent(src)) // see adjacent.dm
|
||||
if(W.pre_attackby(A,src,params))
|
||||
var/resolved = A.attackby(W, src, params)
|
||||
if(!resolved && A && W)
|
||||
W.afterattack(A, src, 1, params)
|
||||
melee_item_attack_chain(src, W, A, params)
|
||||
return
|
||||
else
|
||||
W.afterattack(A, src, 0, params)
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define ui_lingstingdisplay "WEST:6,CENTER-3:11"
|
||||
#define ui_crafting "12:-10,1:5"
|
||||
#define ui_building "12:-10,1:21"
|
||||
#define ui_language_menu "11:6,2:-11"
|
||||
|
||||
#define ui_devilsouldisplay "WEST:6,CENTER-1:15"
|
||||
|
||||
@@ -61,16 +62,16 @@
|
||||
#define ui_borg_store "CENTER+2:16,SOUTH:5" //borgs
|
||||
#define ui_borg_camera "CENTER+3:21,SOUTH:5" //borgs
|
||||
#define ui_borg_album "CENTER+4:21,SOUTH:5" //borgs
|
||||
#define ui_borg_talk_wheel "CENTER+4:21,SOUTH+1:5" //borgs
|
||||
#define ui_borg_language_menu "CENTER+4:21,SOUTH+1:5" //borgs
|
||||
|
||||
#define ui_monkey_head "CENTER-4:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-3:14,SOUTH:5" //monkey
|
||||
#define ui_monkey_neck "CENTER-2:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-1:16,SOUTH:5" //monkey
|
||||
#define ui_monkey_head "CENTER-5:13,SOUTH:5" //monkey
|
||||
#define ui_monkey_mask "CENTER-4:14,SOUTH:5" //monkey
|
||||
#define ui_monkey_neck "CENTER-3:15,SOUTH:5" //monkey
|
||||
#define ui_monkey_back "CENTER-2:16,SOUTH:5" //monkey
|
||||
|
||||
#define ui_alien_storage_l "CENTER-2:14,SOUTH:5"//alien
|
||||
#define ui_alien_storage_r "CENTER+1:18,SOUTH:5"//alien
|
||||
#define ui_alien_talk_wheel "EAST-3:26,SOUTH:5" //alien
|
||||
#define ui_alien_language_menu "EAST-3:26,SOUTH:5" //alien
|
||||
|
||||
#define ui_drone_drop "CENTER+1:18,SOUTH:5" //maintenance drones
|
||||
#define ui_drone_pull "CENTER+2:2,SOUTH:5" //maintenance drones
|
||||
|
||||
@@ -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"
|
||||
@@ -167,6 +167,11 @@
|
||||
..()
|
||||
var/obj/screen/using
|
||||
|
||||
// Language menu
|
||||
using = new /obj/screen/language_menu
|
||||
using.screen_loc = ui_borg_language_menu
|
||||
static_inventory += using
|
||||
|
||||
//AI core
|
||||
using = new /obj/screen/ai/aicore()
|
||||
using.screen_loc = ui_ai_core
|
||||
|
||||
@@ -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())
|
||||
@@ -392,20 +392,17 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
|
||||
textlist += "<b><font color=[get_component_color_bright(i)]>[G.required_components[i]]</font></b> "
|
||||
textlist += "<br>"
|
||||
else
|
||||
if(G.ratvar_portal)
|
||||
textlist += "Seconds until Ratvar's arrival: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
else
|
||||
textlist += "Seconds until Proselytization: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
textlist += "Seconds until Ratvar's arrival: <b>[G.get_arrival_text(TRUE)]</b><br>"
|
||||
if(unconverted_ais_exist)
|
||||
if(unconverted_ais_exist > 1)
|
||||
textlist += "<b>[unconverted_ais_exist] unconverted AIs exist!</b><br>"
|
||||
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>"
|
||||
|
||||
@@ -63,9 +63,8 @@
|
||||
H.leap_icon.screen_loc = ui_alien_storage_r
|
||||
static_inventory += H.leap_icon
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_alien_talk_wheel
|
||||
wheels += using
|
||||
using = new/obj/screen/language_menu
|
||||
using.screen_loc = ui_alien_language_menu
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
|
||||
@@ -18,9 +18,8 @@
|
||||
pull_icon.screen_loc = ui_pull_resist
|
||||
hotkeybuttons += pull_icon
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_alien_talk_wheel
|
||||
wheels += using
|
||||
using = new/obj/screen/language_menu
|
||||
using.screen_loc = ui_alien_language_menu
|
||||
static_inventory += using
|
||||
|
||||
zone_select = new /obj/screen/zone_sel/alien()
|
||||
|
||||
@@ -33,8 +33,6 @@
|
||||
var/obj/screen/throw_icon
|
||||
var/obj/screen/module_store_icon
|
||||
|
||||
var/list/wheels = list() //list of the wheel screen objects
|
||||
|
||||
var/list/static_inventory = list() //the screen objects which are static
|
||||
var/list/toggleable_inventory = list() //the screen objects which can be hidden
|
||||
var/list/obj/screen/hotkeybuttons = list() //the buttons that can be used via hotkeys
|
||||
@@ -78,8 +76,6 @@
|
||||
qdel(module_store_icon)
|
||||
module_store_icon = null
|
||||
|
||||
wheels = null //all wheels are also in static_inventory
|
||||
|
||||
if(static_inventory.len)
|
||||
for(var/thing in static_inventory)
|
||||
qdel(thing)
|
||||
@@ -136,15 +132,15 @@
|
||||
/mob/proc/create_mob_hud()
|
||||
if(client && !hud_used)
|
||||
hud_used = new /datum/hud(src)
|
||||
update_sight()
|
||||
|
||||
//Version denotes which style should be displayed. blank or 0 means "next version"
|
||||
/datum/hud/proc/show_hud(version = 0,mob/viewmob)
|
||||
if(!ismob(mymob))
|
||||
return 0
|
||||
if(!mymob.client)
|
||||
return 0
|
||||
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
if(!screenmob.client)
|
||||
return 0
|
||||
|
||||
screenmob.client.screen = list()
|
||||
|
||||
@@ -166,7 +162,7 @@
|
||||
if(infodisplay.len)
|
||||
screenmob.client.screen += infodisplay
|
||||
|
||||
mymob.client.screen += hide_actions_toggle
|
||||
screenmob.client.screen += hide_actions_toggle
|
||||
|
||||
if(action_intent)
|
||||
action_intent.screen_loc = initial(action_intent.screen_loc) //Restore intent selection to the original position
|
||||
@@ -210,7 +206,7 @@
|
||||
mymob.update_action_buttons(1)
|
||||
reorganize_alerts()
|
||||
mymob.reload_fullscreen()
|
||||
create_parallax()
|
||||
update_parallax_pref(screenmob)
|
||||
|
||||
|
||||
/datum/hud/human/show_hud(version = 0,mob/viewmob)
|
||||
@@ -227,16 +223,6 @@
|
||||
/datum/hud/proc/persistent_inventory_update(mob/viewer)
|
||||
if(!mymob)
|
||||
return
|
||||
var/mob/living/L = mymob
|
||||
|
||||
var/mob/screenmob = viewer || L
|
||||
|
||||
for(var/X in wheels)
|
||||
var/obj/screen/wheel/W = X
|
||||
if(W.toggled)
|
||||
screenmob.client.screen |= W.buttons_list
|
||||
else
|
||||
screenmob.client.screen -= W.buttons_list
|
||||
|
||||
//Triggered when F12 is pressed (Unless someone changed something in the DMF)
|
||||
/mob/verb/button_pressed_F12()
|
||||
|
||||
@@ -96,9 +96,8 @@
|
||||
using.icon = ui_style
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using = new/obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/area_creator
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
using.screen_loc = ui_movi
|
||||
static_inventory += using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using = new/obj/screen/language_menu
|
||||
using.icon = ui_style
|
||||
wheels += using
|
||||
static_inventory += using
|
||||
|
||||
using = new /obj/screen/drop()
|
||||
@@ -70,8 +69,7 @@
|
||||
inv_box.name = "back"
|
||||
inv_box.icon = ui_style
|
||||
inv_box.icon_state = "back"
|
||||
inv_box.icon_full = "template_small"
|
||||
inv_box.screen_loc = ui_back
|
||||
inv_box.screen_loc = ui_monkey_back
|
||||
inv_box.slot_id = slot_back
|
||||
static_inventory += inv_box
|
||||
|
||||
@@ -124,7 +122,7 @@
|
||||
|
||||
if(hud_shown)
|
||||
if(M.back)
|
||||
M.back.screen_loc = ui_back
|
||||
M.back.screen_loc = ui_monkey_back
|
||||
M.client.screen += M.back
|
||||
if(M.wear_mask)
|
||||
M.wear_mask.screen_loc = ui_monkey_mask
|
||||
|
||||
@@ -11,9 +11,10 @@
|
||||
var/parallax_layers_max = 3
|
||||
var/parallax_animate_timer
|
||||
|
||||
/datum/hud/proc/create_parallax()
|
||||
var/client/C = mymob.client
|
||||
if (!apply_parallax_pref())
|
||||
/datum/hud/proc/create_parallax(mob/viewmob)
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
var/client/C = screenmob.client
|
||||
if (!apply_parallax_pref(viewmob)) //don't want shit computers to crash when specing someone with insane parallax, so use the viewer's pref
|
||||
return
|
||||
|
||||
if(!length(C.parallax_layers_cached))
|
||||
@@ -27,7 +28,10 @@
|
||||
C.parallax_layers.len = C.parallax_layers_max
|
||||
|
||||
C.screen |= (C.parallax_layers)
|
||||
var/obj/screen/plane_master/PM = plane_masters["[PLANE_SPACE]"]
|
||||
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
|
||||
if(screenmob != mymob)
|
||||
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen
|
||||
C.screen += PM
|
||||
PM.color = list(
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
@@ -37,15 +41,20 @@
|
||||
)
|
||||
|
||||
|
||||
/datum/hud/proc/remove_parallax()
|
||||
var/client/C = mymob.client
|
||||
/datum/hud/proc/remove_parallax(mob/viewmob)
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
var/client/C = screenmob.client
|
||||
C.screen -= (C.parallax_layers_cached)
|
||||
var/obj/screen/plane_master/PM = plane_masters["[PLANE_SPACE]"]
|
||||
var/obj/screen/plane_master/PM = screenmob.hud_used.plane_masters["[PLANE_SPACE]"]
|
||||
if(screenmob != mymob)
|
||||
C.screen -= locate(/obj/screen/plane_master/parallax_white) in C.screen
|
||||
C.screen += PM
|
||||
PM.color = initial(PM.color)
|
||||
C.parallax_layers = null
|
||||
|
||||
/datum/hud/proc/apply_parallax_pref()
|
||||
var/client/C = mymob.client
|
||||
/datum/hud/proc/apply_parallax_pref(mob/viewmob)
|
||||
var/mob/screenmob = viewmob || mymob
|
||||
var/client/C = screenmob.client
|
||||
if(C.prefs)
|
||||
var/pref = C.prefs.parallax
|
||||
if (isnull(pref))
|
||||
@@ -75,9 +84,9 @@
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
|
||||
/datum/hud/proc/update_parallax_pref()
|
||||
remove_parallax()
|
||||
create_parallax()
|
||||
/datum/hud/proc/update_parallax_pref(mob/viewmob)
|
||||
remove_parallax(viewmob)
|
||||
create_parallax(viewmob)
|
||||
|
||||
// This sets which way the current shuttle is moving (returns true if the shuttle has stopped moving so the caller can append their animation)
|
||||
/datum/hud/proc/set_parallax_movedir(new_parallax_movedir, skip_windups)
|
||||
|
||||
@@ -3,6 +3,14 @@
|
||||
icon_state = "blank"
|
||||
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
|
||||
blend_mode = BLEND_OVERLAY
|
||||
var/show_alpha = 255
|
||||
var/hide_alpha = 0
|
||||
|
||||
/obj/screen/plane_master/proc/Show(override)
|
||||
alpha = override || show_alpha
|
||||
|
||||
/obj/screen/plane_master/proc/Hide(override)
|
||||
alpha = override || hide_alpha
|
||||
|
||||
//Why do plane masters need a backdrop sometimes? Read http://www.byond.com/forum/?post=2141928
|
||||
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
|
||||
@@ -19,11 +27,6 @@
|
||||
blend_mode = BLEND_MULTIPLY
|
||||
mouse_opacity = 0
|
||||
|
||||
/obj/screen/plane_master/lighting/proc/params2color(params)
|
||||
color = params2list(params)
|
||||
/obj/screen/plane_master/lighting/proc/basecolor()
|
||||
color = LIGHTING_BASE_MATRIX
|
||||
|
||||
/obj/screen/plane_master/parallax
|
||||
name = "parallax plane master"
|
||||
plane = PLANE_SPACE_PARALLAX
|
||||
|
||||
@@ -96,9 +96,8 @@
|
||||
var/mob/living/silicon/robot/mymobR = mymob
|
||||
var/obj/screen/using
|
||||
|
||||
using = new/obj/screen/wheel/talk
|
||||
using.screen_loc = ui_borg_talk_wheel
|
||||
wheels += using
|
||||
using = new/obj/screen/language_menu
|
||||
using.screen_loc = ui_borg_language_menu
|
||||
static_inventory += using
|
||||
|
||||
//Radio
|
||||
|
||||
@@ -84,6 +84,18 @@
|
||||
return 1
|
||||
create_area(usr)
|
||||
|
||||
/obj/screen/language_menu
|
||||
name = "language menu"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "talk_wheel"
|
||||
screen_loc = ui_language_menu
|
||||
|
||||
/obj/screen/language_menu/Click()
|
||||
var/mob/living/L = usr
|
||||
if(!istype(L))
|
||||
return
|
||||
L.open_language_menu(usr)
|
||||
|
||||
/obj/screen/inventory
|
||||
var/slot_id // The indentifier for the slot. It has nothing to do with ID cards.
|
||||
var/icon_empty // Icon when empty. For now used only by humans.
|
||||
@@ -529,145 +541,8 @@
|
||||
name = "health doll"
|
||||
screen_loc = ui_healthdoll
|
||||
|
||||
|
||||
|
||||
/obj/screen/wheel
|
||||
name = "wheel"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
icon_state = ""
|
||||
screen_loc = null //if you make a new wheel, remember to give it a screen_loc
|
||||
var/list/buttons_names = list() //list of the names for each button, its length is the amount of buttons.
|
||||
var/toggled = 0 //wheel is hidden/shown
|
||||
var/wheel_buttons_type //the type of buttons used with this wheel.
|
||||
var/list/buttons_list = list()
|
||||
|
||||
/obj/screen/wheel/New()
|
||||
..()
|
||||
build_options()
|
||||
|
||||
|
||||
//we create the buttons for the wheel and place them in a square spiral fashion.
|
||||
/obj/screen/wheel/proc/build_options()
|
||||
var/obj/screen/wheel_button/close_wheel/CW = new ()
|
||||
buttons_list += CW //the close option
|
||||
CW.wheel = src
|
||||
|
||||
var/list/offset_x_list = list()
|
||||
var/list/offset_y_list = list()
|
||||
var/num = 1
|
||||
var/N = 1
|
||||
var/M = 0
|
||||
var/sign = -1
|
||||
my_loop:
|
||||
while(offset_y_list.len < buttons_names.len)
|
||||
for(var/i=1, i<=num, i++)
|
||||
offset_y_list += N
|
||||
offset_x_list += M
|
||||
if(offset_y_list.len == buttons_names.len)
|
||||
break my_loop
|
||||
if(N != 0)
|
||||
N = 0
|
||||
M = -sign
|
||||
else
|
||||
N = sign
|
||||
M = 0
|
||||
sign = -sign
|
||||
num++
|
||||
|
||||
var/screenx = 8
|
||||
var/screeny = 8
|
||||
for(var/i = 1, i <= buttons_names.len, i++)
|
||||
var/obj/screen/wheel_button/WB = new wheel_buttons_type()
|
||||
WB.wheel = src
|
||||
buttons_list += WB
|
||||
screenx += offset_x_list[i]
|
||||
screeny += offset_y_list[i]
|
||||
WB.screen_loc = "[screenx], [screeny]"
|
||||
set_button(WB, i)
|
||||
|
||||
/obj/screen/wheel/proc/set_button(obj/screen/wheel_button/WB, button_number)
|
||||
WB.name = buttons_names[button_number]
|
||||
return
|
||||
|
||||
/obj/screen/wheel/Destroy()
|
||||
for(var/obj/screen/S in buttons_list)
|
||||
qdel(S)
|
||||
return ..()
|
||||
|
||||
/obj/screen/wheel/Click()
|
||||
if(world.time <= usr.next_move)
|
||||
return
|
||||
if(usr.stat)
|
||||
return
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(toggled)
|
||||
L.client.screen -= buttons_list
|
||||
else
|
||||
L.client.screen |= buttons_list
|
||||
toggled = !toggled
|
||||
|
||||
|
||||
/obj/screen/wheel/talk
|
||||
name = "talk wheel"
|
||||
icon_state = "talk_wheel"
|
||||
screen_loc = "11:6,2:-11"
|
||||
wheel_buttons_type = /obj/screen/wheel_button/talk
|
||||
buttons_names = list("help","hello","bye","stop","thanks","come","out", "yes", "no")
|
||||
var/list/word_messages = list(list("Help!","Help me!"), list("Hello.", "Hi."), list("Bye.", "Goodbye."),\
|
||||
list("Stop!", "Halt!"), list("Thanks.", "Thanks!", "Thank you."), \
|
||||
list("Come.", "Follow me."), list("Out!", "Go away!", "Get out!"), \
|
||||
list("Yes.", "Affirmative."), list("No.", "Negative"))
|
||||
|
||||
/obj/screen/wheel/talk/set_button(obj/screen/wheel_button/WB, button_number)
|
||||
..()
|
||||
var/obj/screen/wheel_button/talk/T = WB //we already know what type the button is exactly.
|
||||
T.icon_state = "talk_[T.name]"
|
||||
T.word_messages = word_messages[button_number]
|
||||
|
||||
|
||||
/obj/screen/wheel_button
|
||||
name = "default wheel button"
|
||||
screen_loc = "8,8"
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
mouse_opacity = 2
|
||||
var/obj/screen/wheel/wheel
|
||||
|
||||
/obj/screen/wheel_button/Destroy()
|
||||
wheel = null
|
||||
return ..()
|
||||
|
||||
/obj/screen/wheel_button/close_wheel
|
||||
name = "close wheel"
|
||||
icon_state = "x3"
|
||||
|
||||
/obj/screen/wheel_button/close_wheel/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
L.client.screen -= wheel.buttons_list
|
||||
wheel.toggled = !wheel.toggled
|
||||
|
||||
|
||||
/obj/screen/wheel_button/talk
|
||||
name = "talk option"
|
||||
icon_state = "talk_help"
|
||||
var/talk_cooldown = 0
|
||||
var/list/word_messages = list()
|
||||
|
||||
/obj/screen/wheel_button/talk/Click(location, control,params)
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
if(L.stat)
|
||||
return
|
||||
|
||||
if(word_messages.len && talk_cooldown < world.time)
|
||||
talk_cooldown = world.time + 10
|
||||
L.say(pick(word_messages))
|
||||
|
||||
/obj/screen/splash
|
||||
icon = 'config/title_screens/images/title1.dmi'
|
||||
icon = 'config/title_screens/images/blank.png'
|
||||
icon_state = ""
|
||||
screen_loc = "1,1"
|
||||
layer = SPLASHSCREEN_LAYER
|
||||
@@ -679,16 +554,23 @@
|
||||
|
||||
if(!visible)
|
||||
alpha = 0
|
||||
if(SStitle.title_screen)
|
||||
icon = SStitle.title_screen.icon
|
||||
|
||||
if(!use_previous_title)
|
||||
if(SStitle.icon)
|
||||
icon = SStitle.icon
|
||||
else
|
||||
if(!SStitle.previous_icon)
|
||||
qdel(src)
|
||||
return
|
||||
icon = SStitle.previous_icon
|
||||
|
||||
holder.screen += src
|
||||
if(use_previous_title && !SSmapping.previous_map_config.defaulted)
|
||||
holder.screen -= src //Yell at Cyberboss to finish this
|
||||
|
||||
..()
|
||||
|
||||
/obj/screen/splash/proc/Fade(out, qdel_after = TRUE)
|
||||
if(QDELETED(src))
|
||||
return
|
||||
if(out)
|
||||
animate(src, alpha = 0, time = 30)
|
||||
else
|
||||
@@ -701,4 +583,4 @@
|
||||
if(holder)
|
||||
holder.screen -= src
|
||||
holder = null
|
||||
return ..()
|
||||
return ..()
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
|
||||
/proc/melee_item_attack_chain(mob/user, obj/item/I, atom/target, params)
|
||||
if(I.pre_attackby(target, user, params))
|
||||
// Return 1 in attackby() to prevent afterattack() effects (when safely moving items for example)
|
||||
var/resolved = target.attackby(I,user,params)
|
||||
if(!resolved && target && I)
|
||||
I.afterattack(target, user, 1, params) // 1: clicking something Adjacent
|
||||
|
||||
|
||||
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
|
||||
/obj/item/proc/attack_self(mob/user)
|
||||
return
|
||||
|
||||
@@ -26,6 +26,9 @@
|
||||
if(modifiers["shift"] && modifiers["middle"])
|
||||
ShiftMiddleClickOn(A)
|
||||
return
|
||||
if(modifiers["shift"] && modifiers["ctrl"])
|
||||
CtrlShiftClickOn(A)
|
||||
return
|
||||
if(modifiers["middle"])
|
||||
MiddleClickOn(A)
|
||||
return
|
||||
|
||||
@@ -87,22 +87,23 @@
|
||||
if(is_muzzled())
|
||||
return
|
||||
var/mob/living/carbon/ML = A
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(ML))
|
||||
var/mob/living/carbon/human/H = ML
|
||||
affecting = H.get_bodypart(ran_zone(dam_zone))
|
||||
var/armor = ML.run_armor_check(affecting, "melee")
|
||||
if(prob(75))
|
||||
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
|
||||
ML.visible_message("<span class='danger'>[name] bites [ML]!</span>", \
|
||||
"<span class='userdanger'>[name] bites [ML]!</span>")
|
||||
if(armor >= 2)
|
||||
return
|
||||
for(var/datum/disease/D in viruses)
|
||||
ML.ForceContractDisease(D)
|
||||
else
|
||||
ML.visible_message("<span class='danger'>[src] has attempted to bite [ML]!</span>")
|
||||
if(istype(ML))
|
||||
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(ML))
|
||||
var/mob/living/carbon/human/H = ML
|
||||
affecting = H.get_bodypart(ran_zone(dam_zone))
|
||||
var/armor = ML.run_armor_check(affecting, "melee")
|
||||
if(prob(75))
|
||||
ML.apply_damage(rand(1,3), BRUTE, affecting, armor)
|
||||
ML.visible_message("<span class='danger'>[name] bites [ML]!</span>", \
|
||||
"<span class='userdanger'>[name] bites [ML]!</span>")
|
||||
if(armor >= 2)
|
||||
return
|
||||
for(var/datum/disease/D in viruses)
|
||||
ML.ForceContractDisease(D)
|
||||
else
|
||||
ML.visible_message("<span class='danger'>[src] has attempted to bite [ML]!</span>")
|
||||
|
||||
/*
|
||||
Aliens
|
||||
|
||||
@@ -3,19 +3,35 @@
|
||||
|
||||
This needs more thinking out, but I might as well.
|
||||
*/
|
||||
var/const/tk_maxrange = 15
|
||||
|
||||
/*
|
||||
Telekinetic attack:
|
||||
|
||||
By default, emulate the user's unarmed attack
|
||||
*/
|
||||
|
||||
/atom/proc/attack_tk(mob/user)
|
||||
if(user.stat)
|
||||
return
|
||||
new /obj/effect/overlay/temp/telekinesis(loc)
|
||||
user.UnarmedAttack(src,0) // attack_hand, attack_paw, etc
|
||||
return
|
||||
|
||||
/obj/attack_tk(mob/user)
|
||||
if(user.stat)
|
||||
return
|
||||
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
O.tk_user = user
|
||||
if(O.focus_object(src))
|
||||
user.put_in_active_hand(O)
|
||||
else
|
||||
qdel(O)
|
||||
..()
|
||||
|
||||
/mob/attack_tk(mob/user)
|
||||
return
|
||||
|
||||
/*
|
||||
This is similar to item attack_self, but applies to anything
|
||||
that you can grab with a telekinetic grab.
|
||||
@@ -23,37 +39,13 @@ var/const/tk_maxrange = 15
|
||||
It is used for manipulating things at range, for example, opening and closing closets.
|
||||
There are not a lot of defaults at this time, add more where appropriate.
|
||||
*/
|
||||
|
||||
/atom/proc/attack_self_tk(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/attack_self_tk(mob/user)
|
||||
attack_self(user)
|
||||
|
||||
/obj/attack_tk(mob/user)
|
||||
if(user.stat)
|
||||
return
|
||||
if(anchored)
|
||||
..()
|
||||
return
|
||||
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
user.put_in_active_hand(O)
|
||||
O.host = user
|
||||
O.focus_object(src)
|
||||
return
|
||||
|
||||
/obj/item/attack_tk(mob/user)
|
||||
if(user.stat)
|
||||
return
|
||||
var/obj/item/tk_grab/O = new(src)
|
||||
user.put_in_active_hand(O)
|
||||
O.host = user
|
||||
O.focus_object(src)
|
||||
return
|
||||
|
||||
|
||||
/mob/attack_tk(mob/user)
|
||||
return // needs more thinking about
|
||||
|
||||
/*
|
||||
TK Grab Item (the workhorse of old TK)
|
||||
@@ -74,10 +66,20 @@ var/const/tk_maxrange = 15
|
||||
layer = ABOVE_HUD_LAYER
|
||||
plane = ABOVE_HUD_PLANE
|
||||
|
||||
var/last_throw = 0
|
||||
var/atom/movable/focus = null
|
||||
var/mob/living/host = null
|
||||
var/mob/living/carbon/tk_user = null
|
||||
|
||||
/obj/item/tk_grab/Initialize()
|
||||
..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
|
||||
/obj/item/tk_grab/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/tk_grab/process()
|
||||
if(check_if_focusable(focus)) //if somebody grabs your thing, no waiting for them to put it down and hitting them again.
|
||||
update_icon()
|
||||
|
||||
/obj/item/tk_grab/dropped(mob/user)
|
||||
if(focus && user && loc != user && loc != user.loc) // drop_item() gets called when you tk-attack a table/closet with an item
|
||||
@@ -107,111 +109,73 @@ var/const/tk_maxrange = 15
|
||||
/obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity, params)//TODO: go over this
|
||||
if(!target || !user)
|
||||
return
|
||||
if(last_throw+3 > world.time)
|
||||
return
|
||||
if(!host || host != user)
|
||||
qdel(src)
|
||||
return
|
||||
if(!(user.dna.check_mutation(TK)))
|
||||
qdel(src)
|
||||
return
|
||||
if(isobj(target) && !isturf(target.loc))
|
||||
return
|
||||
|
||||
if(!tkMaxRangeCheck(user, target, focus))
|
||||
return
|
||||
|
||||
if(!focus)
|
||||
focus_object(target, user)
|
||||
focus_object(target)
|
||||
return
|
||||
|
||||
if(focus.anchored || !isturf(focus.loc))
|
||||
qdel(src)
|
||||
else if(!check_if_focusable(focus))
|
||||
return
|
||||
|
||||
if(target == focus)
|
||||
target.attack_self_tk(user)
|
||||
return // todo: something like attack_self not laden with assumptions inherent to attack_self
|
||||
update_icon()
|
||||
return
|
||||
|
||||
|
||||
if(!isturf(target) && istype(focus,/obj/item) && target.Adjacent(focus))
|
||||
var/obj/item/I = focus
|
||||
var/resolved = target.attackby(I, user, params)
|
||||
if(!resolved && target && I)
|
||||
I.afterattack(target,user,1) // for splashing with beakers
|
||||
update_icon()
|
||||
apply_focus_overlay()
|
||||
melee_item_attack_chain(tk_user, focus, target, params) //isn't copying the attack chain fun. we should do it more often.
|
||||
if(check_if_focusable(focus))
|
||||
focus.do_attack_animation(target, null, focus)
|
||||
else
|
||||
apply_focus_overlay()
|
||||
focus.throw_at(target, 10, 1,user)
|
||||
last_throw = world.time
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
update_icon()
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
update_icon()
|
||||
|
||||
/proc/tkMaxRangeCheck(mob/user, atom/target, atom/focus)
|
||||
/proc/tkMaxRangeCheck(mob/user, atom/target)
|
||||
var/d = get_dist(user, target)
|
||||
if(focus)
|
||||
d = max(d,get_dist(user,focus)) // whichever is further
|
||||
if(d > tk_maxrange)
|
||||
if(d > TK_MAXRANGE)
|
||||
to_chat(user, "<span class ='warning'>Your mind won't reach that far.</span>")
|
||||
return 0
|
||||
return 1
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/tk_grab/attack(mob/living/M, mob/living/user, def_zone)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/tk_grab/proc/focus_object(obj/target, mob/living/user)
|
||||
if(!isobj(target))
|
||||
return//Cant throw non objects atm might let it do mobs later
|
||||
if(target.anchored || !isturf(target.loc))
|
||||
qdel(src)
|
||||
/obj/item/tk_grab/proc/focus_object(obj/target)
|
||||
if(!check_if_focusable(target))
|
||||
return
|
||||
focus = target
|
||||
update_icon()
|
||||
apply_focus_overlay()
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/tk_grab/proc/check_if_focusable(obj/target)
|
||||
if(!tk_user || !istype(tk_user) || QDELETED(target) || !istype(target) || !tk_user.dna.check_mutation(TK))
|
||||
qdel(src)
|
||||
return
|
||||
if(!tkMaxRangeCheck(tk_user, target) || target.anchored || !isturf(target.loc))
|
||||
qdel(src)
|
||||
return
|
||||
return TRUE
|
||||
|
||||
/obj/item/tk_grab/proc/apply_focus_overlay()
|
||||
if(!focus)
|
||||
return
|
||||
new /obj/effect/overlay/temp/telekinesis(get_turf(focus))
|
||||
|
||||
|
||||
/obj/item/tk_grab/update_icon()
|
||||
cut_overlays()
|
||||
if(focus && focus.icon && focus.icon_state)
|
||||
add_overlay(icon(focus.icon,focus.icon_state))
|
||||
return
|
||||
if(focus)
|
||||
var/old_layer = focus.layer
|
||||
var/old_plane = focus.plane
|
||||
focus.layer = layer+0.01
|
||||
focus.plane = ABOVE_HUD_PLANE
|
||||
add_overlay(focus) //this is kind of ick, but it's better than using icon()
|
||||
focus.layer = old_layer
|
||||
focus.plane = old_plane
|
||||
|
||||
/obj/item/tk_grab/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is using [user.p_their()] telekinesis to choke [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
return (OXYLOSS)
|
||||
|
||||
/*Not quite done likely needs to use something thats not get_step_to
|
||||
/obj/item/tk_grab/proc/check_path()
|
||||
var/turf/ref = get_turf(src.loc)
|
||||
var/turf/target = get_turf(focus.loc)
|
||||
if(!ref || !target)
|
||||
return 0
|
||||
var/distance = get_dist(ref, target)
|
||||
if(distance >= 10)
|
||||
return 0
|
||||
for(var/i = 1 to distance)
|
||||
ref = get_step_to(ref, target, 0)
|
||||
if(ref != target)
|
||||
return 0
|
||||
return 1
|
||||
*/
|
||||
|
||||
//equip_to_slot_or_del(obj/item/W, slot, qdel_on_fail = 1)
|
||||
/*
|
||||
if(istype(user, /mob/living/carbon))
|
||||
if(user:mutations & TK && get_dist(source, user) <= 7)
|
||||
if(user:get_active_hand())
|
||||
return 0
|
||||
var/X = source:x
|
||||
var/Y = source:y
|
||||
var/Z = source:z
|
||||
|
||||
*/
|
||||
|
||||
@@ -25,45 +25,45 @@ proc/get_racelist(var/mob/user)//This proc returns a list of species that 'user'
|
||||
var/datum/species/S = new spath()
|
||||
var/list/wlist = S.whitelist
|
||||
if(S.whitelisted && (wlist.Find(user.ckey) || wlist.Find(user.key) || user.client.holder)) //If your ckey is on the species whitelist or you're an admin:
|
||||
whitelisted_species_list[S.id] = S.type //Add the species to their available species list.
|
||||
GLOB.whitelisted_species_list[S.id] = S.type //Add the species to their available species list.
|
||||
else if(!S.whitelisted && S.roundstart) //Normal roundstart species will be handled here.
|
||||
whitelisted_species_list[S.id] = S.type
|
||||
GLOB.whitelisted_species_list[S.id] = S.type
|
||||
|
||||
return whitelisted_species_list
|
||||
return GLOB.whitelisted_species_list
|
||||
|
||||
//Mammal Species
|
||||
var/global/list/mam_body_markings_list = list()
|
||||
var/global/list/mam_ears_list = list()
|
||||
var/global/list/mam_tails_list = list()
|
||||
var/global/list/mam_tails_animated_list = list()
|
||||
var/global/list/taur_list = list()
|
||||
GLOBAL_LIST_EMPTY(mam_body_markings_list)
|
||||
GLOBAL_LIST_EMPTY(mam_ears_list)
|
||||
GLOBAL_LIST_EMPTY(mam_tails_list)
|
||||
GLOBAL_LIST_EMPTY(mam_tails_animated_list)
|
||||
GLOBAL_LIST_EMPTY(taur_list)
|
||||
|
||||
//Exotic Species
|
||||
var/global/list/exotic_tails_list = list()
|
||||
var/global/list/exotic_tails_animated_list = list()
|
||||
var/global/list/exotic_ears_list = list()
|
||||
var/global/list/exotic_head_list = list()
|
||||
var/global/list/exotic_back_list = list()
|
||||
GLOBAL_LIST_EMPTY(exotic_tails_list)
|
||||
GLOBAL_LIST_EMPTY(exotic_tails_animated_list)
|
||||
GLOBAL_LIST_EMPTY(exotic_ears_list)
|
||||
GLOBAL_LIST_EMPTY(exotic_head_list)
|
||||
GLOBAL_LIST_EMPTY(exotic_back_list)
|
||||
|
||||
//Xenomorph Species
|
||||
var/global/list/xeno_head_list = list() //I forgot the ' = list()' part for the longest time and couldn't figure out what was wrong. *facepalm
|
||||
var/global/list/xeno_tail_list = list()
|
||||
var/global/list/xeno_dorsal_list = list()
|
||||
GLOBAL_LIST_EMPTY(xeno_head_list)
|
||||
GLOBAL_LIST_EMPTY(xeno_tail_list)
|
||||
GLOBAL_LIST_EMPTY(xeno_dorsal_list)
|
||||
|
||||
|
||||
//Genitals and Arousal Lists
|
||||
var/global/list/cock_shapes_list = list()//global_lists.dm for the list initializations
|
||||
var/global/list/breasts_size_list = list()
|
||||
var/global/list/cum_into_containers_list = list(/obj/item/weapon/reagent_containers/food/snacks/pie)
|
||||
var/global/list/dick_nouns = list("dick","cock","member","shaft")
|
||||
var/global/list/cum_id_list = list("semen")
|
||||
var/global/list/milk_id_list = list("milk")
|
||||
GLOBAL_LIST_EMPTY(cock_shapes_list)//global_lists.dm for the list initializations //Now also _DATASTRUCTURES globals.dm
|
||||
GLOBAL_LIST_EMPTY(breasts_size_list)
|
||||
GLOBAL_LIST_INIT(cum_into_containers_list, /obj/item/weapon/reagent_containers/food/snacks/pie) //Yer fuggin snowflake name list jfc
|
||||
GLOBAL_LIST_INIT(dick_nouns, list("dick","cock","member","shaft"))
|
||||
GLOBAL_LIST_INIT(cum_id_list,"semen")
|
||||
GLOBAL_LIST_INIT(milk_id_list,"milk")
|
||||
//mentor stuff
|
||||
var/list/mentors = list()
|
||||
GLOBAL_LIST_EMPTY(mentors)
|
||||
|
||||
//Looc stuff
|
||||
var/global/looc_allowed = 1
|
||||
var/global/dlooc_allowed = 1
|
||||
GLOBAL_VAR_INIT(looc_allowed, 1)
|
||||
GLOBAL_VAR_INIT(dlooc_allowed, 1)
|
||||
|
||||
/client/proc/reload_mentors()
|
||||
set name = "Reload Mentors"
|
||||
@@ -103,19 +103,19 @@ var/global/dlooc_allowed = 1
|
||||
|
||||
/proc/toggle_looc(toggle = null)
|
||||
if(toggle != null) //if we're specifically en/disabling ooc
|
||||
if(toggle != looc_allowed)
|
||||
looc_allowed = toggle
|
||||
if(toggle != GLOB.looc_allowed)
|
||||
GLOB.looc_allowed = toggle
|
||||
else
|
||||
return
|
||||
else //otherwise just toggle it
|
||||
looc_allowed = !looc_allowed
|
||||
world << "<B>The LOOC channel has been globally [looc_allowed ? "enabled" : "disabled"].</B>"
|
||||
GLOB.looc_allowed = !GLOB.looc_allowed
|
||||
world << "<B>The LOOC channel has been globally [GLOB.looc_allowed ? "enabled" : "disabled"].</B>"
|
||||
|
||||
/datum/admins/proc/toggleloocdead()
|
||||
set category = "Server"
|
||||
set desc="Toggle dis bitch"
|
||||
set name="Toggle Dead LOOC"
|
||||
dlooc_allowed = !( dlooc_allowed )
|
||||
GLOB.dlooc_allowed = !( GLOB.dlooc_allowed )
|
||||
|
||||
log_admin("[key_name(usr)] toggled Dead LOOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead LOOC.")
|
||||
@@ -185,7 +185,7 @@ var/global/dlooc_allowed = 1
|
||||
|
||||
log_admin("[src] gave everyone genitals.")
|
||||
message_admins("[src] gave everyone genitals.")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(H.gender == MALE)
|
||||
H.give_penis()
|
||||
H.give_balls()
|
||||
@@ -201,7 +201,7 @@ var/global/dlooc_allowed = 1
|
||||
|
||||
log_admin("[src] turned everyone into mammals.")
|
||||
message_admins("[src] turned everyone into mammals.")
|
||||
for(var/mob/living/carbon/human/H in mob_list)
|
||||
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
||||
if(!H.dna)
|
||||
continue
|
||||
var/datum/dna/hdna = H.dna
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
if(canbearoused && dna)
|
||||
var/datum/species/S
|
||||
S = dna.species
|
||||
if(S && SSmob.times_fired%36==2 && getArousalLoss() < max_arousal)//Totally stolen from breathing code. Do this every 36 ticks.
|
||||
if(S && SSmobs.times_fired%36==2 && getArousalLoss() < max_arousal)//Totally stolen from breathing code. Do this every 36 ticks.
|
||||
adjustArousalLoss(arousal_rate * S.arousal_gain_rate)
|
||||
if(dna.features["exhibitionist"])
|
||||
var/amt_nude = 0
|
||||
@@ -255,8 +255,8 @@
|
||||
finished = 1
|
||||
|
||||
else//not into a container
|
||||
src.visible_message("<span class='danger'>[src] starts [pick("jerking off","stroking")] their [pick(dick_nouns)].</span>", \
|
||||
"<span class='userdanger'>You start jerking off your [pick(dick_nouns)].</span>", \
|
||||
src.visible_message("<span class='danger'>[src] starts [pick("jerking off","stroking")] their [pick(GLOB.dick_nouns)].</span>", \
|
||||
"<span class='userdanger'>You start jerking off your [pick(GLOB.dick_nouns)].</span>", \
|
||||
"<span class='userdanger'>You start masturbating.</span>")
|
||||
if(do_after(src, mb_time, target = src))
|
||||
if(total_cum > 5)
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
var/datum/sprite_accessory/S
|
||||
switch(G.type)
|
||||
if(/obj/item/organ/genital/penis)
|
||||
S = cock_shapes_list[G.shape]
|
||||
S = GLOB.cock_shapes_list[G.shape]
|
||||
size = G.size
|
||||
|
||||
if(!S || S.icon_state == "none")
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
switch(controller)
|
||||
if("Master")
|
||||
Recreate_MC()
|
||||
feedback_add_details("admin_verb","RMC")
|
||||
feedback_add_details("admin_verb","Restart Master Controller")
|
||||
if("Failsafe")
|
||||
new /datum/controller/failsafe()
|
||||
feedback_add_details("admin_verb","RFailsafe")
|
||||
feedback_add_details("admin_verb","Restart Failsafe Controller")
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
|
||||
|
||||
@@ -5,10 +5,10 @@
|
||||
#define SECURITY_HAS_MAINT_ACCESS 2
|
||||
#define EVERYONE_HAS_MAINT_ACCESS 4
|
||||
|
||||
/datum/configuration/vv_get_var(var_name)
|
||||
var/static/list/banned_views = list("autoadmin", "autoadmin_rank")
|
||||
if(var_name in banned_views)
|
||||
return debug_variable(var_name, "SECRET", 0, src)
|
||||
/datum/configuration/can_vv_get(var_name)
|
||||
var/static/list/banned_gets = list("autoadmin", "autoadmin_rank")
|
||||
if (var_name in banned_gets)
|
||||
return FALSE
|
||||
return ..()
|
||||
|
||||
/datum/configuration/vv_edit_var(var_name, var_value)
|
||||
@@ -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
|
||||
@@ -691,10 +691,6 @@
|
||||
config.forbid_peaceborg = 1
|
||||
if("silent_ai")
|
||||
config.silent_ai = 1
|
||||
if ("mentor_mobname_only")
|
||||
config.mentors_mobname_only = 1
|
||||
if ("mentor_legacy_system")
|
||||
config.mentor_legacy_system = 1
|
||||
if("silent_borg")
|
||||
config.silent_borg = 1
|
||||
if("sandbox_autoclose")
|
||||
@@ -708,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])
|
||||
@@ -720,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")
|
||||
@@ -751,17 +747,21 @@
|
||||
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)
|
||||
if ("mentor_mobname_only")
|
||||
config.mentors_mobname_only = 1
|
||||
if ("mentor_legacy_system")
|
||||
config.mentor_legacy_system = 1
|
||||
else
|
||||
diary << "Unknown setting in configuration: '[name]'"
|
||||
GLOB.diary << "Unknown setting in configuration: '[name]'"
|
||||
|
||||
fps = round(fps)
|
||||
if(fps <= 0)
|
||||
@@ -815,7 +815,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)
|
||||
@@ -847,19 +847,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
|
||||
@@ -893,7 +893,7 @@
|
||||
|
||||
/datum/configuration/proc/get_runnable_midround_modes(crew)
|
||||
var/list/datum/game_mode/runnable_modes = new
|
||||
for(var/T in (gamemode_cache - ticker.mode.type))
|
||||
for(var/T in (gamemode_cache - SSticker.mode.type))
|
||||
var/datum/game_mode/M = new T()
|
||||
if(!(M.config_tag in modes))
|
||||
qdel(M)
|
||||
|
||||
@@ -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
code/controllers/globals.dm
Normal file
62
code/controllers/globals.dm
Normal 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/can_vv_get(var_name)
|
||||
if(var_name in gvars_datum_protected_varlist)
|
||||
return FALSE
|
||||
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!")
|
||||
@@ -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()
|
||||
@@ -107,7 +113,25 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
|
||||
else
|
||||
msg += "\t [varname] = [varval]\n"
|
||||
log_world(msg)
|
||||
|
||||
var/datum/controller/subsystem/BadBoy = Master.last_type_processed
|
||||
var/FireHim = FALSE
|
||||
if(istype(BadBoy))
|
||||
msg = null
|
||||
switch(++BadBoy.failure_strikes)
|
||||
if(2)
|
||||
msg = "The [BadBoy.name] subsystem was the last to fire for 2 controller restarts. It will be recovered now and disabled if it happens again."
|
||||
FireHim = TRUE
|
||||
if(3)
|
||||
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined."
|
||||
BadBoy.flags |= SS_NO_FIRE
|
||||
if(msg)
|
||||
to_chat(GLOB.admins, "<span class='boldannounce'>[msg]</span>")
|
||||
log_world(msg)
|
||||
|
||||
if (istype(Master.subsystems))
|
||||
if(FireHim)
|
||||
Master.subsystems += new BadBoy.type //NEW_SS_GLOBAL will remove the old one
|
||||
subsystems = Master.subsystems
|
||||
StartProcessing(10)
|
||||
else
|
||||
@@ -133,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"]!"
|
||||
@@ -242,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
|
||||
|
||||
@@ -250,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
|
||||
|
||||
@@ -279,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
|
||||
|
||||
@@ -291,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--
|
||||
@@ -302,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))
|
||||
|
||||
|
||||
@@ -391,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,5 +1,4 @@
|
||||
|
||||
|
||||
/datum/controller/subsystem
|
||||
// Metadata; you should define these.
|
||||
name = "fire coderbus" //name of the subsystem
|
||||
@@ -29,8 +28,17 @@
|
||||
var/datum/controller/subsystem/queue_next
|
||||
var/datum/controller/subsystem/queue_prev
|
||||
|
||||
// Used to initialize the subsystem BEFORE the map has loaded
|
||||
var/static/failure_strikes = 0 //How many times we suspect this subsystem has crashed the MC, 3 strikes and you're out!
|
||||
|
||||
//Do not override
|
||||
/datum/controller/subsystem/New()
|
||||
return
|
||||
|
||||
// Used to initialize the subsystem BEFORE the map has loaded
|
||||
// Called AFTER Recover if that is called
|
||||
// Prefer to use Initialize if possible
|
||||
/datum/controller/subsystem/proc/PreInit()
|
||||
return
|
||||
|
||||
//This is used so the mc knows when the subsystem sleeps. do not override.
|
||||
/datum/controller/subsystem/proc/ignite(resumed = 0)
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
var/datum/controller/subsystem/acid/SSacid
|
||||
|
||||
/datum/controller/subsystem/acid
|
||||
SUBSYSTEM_DEF(acid)
|
||||
name = "Acid"
|
||||
priority = 40
|
||||
flags = SS_NO_INIT|SS_BACKGROUND
|
||||
@@ -8,10 +6,6 @@ var/datum/controller/subsystem/acid/SSacid
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
/datum/controller/subsystem/acid/New()
|
||||
NEW_SS_GLOBAL(SSacid)
|
||||
|
||||
|
||||
/datum/controller/subsystem/acid/stat_entry()
|
||||
..("P:[processing.len]")
|
||||
|
||||
@@ -34,7 +28,7 @@ var/datum/controller/subsystem/acid/SSacid
|
||||
|
||||
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)
|
||||
|
||||
@@ -5,9 +5,8 @@
|
||||
#define SSAIR_HIGHPRESSURE 5
|
||||
#define SSAIR_HOTSPOTS 6
|
||||
#define SSAIR_SUPERCONDUCTIVITY 7
|
||||
var/datum/controller/subsystem/air/SSair
|
||||
|
||||
/datum/controller/subsystem/air
|
||||
SUBSYSTEM_DEF(air)
|
||||
name = "Air"
|
||||
init_order = -1
|
||||
priority = 20
|
||||
@@ -41,9 +40,6 @@ var/datum/controller/subsystem/air/SSair
|
||||
var/map_loading = TRUE
|
||||
var/list/queued_for_activation
|
||||
|
||||
/datum/controller/subsystem/air/New()
|
||||
NEW_SS_GLOBAL(SSair)
|
||||
|
||||
/datum/controller/subsystem/air/stat_entry(msg)
|
||||
msg += "C:{"
|
||||
msg += "AT:[round(cost_turfs,1)]|"
|
||||
@@ -69,6 +65,7 @@ var/datum/controller/subsystem/air/SSair
|
||||
setup_allturfs()
|
||||
setup_atmos_machinery()
|
||||
setup_pipenets()
|
||||
gas_reactions = init_gas_reactions()
|
||||
..()
|
||||
|
||||
|
||||
@@ -244,6 +241,9 @@ var/datum/controller/subsystem/air/SSair
|
||||
active_turfs -= T
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
currentrun -= T
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.remove_atom_colour(TEMPORARY_COLOUR_PRIORITY, "#00ff00")
|
||||
#endif
|
||||
if(istype(T))
|
||||
T.excited = 0
|
||||
if(T.excited_group)
|
||||
@@ -251,6 +251,9 @@ var/datum/controller/subsystem/air/SSair
|
||||
|
||||
/datum/controller/subsystem/air/proc/add_to_active(turf/open/T, blockchanges = 1)
|
||||
if(istype(T) && T.air)
|
||||
#ifdef VISUALIZE_ACTIVE_TURFS
|
||||
T.add_atom_colour("#00ff00", TEMPORARY_COLOUR_PRIORITY)
|
||||
#endif
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
if(currentpart == SSAIR_ACTIVETURFS)
|
||||
@@ -296,7 +299,7 @@ var/datum/controller/subsystem/air/SSair
|
||||
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,19 +1,14 @@
|
||||
var/datum/controller/subsystem/assets/SSasset
|
||||
|
||||
/datum/controller/subsystem/assets
|
||||
SUBSYSTEM_DEF(assets)
|
||||
name = "Assets"
|
||||
init_order = -3
|
||||
flags = SS_NO_FIRE
|
||||
var/list/cache = list()
|
||||
|
||||
/datum/controller/subsystem/assets/New()
|
||||
NEW_SS_GLOBAL(SSasset)
|
||||
|
||||
/datum/controller/subsystem/assets/Initialize(timeofday)
|
||||
for(var/type in typesof(/datum/asset) - list(/datum/asset, /datum/asset/simple))
|
||||
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)
|
||||
..()
|
||||
@@ -1,10 +1,8 @@
|
||||
var/datum/controller/subsystem/atoms/SSatoms
|
||||
|
||||
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
|
||||
#define INITIALIZATION_INNEW_MAPLOAD 1 //New should call Initialize(TRUE)
|
||||
#define INITIALIZATION_INNEW_REGULAR 2 //New should call Initialize(FALSE)
|
||||
|
||||
/datum/controller/subsystem/atoms
|
||||
SUBSYSTEM_DEF(atoms)
|
||||
name = "Atoms"
|
||||
init_order = 11
|
||||
flags = SS_NO_FIRE
|
||||
@@ -12,11 +10,10 @@ var/datum/controller/subsystem/atoms/SSatoms
|
||||
var/initialized = INITIALIZATION_INSSATOMS
|
||||
var/old_initialized
|
||||
|
||||
/datum/controller/subsystem/atoms/New()
|
||||
NEW_SS_GLOBAL(SSatoms)
|
||||
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()
|
||||
@@ -26,8 +23,6 @@ var/datum/controller/subsystem/atoms/SSatoms
|
||||
if(initialized == INITIALIZATION_INSSATOMS)
|
||||
return
|
||||
|
||||
var/list/late_loaders
|
||||
|
||||
initialized = INITIALIZATION_INNEW_MAPLOAD
|
||||
|
||||
var/static/list/NewQdelList = list()
|
||||
@@ -73,15 +68,15 @@ var/datum/controller/subsystem/atoms/SSatoms
|
||||
|
||||
initialized = INITIALIZATION_INNEW_REGULAR
|
||||
|
||||
if(late_loaders)
|
||||
for(var/I in late_loaders)
|
||||
var/atom/A = I
|
||||
var/start_tick = world.time
|
||||
A.Initialize(FALSE)
|
||||
if(start_tick != world.time)
|
||||
WARNING("[A]: [A.type] slept during it's Initialize!")
|
||||
CHECK_TICK
|
||||
testing("Late-initialized [late_loaders.len] atoms")
|
||||
for(var/I in late_loaders)
|
||||
var/atom/A = I
|
||||
var/start_tick = world.time
|
||||
A.Initialize(FALSE)
|
||||
if(start_tick != world.time)
|
||||
WARNING("[A]: [A.type] slept during it's Initialize!")
|
||||
CHECK_TICK
|
||||
testing("Late-initialized [LAZYLEN(late_loaders)] atoms")
|
||||
LAZYCLEARLIST(late_loaders)
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/map_loader_begin()
|
||||
old_initialized = initialized
|
||||
@@ -108,9 +103,9 @@ var/datum/controller/subsystem/atoms/SSatoms
|
||||
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
|
||||
CHECK_TICK
|
||||
GLOB.not_good_mutations |= B
|
||||
CHECK_TICK
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user