mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Makes all global variables handled by the GLOB controller (#13152)
* Handlers converted, now to fix 3532 compile errors * 3532 compile fixes later, got runtimes on startup * Well the server loads now atleast * Take 2 * Oops
This commit is contained in:
+1
-2
@@ -32,7 +32,6 @@ stddef.dm
|
||||
/tools/dmitool/.project
|
||||
|
||||
# ignore midi2piano build cache
|
||||
/tools/midi2piano/obj/*
|
||||
|
||||
/tools/midi2piano/midi2piano/obj/*
|
||||
|
||||
|
||||
|
||||
@@ -257,7 +257,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
|
||||
#define VENT_SOUND_DELAY 30
|
||||
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
|
||||
direction &= initialize_directions
|
||||
if(!direction || !(direction in cardinal)) //cant go this way.
|
||||
if(!direction || !(direction in GLOB.cardinal)) //cant go this way.
|
||||
return
|
||||
|
||||
if(user in buckled_mobs)// fixes buckle ventcrawl edgecase fuck bug
|
||||
@@ -265,7 +265,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
|
||||
|
||||
var/obj/machinery/atmospherics/target_move = findConnecting(direction)
|
||||
if(target_move)
|
||||
if(is_type_in_list(target_move, ventcrawl_machinery) && target_move.can_crawl_through())
|
||||
if(is_type_in_list(target_move, GLOB.ventcrawl_machinery) && target_move.can_crawl_through())
|
||||
user.remove_ventcrawl()
|
||||
user.forceMove(target_move.loc) //handles entering and so on
|
||||
user.visible_message("You hear something squeezing through the ducts.", "You climb out the ventilation system.")
|
||||
@@ -278,7 +278,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
|
||||
user.last_played_vent = world.time
|
||||
playsound(src, 'sound/machines/ventcrawl.ogg', 50, 1, -3)
|
||||
else
|
||||
if((direction & initialize_directions) || is_type_in_list(src, ventcrawl_machinery)) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
|
||||
if((direction & initialize_directions) || is_type_in_list(src, GLOB.ventcrawl_machinery)) //if we move in a way the pipe can connect, but doesn't - or we're in a vent
|
||||
user.remove_ventcrawl()
|
||||
user.forceMove(src.loc)
|
||||
user.visible_message("You hear something squeezing through the pipes.", "You climb out the ventilation system.")
|
||||
@@ -287,7 +287,7 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
|
||||
user.canmove = 1
|
||||
|
||||
/obj/machinery/atmospherics/AltClick(var/mob/living/L)
|
||||
if(is_type_in_list(src, ventcrawl_machinery))
|
||||
if(is_type_in_list(src, GLOB.ventcrawl_machinery))
|
||||
L.handle_ventcrawl(src)
|
||||
return
|
||||
..()
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
/obj/machinery/atmospherics/binary/passive_gate/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
/obj/machinery/atmospherics/binary/passive_gate/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
|
||||
@@ -80,7 +80,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/update_icon()
|
||||
..()
|
||||
|
||||
|
||||
if(!powered())
|
||||
icon_state = "off"
|
||||
else
|
||||
@@ -197,7 +197,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/binary/pump/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
/obj/machinery/atmospherics/binary/pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
|
||||
@@ -84,7 +84,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
|
||||
..()
|
||||
|
||||
|
||||
if(!powered())
|
||||
icon_state = "off"
|
||||
else
|
||||
@@ -193,7 +193,7 @@ Thus, the two variables affect pump operation are set in New():
|
||||
/obj/machinery/atmospherics/binary/volume_pump/attack_ghost(mob/user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
/obj/machinery/atmospherics/binary/volume_pump/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
icon_state = "base"
|
||||
|
||||
ports = new()
|
||||
for(var/d in cardinal)
|
||||
for(var/d in GLOB.cardinal)
|
||||
var/datum/omni_port/new_port = new(src, d)
|
||||
switch(d)
|
||||
if(NORTH)
|
||||
|
||||
@@ -80,7 +80,7 @@ Filter types:
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/update_icon()
|
||||
..()
|
||||
|
||||
|
||||
if(flipped)
|
||||
icon_state = "m"
|
||||
else
|
||||
@@ -208,7 +208,7 @@ Filter types:
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
/obj/machinery/atmospherics/trinary/filter/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
if(flipped)
|
||||
icon_state = "m"
|
||||
else
|
||||
@@ -165,7 +165,7 @@
|
||||
add_fingerprint(user)
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = default_state)
|
||||
/obj/machinery/atmospherics/trinary/mixer/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = 1, var/master_ui = null, var/datum/topic_state/state = GLOB.default_state)
|
||||
user.set_machine(src)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
|
||||
@@ -14,18 +14,18 @@
|
||||
#define PIPE_COLOR_YELLOW "#ffcc00"
|
||||
#define PIPE_COLOR_PURPLE "#5c1ec0"
|
||||
|
||||
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)
|
||||
GLOBAL_LIST_INIT(pipe_colors, list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE))
|
||||
|
||||
/proc/pipe_color_lookup(var/color)
|
||||
for(var/C in pipe_colors)
|
||||
if(color == pipe_colors[C])
|
||||
for(var/C in GLOB.pipe_colors)
|
||||
if(color == GLOB.pipe_colors[C])
|
||||
return "[C]"
|
||||
|
||||
/proc/pipe_color_check(var/color)
|
||||
if(!color)
|
||||
return 1
|
||||
for(var/C in pipe_colors)
|
||||
if(color == pipe_colors[C])
|
||||
for(var/C in GLOB.pipe_colors)
|
||||
if(color == GLOB.pipe_colors[C])
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -105,10 +105,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
|
||||
var/image/I = image('icons/atmos/pipes.dmi', icon_state = state)
|
||||
pipe_icons[cache_name] = I
|
||||
|
||||
for(var/pipe_color in pipe_colors)
|
||||
for(var/pipe_color in GLOB.pipe_colors)
|
||||
I = image('icons/atmos/pipes.dmi', icon_state = state)
|
||||
I.color = pipe_colors[pipe_color]
|
||||
pipe_icons[state + "[pipe_colors[pipe_color]]"] = I
|
||||
I.color = GLOB.pipe_colors[pipe_color]
|
||||
pipe_icons[state + "[GLOB.pipe_colors[pipe_color]]"] = I
|
||||
|
||||
pipe = new ('icons/atmos/heat.dmi')
|
||||
for(var/state in pipe.IconStates())
|
||||
@@ -137,10 +137,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
|
||||
if(findtext(state, "core") || findtext(state, "4way"))
|
||||
var/image/I = image('icons/atmos/manifold.dmi', icon_state = state)
|
||||
manifold_icons[state] = I
|
||||
for(var/pipe_color in pipe_colors)
|
||||
for(var/pipe_color in GLOB.pipe_colors)
|
||||
I = image('icons/atmos/manifold.dmi', icon_state = state)
|
||||
I.color = pipe_colors[pipe_color]
|
||||
manifold_icons[state + pipe_colors[pipe_color]] = I
|
||||
I.color = GLOB.pipe_colors[pipe_color]
|
||||
manifold_icons[state + GLOB.pipe_colors[pipe_color]] = I
|
||||
|
||||
/datum/pipe_icon_manager/proc/gen_device_icons()
|
||||
if(!device_icons)
|
||||
@@ -185,10 +185,10 @@ var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_
|
||||
|
||||
var/cache_name = state
|
||||
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
var/image/I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D))
|
||||
underlays[cache_name + "[D]"] = I
|
||||
for(var/pipe_color in pipe_colors)
|
||||
for(var/pipe_color in GLOB.pipe_colors)
|
||||
I = image(icon('icons/atmos/pipe_underlays.dmi', icon_state = state, dir = D))
|
||||
I.color = pipe_colors[pipe_color]
|
||||
underlays[state + "[D]" + "[pipe_colors[pipe_color]]"] = I
|
||||
I.color = GLOB.pipe_colors[pipe_color]
|
||||
underlays[state + "[D]" + "[GLOB.pipe_colors[pipe_color]]"] = I
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
reconcile_air()
|
||||
return
|
||||
|
||||
var/pipenetwarnings = 10
|
||||
GLOBAL_VAR_INIT(pipenetwarnings, 10)
|
||||
|
||||
/datum/pipeline/proc/build_pipeline(obj/machinery/atmospherics/base)
|
||||
var/volume = 0
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/atmos_init()
|
||||
..()
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
if(D == dir)
|
||||
continue
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, D))
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold/update_icon(var/safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/update_icon(var/safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/manifold4w/atmos_init()
|
||||
..()
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, D))
|
||||
if(target.initialize_directions & get_dir(target,src))
|
||||
var/c = check_connect_types(target,src)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
if(initPipe)
|
||||
normalize_dir()
|
||||
var/N = 2
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
if(D & initialize_directions)
|
||||
N--
|
||||
for(var/obj/machinery/atmospherics/target in get_step(src, D))
|
||||
@@ -138,7 +138,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/pipe/simple/update_icon(var/safety = 0)
|
||||
..()
|
||||
|
||||
|
||||
if(!check_icon_cache())
|
||||
return
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if(initPipe)
|
||||
normalize_dir()
|
||||
var/N = 2
|
||||
for(var/D in cardinal)
|
||||
for(var/D in GLOB.cardinal)
|
||||
if(D & initialize_directions_he)
|
||||
N--
|
||||
for(var/obj/machinery/atmospherics/pipe/simple/heat_exchanging/target in get_step(src, D))
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(!fake)
|
||||
SSair.hotspots += src
|
||||
perform_exposure()
|
||||
dir = pick(cardinal)
|
||||
dir = pick(GLOB.cardinal)
|
||||
air_update_turf()
|
||||
|
||||
/obj/effect/hotspot/proc/perform_exposure()
|
||||
@@ -133,7 +133,7 @@
|
||||
//Possible spread due to radiated heat
|
||||
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
|
||||
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(!(location.atmos_adjacent_turfs & direction))
|
||||
var/turf/simulated/wall/W = get_step(src, direction)
|
||||
if(istype(W))
|
||||
@@ -309,7 +309,7 @@
|
||||
if(dist == max_dist)
|
||||
continue
|
||||
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
var/turf/link = get_step(T, dir)
|
||||
if (!link)
|
||||
continue
|
||||
|
||||
@@ -62,7 +62,7 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
|
||||
/turf/proc/CalculateAdjacentTurfs()
|
||||
atmos_adjacent_turfs_amount = 0
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
@@ -89,7 +89,7 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
var/adjacent_turfs = list()
|
||||
|
||||
var/turf/simulated/curloc = src
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(!(curloc.atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
|
||||
@@ -99,11 +99,11 @@ turf/CanPass(atom/movable/mover, turf/target, height=1.5)
|
||||
if(!alldir)
|
||||
return adjacent_turfs
|
||||
|
||||
for(var/direction in diagonals)
|
||||
for(var/direction in GLOB.diagonals)
|
||||
var/matchingDirections = 0
|
||||
var/turf/simulated/S = get_step(curloc, direction)
|
||||
|
||||
for(var/checkDirection in cardinal)
|
||||
for(var/checkDirection in GLOB.cardinal)
|
||||
if(!(S.atmos_adjacent_turfs & checkDirection))
|
||||
continue
|
||||
var/turf/simulated/checkTurf = get_step(S, checkDirection)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
if (planet_atmos)
|
||||
atmos_adjacent_turfs_amount++
|
||||
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(!(atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
|
||||
@@ -260,9 +260,9 @@
|
||||
/turf/simulated/proc/get_atmos_overlay_by_name(name)
|
||||
switch(name)
|
||||
if("plasma")
|
||||
return plmaster
|
||||
return GLOB.plmaster
|
||||
if("sleeping_agent")
|
||||
return slmaster
|
||||
return GLOB.slmaster
|
||||
return null
|
||||
|
||||
/turf/simulated/proc/tile_graphic()
|
||||
@@ -412,13 +412,13 @@
|
||||
archive()
|
||||
else
|
||||
//Does particate in air exchange so only consider directions not considered during process_cell()
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(!(atmos_adjacent_turfs & direction) && !(atmos_supeconductivity & direction))
|
||||
conductivity_directions += direction
|
||||
|
||||
if(conductivity_directions>0)
|
||||
//Conduct with tiles around me
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(conductivity_directions&direction)
|
||||
var/turf/neighbor = get_step(src,direction)
|
||||
|
||||
@@ -499,7 +499,7 @@ turf/simulated/proc/radiate_to_spess() //Radiate excess tile heat to space
|
||||
/turf/simulated/Initialize_Atmos(times_fired)
|
||||
..()
|
||||
update_visuals()
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(!(atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
var/turf/enemy_tile = get_step(src, direction)
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
// Defines for all genetics/DNA related stuff
|
||||
|
||||
// What each index means:
|
||||
#define DNA_OFF_LOWERBOUND 1 // changed as lists start at 1 not 0
|
||||
#define DNA_OFF_UPPERBOUND 2
|
||||
#define DNA_ON_LOWERBOUND 3
|
||||
#define DNA_ON_UPPERBOUND 4
|
||||
|
||||
// Define block bounds (off-low,off-high,on-low,on-high)
|
||||
// Used in setupgame.dm
|
||||
#define DNA_DEFAULT_BOUNDS list(1,2049,2050,4095)
|
||||
#define DNA_HARDER_BOUNDS list(1,3049,3050,4095)
|
||||
#define DNA_HARD_BOUNDS list(1,3490,3500,4095)
|
||||
|
||||
// UI Indices (can change to mutblock style, if desired)
|
||||
#define DNA_UI_HAIR_R 1
|
||||
#define DNA_UI_HAIR_G 2
|
||||
#define DNA_UI_HAIR_B 3
|
||||
#define DNA_UI_HAIR2_R 4
|
||||
#define DNA_UI_HAIR2_G 5
|
||||
#define DNA_UI_HAIR2_B 6
|
||||
#define DNA_UI_BEARD_R 7
|
||||
#define DNA_UI_BEARD_G 8
|
||||
#define DNA_UI_BEARD_B 9
|
||||
#define DNA_UI_BEARD2_R 10
|
||||
#define DNA_UI_BEARD2_G 11
|
||||
#define DNA_UI_BEARD2_B 12
|
||||
#define DNA_UI_SKIN_TONE 13
|
||||
#define DNA_UI_SKIN_R 14
|
||||
#define DNA_UI_SKIN_G 15
|
||||
#define DNA_UI_SKIN_B 16
|
||||
#define DNA_UI_HACC_R 17
|
||||
#define DNA_UI_HACC_G 18
|
||||
#define DNA_UI_HACC_B 19
|
||||
#define DNA_UI_HEAD_MARK_R 20
|
||||
#define DNA_UI_HEAD_MARK_G 21
|
||||
#define DNA_UI_HEAD_MARK_B 22
|
||||
#define DNA_UI_BODY_MARK_R 23
|
||||
#define DNA_UI_BODY_MARK_G 24
|
||||
#define DNA_UI_BODY_MARK_B 25
|
||||
#define DNA_UI_TAIL_MARK_R 26
|
||||
#define DNA_UI_TAIL_MARK_G 27
|
||||
#define DNA_UI_TAIL_MARK_B 28
|
||||
#define DNA_UI_EYES_R 29
|
||||
#define DNA_UI_EYES_G 30
|
||||
#define DNA_UI_EYES_B 31
|
||||
#define DNA_UI_GENDER 32
|
||||
#define DNA_UI_BEARD_STYLE 33
|
||||
#define DNA_UI_HAIR_STYLE 34
|
||||
/*#define DNA_UI_BACC_STYLE 23*/
|
||||
#define DNA_UI_HACC_STYLE 35
|
||||
#define DNA_UI_HEAD_MARK_STYLE 36
|
||||
#define DNA_UI_BODY_MARK_STYLE 37
|
||||
#define DNA_UI_TAIL_MARK_STYLE 38
|
||||
#define DNA_UI_LENGTH 38 // Update this when you add something, or you WILL break shit.
|
||||
|
||||
#define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow.
|
||||
@@ -28,13 +28,13 @@
|
||||
|
||||
#define is_pen(W) (istype(W, /obj/item/pen))
|
||||
|
||||
var/list/static/global/pointed_types = typecacheof(list(
|
||||
GLOBAL_LIST_INIT(pointed_types, typecacheof(list(
|
||||
/obj/item/pen,
|
||||
/obj/item/screwdriver,
|
||||
/obj/item/reagent_containers/syringe,
|
||||
/obj/item/kitchen/utensil/fork))
|
||||
/obj/item/kitchen/utensil/fork)))
|
||||
|
||||
#define is_pointed(W) (is_type_in_typecache(W, pointed_types))
|
||||
#define is_pointed(W) (is_type_in_typecache(W, GLOB.pointed_types))
|
||||
|
||||
GLOBAL_LIST_INIT(glass_sheet_types, typecacheof(list(
|
||||
/obj/item/stack/sheet/glass,
|
||||
|
||||
@@ -122,10 +122,10 @@
|
||||
)
|
||||
|
||||
#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))
|
||||
#define END_FOR_DVIEW dview_mob.loc = null
|
||||
GLOB.dview_mob.loc = center; \
|
||||
GLOB.dview_mob.see_invisible = invis_flags; \
|
||||
for(type in view(range, GLOB.dview_mob))
|
||||
#define END_FOR_DVIEW GLOB.dview_mob.loc = null
|
||||
|
||||
//Turf locational stuff
|
||||
#define get_turf(A) (get_step(A, 0))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Bannable antag roles
|
||||
var/global/list/antag_roles = list(
|
||||
GLOBAL_LIST_INIT(antag_roles, list(
|
||||
ROLE_TRAITOR,
|
||||
ROLE_OPERATIVE,
|
||||
ROLE_CHANGELING,
|
||||
@@ -18,14 +18,14 @@ var/global/list/antag_roles = list(
|
||||
ROLE_GUARDIAN,
|
||||
ROLE_MORPH,
|
||||
ROLE_GSPIDER,
|
||||
)
|
||||
))
|
||||
|
||||
// Bannable other roles
|
||||
var/global/list/other_roles = list(
|
||||
GLOBAL_LIST_INIT(other_roles, list(
|
||||
ROLE_SENTIENT,
|
||||
ROLE_NYMPH,
|
||||
ROLE_ERT,
|
||||
ROLE_GHOST,
|
||||
"AntagHUD",
|
||||
"Records"
|
||||
)
|
||||
))
|
||||
|
||||
+24
-24
@@ -5,7 +5,7 @@
|
||||
// will get logs that are one big line if the system is Linux and they are using notepad. This solves it by adding CR to every line ending
|
||||
// in the logs. ascii character 13 = CR
|
||||
|
||||
/var/global/log_end = world.system_type == UNIX ? ascii2text(13) : ""
|
||||
GLOBAL_VAR_INIT(log_end, (world.system_type == UNIX ? ascii2text(13) : ""))
|
||||
|
||||
#define DIRECT_OUTPUT(A, B) A << B
|
||||
#define SEND_IMAGE(target, image) DIRECT_OUTPUT(target, image)
|
||||
@@ -30,13 +30,13 @@
|
||||
#endif
|
||||
|
||||
/proc/log_admin(text)
|
||||
admin_log.Add(text)
|
||||
GLOB.admin_log.Add(text)
|
||||
if(config.log_admin)
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMIN: [text][GLOB.log_end]")
|
||||
|
||||
/proc/log_debug(text)
|
||||
if(config.log_debug)
|
||||
WRITE_LOG(GLOB.world_game_log, "DEBUG: [text][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "DEBUG: [text][GLOB.log_end]")
|
||||
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(check_rights(R_DEBUG, 0, C.mob) && (C.prefs.toggles & CHAT_DEBUGLOGS))
|
||||
@@ -44,88 +44,88 @@
|
||||
|
||||
/proc/log_game(text)
|
||||
if(config.log_game)
|
||||
WRITE_LOG(GLOB.world_game_log, "GAME: [text][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "GAME: [text][GLOB.log_end]")
|
||||
|
||||
/proc/log_vote(text)
|
||||
if(config.log_vote)
|
||||
WRITE_LOG(GLOB.world_game_log, "VOTE: [text][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "VOTE: [text][GLOB.log_end]")
|
||||
|
||||
/proc/log_access_in(client/new_client)
|
||||
if(config.log_access)
|
||||
var/message = "[key_name(new_client)] - IP:[new_client.address] - CID:[new_client.computer_id] - BYOND v[new_client.byond_version]"
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS IN: [message][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS IN: [message][GLOB.log_end]")
|
||||
|
||||
/proc/log_access_out(mob/last_mob)
|
||||
if(config.log_access)
|
||||
var/message = "[key_name(last_mob)] - IP:[last_mob.lastKnownIP] - CID:[last_mob.computer_id] - BYOND Logged Out"
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS OUT: [message][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "ACCESS OUT: [message][GLOB.log_end]")
|
||||
|
||||
/proc/log_say(text, mob/speaker)
|
||||
if(config.log_say)
|
||||
WRITE_LOG(GLOB.world_game_log, "SAY: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "SAY: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_whisper(text, mob/speaker)
|
||||
if(config.log_whisper)
|
||||
WRITE_LOG(GLOB.world_game_log, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "WHISPER: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_ooc(text, client/user)
|
||||
if(config.log_ooc)
|
||||
WRITE_LOG(GLOB.world_game_log, "OOC: [user.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "OOC: [user.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_aooc(text, client/user)
|
||||
if(config.log_ooc)
|
||||
WRITE_LOG(GLOB.world_game_log, "AOOC: [user.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "AOOC: [user.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_looc(text, client/user)
|
||||
if(config.log_ooc)
|
||||
WRITE_LOG(GLOB.world_game_log, "LOOC: [user.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "LOOC: [user.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_emote(text, mob/speaker)
|
||||
if(config.log_emote)
|
||||
WRITE_LOG(GLOB.world_game_log, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "EMOTE: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_attack(attacker, defender, message)
|
||||
if(config.log_attack)
|
||||
WRITE_LOG(GLOB.world_game_log, "ATTACK: [attacker] against [defender]: [message][log_end]") //Seperate attack logs? Why?
|
||||
WRITE_LOG(GLOB.world_game_log, "ATTACK: [attacker] against [defender]: [message][GLOB.log_end]") //Seperate attack logs? Why?
|
||||
|
||||
/proc/log_adminsay(text, mob/speaker)
|
||||
if(config.log_adminchat)
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMINSAY: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_qdel(text)
|
||||
WRITE_LOG(GLOB.world_qdel_log, "QDEL: [text]")
|
||||
|
||||
/proc/log_mentorsay(text, mob/speaker)
|
||||
if(config.log_adminchat)
|
||||
WRITE_LOG(GLOB.world_game_log, "MENTORSAY: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "MENTORSAY: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_ghostsay(text, mob/speaker)
|
||||
if(config.log_say)
|
||||
WRITE_LOG(GLOB.world_game_log, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "DEADCHAT: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_ghostemote(text, mob/speaker)
|
||||
if(config.log_emote)
|
||||
WRITE_LOG(GLOB.world_game_log, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "DEADEMOTE: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_adminwarn(text)
|
||||
if(config.log_adminwarn)
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMINWARN: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "ADMINWARN: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_pda(text, mob/speaker)
|
||||
if(config.log_pda)
|
||||
WRITE_LOG(GLOB.world_game_log, "PDA: [speaker.simple_info_line()]: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "PDA: [speaker.simple_info_line()]: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_chat(text, mob/speaker)
|
||||
if(config.log_pda)
|
||||
WRITE_LOG(GLOB.world_game_log, "CHAT: [speaker.simple_info_line()] [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "CHAT: [speaker.simple_info_line()] [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_misc(text)
|
||||
WRITE_LOG(GLOB.world_game_log, "MISC: [text][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "MISC: [text][GLOB.log_end]")
|
||||
|
||||
/proc/log_world(text)
|
||||
SEND_TEXT(world.log, text)
|
||||
if(config && config.log_world_output)
|
||||
WRITE_LOG(GLOB.world_game_log, "WORLD: [html_decode(text)][log_end]")
|
||||
WRITE_LOG(GLOB.world_game_log, "WORLD: [html_decode(text)][GLOB.log_end]")
|
||||
|
||||
/proc/log_runtime_txt(text) // different from /tg/'s log_runtime because our error handler has a log_runtime proc already that does other stuff
|
||||
WRITE_LOG(GLOB.world_runtime_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/list/string_filename_current_key
|
||||
GLOBAL_LIST_EMPTY(string_cache)
|
||||
GLOBAL_LIST_EMPTY(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/list/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]")
|
||||
|
||||
@@ -51,10 +51,10 @@
|
||||
|
||||
PLEASE USE RESPONSIBLY, Some log files canr each 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
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
|
||||
|
||||
|
||||
//var/debug_mob = 0
|
||||
//GLOBAL_VAR_INIT(debug_mob, 0)
|
||||
|
||||
// Will recursively loop through an atom's contents and check for mobs, then it will loop through every atom in that atom's contents.
|
||||
// It will keep doing this until it checks every content possible. This will fix any problems with mobs, that are inside objects,
|
||||
@@ -128,7 +128,7 @@
|
||||
|
||||
/proc/recursive_mob_check(var/atom/O, var/list/L = list(), var/recursion_limit = 3, var/client_check = 1, var/sight_check = 1, var/include_radio = 1)
|
||||
|
||||
//debug_mob += O.contents.len
|
||||
//GLOB.debug_mob += O.contents.len
|
||||
if(!recursion_limit)
|
||||
return L
|
||||
for(var/atom/A in O.contents)
|
||||
@@ -273,7 +273,7 @@
|
||||
|
||||
/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
|
||||
|
||||
|
||||
@@ -66,7 +66,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))
|
||||
|
||||
@@ -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')
|
||||
var/icon/my_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
|
||||
|
||||
@@ -77,13 +77,13 @@
|
||||
//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
|
||||
GLOBAL_VAR(gaussian_next)
|
||||
#define ACCURACY 10000
|
||||
/proc/gaussian(mean, stddev)
|
||||
var/R1;var/R2;var/working
|
||||
if(gaussian_next != null)
|
||||
R1 = gaussian_next
|
||||
gaussian_next = null
|
||||
if(GLOB.gaussian_next != null)
|
||||
R1 = GLOB.gaussian_next
|
||||
GLOB.gaussian_next = null
|
||||
else
|
||||
do
|
||||
R1 = rand(-ACCURACY,ACCURACY)/ACCURACY
|
||||
@@ -92,7 +92,7 @@ var/gaussian_next
|
||||
while(working >= 1 || working==0)
|
||||
working = sqrt(-2 * log(working) / working)
|
||||
R1 *= working
|
||||
gaussian_next = R2 * working
|
||||
GLOB.gaussian_next = R2 * working
|
||||
return (mean + stddev * R1)
|
||||
#undef ACCURACY
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ proc/random_hair_style(var/gender, species = "Human", var/datum/robolimb/robohea
|
||||
continue
|
||||
if(species == "Machine") //If the user is a species who can have a robotic head...
|
||||
if(!robohead)
|
||||
robohead = all_robolimbs["Morpheus Cyberkinetics"]
|
||||
robohead = GLOB.all_robolimbs["Morpheus Cyberkinetics"]
|
||||
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
valid_hairstyles += hairstyle //Give them their hairstyles if they do.
|
||||
else
|
||||
@@ -88,7 +88,7 @@ proc/random_facial_hair_style(var/gender, species = "Human", var/datum/robolimb/
|
||||
continue
|
||||
if(species == "Machine") //If the user is a species who can have a robotic head...
|
||||
if(!robohead)
|
||||
robohead = all_robolimbs["Morpheus Cyberkinetics"]
|
||||
robohead = GLOB.all_robolimbs["Morpheus Cyberkinetics"]
|
||||
if((species in S.species_allowed) && robohead.is_monitor && ((S.models_allowed && (robohead.company in S.models_allowed)) || !S.models_allowed)) //If this is a facial hair style native to the user's species, check to see if they have a head with an ipc-style screen and that the head's company is in the screen style's allowed models list.
|
||||
valid_facial_hairstyles += facialhairstyle //Give them their facial hairstyles if they do.
|
||||
else
|
||||
@@ -142,7 +142,7 @@ proc/random_marking_style(var/location = "body", species = "Human", var/datum/ro
|
||||
var/datum/sprite_accessory/body_markings/head/M = GLOB.marking_styles_list[S.name]
|
||||
if(species == "Machine")//If the user is a species that can have a robotic head...
|
||||
if(!robohead)
|
||||
robohead = all_robolimbs["Morpheus Cyberkinetics"]
|
||||
robohead = GLOB.all_robolimbs["Morpheus Cyberkinetics"]
|
||||
if(!(S.models_allowed && (robohead.company in S.models_allowed))) //Make sure they don't get markings incompatible with their head.
|
||||
continue
|
||||
else if(alt_head && alt_head != "None") //If the user's got an alt head, validate markings for that head.
|
||||
@@ -161,8 +161,8 @@ proc/random_marking_style(var/location = "body", species = "Human", var/datum/ro
|
||||
proc/random_body_accessory(species = "Vulpkanin")
|
||||
var/body_accessory = null
|
||||
var/list/valid_body_accessories = list()
|
||||
for(var/B in body_accessory_by_name)
|
||||
var/datum/body_accessory/A = body_accessory_by_name[B]
|
||||
for(var/B in GLOB.body_accessory_by_name)
|
||||
var/datum/body_accessory/A = GLOB.body_accessory_by_name[B]
|
||||
if(!istype(A))
|
||||
valid_body_accessories += "None" //The only null entry should be the "None" option.
|
||||
continue
|
||||
@@ -261,7 +261,7 @@ proc/age2agedescription(age)
|
||||
status = "Released"
|
||||
target_records.fields["criminal"] = status
|
||||
log_admin("[key_name_admin(user)] set secstatus of [their_rank] [their_name] to [status], comment: [comment]")
|
||||
target_records.fields["comments"] += "Set to [status] by [user.name] ([user_rank]) on [current_date_string] [station_time_timestamp()], comment: [comment]"
|
||||
target_records.fields["comments"] += "Set to [status] by [user.name] ([user_rank]) on [GLOB.current_date_string] [station_time_timestamp()], comment: [comment]"
|
||||
update_all_mob_security_hud()
|
||||
return 1
|
||||
|
||||
|
||||
+13
-13
@@ -1,7 +1,7 @@
|
||||
var/church_name = null
|
||||
GLOBAL_VAR(church_name)
|
||||
/proc/church_name()
|
||||
if(church_name)
|
||||
return church_name
|
||||
if(GLOB.church_name)
|
||||
return GLOB.church_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
@@ -15,9 +15,9 @@ var/church_name = null
|
||||
|
||||
return name
|
||||
|
||||
var/command_name = null
|
||||
GLOBAL_VAR(command_name)
|
||||
/proc/command_name()
|
||||
return using_map.dock_name
|
||||
return GLOB.using_map.dock_name
|
||||
|
||||
var/religion_name = null
|
||||
/proc/religion_name()
|
||||
@@ -32,10 +32,10 @@ var/religion_name = null
|
||||
return capitalize(name)
|
||||
|
||||
/proc/system_name()
|
||||
return using_map.starsys_name
|
||||
return GLOB.using_map.starsys_name
|
||||
|
||||
/proc/station_name()
|
||||
return using_map.station_name
|
||||
return GLOB.using_map.station_name
|
||||
|
||||
/proc/new_station_name()
|
||||
var/random = rand(1,5)
|
||||
@@ -80,10 +80,10 @@ var/religion_name = null
|
||||
new_station_name += pick("13","XIII","Thirteen")
|
||||
return new_station_name
|
||||
|
||||
var/syndicate_name = null
|
||||
GLOBAL_VAR(syndicate_name)
|
||||
/proc/syndicate_name()
|
||||
if(syndicate_name)
|
||||
return syndicate_name
|
||||
if(GLOB.syndicate_name)
|
||||
return GLOB.syndicate_name
|
||||
|
||||
var/name = ""
|
||||
|
||||
@@ -107,7 +107,7 @@ var/syndicate_name = null
|
||||
name += pick("-", "*", "")
|
||||
name += pick("Tech", "Sun", "Co", "Tek", "X", "Inc", "Gen", "Star", "Dyne", "Code", "Hive")
|
||||
|
||||
syndicate_name = name
|
||||
GLOB.syndicate_name = name
|
||||
return name
|
||||
|
||||
|
||||
@@ -142,10 +142,10 @@ GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
|
||||
var/safety[] = list(1,2,3)//Tells the proc which options to remove later on.
|
||||
var/nouns[] = list("love","hate","anger","peace","pride","sympathy","bravery","loyalty","honesty","integrity","compassion","charity","success","courage","deceit","skill","beauty","brilliance","pain","misery","beliefs","dreams","justice","truth","faith","liberty","knowledge","thought","information","culture","trust","dedication","progress","education","hospitality","leisure","trouble","friendships", "relaxation")
|
||||
var/drinks[] = list("vodka and tonic","gin fizz","bahama mama","manhattan","black Russian","whiskey soda","long island tea","margarita","Irish coffee"," manly dwarf","Irish cream","doctor's delight","Beepksy Smash","tequila sunrise","brave bull","gargle blaster","bloody mary","whiskey cola","white Russian","vodka martini","martini","Cuba libre","kahlua","vodka","wine","moonshine")
|
||||
var/locations[] = teleportlocs.len ? teleportlocs : drinks//if null, defaults to drinks instead.
|
||||
var/locations[] = GLOB.teleportlocs.len ? GLOB.teleportlocs : drinks//if null, defaults to drinks instead.
|
||||
|
||||
var/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.
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return null
|
||||
if(!istext(t))
|
||||
t = "[t]" // Just quietly assume any non-texts are supposed to be text
|
||||
var/sqltext = dbcon.Quote(t);
|
||||
var/sqltext = GLOB.dbcon.Quote(t);
|
||||
return copytext(sqltext, 2, length(sqltext));//Quote() adds quotes around input, we already do that
|
||||
|
||||
/proc/format_table_name(table as text)
|
||||
@@ -207,7 +207,7 @@ proc/checkhtml(var/t)
|
||||
tag = copytext(t,start, p)
|
||||
p++
|
||||
tag = copytext(t,start+1, p)
|
||||
if(!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it
|
||||
if(!(tag in GLOB.paper_tag_whitelist)) //if it's unkown tag, disarming it
|
||||
t = copytext(t,1,start-1) + "<" + copytext(t,start+1)
|
||||
p = findtext(t,"<",p)
|
||||
return t
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
// var/myUID = mydatum.UID()
|
||||
// var/datum/D = locateUID(myUID)
|
||||
|
||||
var/global/next_unique_datum_id = 1
|
||||
GLOBAL_VAR_INIT(next_unique_datum_id, 1)
|
||||
|
||||
// /client/var/tmp/unique_datum_id = null
|
||||
|
||||
@@ -22,7 +22,7 @@ var/global/next_unique_datum_id = 1
|
||||
if(!unique_datum_id)
|
||||
var/tag_backup = tag
|
||||
tag = null // Grab the raw ref, not the tag
|
||||
unique_datum_id = "\ref[src]_[next_unique_datum_id++]"
|
||||
unique_datum_id = "\ref[src]_[GLOB.next_unique_datum_id++]"
|
||||
tag = tag_backup
|
||||
return unique_datum_id
|
||||
|
||||
|
||||
+13
-13
@@ -1129,9 +1129,9 @@ proc/get_mob_with_client_list()
|
||||
|
||||
//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(is_sharp(W))
|
||||
@@ -1139,7 +1139,7 @@ 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
|
||||
|
||||
/proc/is_hot(obj/item/W as obj)
|
||||
@@ -1221,18 +1221,18 @@ var/list/can_embed_types = typecacheof(list(
|
||||
/*
|
||||
Checks if that loc and dir has a item on the wall
|
||||
*/
|
||||
var/list/static/global/wall_items = typecacheof(list(/obj/machinery/power/apc, /obj/machinery/alarm,
|
||||
GLOBAL_LIST_INIT(wall_items, typecacheof(list(/obj/machinery/power/apc, /obj/machinery/alarm,
|
||||
/obj/item/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,
|
||||
/obj/machinery/newscaster, /obj/machinery/firealarm, /obj/structure/noticeboard, /obj/machinery/door_control,
|
||||
/obj/machinery/computer/security/telescreen, /obj/machinery/embedded_controller/radio/airlock,
|
||||
/obj/item/storage/secure/safe, /obj/machinery/door_timer, /obj/machinery/flasher, /obj/machinery/keycard_auth,
|
||||
/obj/structure/mirror, /obj/structure/closet/fireaxecabinet, /obj/machinery/computer/security/telescreen/entertainment,
|
||||
/obj/structure/sign))
|
||||
/obj/structure/sign)))
|
||||
|
||||
/proc/gotwallitem(loc, dir)
|
||||
for(var/obj/O in loc)
|
||||
if(is_type_in_typecache(O, wall_items))
|
||||
if(is_type_in_typecache(O, GLOB.wall_items))
|
||||
//Direction works sometimes
|
||||
if(O.dir == dir)
|
||||
return 1
|
||||
@@ -1254,7 +1254,7 @@ var/list/static/global/wall_items = typecacheof(list(/obj/machinery/power/apc, /
|
||||
|
||||
//Some stuff is placed directly on the wallturf (signs)
|
||||
for(var/obj/O in get_step(loc, dir))
|
||||
if(is_type_in_typecache(O, wall_items))
|
||||
if(is_type_in_typecache(O, GLOB.wall_items))
|
||||
if(abs(O.pixel_x) <= 10 && abs(O.pixel_y) <= 10)
|
||||
return 1
|
||||
return 0
|
||||
@@ -1381,7 +1381,7 @@ atom/proc/GetTypeInAllContents(typepath)
|
||||
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--
|
||||
|
||||
@@ -1415,19 +1415,19 @@ atom/proc/GetTypeInAllContents(typepath)
|
||||
|
||||
return locate(dest_x,dest_y,dest_z)
|
||||
|
||||
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.
|
||||
/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
|
||||
invisibility = 101
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
var/datum/configuration/config = null
|
||||
GLOBAL_REAL(config, /datum/configuration)
|
||||
|
||||
var/host = null
|
||||
var/join_motd = null
|
||||
GLOBAL_VAR(host)
|
||||
GLOBAL_VAR(join_motd)
|
||||
GLOBAL_VAR(join_tos)
|
||||
var/game_version = "ParaCode"
|
||||
var/changelog_hash = md5('html/changelog.html') //used to check if the CL changed
|
||||
var/game_year = (text2num(time2text(world.realtime, "YYYY")) + 544)
|
||||
GLOBAL_VAR_INIT(game_version, "ParaCode")
|
||||
GLOBAL_VAR_INIT(changelog_hash, md5('html/changelog.html')) //used to check if the CL changed
|
||||
GLOBAL_VAR_INIT(game_year, (text2num(time2text(world.realtime, "YYYY")) + 544))
|
||||
|
||||
var/aliens_allowed = 1
|
||||
var/traitor_scaling = 1
|
||||
//var/goonsay_allowed = 0
|
||||
var/dna_ident = 1
|
||||
var/abandon_allowed = 0
|
||||
var/enter_allowed = 1
|
||||
var/guests_allowed = 1
|
||||
var/shuttle_frozen = 0
|
||||
var/shuttle_left = 0
|
||||
var/tinted_weldhelh = 1
|
||||
var/mouse_respawn_time = 5 //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
|
||||
|
||||
// Command to run if shutting down (SHUTDOWN_ON_REBOOT) instead of rebooting
|
||||
// It's defined here as a global because this is a hilariously bad thing to have on the easily-edited config datum
|
||||
var/global/shutdown_shell_command
|
||||
|
||||
// Also global to prevent easy edits
|
||||
var/global/python_path = "" //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
|
||||
GLOBAL_VAR_INIT(aliens_allowed, 1)
|
||||
GLOBAL_VAR_INIT(traitor_scaling, 1)
|
||||
//GLOBAL_VAR_INIT(goonsay_allowed, 0)
|
||||
GLOBAL_VAR_INIT(dna_ident, 1)
|
||||
GLOBAL_VAR_INIT(abandon_allowed, 0)
|
||||
GLOBAL_VAR_INIT(enter_allowed, 1)
|
||||
GLOBAL_VAR_INIT(guests_allowed, 1)
|
||||
GLOBAL_VAR_INIT(shuttle_frozen, 0)
|
||||
GLOBAL_VAR_INIT(shuttle_left, 0)
|
||||
GLOBAL_VAR_INIT(tinted_weldhelh, 1)
|
||||
GLOBAL_VAR_INIT(mouse_respawn_time, 5) //Amount of time that must pass between a player dying as a mouse and repawning as a mouse. In minutes.
|
||||
|
||||
// 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 = 1 // enables detailed job debug file in secrets
|
||||
GLOBAL_VAR_INIT(debug, 0) // global debug switch
|
||||
GLOBAL_VAR_INIT(debug2, 1) // enables detailed job debug file in secrets
|
||||
|
||||
//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_DEVASTATION_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
|
||||
GLOBAL_VAR_INIT(max_ex_devastation_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)
|
||||
|
||||
//Random event stuff, apparently used
|
||||
var/eventchance = 10 //% per 5 mins
|
||||
var/event = 0
|
||||
var/hadevent = 0
|
||||
var/blobevent = 0
|
||||
GLOBAL_VAR_INIT(eventchance, 10) //% per 5 mins
|
||||
GLOBAL_VAR_INIT(event, 0)
|
||||
GLOBAL_VAR_INIT(hadevent, 0)
|
||||
GLOBAL_VAR_INIT(blobevent, 0)
|
||||
|
||||
// These vars are protected because changing them could pose a security risk, though they are fine to be read since they are just system paths
|
||||
GLOBAL_VAR(shutdown_shell_command) // Command to run if shutting down (SHUTDOWN_ON_REBOOT) instead of rebooting
|
||||
GLOBAL_PROTECT(shutdown_shell_command)
|
||||
|
||||
GLOBAL_VAR(python_path) //Path to the python executable. Defaults to "python" on windows and "/usr/bin/env python2" on unix
|
||||
GLOBAL_PROTECT(python_path)
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
// 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
|
||||
|
||||
//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)
|
||||
@@ -1,10 +1,11 @@
|
||||
var/master_mode = "extended"//"extended"
|
||||
var/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(master_mode, "extended") //"extended"
|
||||
GLOBAL_VAR_INIT(secret_force_mode, "secret") // if this is anything but "secret", the secret rotation will forceably choose this mode
|
||||
|
||||
var/custom_event_msg = null
|
||||
var/custom_event_admin_msg = null
|
||||
GLOBAL_VAR_INIT(wavesecret, 0) // meteor mode, delays wave progression, terrible name
|
||||
GLOBAL_DATUM(start_state, /datum/station_state) // Used in round-end report. Dont ask why it inits as null
|
||||
|
||||
var/list/summon_spots = list()
|
||||
GLOBAL_VAR(custom_event_msg)
|
||||
GLOBAL_VAR(custom_event_admin_msg)
|
||||
|
||||
GLOBAL_LIST_EMPTY(summon_spots)
|
||||
|
||||
@@ -1,68 +1,68 @@
|
||||
///////////
|
||||
var/BLINDBLOCK = 0
|
||||
var/COLOURBLINDBLOCK = 0
|
||||
var/DEAFBLOCK = 0
|
||||
var/HULKBLOCK = 0
|
||||
var/TELEBLOCK = 0
|
||||
var/FIREBLOCK = 0
|
||||
var/XRAYBLOCK = 0
|
||||
var/CLUMSYBLOCK = 0
|
||||
var/FAKEBLOCK = 0
|
||||
var/COUGHBLOCK = 0
|
||||
var/GLASSESBLOCK = 0
|
||||
var/EPILEPSYBLOCK = 0
|
||||
var/TWITCHBLOCK = 0
|
||||
var/NERVOUSBLOCK = 0
|
||||
var/WINGDINGSBLOCK = 0
|
||||
var/MONKEYBLOCK = 50 // Monkey block will always be the DNA_SE_LENGTH
|
||||
GLOBAL_VAR_INIT(blindblock, 0)
|
||||
GLOBAL_VAR_INIT(colourblindblock, 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(fakeblock, 0)
|
||||
GLOBAL_VAR_INIT(coughblock, 0)
|
||||
GLOBAL_VAR_INIT(glassesblock, 0)
|
||||
GLOBAL_VAR_INIT(epilepsyblock, 0)
|
||||
GLOBAL_VAR_INIT(twitchblock, 0)
|
||||
GLOBAL_VAR_INIT(nervousblock, 0)
|
||||
GLOBAL_VAR_INIT(wingdingsblock, 0)
|
||||
GLOBAL_VAR_INIT(monkeyblock, DNA_SE_LENGTH) // Monkey block will always be the DNA_SE_LENGTH
|
||||
|
||||
var/BLOCKADD = 0
|
||||
var/DIFFMUT = 0
|
||||
GLOBAL_VAR_INIT(blockadd, 0)
|
||||
GLOBAL_VAR_INIT(diffmut, 0)
|
||||
|
||||
var/BREATHLESSBLOCK = 0
|
||||
var/REMOTEVIEWBLOCK = 0
|
||||
var/REGENERATEBLOCK = 0
|
||||
var/INCREASERUNBLOCK = 0
|
||||
var/REMOTETALKBLOCK = 0
|
||||
var/MORPHBLOCK = 0
|
||||
var/COLDBLOCK = 0
|
||||
var/HALLUCINATIONBLOCK = 0
|
||||
var/NOPRINTSBLOCK = 0
|
||||
var/SHOCKIMMUNITYBLOCK = 0
|
||||
var/SMALLSIZEBLOCK = 0
|
||||
GLOBAL_VAR_INIT(breathlessblock, 0)
|
||||
GLOBAL_VAR_INIT(remoteviewblock, 0)
|
||||
GLOBAL_VAR_INIT(regenerateblock, 0)
|
||||
GLOBAL_VAR_INIT(increaserunblock, 0)
|
||||
GLOBAL_VAR_INIT(remotetalkblock, 0)
|
||||
GLOBAL_VAR_INIT(morphblock, 0)
|
||||
GLOBAL_VAR_INIT(coldblock, 0)
|
||||
GLOBAL_VAR_INIT(hallucinationblock, 0)
|
||||
GLOBAL_VAR_INIT(noprintsblock, 0)
|
||||
GLOBAL_VAR_INIT(shockimmunityblock, 0)
|
||||
GLOBAL_VAR_INIT(smallsizeblock, 0)
|
||||
|
||||
///////////////////////////////
|
||||
// Goon Stuff
|
||||
///////////////////////////////
|
||||
// Disabilities
|
||||
var/LISPBLOCK = 0
|
||||
var/MUTEBLOCK = 0
|
||||
var/RADBLOCK = 0
|
||||
var/FATBLOCK = 0
|
||||
var/CHAVBLOCK = 0
|
||||
var/SWEDEBLOCK = 0
|
||||
var/SCRAMBLEBLOCK = 0
|
||||
var/STRONGBLOCK = 0
|
||||
var/HORNSBLOCK = 0
|
||||
var/COMICBLOCK = 0
|
||||
GLOBAL_VAR_INIT(lispblock, 0)
|
||||
GLOBAL_VAR_INIT(muteblock, 0)
|
||||
GLOBAL_VAR_INIT(radblock, 0)
|
||||
GLOBAL_VAR_INIT(fatblock, 0)
|
||||
GLOBAL_VAR_INIT(chavblock, 0)
|
||||
GLOBAL_VAR_INIT(swedeblock, 0)
|
||||
GLOBAL_VAR_INIT(scrambleblock, 0)
|
||||
GLOBAL_VAR_INIT(strongblock, 0)
|
||||
GLOBAL_VAR_INIT(hornsblock, 0)
|
||||
GLOBAL_VAR_INIT(comicblock, 0)
|
||||
|
||||
// Powers
|
||||
var/SOBERBLOCK = 0
|
||||
var/PSYRESISTBLOCK = 0
|
||||
var/SHADOWBLOCK = 0
|
||||
var/CHAMELEONBLOCK = 0
|
||||
var/CRYOBLOCK = 0
|
||||
var/EATBLOCK = 0
|
||||
var/JUMPBLOCK = 0
|
||||
var/EMPATHBLOCK = 0
|
||||
var/IMMOLATEBLOCK = 0
|
||||
var/POLYMORPHBLOCK = 0
|
||||
GLOBAL_VAR_INIT(soberblock, 0)
|
||||
GLOBAL_VAR_INIT(psyresistblock, 0)
|
||||
GLOBAL_VAR_INIT(shadowblock, 0)
|
||||
GLOBAL_VAR_INIT(chameleonblock, 0)
|
||||
GLOBAL_VAR_INIT(cryoblock, 0)
|
||||
GLOBAL_VAR_INIT(eatblock, 0)
|
||||
GLOBAL_VAR_INIT(jumpblock, 0)
|
||||
GLOBAL_VAR_INIT(empathblock, 0)
|
||||
GLOBAL_VAR_INIT(immolateblock, 0)
|
||||
GLOBAL_VAR_INIT(polymorphblock, 0)
|
||||
|
||||
///////////////////////////////
|
||||
// /vg/ Mutations
|
||||
///////////////////////////////
|
||||
var/LOUDBLOCK = 0
|
||||
var/DIZZYBLOCK = 0
|
||||
GLOBAL_VAR_INIT(loudblock, 0)
|
||||
GLOBAL_VAR_INIT(dizzyblock, 0)
|
||||
|
||||
var/list/reg_dna = list( ) //this appears to be a list of UE == real_name correlations
|
||||
var/list/global_mutations = list() // list of hidden mutation things
|
||||
GLOBAL_LIST_EMPTY(reg_dna)
|
||||
GLOBAL_LIST_EMPTY(global_mutations)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
//what could possibly go wrong
|
||||
var/list/devil_machines = typecacheof(/obj/item/circuitboard, TRUE) - list(
|
||||
GLOBAL_LIST_INIT(devil_machines, typecacheof(/obj/item/circuitboard, TRUE) - list(
|
||||
/obj/item/circuitboard/shuttle,
|
||||
/obj/item/circuitboard/swfdoor,
|
||||
/obj/item/circuitboard/olddoor,
|
||||
/obj/item/circuitboard/computer,
|
||||
/obj/item/circuitboard/machine
|
||||
)
|
||||
))
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// Everything in this file should be protected
|
||||
GLOBAL_VAR(log_directory)
|
||||
GLOBAL_PROTECT(log_directory)
|
||||
GLOBAL_VAR(world_game_log)
|
||||
@@ -15,14 +16,20 @@ GLOBAL_PROTECT(world_asset_log)
|
||||
GLOBAL_VAR(runtime_summary_log)
|
||||
GLOBAL_PROTECT(runtime_summary_log)
|
||||
|
||||
var/list/jobMax = 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(jobMax)
|
||||
GLOBAL_PROTECT(jobMax)
|
||||
GLOBAL_LIST_EMPTY(admin_log)
|
||||
GLOBAL_PROTECT(admin_log)
|
||||
GLOBAL_LIST_EMPTY(lastsignalers)
|
||||
GLOBAL_PROTECT(lastsignalers)
|
||||
GLOBAL_LIST_EMPTY(lawchanges)
|
||||
GLOBAL_PROTECT(lawchanges)
|
||||
|
||||
var/list/combatlog = list()
|
||||
var/list/IClog = list()
|
||||
var/list/OOClog = list()
|
||||
var/list/adminlog = list()
|
||||
GLOBAL_LIST_EMPTY(combatlog)
|
||||
GLOBAL_PROTECT(combatlog)
|
||||
GLOBAL_LIST_EMPTY(IClog)
|
||||
GLOBAL_PROTECT(IClog)
|
||||
GLOBAL_LIST_EMPTY(OOClog)
|
||||
GLOBAL_PROTECT(OOClog)
|
||||
|
||||
var/list/investigate_log_subjects = list("notes", "watchlist", "hrefs")
|
||||
GLOBAL_LIST_INIT(investigate_log_subjects, list("notes", "watchlist", "hrefs"))
|
||||
|
||||
+37
-36
@@ -3,12 +3,14 @@
|
||||
#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))
|
||||
|
||||
var/global/list/global_map = null
|
||||
//list/global_map = list(list(1,5),list(4,3))//an array of map Z levels.
|
||||
// This must exist early on or shit breaks bad
|
||||
GLOBAL_DATUM_INIT(using_map, /datum/map, new USING_MAP_DATUM)
|
||||
|
||||
GLOBAL_LIST(global_map) // This is the array of zlevels | list(list(1,5),list(4,3)) | becomes a 2D array of zlevels
|
||||
//Resulting sector map looks like
|
||||
//|_1_|_4_|
|
||||
//|_5_|_3_|
|
||||
@@ -18,38 +20,37 @@ var/global/list/global_map = null
|
||||
//3 - AI satellite
|
||||
//5 - empty space
|
||||
|
||||
var/list/wizardstart = list()
|
||||
var/list/newplayer_start = list()
|
||||
var/list/latejoin = list()
|
||||
var/list/latejoin_gateway = list()
|
||||
var/list/latejoin_cryo = list()
|
||||
var/list/latejoin_cyborg = list()
|
||||
var/list/prisonwarp = list() //prisoners go to these
|
||||
var/list/xeno_spawn = list()//Aliens spawn at these.
|
||||
var/list/ertdirector = list()
|
||||
var/list/emergencyresponseteamspawn = list()
|
||||
var/list/tdome1 = list()
|
||||
var/list/tdome2 = list()
|
||||
var/list/team_alpha = list()
|
||||
var/list/team_bravo = list()
|
||||
var/list/tdomeobserve = list()
|
||||
var/list/tdomeadmin = list()
|
||||
var/list/aroomwarp = 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/ninjastart = list()
|
||||
var/list/carplist = list() //list of all carp-spawn landmarks
|
||||
var/list/syndicateofficer = list()
|
||||
GLOBAL_LIST_EMPTY(wizardstart)
|
||||
GLOBAL_LIST_EMPTY(newplayer_start)
|
||||
GLOBAL_LIST_EMPTY(latejoin)
|
||||
GLOBAL_LIST_EMPTY(latejoin_gateway)
|
||||
GLOBAL_LIST_EMPTY(latejoin_cryo)
|
||||
GLOBAL_LIST_EMPTY(latejoin_cyborg)
|
||||
GLOBAL_LIST_EMPTY(prisonwarp) //prisoners go to these
|
||||
GLOBAL_LIST_EMPTY(xeno_spawn)//Aliens spawn at these.
|
||||
GLOBAL_LIST_EMPTY(ertdirector)
|
||||
GLOBAL_LIST_EMPTY(emergencyresponseteamspawn)
|
||||
GLOBAL_LIST_EMPTY(tdome1)
|
||||
GLOBAL_LIST_EMPTY(tdome2)
|
||||
GLOBAL_LIST_EMPTY(team_alpha)
|
||||
GLOBAL_LIST_EMPTY(team_bravo)
|
||||
GLOBAL_LIST_EMPTY(tdomeobserve)
|
||||
GLOBAL_LIST_EMPTY(tdomeadmin)
|
||||
GLOBAL_LIST_EMPTY(aroomwarp)
|
||||
GLOBAL_LIST_EMPTY(prisonsecuritywarp) //prison security goes to these
|
||||
GLOBAL_LIST_EMPTY(prisonwarped) //list of players already warped
|
||||
GLOBAL_LIST_EMPTY(blobstart)
|
||||
GLOBAL_LIST_EMPTY(ninjastart)
|
||||
GLOBAL_LIST_EMPTY(carplist) //list of all carp-spawn landmarks
|
||||
GLOBAL_LIST_EMPTY(syndicateofficer)
|
||||
|
||||
//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
|
||||
|
||||
//List of preloaded templates
|
||||
var/list/datum/map_template/map_templates = list()
|
||||
|
||||
var/list/datum/map_template/ruins_templates = list()
|
||||
var/list/datum/map_template/space_ruins_templates = list()
|
||||
var/list/datum/map_template/lava_ruins_templates = list()
|
||||
var/list/datum/map_template/shelter_templates = list()
|
||||
var/list/datum/map_template/shuttle_templates = list()
|
||||
GLOBAL_LIST_EMPTY(map_templates)
|
||||
GLOBAL_LIST_EMPTY(ruins_templates)
|
||||
GLOBAL_LIST_EMPTY(space_ruins_templates)
|
||||
GLOBAL_LIST_EMPTY(lava_ruins_templates)
|
||||
GLOBAL_LIST_EMPTY(shelter_templates)
|
||||
GLOBAL_LIST_EMPTY(shuttle_templates)
|
||||
|
||||
+61
-52
@@ -1,93 +1,102 @@
|
||||
var/global/obj/effect/overlay/plmaster = null
|
||||
var/global/obj/effect/overlay/slmaster = null
|
||||
GLOBAL_DATUM(plmaster, /obj/effect/overlay)
|
||||
GLOBAL_DATUM(slmaster, /obj/effect/overlay)
|
||||
|
||||
GLOBAL_VAR_INIT(CELLRATE, 0.002) // conversion ratio between a watt-tick and kilojoule
|
||||
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)
|
||||
|
||||
// Announcer intercom, because too much stuff creates an intercom for one message then hard del()s it.
|
||||
var/global/obj/item/radio/intercom/global_announcer = create_global_announcer()
|
||||
var/global/obj/item/radio/intercom/command/command_announcer = create_command_announcer()
|
||||
GLOBAL_DATUM_INIT(global_announcer, /obj/item/radio/intercom, create_global_announcer())
|
||||
GLOBAL_DATUM_INIT(command_announcer, /obj/item/radio/intercom/command, create_command_announcer())
|
||||
|
||||
// Load order issues means this can't be new'd until other code runs
|
||||
// This is probably not the way I should be doing this, but I don't know how to do it right!
|
||||
proc/create_global_announcer()
|
||||
spawn(0)
|
||||
global_announcer = new(null)
|
||||
GLOB.global_announcer = new(null)
|
||||
return
|
||||
|
||||
proc/create_command_announcer()
|
||||
spawn(0)
|
||||
command_announcer = new(null)
|
||||
GLOB.command_announcer = new(null)
|
||||
return
|
||||
|
||||
var/list/paper_tag_whitelist = list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
|
||||
GLOBAL_LIST_INIT(paper_tag_whitelist, list("center","p","div","span","h1","h2","h3","h4","h5","h6","hr","pre", \
|
||||
"big","small","font","i","u","b","s","sub","sup","tt","br","hr","ol","ul","li","caption","col", \
|
||||
"table","td","th","tr")
|
||||
var/list/paper_blacklist = list("java","onblur","onchange","onclick","ondblclick","onfocus","onkeydown", \
|
||||
"table","td","th","tr"))
|
||||
GLOBAL_LIST_INIT(paper_blacklist, list("java","onblur","onchange","onclick","ondblclick","onfocus","onkeydown", \
|
||||
"onkeypress","onkeyup","onload","onmousedown","onmousemove","onmouseout","onmouseover", \
|
||||
"onmouseup","onreset","onselect","onsubmit","onunload")
|
||||
"onmouseup","onreset","onselect","onsubmit","onunload"))
|
||||
|
||||
//Reverse of dir
|
||||
var/list/reverse_dir = list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63)
|
||||
var/gravity_is_on = 1 //basically unused, just one admin verb..
|
||||
GLOBAL_LIST_INIT(reverse_dir, list(2, 1, 3, 8, 10, 9, 11, 4, 6, 5, 7, 12, 14, 13, 15, 32, 34, 33, 35, 40, 42, 41, 43, 36, 38, 37, 39, 44, 46, 45, 47, 16, 18, 17, 19, 24, 26, 25, 27, 20, 22, 21, 23, 28, 30, 29, 31, 48, 50, 49, 51, 56, 58, 57, 59, 52, 54, 53, 55, 60, 62, 61, 63))
|
||||
GLOBAL_VAR_INIT(gravity_is_on, 1) //basically unused, just one admin verb..
|
||||
// Recall time limit: 2 hours
|
||||
var/recall_time_limit=72000 //apparently used for the comm console
|
||||
GLOBAL_VAR_INIT(recall_time_limit, 72000) //apparently used for the comm console
|
||||
|
||||
//////SCORE STUFF
|
||||
//Goonstyle scoreboard
|
||||
var/score_crewscore = 0 // this is the overall var/score for the whole round
|
||||
var/score_stuffshipped = 0 // how many useful items have cargo shipped out?
|
||||
var/score_stuffharvested = 0 // how many harvests have hydroponics done?
|
||||
var/score_oremined = 0 // obvious
|
||||
var/score_researchdone = 0
|
||||
var/score_eventsendured = 0 // how many random events did the station survive?
|
||||
var/score_powerloss = 0 // how many APCs have poor charge?
|
||||
var/score_escapees = 0 // how many people got out alive?
|
||||
var/score_deadcrew = 0 // dead bodies on the station, oh no
|
||||
var/score_mess = 0 // how much poo, puke, gibs, etc went uncleaned
|
||||
var/score_meals = 0
|
||||
var/score_disease = 0 // how many rampant, uncured diseases are on board the station
|
||||
var/score_deadcommand = 0 // used during rev, how many command staff perished
|
||||
var/score_arrested = 0 // how many traitors/revs/whatever are alive in the brig
|
||||
var/score_traitorswon = 0 // how many traitors were successful?
|
||||
var/score_allarrested = 0 // did the crew catch all the enemies alive?
|
||||
var/score_opkilled = 0 // used during nuke mode, how many operatives died?
|
||||
var/score_disc = 0 // is the disc safe and secure?
|
||||
var/score_nuked = 0 // was the station blown into little bits?
|
||||
var/score_nuked_penalty = 0 //penalty for getting blown to bits
|
||||
GLOBAL_VAR_INIT(score_crewscore, 0) // this is the overall var/score for the whole round
|
||||
GLOBAL_VAR_INIT(score_stuffshipped, 0) // how many useful items have cargo shipped out?
|
||||
GLOBAL_VAR_INIT(score_stuffharvested, 0) // how many harvests have hydroponics done?
|
||||
GLOBAL_VAR_INIT(score_oremined, 0) // obvious
|
||||
GLOBAL_VAR_INIT(score_researchdone, 0)
|
||||
GLOBAL_VAR_INIT(score_eventsendured, 0) // how many random events did the station survive?
|
||||
GLOBAL_VAR_INIT(score_powerloss, 0) // how many APCs have poor charge?
|
||||
GLOBAL_VAR_INIT(score_escapees, 0) // how many people got out alive?
|
||||
GLOBAL_VAR_INIT(score_deadcrew, 0) // dead bodies on the station, oh no
|
||||
GLOBAL_VAR_INIT(score_mess, 0) // how much poo, puke, gibs, etc went uncleaned
|
||||
GLOBAL_VAR_INIT(score_meals, 0)
|
||||
GLOBAL_VAR_INIT(score_disease, 0) // how many rampant, uncured diseases are on board the station
|
||||
GLOBAL_VAR_INIT(score_deadcommand, 0) // used during rev, how many command staff perished
|
||||
GLOBAL_VAR_INIT(score_arrested, 0) // how many traitors/revs/whatever are alive in the brig
|
||||
GLOBAL_VAR_INIT(score_traitorswon, 0) // how many traitors were successful?
|
||||
GLOBAL_VAR_INIT(score_allarrested, 0) // did the crew catch all the enemies alive?
|
||||
GLOBAL_VAR_INIT(score_opkilled, 0) // used during nuke mode, how many operatives died?
|
||||
GLOBAL_VAR_INIT(score_disc, 0) // is the disc safe and secure?
|
||||
GLOBAL_VAR_INIT(score_nuked, 0) // was the station blown into little bits?
|
||||
GLOBAL_VAR_INIT(score_nuked_penalty, 0) //penalty for getting blown to bits
|
||||
|
||||
// these ones are mainly for the stat panel
|
||||
var/score_powerbonus = 0 // if all APCs on the station are running optimally, big bonus
|
||||
var/score_messbonus = 0 // if there are no messes on the station anywhere, huge bonus
|
||||
var/score_deadaipenalty = 0 // is the AI dead? if so, big penalty
|
||||
var/score_foodeaten = 0 // nom nom nom
|
||||
var/score_clownabuse = 0 // how many times a clown was punched, struck or otherwise maligned
|
||||
var/score_richestname = null // this is all stuff to show who was the richest alive on the shuttle
|
||||
var/score_richestjob = null // kinda pointless if you dont have a money system i guess
|
||||
var/score_richestcash = 0
|
||||
var/score_richestkey = null
|
||||
var/score_dmgestname = null // who had the most damage on the shuttle (but was still alive)
|
||||
var/score_dmgestjob = null
|
||||
var/score_dmgestdamage = 0
|
||||
var/score_dmgestkey = null
|
||||
GLOBAL_VAR_INIT(score_powerbonus, 0) // if all APCs on the station are running optimally, big bonus
|
||||
GLOBAL_VAR_INIT(score_messbonus, 0) // if there are no messes on the station anywhere, huge bonus
|
||||
GLOBAL_VAR_INIT(score_deadaipenalty, 0) // is the AI dead? if so, big penalty
|
||||
GLOBAL_VAR_INIT(score_foodeaten, 0) // nom nom nom
|
||||
GLOBAL_VAR_INIT(score_clownabuse, 0) // how many times a clown was punched, struck or otherwise maligned
|
||||
GLOBAL_VAR(score_richestname) // this is all stuff to show who was the richest alive on the shuttle
|
||||
GLOBAL_VAR(score_richestjob) // kinda pointless if you dont have a money system i guess
|
||||
GLOBAL_VAR_INIT(score_richestcash, 0)
|
||||
GLOBAL_VAR(score_richestkey)
|
||||
GLOBAL_VAR(score_dmgestname) // who had the most damage on the shuttle (but was still alive)
|
||||
GLOBAL_VAR(score_dmgestjob)
|
||||
GLOBAL_VAR_INIT(score_dmgestdamage, 0)
|
||||
GLOBAL_VAR(score_dmgestkey)
|
||||
|
||||
var/TAB = " "
|
||||
#define TAB " "
|
||||
|
||||
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)
|
||||
|
||||
GLOBAL_VAR_INIT(gametime_offset, 432000) // 12:00 in seconds
|
||||
|
||||
//printers shutdown if too much shit printed
|
||||
var/copier_items_printed = 0
|
||||
var/copier_max_items = 300
|
||||
var/copier_items_printed_logged = FALSE
|
||||
GLOBAL_VAR_INIT(copier_items_printed, 0)
|
||||
GLOBAL_VAR_INIT(copier_max_items, 300)
|
||||
GLOBAL_VAR_INIT(copier_items_printed_logged, FALSE)
|
||||
|
||||
|
||||
GLOBAL_VAR(map_name) // Self explanatory
|
||||
|
||||
var/global/datum/datacore/data_core = null // Station datacore, manifest, etc
|
||||
GLOBAL_DATUM(data_core, /datum/datacore) // Station datacore, manifest, etc
|
||||
|
||||
GLOBAL_VAR_INIT(panic_bunker_enabled, FALSE) // Is the panic bunker enabled
|
||||
|
||||
//Database connections
|
||||
//A connection is established on world creation. Ideally, the connection dies when the server restarts (After feedback logging.).
|
||||
// This is a protected datum which means its read only. I hope the reason for protecting this is obvious
|
||||
GLOBAL_DATUM_INIT(dbcon, /DBConnection, new) //Feedback database (New database)
|
||||
GLOBAL_PROTECT(dbcon)
|
||||
|
||||
GLOBAL_LIST_EMPTY(ability_verbs) // Create-level abilities
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
// All global vars in this file require a different handler as we dont want their data to be exposed, not even to admins with permission to view globals
|
||||
// They write as native BYOND globals, which means they cant be edited at all, and also use a format
|
||||
// Please only throw absolutely crucial do-not-view shit in here please. -aa07
|
||||
|
||||
// MySQL configuration
|
||||
GLOBAL_REAL_VAR(sqladdress) = "localhost"
|
||||
GLOBAL_REAL_VAR(sqlport) = "3306"
|
||||
GLOBAL_REAL_VAR(sqlfdbkdb) = "test"
|
||||
GLOBAL_REAL_VAR(sqlfdbklogin) = "root"
|
||||
GLOBAL_REAL_VAR(sqlfdbkpass) = ""
|
||||
GLOBAL_REAL_VAR(sqlfdbktableprefix) = "erro_"
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
var/going = 1.0
|
||||
+3
-3
@@ -42,7 +42,7 @@
|
||||
|
||||
if(control_disabled || stat)
|
||||
return
|
||||
|
||||
|
||||
var/turf/pixel_turf = isturf(A) ? A : get_turf_pixel(A)
|
||||
if(isnull(pixel_turf))
|
||||
return
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
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/aicard) && (pixel_turf in view(client.view, loc)))
|
||||
turf_visible = TRUE
|
||||
@@ -228,4 +228,4 @@
|
||||
//
|
||||
|
||||
/mob/living/silicon/ai/TurfAdjacent(var/turf/T)
|
||||
return (cameranet && cameranet.checkTurfVis(T))
|
||||
return (GLOB.cameranet && GLOB.cameranet.checkTurfVis(T))
|
||||
|
||||
@@ -502,7 +502,7 @@
|
||||
config.guest_jobban = 1
|
||||
|
||||
if("guest_ban")
|
||||
guests_allowed = 0
|
||||
GLOB.guests_allowed = 0
|
||||
|
||||
if("panic_bunker_threshold")
|
||||
config.panic_bunker_threshold = text2num(value)
|
||||
@@ -618,12 +618,12 @@
|
||||
|
||||
if("python_path")
|
||||
if(value)
|
||||
python_path = value
|
||||
GLOB.python_path = value
|
||||
else
|
||||
if(world.system_type == UNIX)
|
||||
python_path = "/usr/bin/env python2"
|
||||
GLOB.python_path = "/usr/bin/env python2"
|
||||
else //probably windows, if not this should work anyway
|
||||
python_path = "pythonw"
|
||||
GLOB.python_path = "pythonw"
|
||||
|
||||
if("assistant_limit")
|
||||
config.assistantlimit = 1
|
||||
@@ -716,7 +716,7 @@
|
||||
config.shutdown_on_reboot = 1
|
||||
|
||||
if("shutdown_shell_command")
|
||||
shutdown_shell_command = value
|
||||
GLOB.shutdown_shell_command = value
|
||||
|
||||
if("disable_karma")
|
||||
config.disable_karma = 1
|
||||
@@ -789,11 +789,11 @@
|
||||
if(BombCap > 128)
|
||||
BombCap = 128
|
||||
|
||||
MAX_EX_DEVASTATION_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_devastation_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("default_laws")
|
||||
config.default_laws = text2num(value)
|
||||
if("randomize_shift_time")
|
||||
@@ -856,7 +856,7 @@
|
||||
log_config("WARNING: DB_CONFIG DEFINITION MISMATCH!")
|
||||
spawn(60)
|
||||
if(SSticker.current_state == GAME_STATE_PREGAME)
|
||||
going = 0
|
||||
SSticker.ticker_going = FALSE
|
||||
spawn(600)
|
||||
to_chat(world, "<span class='alert'>DB_CONFIG MISMATCH, ROUND START DELAYED. <BR>Please check database version for recent upstream changes!</span>")
|
||||
|
||||
|
||||
@@ -275,7 +275,7 @@ SUBSYSTEM_DEF(air)
|
||||
if(blockchanges && T.excited_group)
|
||||
T.excited_group.garbage_collect()
|
||||
else
|
||||
for(var/direction in cardinal)
|
||||
for(var/direction in GLOB.cardinal)
|
||||
if(!(T.atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
var/turf/simulated/S = get_step(T, direction)
|
||||
@@ -360,21 +360,21 @@ SUBSYSTEM_DEF(air)
|
||||
return count
|
||||
|
||||
/datum/controller/subsystem/air/proc/setup_overlays()
|
||||
plmaster = new /obj/effect/overlay()
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
plmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.appearance_flags = TILE_BOUND
|
||||
GLOB.plmaster = new /obj/effect/overlay()
|
||||
GLOB.plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
GLOB.plmaster.icon_state = "plasma"
|
||||
GLOB.plmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
GLOB.plmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
GLOB.plmaster.layer = FLY_LAYER
|
||||
GLOB.plmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
slmaster = new /obj/effect/overlay()
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
slmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.appearance_flags = TILE_BOUND
|
||||
GLOB.slmaster = new /obj/effect/overlay()
|
||||
GLOB.slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
GLOB.slmaster.icon_state = "sleeping_agent"
|
||||
GLOB.slmaster.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
GLOB.slmaster.anchored = TRUE // should only appear in vis_contents, but to be safe
|
||||
GLOB.slmaster.layer = FLY_LAYER
|
||||
GLOB.slmaster.appearance_flags = TILE_BOUND
|
||||
|
||||
#undef SSAIR_PIPENETS
|
||||
#undef SSAIR_ATMOSMACHINERY
|
||||
|
||||
@@ -104,7 +104,7 @@ SUBSYSTEM_DEF(events)
|
||||
html += "<A align='right' href='?src=[UID()];back=1'>Back</A><br>"
|
||||
html += "Time till start: [round(event_time / 600, 0.1)]<br>"
|
||||
html += "<div class='block'>"
|
||||
html += "<h2>Available [severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
|
||||
html += "<h2>Available [GLOB.severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)</h2>"
|
||||
html += "<table[table_options]>"
|
||||
html += "<tr[head_options]><td[row_options2]>Name </td><td>Weight </td><td>MinWeight </td><td>MaxWeight </td><td>OneShot </td><td>Enabled </td><td><span class='alert'>CurrWeight </span></td><td>Remove</td></tr>"
|
||||
for(var/datum/event_meta/EM in selected_event_container.available_events)
|
||||
@@ -145,7 +145,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/event_container/EC = event_containers[severity]
|
||||
var/next_event_at = max(0, EC.next_event_time - world.time)
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td>[GLOB.severity_to_string[severity]]</td>"
|
||||
html += "<td>[station_time_timestamp("hh:mm:ss", max(EC.next_event_time, world.time))]</td>"
|
||||
html += "<td>[round(next_event_at / 600, 0.1)]</td>"
|
||||
html += "<td>"
|
||||
@@ -172,7 +172,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/event_container/EC = event_containers[severity]
|
||||
var/datum/event_meta/EM = EC.next_event
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[severity]]</td>"
|
||||
html += "<td>[GLOB.severity_to_string[severity]]</td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];select_event=\ref[EC]'>[EM ? EM.name : "Random"]</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];view_events=\ref[EC]'>View</A></td>"
|
||||
html += "<td><A align='right' href='?src=[UID()];clear=\ref[EC]'>Clear</A></td>"
|
||||
@@ -193,7 +193,7 @@ SUBSYSTEM_DEF(events)
|
||||
var/ends_in = max(0, round((ends_at - world.time) / 600, 0.1))
|
||||
var/no_end = E.noAutoEnd
|
||||
html += "<tr>"
|
||||
html += "<td>[severity_to_string[EM.severity]]</td>"
|
||||
html += "<td>[GLOB.severity_to_string[EM.severity]]</td>"
|
||||
html += "<td>[EM.name]</td>"
|
||||
html += "<td>[no_end ? "N/A" : station_time_timestamp("hh:mm:ss", ends_at)]</td>"
|
||||
html += "<td>[no_end ? "N/A" : ends_in]</td>"
|
||||
@@ -216,33 +216,33 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/event_container/EC = locate(href_list["event"])
|
||||
var/decrease = (60 * RaiseToPower(10, text2num(href_list["dec_timer"])))
|
||||
EC.next_event_time -= decrease
|
||||
admin_log_and_message_admins("decreased timer for [severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
|
||||
admin_log_and_message_admins("decreased timer for [GLOB.severity_to_string[EC.severity]] events by [decrease/600] minute(s).")
|
||||
else if(href_list["inc_timer"])
|
||||
var/datum/event_container/EC = locate(href_list["event"])
|
||||
var/increase = (60 * RaiseToPower(10, text2num(href_list["inc_timer"])))
|
||||
EC.next_event_time += increase
|
||||
admin_log_and_message_admins("increased timer for [severity_to_string[EC.severity]] events by [increase/600] minute(s).")
|
||||
admin_log_and_message_admins("increased timer for [GLOB.severity_to_string[EC.severity]] events by [increase/600] minute(s).")
|
||||
else if(href_list["select_event"])
|
||||
var/datum/event_container/EC = locate(href_list["select_event"])
|
||||
var/datum/event_meta/EM = EC.SelectEvent()
|
||||
if(EM)
|
||||
admin_log_and_message_admins("has queued the [severity_to_string[EC.severity]] event '[EM.name]'.")
|
||||
admin_log_and_message_admins("has queued the [GLOB.severity_to_string[EC.severity]] event '[EM.name]'.")
|
||||
else if(href_list["pause"])
|
||||
var/datum/event_container/EC = locate(href_list["pause"])
|
||||
EC.delayed = !EC.delayed
|
||||
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [severity_to_string[EC.severity]] events.")
|
||||
admin_log_and_message_admins("has [EC.delayed ? "paused" : "resumed"] countdown for [GLOB.severity_to_string[EC.severity]] events.")
|
||||
else if(href_list["interval"])
|
||||
var/delay = input("Enter delay modifier. A value less than one means events fire more often, higher than one less often.", "Set Interval Modifier") as num|null
|
||||
if(delay && delay > 0)
|
||||
var/datum/event_container/EC = locate(href_list["interval"])
|
||||
EC.delay_modifier = delay
|
||||
admin_log_and_message_admins("has set the interval modifier for [severity_to_string[EC.severity]] events to [EC.delay_modifier].")
|
||||
admin_log_and_message_admins("has set the interval modifier for [GLOB.severity_to_string[EC.severity]] events to [EC.delay_modifier].")
|
||||
else if(href_list["stop"])
|
||||
if(alert("Stopping an event may have unintended side-effects. Continue?","Stopping Event!","Yes","No") != "Yes")
|
||||
return
|
||||
var/datum/event/E = locate(href_list["stop"])
|
||||
var/datum/event_meta/EM = E.event_meta
|
||||
admin_log_and_message_admins("has stopped the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
admin_log_and_message_admins("has stopped the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
E.kill()
|
||||
else if(href_list["view_events"])
|
||||
selected_event_container = locate(href_list["view_events"])
|
||||
@@ -264,23 +264,23 @@ SUBSYSTEM_DEF(events)
|
||||
var/datum/event_meta/EM = locate(href_list["set_weight"])
|
||||
EM.weight = weight
|
||||
if(EM != new_event)
|
||||
admin_log_and_message_admins("has changed the weight of the [severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].")
|
||||
admin_log_and_message_admins("has changed the weight of the [GLOB.severity_to_string[EM.severity]] event '[EM.name]' to [EM.weight].")
|
||||
else if(href_list["toggle_oneshot"])
|
||||
var/datum/event_meta/EM = locate(href_list["toggle_oneshot"])
|
||||
EM.one_shot = !EM.one_shot
|
||||
if(EM != new_event)
|
||||
admin_log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
admin_log_and_message_admins("has [EM.one_shot ? "set" : "unset"] the oneshot flag for the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["toggle_enabled"])
|
||||
var/datum/event_meta/EM = locate(href_list["toggle_enabled"])
|
||||
EM.enabled = !EM.enabled
|
||||
admin_log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
admin_log_and_message_admins("has [EM.enabled ? "enabled" : "disabled"] the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["remove"])
|
||||
if(alert("This will remove the event from rotation. Continue?","Removing Event!","Yes","No") != "Yes")
|
||||
return
|
||||
var/datum/event_meta/EM = locate(href_list["remove"])
|
||||
var/datum/event_container/EC = locate(href_list["EC"])
|
||||
EC.available_events -= EM
|
||||
admin_log_and_message_admins("has removed the [severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
admin_log_and_message_admins("has removed the [GLOB.severity_to_string[EM.severity]] event '[EM.name]'.")
|
||||
else if(href_list["add"])
|
||||
if(!new_event.name || !new_event.event_type)
|
||||
return
|
||||
@@ -288,12 +288,12 @@ SUBSYSTEM_DEF(events)
|
||||
return
|
||||
new_event.severity = selected_event_container.severity
|
||||
selected_event_container.available_events += new_event
|
||||
admin_log_and_message_admins("has added \a [severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].")
|
||||
admin_log_and_message_admins("has added \a [GLOB.severity_to_string[new_event.severity]] event '[new_event.name]' of type [new_event.event_type] with weight [new_event.weight].")
|
||||
new_event = new
|
||||
else if(href_list["clear"])
|
||||
var/datum/event_container/EC = locate(href_list["clear"])
|
||||
if(EC.next_event)
|
||||
admin_log_and_message_admins("has dequeued the [severity_to_string[EC.severity]] event '[EC.next_event.name]'.")
|
||||
admin_log_and_message_admins("has dequeued the [GLOB.severity_to_string[EC.severity]] event '[EC.next_event.name]'.")
|
||||
EC.next_event = null
|
||||
|
||||
Interact(usr)
|
||||
|
||||
@@ -49,7 +49,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
|
||||
|
||||
/datum/controller/subsystem/jobs/proc/Debug(var/text)
|
||||
if(!Debug2)
|
||||
if(!GLOB.debug2)
|
||||
return 0
|
||||
job_debug.Add(text)
|
||||
return 1
|
||||
@@ -155,10 +155,10 @@ SUBSYSTEM_DEF(jobs)
|
||||
if(istype(job, GetJob("Civilian"))) // We don't want to give him assistant, that's boring!
|
||||
continue
|
||||
|
||||
if(job.title in command_positions) //If you want a command position, select it!
|
||||
if(job.title in GLOB.command_positions) //If you want a command position, select it!
|
||||
continue
|
||||
|
||||
if(job.title in whitelisted_positions) // No random whitelisted job, sorry!
|
||||
if(job.title in GLOB.whitelisted_positions) // No random whitelisted job, sorry!
|
||||
continue
|
||||
|
||||
if(job.admin_only) // No admin positions either.
|
||||
@@ -203,7 +203,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check
|
||||
/datum/controller/subsystem/jobs/proc/FillHeadPosition()
|
||||
for(var/level = 1 to 3)
|
||||
for(var/command_position in command_positions)
|
||||
for(var/command_position in GLOB.command_positions)
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job)
|
||||
continue
|
||||
@@ -231,7 +231,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
|
||||
///This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
|
||||
/datum/controller/subsystem/jobs/proc/CheckHeadPositions(var/level)
|
||||
for(var/command_position in command_positions)
|
||||
for(var/command_position in GLOB.command_positions)
|
||||
var/datum/job/job = GetJob(command_position)
|
||||
if(!job)
|
||||
continue
|
||||
@@ -600,7 +600,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
// If they're head, give them the account info for their department
|
||||
if(job && job.head_position)
|
||||
remembered_info = ""
|
||||
var/datum/money_account/department_account = department_accounts[job.department]
|
||||
var/datum/money_account/department_account = GLOB.department_accounts[job.department]
|
||||
|
||||
if(department_account)
|
||||
remembered_info += "<b>Your department's account number is:</b> #[department_account.account_number]<br>"
|
||||
@@ -638,7 +638,7 @@ SUBSYSTEM_DEF(jobs)
|
||||
var/datum/job/oldjobdatum = SSjobs.GetJob(oldtitle)
|
||||
var/datum/job/newjobdatum = SSjobs.GetJob(newtitle)
|
||||
if(istype(oldjobdatum) && oldjobdatum.current_positions > 0 && istype(newjobdatum))
|
||||
if(!(oldjobdatum.title in command_positions) && !(newjobdatum.title in command_positions))
|
||||
if(!(oldjobdatum.title in GLOB.command_positions) && !(newjobdatum.title in GLOB.command_positions))
|
||||
oldjobdatum.current_positions--
|
||||
newjobdatum.current_positions++
|
||||
|
||||
|
||||
@@ -13,21 +13,21 @@ SUBSYSTEM_DEF(mapping)
|
||||
if(!config.disable_space_ruins)
|
||||
var/timer = start_watch()
|
||||
log_startup_progress("Creating random space levels...")
|
||||
seedRuins(list(level_name_to_num(EMPTY_AREA)), rand(0, 3), /area/space, space_ruins_templates)
|
||||
seedRuins(list(level_name_to_num(EMPTY_AREA)), rand(0, 3), /area/space, GLOB.space_ruins_templates)
|
||||
log_startup_progress("Loaded random space levels in [stop_watch(timer)]s.")
|
||||
|
||||
// load in extra levels of space ruins
|
||||
|
||||
var/num_extra_space = rand(config.extra_space_ruin_levels_min, config.extra_space_ruin_levels_max)
|
||||
for(var/i = 1, i <= num_extra_space, i++)
|
||||
var/zlev = space_manager.add_new_zlevel("[EMPTY_AREA] #[i]", linkage = CROSSLINKED, traits = list(REACHABLE))
|
||||
seedRuins(list(zlev), rand(0, 3), /area/space, space_ruins_templates)
|
||||
var/zlev = GLOB.space_manager.add_new_zlevel("[EMPTY_AREA] #[i]", linkage = CROSSLINKED, traits = list(REACHABLE))
|
||||
seedRuins(list(zlev), rand(0, 3), /area/space, GLOB.space_ruins_templates)
|
||||
|
||||
// Setup the Z-level linkage
|
||||
space_manager.do_transition_setup()
|
||||
GLOB.space_manager.do_transition_setup()
|
||||
|
||||
// Spawn Lavaland ruins and rivers.
|
||||
seedRuins(list(level_name_to_num(MINING)), config.lavaland_budget, /area/lavaland/surface/outdoors/unexplored, lava_ruins_templates)
|
||||
seedRuins(list(level_name_to_num(MINING)), config.lavaland_budget, /area/lavaland/surface/outdoors/unexplored, GLOB.lava_ruins_templates)
|
||||
spawn_rivers(list(level_name_to_num(MINING)))
|
||||
|
||||
return ..()
|
||||
|
||||
@@ -25,12 +25,12 @@ SUBSYSTEM_DEF(nightshift)
|
||||
check_nightshift()
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/announce(message)
|
||||
priority_announcement.Announce(message, new_sound = 'sound/misc/notice2.ogg', new_title = "Automated Lighting System Announcement")
|
||||
GLOB.priority_announcement.Announce(message, new_sound = 'sound/misc/notice2.ogg', new_title = "Automated Lighting System Announcement")
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/check_nightshift(check_canfire=FALSE)
|
||||
if(check_canfire && !can_fire)
|
||||
return
|
||||
var/emergency = security_level >= SEC_LEVEL_RED
|
||||
var/emergency = GLOB.security_level >= SEC_LEVEL_RED
|
||||
var/announcing = TRUE
|
||||
var/time = station_time()
|
||||
var/night_time = (time < nightshift_end_time) || (time > nightshift_start_time)
|
||||
@@ -41,7 +41,7 @@ SUBSYSTEM_DEF(nightshift)
|
||||
if(!emergency)
|
||||
announce("Restoring night lighting configuration to normal operation.")
|
||||
else
|
||||
announce("Disabling night lighting: Station is in a state of emergency.")
|
||||
announce("Disabling night lighting: Station is in a state of emergency.")
|
||||
if(emergency)
|
||||
night_time = FALSE
|
||||
if(nightshift_active != night_time)
|
||||
|
||||
@@ -33,7 +33,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/triai = 0//Global holder for Triumvirate
|
||||
var/initialtpass = 0 //holder for inital autotransfer vote timer
|
||||
var/obj/screen/cinematic = null //used for station explosion cinematic
|
||||
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.\
|
||||
var/round_end_announced = 0 // Spam Prevention. Announce round end only once.
|
||||
var/ticker_going = TRUE // This used to be in the unused globals, but it turns out its actually used in a load of places. Its now a ticker var because its related to round stuff, -aa
|
||||
|
||||
/datum/controller/subsystem/ticker/Initialize()
|
||||
login_music = pick(\
|
||||
@@ -42,10 +43,9 @@ SUBSYSTEM_DEF(ticker)
|
||||
'sound/music/title1.ogg',\
|
||||
'sound/music/title2.ogg',\
|
||||
'sound/music/title3.ogg',)
|
||||
|
||||
// Map name
|
||||
if(using_map && using_map.name)
|
||||
GLOB.map_name = "[using_map.name]"
|
||||
if(GLOB.using_map && GLOB.using_map.name)
|
||||
GLOB.map_name = "[GLOB.using_map.name]"
|
||||
else
|
||||
GLOB.map_name = "Unknown"
|
||||
|
||||
@@ -68,12 +68,12 @@ SUBSYSTEM_DEF(ticker)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
fire() // TG says this is a good idea
|
||||
if(GAME_STATE_PREGAME)
|
||||
if(!going)
|
||||
if(!SSticker.ticker_going) // This has to be referenced like this, and I dont know why. If you dont put SSticker. it will break
|
||||
return
|
||||
|
||||
// This is so we dont have sleeps in controllers, because that is a bad, bad thing
|
||||
if(!delay_end)
|
||||
pregame_timeleft = max(0,round_start_time - world.time) // Normal lobby countdown when roundstart was not delayed
|
||||
pregame_timeleft = max(0,round_start_time - world.time) // Normal lobby countdown when roundstart was not delayed
|
||||
else
|
||||
pregame_timeleft = max(0,pregame_timeleft - 20) // If roundstart was delayed, we should resume the countdown where it left off
|
||||
|
||||
@@ -129,20 +129,20 @@ SUBSYSTEM_DEF(ticker)
|
||||
/datum/controller/subsystem/ticker/proc/setup()
|
||||
cultdat = setupcult()
|
||||
//Create and announce mode
|
||||
if(master_mode=="secret")
|
||||
if(GLOB.master_mode=="secret")
|
||||
src.hide_mode = 1
|
||||
var/list/datum/game_mode/runnable_modes
|
||||
if((master_mode=="random") || (master_mode=="secret"))
|
||||
if((GLOB.master_mode=="random") || (GLOB.master_mode=="secret"))
|
||||
runnable_modes = config.get_runnable_modes()
|
||||
if(runnable_modes.len==0)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
to_chat(world, "<B>Unable to choose playable game mode.</B> Reverting to pre-game lobby.")
|
||||
return 0
|
||||
if(secret_force_mode != "secret")
|
||||
var/datum/game_mode/M = config.pick_mode(secret_force_mode)
|
||||
if(GLOB.secret_force_mode != "secret")
|
||||
var/datum/game_mode/M = config.pick_mode(GLOB.secret_force_mode)
|
||||
if(M.can_start())
|
||||
src.mode = config.pick_mode(secret_force_mode)
|
||||
src.mode = config.pick_mode(GLOB.secret_force_mode)
|
||||
SSjobs.ResetOccupations()
|
||||
if(!src.mode)
|
||||
src.mode = pickweight(runnable_modes)
|
||||
@@ -150,7 +150,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
var/mtype = src.mode.type
|
||||
src.mode = new mtype
|
||||
else
|
||||
src.mode = config.pick_mode(master_mode)
|
||||
src.mode = config.pick_mode(GLOB.master_mode)
|
||||
if(!src.mode.can_start())
|
||||
to_chat(world, "<B>Unable to start [mode.name].</B> Not enough players, [mode.required_players] players needed. Reverting to pre-game lobby.")
|
||||
mode = null
|
||||
@@ -167,7 +167,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(!can_continue)
|
||||
qdel(mode)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
to_chat(world, "<B>Error setting up [master_mode].</B> Reverting to pre-game lobby.")
|
||||
to_chat(world, "<B>Error setting up [GLOB.master_mode].</B> Reverting to pre-game lobby.")
|
||||
SSjobs.ResetOccupations()
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
return 0
|
||||
@@ -186,7 +186,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
populate_spawn_points()
|
||||
collect_minds()
|
||||
equip_characters()
|
||||
data_core.manifest()
|
||||
GLOB.data_core.manifest()
|
||||
current_state = GAME_STATE_PLAYING
|
||||
Master.SetRunLevel(RUNLEVEL_GAME)
|
||||
|
||||
@@ -449,11 +449,11 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/declare_completion()
|
||||
nologevent = 1 //end of round murder and shenanigans are legal; there's no need to jam up attack logs past this point.
|
||||
GLOB.nologevent = 1 //end of round murder and shenanigans are legal; there's no need to jam up attack logs past this point.
|
||||
//Round statistics report
|
||||
var/datum/station_state/end_state = new /datum/station_state()
|
||||
end_state.count()
|
||||
var/station_integrity = min(round( 100.0 * start_state.score(end_state), 0.1), 100.0)
|
||||
var/station_integrity = min(round( 100.0 * GLOB.start_state.score(end_state), 0.1), 100.0)
|
||||
|
||||
to_chat(world, "<BR>[TAB]Shift Duration: <B>[round(ROUND_TIME / 36000)]:[add_zero("[ROUND_TIME / 600 % 60]", 2)]:[ROUND_TIME / 100 % 6][ROUND_TIME / 100 % 10]</B>")
|
||||
to_chat(world, "<BR>[TAB]Station Integrity: <B>[mode.station_was_nuked ? "<font color='red'>Destroyed</font>" : "[station_integrity]%"]</B>")
|
||||
@@ -519,7 +519,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
SSevents.RoundEnd()
|
||||
|
||||
// Add AntagHUD to everyone, see who was really evil the whole time!
|
||||
for(var/datum/atom_hud/antag/H in huds)
|
||||
for(var/datum/atom_hud/antag/H in GLOB.huds)
|
||||
for(var/m in GLOB.player_list)
|
||||
var/mob/M = m
|
||||
H.add_hud_to(M)
|
||||
|
||||
@@ -90,10 +90,10 @@ SUBSYSTEM_DEF(vote)
|
||||
if(choices["Continue Playing"] >= greatest_votes)
|
||||
greatest_votes = choices["Continue Playing"]
|
||||
else if(mode == "gamemode")
|
||||
if(master_mode in choices)
|
||||
choices[master_mode] += non_voters
|
||||
if(choices[master_mode] >= greatest_votes)
|
||||
greatest_votes = choices[master_mode]
|
||||
if(GLOB.master_mode in choices)
|
||||
choices[GLOB.master_mode] += non_voters
|
||||
if(choices[GLOB.master_mode] >= greatest_votes)
|
||||
greatest_votes = choices[GLOB.master_mode]
|
||||
else if(mode == "crew_transfer")
|
||||
var/factor = 0.5
|
||||
switch(world.time / (10 * 60)) // minutes
|
||||
@@ -164,14 +164,14 @@ SUBSYSTEM_DEF(vote)
|
||||
if(. == "Restart Round")
|
||||
restart = 1
|
||||
if("gamemode")
|
||||
if(master_mode != .)
|
||||
if(GLOB.master_mode != .)
|
||||
world.save_mode(.)
|
||||
if(SSticker && SSticker.mode)
|
||||
restart = 1
|
||||
else
|
||||
master_mode = .
|
||||
if(!going)
|
||||
going = 1
|
||||
GLOB.master_mode = .
|
||||
if(!SSticker.ticker_going)
|
||||
SSticker.ticker_going = TRUE
|
||||
to_chat(world, "<font color='red'><b>The round will start soon.</b></font>")
|
||||
if("crew_transfer")
|
||||
if(. == "Initiate Crew Transfer")
|
||||
@@ -253,8 +253,8 @@ SUBSYSTEM_DEF(vote)
|
||||
world << sound('sound/ambience/alarm4.ogg')
|
||||
if("custom")
|
||||
world << sound('sound/ambience/alarm4.ogg')
|
||||
if(mode == "gamemode" && going)
|
||||
going = 0
|
||||
if(mode == "gamemode" && SSticker.ticker_going)
|
||||
SSticker.ticker_going = FALSE
|
||||
to_chat(world, "<font color='red'><b>Round start has been delayed.</b></font>")
|
||||
if(mode == "crew_transfer" && config.ooc_allowed)
|
||||
auto_muted = 1
|
||||
|
||||
@@ -53,10 +53,10 @@
|
||||
debug_variables(config)
|
||||
feedback_add_details("admin_verb","DConf")
|
||||
if("pAI")
|
||||
debug_variables(paiController)
|
||||
debug_variables(GLOB.paiController)
|
||||
feedback_add_details("admin_verb","DpAI")
|
||||
if("Cameras")
|
||||
debug_variables(cameranet)
|
||||
debug_variables(GLOB.cameranet)
|
||||
feedback_add_details("admin_verb","DCameras")
|
||||
if("Garbage")
|
||||
debug_variables(SSgarbage)
|
||||
@@ -92,7 +92,7 @@
|
||||
debug_variables(SSweather)
|
||||
feedback_add_details("admin_verb","DWeather")
|
||||
if("Space")
|
||||
debug_variables(space_manager)
|
||||
debug_variables(GLOB.space_manager)
|
||||
feedback_add_details("admin_verb","DSpace")
|
||||
if("Mob Hunt Server")
|
||||
debug_variables(SSmob_hunt)
|
||||
|
||||
Vendored
+4
-4
@@ -1,4 +1,4 @@
|
||||
var/global/datum/repository/air_alarm/air_alarm_repository = new()
|
||||
GLOBAL_DATUM_INIT(air_alarm_repository, /datum/repository/air_alarm, new())
|
||||
|
||||
/datum/repository/air_alarm/proc/air_alarm_data(var/list/monitored_alarms, var/refresh = 0, var/obj/machinery/alarm/passed_alarm)
|
||||
var/alarms[0]
|
||||
@@ -11,13 +11,13 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new()
|
||||
if(!refresh)
|
||||
return cache_entry.data
|
||||
|
||||
if(SSticker && SSticker.current_state < GAME_STATE_PLAYING && istype(passed_alarm)) // Generating the list for the first time as the game hasn't started - no need to run through the machines list everything every time
|
||||
if(SSticker && SSticker.current_state < GAME_STATE_PLAYING && istype(passed_alarm)) // Generating the list for the first time as the game hasn't started - no need to run through the machines list everything every time
|
||||
alarms = cache_entry.data // Don't deleate the list
|
||||
if(is_station_contact(passed_alarm.z) && passed_alarm.remote_control) // Still need sanity checks
|
||||
alarms[++alarms.len] = passed_alarm.get_nano_data_console()
|
||||
alarms[++alarms.len] = passed_alarm.get_nano_data_console()
|
||||
else
|
||||
for(var/obj/machinery/alarm/alarm in (monitored_alarms ? monitored_alarms : GLOB.air_alarms)) // Generating the whole list again is a bad habit but I can't be bothered to fix it right now
|
||||
if(!monitored_alarms && !is_station_contact(alarm.z))
|
||||
if(!monitored_alarms && !is_station_contact(alarm.z))
|
||||
continue
|
||||
if(!alarm.remote_control)
|
||||
continue
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
var/global/datum/repository/apc/apc_repository = new()
|
||||
GLOBAL_DATUM_INIT(apc_repository, /datum/repository/apc, new())
|
||||
|
||||
/datum/repository/apc/proc/apc_data(datum/powernet/powernet)
|
||||
var/apcData[0]
|
||||
|
||||
Vendored
+1
-1
@@ -1,4 +1,4 @@
|
||||
var/global/datum/repository/crew/crew_repository = new()
|
||||
GLOBAL_DATUM_INIT(crew_repository, /datum/repository/crew, new())
|
||||
|
||||
/datum/repository/crew/New()
|
||||
cache_data = list()
|
||||
|
||||
Vendored
+6
-6
@@ -1,8 +1,8 @@
|
||||
var/global/datum/repository/powermonitor/powermonitor_repository = new()
|
||||
GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new())
|
||||
|
||||
/datum/repository/powermonitor/proc/powermonitor_data(var/refresh = 0)
|
||||
var/pMonData[0]
|
||||
|
||||
|
||||
var/datum/cache_entry/cache_entry = cache_data
|
||||
if(!cache_entry)
|
||||
cache_entry = new/datum/cache_entry
|
||||
@@ -10,15 +10,15 @@ var/global/datum/repository/powermonitor/powermonitor_repository = new()
|
||||
|
||||
if(!refresh)
|
||||
return cache_entry.data
|
||||
|
||||
|
||||
for(var/obj/machinery/computer/monitor/pMon in GLOB.power_monitors)
|
||||
if( !(pMon.stat & (NOPOWER|BROKEN)) && !pMon.is_secret_monitor )
|
||||
pMonData[++pMonData.len] = list ("Name" = pMon.name, "ref" = "\ref[pMon]")
|
||||
|
||||
cache_entry.timestamp = world.time //+ 30 SECONDS
|
||||
cache_entry.data = pMonData
|
||||
cache_entry.data = pMonData
|
||||
return pMonData
|
||||
|
||||
|
||||
/datum/repository/powermonitor/proc/update_cache()
|
||||
return powermonitor_data(refresh = 1)
|
||||
|
||||
|
||||
|
||||
+29
-29
@@ -1,5 +1,5 @@
|
||||
/hook/startup/proc/createDatacore()
|
||||
data_core = new /datum/datacore()
|
||||
GLOB.data_core = new /datum/datacore()
|
||||
return 1
|
||||
|
||||
/datum/datacore
|
||||
@@ -34,7 +34,7 @@
|
||||
"}
|
||||
var/even = 0
|
||||
// sort mobs
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)
|
||||
var/name = t.fields["name"]
|
||||
var/rank = t.fields["rank"]
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
@@ -48,28 +48,28 @@
|
||||
else
|
||||
isactive[name] = t.fields["p_stat"]
|
||||
var/department = 0
|
||||
if(real_rank in command_positions)
|
||||
if(real_rank in GLOB.command_positions)
|
||||
heads[name] = rank
|
||||
department = 1
|
||||
if(real_rank in security_positions)
|
||||
if(real_rank in GLOB.security_positions)
|
||||
sec[name] = rank
|
||||
department = 1
|
||||
if(real_rank in engineering_positions)
|
||||
if(real_rank in GLOB.engineering_positions)
|
||||
eng[name] = rank
|
||||
department = 1
|
||||
if(real_rank in medical_positions)
|
||||
if(real_rank in GLOB.medical_positions)
|
||||
med[name] = rank
|
||||
department = 1
|
||||
if(real_rank in science_positions)
|
||||
if(real_rank in GLOB.science_positions)
|
||||
sci[name] = rank
|
||||
department = 1
|
||||
if(real_rank in service_positions)
|
||||
if(real_rank in GLOB.service_positions)
|
||||
ser[name] = rank
|
||||
department = 1
|
||||
if(real_rank in supply_positions)
|
||||
if(real_rank in GLOB.supply_positions)
|
||||
sup[name] = rank
|
||||
department = 1
|
||||
if(real_rank in nonhuman_positions)
|
||||
if(real_rank in GLOB.nonhuman_positions)
|
||||
bot[name] = rank
|
||||
department = 1
|
||||
if(!department && !(name in heads))
|
||||
@@ -133,10 +133,10 @@ we'll only update it when it changes. The PDA_Manifest global list is zeroed ou
|
||||
using /datum/datacore/proc/manifest_inject(), or manifest_insert()
|
||||
*/
|
||||
|
||||
var/global/list/PDA_Manifest = list()
|
||||
GLOBAL_LIST_EMPTY(PDA_Manifest)
|
||||
|
||||
/datum/datacore/proc/get_manifest_json()
|
||||
if(PDA_Manifest.len)
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
return
|
||||
var/heads[0]
|
||||
var/sec[0]
|
||||
@@ -147,7 +147,7 @@ var/global/list/PDA_Manifest = list()
|
||||
var/sup[0]
|
||||
var/bot[0]
|
||||
var/misc[0]
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)
|
||||
var/name = sanitize(t.fields["name"])
|
||||
var/rank = sanitize(t.fields["rank"])
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
@@ -155,50 +155,50 @@ var/global/list/PDA_Manifest = list()
|
||||
var/isactive = t.fields["p_stat"]
|
||||
var/department = 0
|
||||
var/depthead = 0 // Department Heads will be placed at the top of their lists.
|
||||
if(real_rank in command_positions)
|
||||
if(real_rank in GLOB.command_positions)
|
||||
heads[++heads.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
depthead = 1
|
||||
if(rank == "Captain" && heads.len != 1)
|
||||
heads.Swap(1, heads.len)
|
||||
|
||||
if(real_rank in security_positions)
|
||||
if(real_rank in GLOB.security_positions)
|
||||
sec[++sec.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sec.len != 1)
|
||||
sec.Swap(1, sec.len)
|
||||
|
||||
if(real_rank in engineering_positions)
|
||||
if(real_rank in GLOB.engineering_positions)
|
||||
eng[++eng.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && eng.len != 1)
|
||||
eng.Swap(1, eng.len)
|
||||
|
||||
if(real_rank in medical_positions)
|
||||
if(real_rank in GLOB.medical_positions)
|
||||
med[++med.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && med.len != 1)
|
||||
med.Swap(1, med.len)
|
||||
|
||||
if(real_rank in science_positions)
|
||||
if(real_rank in GLOB.science_positions)
|
||||
sci[++sci.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sci.len != 1)
|
||||
sci.Swap(1, sci.len)
|
||||
|
||||
if(real_rank in service_positions)
|
||||
if(real_rank in GLOB.service_positions)
|
||||
ser[++ser.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && ser.len != 1)
|
||||
ser.Swap(1, ser.len)
|
||||
|
||||
if(real_rank in supply_positions)
|
||||
if(real_rank in GLOB.supply_positions)
|
||||
sup[++sup.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
if(depthead && sup.len != 1)
|
||||
sup.Swap(1, sup.len)
|
||||
|
||||
if(real_rank in nonhuman_positions)
|
||||
if(real_rank in GLOB.nonhuman_positions)
|
||||
bot[++bot.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
department = 1
|
||||
|
||||
@@ -206,7 +206,7 @@ var/global/list/PDA_Manifest = list()
|
||||
misc[++misc.len] = list("name" = name, "rank" = rank, "active" = isactive)
|
||||
|
||||
|
||||
PDA_Manifest = list(\
|
||||
GLOB.PDA_Manifest = list(\
|
||||
"heads" = heads,\
|
||||
"sec" = sec,\
|
||||
"eng" = eng,\
|
||||
@@ -226,12 +226,12 @@ var/global/list/PDA_Manifest = list()
|
||||
manifest_inject(H)
|
||||
|
||||
/datum/datacore/proc/manifest_modify(name, assignment)
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
var/datum/data/record/foundrecord
|
||||
var/real_title = assignment
|
||||
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
for(var/datum/data/record/t in GLOB.data_core.general)
|
||||
if(t)
|
||||
if(t.fields["name"] == name)
|
||||
foundrecord = t
|
||||
@@ -250,10 +250,10 @@ var/global/list/PDA_Manifest = list()
|
||||
foundrecord.fields["rank"] = assignment
|
||||
foundrecord.fields["real_rank"] = real_title
|
||||
|
||||
var/record_id_num = 1001
|
||||
GLOBAL_VAR_INIT(record_id_num, 1001)
|
||||
/datum/datacore/proc/manifest_inject(mob/living/carbon/human/H)
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
|
||||
if(H.mind && (H.mind.assigned_role != H.mind.special_role))
|
||||
var/assignment
|
||||
@@ -266,7 +266,7 @@ var/record_id_num = 1001
|
||||
else
|
||||
assignment = "Unassigned"
|
||||
|
||||
var/id = num2hex(record_id_num++, 6)
|
||||
var/id = num2hex(GLOB.record_id_num++, 6)
|
||||
|
||||
|
||||
//General Record
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#define BIOHAZARD "BIOHAZARD THREAT!"
|
||||
|
||||
|
||||
var/list/diseases = subtypesof(/datum/disease)
|
||||
GLOBAL_LIST_INIT(diseases, subtypesof(/datum/disease))
|
||||
|
||||
|
||||
/datum/disease
|
||||
|
||||
@@ -6,16 +6,15 @@
|
||||
If you need help with creating new symptoms or expanding the advance disease, ask for Giacom on #coderbus.
|
||||
|
||||
*/
|
||||
|
||||
var/list/archive_diseases = list()
|
||||
GLOBAL_LIST_EMPTY(archive_diseases)
|
||||
|
||||
// The order goes from easy to cure to hard to cure.
|
||||
var/list/advance_cures = list(
|
||||
GLOBAL_LIST_INIT(advance_cures, list(
|
||||
"sodiumchloride", "sugar", "orangejuice",
|
||||
"spaceacillin", "salglu_solution", "ethanol",
|
||||
"teporone", "diphenhydramine", "lipolicide",
|
||||
"silver", "gold"
|
||||
)
|
||||
))
|
||||
|
||||
/*
|
||||
|
||||
@@ -132,7 +131,7 @@ var/list/advance_cures = list(
|
||||
|
||||
// Generate symptoms. By default, we only choose non-deadly symptoms.
|
||||
var/list/possible_symptoms = list()
|
||||
for(var/symp in list_symptoms)
|
||||
for(var/symp in GLOB.list_symptoms)
|
||||
var/datum/symptom/S = new symp
|
||||
if(S.level >= level_min && S.level <= level_max)
|
||||
if(!HasSymptom(S))
|
||||
@@ -158,13 +157,13 @@ var/list/advance_cures = list(
|
||||
AssignProperties(properties)
|
||||
id = null
|
||||
|
||||
if(!archive_diseases[GetDiseaseID()])
|
||||
if(!GLOB.archive_diseases[GetDiseaseID()])
|
||||
if(new_name)
|
||||
AssignName()
|
||||
archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
|
||||
archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
|
||||
GLOB.archive_diseases[GetDiseaseID()] = src // So we don't infinite loop
|
||||
GLOB.archive_diseases[GetDiseaseID()] = new /datum/disease/advance(0, src, 1)
|
||||
|
||||
var/datum/disease/advance/A = archive_diseases[GetDiseaseID()]
|
||||
var/datum/disease/advance/A = GLOB.archive_diseases[GetDiseaseID()]
|
||||
AssignName(A.name)
|
||||
|
||||
//Generate disease properties based on the effects. Returns an associated list.
|
||||
@@ -246,9 +245,9 @@ var/list/advance_cures = list(
|
||||
// Will generate a random cure, the less resistance the symptoms have, the harder the cure.
|
||||
/datum/disease/advance/proc/GenerateCure(list/properties = list())
|
||||
if(properties && properties.len)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
|
||||
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, GLOB.advance_cures.len)
|
||||
// to_chat(world, "Res = [res]")
|
||||
cures = list(advance_cures[res])
|
||||
cures = list(GLOB.advance_cures[res])
|
||||
|
||||
// Get the cure name from the cure_id
|
||||
var/datum/reagent/D = GLOB.chemical_reagents_list[cures[1]]
|
||||
@@ -371,7 +370,7 @@ var/list/advance_cures = list(
|
||||
|
||||
var/list/symptoms = list()
|
||||
symptoms += "Done"
|
||||
symptoms += list_symptoms.Copy()
|
||||
symptoms += GLOB.list_symptoms.Copy()
|
||||
do
|
||||
if(user)
|
||||
var/symptom = input(user, "Choose a symptom to add ([i] remaining)", "Choose a Symptom") in symptoms
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Symptoms are the effects that engineered advanced diseases do.
|
||||
|
||||
var/list/list_symptoms = subtypesof(/datum/symptom)
|
||||
GLOBAL_LIST_INIT(list_symptoms, subtypesof(/datum/symptom))
|
||||
|
||||
/datum/symptom
|
||||
// Buffs/Debuffs the symptom has to the overall engineered disease.
|
||||
@@ -17,7 +17,7 @@ var/list/list_symptoms = subtypesof(/datum/symptom)
|
||||
var/id = ""
|
||||
|
||||
/datum/symptom/New()
|
||||
var/list/S = list_symptoms
|
||||
var/list/S = GLOB.list_symptoms
|
||||
for(var/i = 1; i <= S.len; i++)
|
||||
if(type == S[i])
|
||||
id = "[i]"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
name = rename
|
||||
|
||||
/datum/map_template/proc/preload_size(path)
|
||||
var/bounds = maploader.load_map(file(path), 1, 1, 1, cropMap = 0, measureOnly = 1)
|
||||
var/bounds = GLOB.maploader.load_map(file(path), 1, 1, 1, cropMap = 0, measureOnly = 1)
|
||||
if(bounds)
|
||||
width = bounds[MAP_MAXX] // Assumes all templates are rectangular, have a single Z level, and begin at 1,1,1
|
||||
height = bounds[MAP_MAXY]
|
||||
@@ -48,8 +48,8 @@
|
||||
// This system will metaphorically snap in half (not postpone init everywhere)
|
||||
// if given a multi-z template
|
||||
// it might need to be adapted for that when that time comes
|
||||
space_manager.add_dirt(placement.z)
|
||||
var/list/bounds = maploader.load_map(get_file(), min_x, min_y, placement.z, cropMap = 1)
|
||||
GLOB.space_manager.add_dirt(placement.z)
|
||||
var/list/bounds = GLOB.maploader.load_map(get_file(), min_x, min_y, placement.z, cropMap = 1)
|
||||
if(!bounds)
|
||||
return 0
|
||||
if(bot_left == null || top_right == null)
|
||||
@@ -58,7 +58,7 @@
|
||||
if(ST_bot_left == null || ST_top_right == null)
|
||||
log_runtime(EXCEPTION("One of the smoothing corners is bust"), src)
|
||||
|
||||
space_manager.remove_dirt(placement.z)
|
||||
GLOB.space_manager.remove_dirt(placement.z)
|
||||
late_setup_level(
|
||||
block(bot_left, top_right),
|
||||
block(ST_bot_left, ST_top_right))
|
||||
@@ -108,7 +108,7 @@
|
||||
for(var/map in flist(path))
|
||||
if(cmptext(copytext(map, length(map) - 3), ".dmm"))
|
||||
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
|
||||
map_templates[T.name] = T
|
||||
GLOB.map_templates[T.name] = T
|
||||
|
||||
if(!config.disable_space_ruins) // so we don't unnecessarily clutter start-up
|
||||
preloadRuinTemplates()
|
||||
@@ -134,13 +134,13 @@
|
||||
if(banned.Find(R.mappath))
|
||||
continue
|
||||
|
||||
map_templates[R.name] = R
|
||||
ruins_templates[R.name] = R
|
||||
GLOB.map_templates[R.name] = R
|
||||
GLOB.ruins_templates[R.name] = R
|
||||
|
||||
if(istype(R, /datum/map_template/ruin/lavaland))
|
||||
lava_ruins_templates[R.name] = R
|
||||
GLOB.lava_ruins_templates[R.name] = R
|
||||
if(istype(R, /datum/map_template/ruin/space))
|
||||
space_ruins_templates[R.name] = R
|
||||
GLOB.space_ruins_templates[R.name] = R
|
||||
|
||||
/proc/preloadShelterTemplates()
|
||||
for(var/item in subtypesof(/datum/map_template/shelter))
|
||||
@@ -149,8 +149,8 @@
|
||||
continue
|
||||
var/datum/map_template/shelter/S = new shelter_type()
|
||||
|
||||
shelter_templates[S.shelter_id] = S
|
||||
map_templates[S.shelter_id] = S
|
||||
GLOB.shelter_templates[S.shelter_id] = S
|
||||
GLOB.map_templates[S.shelter_id] = S
|
||||
|
||||
/proc/preloadShuttleTemplates()
|
||||
for(var/item in subtypesof(/datum/map_template/shuttle))
|
||||
@@ -160,5 +160,5 @@
|
||||
|
||||
var/datum/map_template/shuttle/S = new shuttle_type()
|
||||
|
||||
shuttle_templates[S.shuttle_id] = S
|
||||
map_templates[S.shuttle_id] = S
|
||||
GLOB.shuttle_templates[S.shuttle_id] = S
|
||||
GLOB.map_templates[S.shuttle_id] = S
|
||||
|
||||
+6
-6
@@ -1,8 +1,8 @@
|
||||
/* HUD DATUMS */
|
||||
var/global/list/all_huds = list()
|
||||
GLOBAL_LIST_EMPTY(all_huds)
|
||||
|
||||
///GLOBAL HUD LIST
|
||||
var/datum/atom_hud/huds = list( \
|
||||
GLOBAL_LIST_INIT(huds, list( \
|
||||
DATA_HUD_SECURITY_BASIC = new/datum/atom_hud/data/human/security/basic(), \
|
||||
DATA_HUD_SECURITY_ADVANCED = new/datum/atom_hud/data/human/security/advanced(), \
|
||||
DATA_HUD_MEDICAL_BASIC = new/datum/atom_hud/data/human/medical/basic(), \
|
||||
@@ -24,7 +24,7 @@ var/datum/atom_hud/huds = list( \
|
||||
ANTAG_HUD_DEVIL = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_EVENTMISC = new/datum/atom_hud/antag/hidden(),\
|
||||
ANTAG_HUD_BLOB = new/datum/atom_hud/antag/hidden()\
|
||||
)
|
||||
))
|
||||
|
||||
/datum/atom_hud
|
||||
var/list/atom/hudatoms = list() //list of all atoms which display this hud
|
||||
@@ -33,14 +33,14 @@ var/datum/atom_hud/huds = list( \
|
||||
|
||||
|
||||
/datum/atom_hud/New()
|
||||
all_huds += src
|
||||
GLOB.all_huds += src
|
||||
|
||||
/datum/atom_hud/Destroy()
|
||||
for(var/v in hudusers)
|
||||
remove_hud_from(v)
|
||||
for(var/v in hudatoms)
|
||||
remove_from_hud(v)
|
||||
all_huds -= src
|
||||
GLOB.all_huds -= src
|
||||
return ..()
|
||||
|
||||
/datum/atom_hud/proc/remove_hud_from(mob/M)
|
||||
@@ -99,7 +99,7 @@ var/datum/atom_hud/huds = list( \
|
||||
serv_huds += serv.thrallhud
|
||||
|
||||
|
||||
for(var/datum/atom_hud/hud in (all_huds|serv_huds))//|gang_huds))
|
||||
for(var/datum/atom_hud/hud in (GLOB.all_huds|serv_huds))//|gang_huds))
|
||||
if(src in hud.hudusers)
|
||||
hud.add_hud_to(src)
|
||||
|
||||
|
||||
+10
-10
@@ -845,11 +845,11 @@
|
||||
to_chat(current, "<span class='cultitalic'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [SSticker.cultdat.entity_title2] above all else. Bring It back.</span>")
|
||||
log_admin("[key_name(usr)] has culted [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has culted [key_name_admin(current)]")
|
||||
if(!summon_spots.len)
|
||||
while(summon_spots.len < SUMMON_POSSIBILITIES)
|
||||
var/area/summon = pick(return_sorted_areas() - summon_spots)
|
||||
if(!GLOB.summon_spots.len)
|
||||
while(GLOB.summon_spots.len < SUMMON_POSSIBILITIES)
|
||||
var/area/summon = pick(return_sorted_areas() - GLOB.summon_spots)
|
||||
if(summon && is_station_level(summon.z) && summon.valid_territory)
|
||||
summon_spots += summon
|
||||
GLOB.summon_spots += summon
|
||||
if("tome")
|
||||
var/mob/living/carbon/human/H = current
|
||||
if(istype(H))
|
||||
@@ -902,7 +902,7 @@
|
||||
log_admin("[key_name(usr)] has wizarded [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has wizarded [key_name_admin(current)]")
|
||||
if("lair")
|
||||
current.forceMove(pick(wizardstart))
|
||||
current.forceMove(pick(GLOB.wizardstart))
|
||||
log_admin("[key_name(usr)] has moved [key_name(current)] to the wizard's lair")
|
||||
message_admins("[key_name_admin(usr)] has moved [key_name_admin(current)] to the wizard's lair")
|
||||
if("dressup")
|
||||
@@ -1165,7 +1165,7 @@
|
||||
remove_antag_datum(/datum/antagonist/traitor)
|
||||
log_admin("[key_name(usr)] has de-traitored [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has de-traitored [key_name_admin(current)]")
|
||||
|
||||
|
||||
if("traitor")
|
||||
if(!(has_antag_datum(/datum/antagonist/traitor)))
|
||||
var/datum/antagonist/traitor/T = new()
|
||||
@@ -1487,11 +1487,11 @@
|
||||
special_role = SPECIAL_ROLE_WIZARD
|
||||
assigned_role = SPECIAL_ROLE_WIZARD
|
||||
//ticker.mode.learn_basic_spells(current)
|
||||
if(!wizardstart.len)
|
||||
current.loc = pick(latejoin)
|
||||
if(!GLOB.wizardstart.len)
|
||||
current.loc = pick(GLOB.latejoin)
|
||||
to_chat(current, "HOT INSERTION, GO GO GO")
|
||||
else
|
||||
current.loc = pick(wizardstart)
|
||||
current.loc = pick(GLOB.wizardstart)
|
||||
|
||||
SSticker.mode.equip_wizard(current)
|
||||
for(var/obj/item/spellbook/S in current.contents)
|
||||
@@ -1659,7 +1659,7 @@
|
||||
SSticker.mode.implanter[missionary.mind] = implanters
|
||||
SSticker.mode.traitors += src
|
||||
|
||||
|
||||
|
||||
var/datum/objective/protect/zealot_objective = new
|
||||
zealot_objective.target = missionary.mind
|
||||
zealot_objective.owner = src
|
||||
|
||||
@@ -22,14 +22,14 @@
|
||||
var/list/fields = list( )
|
||||
|
||||
/datum/data/record/Destroy()
|
||||
if(src in data_core.medical)
|
||||
data_core.medical -= src
|
||||
if(src in data_core.security)
|
||||
data_core.security -= src
|
||||
if(src in data_core.general)
|
||||
data_core.general -= src
|
||||
if(src in data_core.locked)
|
||||
data_core.locked -= src
|
||||
if(src in GLOB.data_core.medical)
|
||||
GLOB.data_core.medical -= src
|
||||
if(src in GLOB.data_core.security)
|
||||
GLOB.data_core.security -= src
|
||||
if(src in GLOB.data_core.general)
|
||||
GLOB.data_core.general -= src
|
||||
if(src in GLOB.data_core.locked)
|
||||
GLOB.data_core.locked -= src
|
||||
return ..()
|
||||
|
||||
/datum/data/text
|
||||
|
||||
@@ -1048,8 +1048,8 @@
|
||||
to_chat(H, "You have gained the ability to shapeshift into lesser hellhound form. This is a combat form with different abilities, tough but not invincible. It can regenerate itself over time by resting.")
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/raise_vampires)
|
||||
to_chat(H, "You have gained the ability to Raise Vampires. This extremely powerful AOE ability affects all humans near you. Vampires/thralls are healed. Corpses are raised as vampires. Others are stunned, then brain damaged, then killed.")
|
||||
H.dna.SetSEState(JUMPBLOCK, 1)
|
||||
genemutcheck(H, JUMPBLOCK, null, MUTCHK_FORCED)
|
||||
H.dna.SetSEState(GLOB.jumpblock, 1)
|
||||
genemutcheck(H, GLOB.jumpblock, null, MUTCHK_FORCED)
|
||||
H.update_mutations()
|
||||
H.gene_stability = 100
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// This system defines news that will be displayed in the course of a round.
|
||||
// Uses BYOND's type system to put everything into a nice format
|
||||
|
||||
// THIS ISNT PROPERLY PATHED AND I AM GOING TO FUCKING SCREAM AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
|
||||
/datum/news_announcement
|
||||
var
|
||||
round_time // time of the round at which this should be announced, in seconds
|
||||
@@ -114,24 +115,24 @@
|
||||
the riots. More on this at 6."}
|
||||
round_time = 60 * 60
|
||||
|
||||
|
||||
var/global/list/newscaster_standard_feeds = list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots)
|
||||
GLOBAL_LIST_INIT(newscaster_standard_feeds, list(/datum/news_announcement/bluespace_research, /datum/news_announcement/lotus_tree, /datum/news_announcement/random_junk, /datum/news_announcement/food_riots))
|
||||
|
||||
proc/process_newscaster()
|
||||
check_for_newscaster_updates(SSticker.mode.newscaster_announcements)
|
||||
|
||||
var/global/tmp/announced_news_types = list()
|
||||
GLOBAL_LIST_EMPTY(announced_news_types)
|
||||
|
||||
proc/check_for_newscaster_updates(type)
|
||||
for(var/subtype in subtypesof(type))
|
||||
var/datum/news_announcement/news = new subtype()
|
||||
if(news.round_time * 10 <= world.time && !(subtype in announced_news_types))
|
||||
announced_news_types += subtype
|
||||
if(news.round_time * 10 <= world.time && !(subtype in GLOB.announced_news_types))
|
||||
GLOB.announced_news_types += subtype
|
||||
announce_newscaster_news(news)
|
||||
|
||||
proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
|
||||
var/datum/feed_channel/sendto
|
||||
for(var/datum/feed_channel/FC in news_network.network_channels)
|
||||
for(var/datum/feed_channel/FC in GLOB.news_network.network_channels)
|
||||
if(FC.channel_name == news.channel_name)
|
||||
sendto = FC
|
||||
break
|
||||
@@ -142,7 +143,7 @@ proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
sendto.author = news.author
|
||||
sendto.locked = 1
|
||||
sendto.is_admin_channel = 1
|
||||
news_network.network_channels += sendto
|
||||
GLOB.news_network.network_channels += sendto
|
||||
|
||||
var/datum/feed_message/newMsg = new /datum/feed_message
|
||||
newMsg.author = news.author ? news.author : sendto.author
|
||||
@@ -152,5 +153,5 @@ proc/announce_newscaster_news(datum/news_announcement/news)
|
||||
|
||||
sendto.messages += newMsg
|
||||
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allNewscasters)
|
||||
NEWSCASTER.newsAlert(news.channel_name)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
qdel(src)
|
||||
owner = new_owner
|
||||
|
||||
/datum/spawners_menu/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = FALSE, datum/topic_state/state = ghost_state, datum/nanoui/master_ui = null)
|
||||
/datum/spawners_menu/ui_interact(mob/user, ui_key = "main", datum/nanoui/ui = null, force_open = FALSE, datum/topic_state/state = GLOB.ghost_state, datum/nanoui/master_ui = null)
|
||||
ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open)
|
||||
if(!ui)
|
||||
ui = new(user, src, ui_key, "spawners_menu.tmpl", "Spawners Menu", 700, 600, master_ui, state = state)
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/obj/effect/proc_holder/singularity_pull()
|
||||
return
|
||||
|
||||
var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin verb for now
|
||||
GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
|
||||
/obj/effect/proc_holder/proc/InterceptClickOn(mob/living/user, params, atom/A)
|
||||
if(user.ranged_ability != src)
|
||||
|
||||
@@ -25,14 +25,14 @@
|
||||
var/A = null
|
||||
|
||||
if(!randomise_selection)
|
||||
A = input("Area to teleport to", "Teleport", A) as null|anything in teleportlocs
|
||||
A = input("Area to teleport to", "Teleport", A) as null|anything in GLOB.teleportlocs
|
||||
else
|
||||
A = pick(teleportlocs)
|
||||
A = pick(GLOB.teleportlocs)
|
||||
|
||||
if(!A)
|
||||
return
|
||||
|
||||
var/area/thearea = teleportlocs[A]
|
||||
var/area/thearea = GLOB.teleportlocs[A]
|
||||
|
||||
if(thearea.tele_proof && !istype(thearea, /area/wizard_station))
|
||||
to_chat(usr, "A mysterious force disrupts your arcane spell matrix, and you remain where you are.")
|
||||
|
||||
@@ -55,10 +55,10 @@
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/rank/clown/nodrop, slot_w_uniform, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/shoes/clown_shoes/nodrop, slot_shoes, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/clown_hat/nodrop, slot_wear_mask, TRUE, TRUE)
|
||||
dna.SetSEState(CLUMSYBLOCK, TRUE, TRUE)
|
||||
dna.SetSEState(COMICBLOCK, TRUE, TRUE)
|
||||
genemutcheck(src, CLUMSYBLOCK, null, MUTCHK_FORCED)
|
||||
genemutcheck(src, COMICBLOCK, null, MUTCHK_FORCED)
|
||||
dna.SetSEState(GLOB.clumsyblock, TRUE, TRUE)
|
||||
dna.SetSEState(GLOB.comicblock, TRUE, TRUE)
|
||||
genemutcheck(src, GLOB.clumsyblock, null, MUTCHK_FORCED)
|
||||
genemutcheck(src, GLOB.comicblock, null, MUTCHK_FORCED)
|
||||
if(!(iswizard(src) || (mind && mind.special_role == SPECIAL_ROLE_WIZARD_APPRENTICE))) //Mutations are permanent on non-wizards. Can still be removed by genetics fuckery but not mutadone.
|
||||
dna.default_blocks.Add(CLUMSYBLOCK)
|
||||
dna.default_blocks.Add(COMICBLOCK)
|
||||
dna.default_blocks.Add(GLOB.clumsyblock)
|
||||
dna.default_blocks.Add(GLOB.comicblock)
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
var/obj/item/organ/internal/honktumor/cursed/tumor = new
|
||||
tumor.insert(src)
|
||||
mutations.Add(NERVOUS)
|
||||
dna.SetSEState(NERVOUSBLOCK, 1, 1)
|
||||
genemutcheck(src, NERVOUSBLOCK, null, MUTCHK_FORCED)
|
||||
dna.SetSEState(GLOB.nervousblock, 1, 1)
|
||||
genemutcheck(src, GLOB.nervousblock, null, MUTCHK_FORCED)
|
||||
rename_character(real_name, "cluwne")
|
||||
|
||||
unEquip(w_uniform, 1)
|
||||
@@ -56,14 +56,14 @@
|
||||
tumor.remove(src)
|
||||
else
|
||||
mutations.Remove(CLUMSY)
|
||||
mutations.Remove(COMICBLOCK)
|
||||
dna.SetSEState(CLUMSYBLOCK,0)
|
||||
dna.SetSEState(COMICBLOCK,0)
|
||||
genemutcheck(src, CLUMSYBLOCK, null, MUTCHK_FORCED)
|
||||
genemutcheck(src, COMICBLOCK, null, MUTCHK_FORCED)
|
||||
mutations.Remove(GLOB.comicblock)
|
||||
dna.SetSEState(GLOB.clumsyblock,0)
|
||||
dna.SetSEState(GLOB.comicblock,0)
|
||||
genemutcheck(src, GLOB.clumsyblock, null, MUTCHK_FORCED)
|
||||
genemutcheck(src, GLOB.comicblock, null, MUTCHK_FORCED)
|
||||
mutations.Remove(NERVOUS)
|
||||
dna.SetSEState(NERVOUSBLOCK, 0)
|
||||
genemutcheck(src, NERVOUSBLOCK, null, MUTCHK_FORCED)
|
||||
dna.SetSEState(GLOB.nervousblock, 0)
|
||||
genemutcheck(src, GLOB.nervousblock, null, MUTCHK_FORCED)
|
||||
|
||||
var/obj/item/clothing/under/U = w_uniform
|
||||
unEquip(w_uniform, 1)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
qdel(holder)
|
||||
if(!QDELETED(target))
|
||||
if(mobloc.density)
|
||||
for(var/direction in alldirs)
|
||||
for(var/direction in GLOB.alldirs)
|
||||
var/turf/T = get_step(mobloc, direction)
|
||||
if(T)
|
||||
if(target.Move(T))
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
if(is_station_level(A.z))
|
||||
A.req_access = list()
|
||||
A.req_one_access = list()
|
||||
command_announcement.Announce("We have removed all access requirements on your station's airlocks. You can thank us later!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message")
|
||||
GLOB.command_announcement.Announce("We have removed all access requirements on your station's airlocks. You can thank us later!", "Greetings!", 'sound/misc/notice2.ogg', , , "Space Wizard Federation Message")
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
@@ -49,6 +49,6 @@
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/mask/gas/mime/nodrop, slot_wear_mask, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/under/mime/nodrop, slot_w_uniform, TRUE, TRUE)
|
||||
equip_to_slot_if_possible(new /obj/item/clothing/suit/suspenders/nodrop, slot_wear_suit, TRUE, TRUE)
|
||||
dna.SetSEState(MUTEBLOCK , TRUE, TRUE)
|
||||
genemutcheck(src, MUTEBLOCK , null, MUTCHK_FORCED)
|
||||
dna.default_blocks.Add(MUTEBLOCK)
|
||||
dna.SetSEState(GLOB.muteblock , TRUE, TRUE)
|
||||
genemutcheck(src, GLOB.muteblock , null, MUTCHK_FORCED)
|
||||
dna.default_blocks.Add(GLOB.muteblock)
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
A.remove(H)
|
||||
A.forceMove(get_turf(H))
|
||||
spawn()
|
||||
A.throw_at(get_edge_target_turf(H, pick(alldirs)), rand(1, 10), 5)
|
||||
A.throw_at(get_edge_target_turf(H, pick(GLOB.alldirs)), rand(1, 10), 5)
|
||||
H.visible_message("<span class='danger'>[H]'s [A.name] flies out of their body in a magical explosion!</span>",\
|
||||
"<span class='danger'>Your [A.name] flies out of your body in a magical explosion!</span>")
|
||||
H.Weaken(2)
|
||||
else
|
||||
var/obj/effect/decal/cleanable/blood/gibs/G = new/obj/effect/decal/cleanable/blood/gibs(get_turf(H))
|
||||
spawn()
|
||||
G.throw_at(get_edge_target_turf(H, pick(alldirs)), rand(1, 10), 5)
|
||||
G.throw_at(get_edge_target_turf(H, pick(GLOB.alldirs)), rand(1, 10), 5)
|
||||
H.apply_damage(10, BRUTE, "chest")
|
||||
to_chat(H, "<span class='userdanger'>You have no appendix, but something had to give! Holy shit, what was that?</span>")
|
||||
H.Weaken(3)
|
||||
|
||||
@@ -97,11 +97,11 @@
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/genetic/mutate/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/target in targets)
|
||||
target.dna.SetSEState(HULKBLOCK, 1)
|
||||
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
|
||||
target.dna.SetSEState(GLOB.hulkblock, 1)
|
||||
genemutcheck(target, GLOB.hulkblock, null, MUTCHK_FORCED)
|
||||
spawn(duration)
|
||||
target.dna.SetSEState(HULKBLOCK, 0)
|
||||
genemutcheck(target, HULKBLOCK, null, MUTCHK_FORCED)
|
||||
target.dna.SetSEState(GLOB.hulkblock, 0)
|
||||
genemutcheck(target, GLOB.hulkblock, null, MUTCHK_FORCED)
|
||||
..()
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/smoke
|
||||
|
||||
@@ -113,13 +113,13 @@
|
||||
/datum/status_effect/hippocraticOath/on_apply()
|
||||
//Makes the user passive, it's in their oath not to harm!
|
||||
ADD_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
|
||||
var/datum/atom_hud/H = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
H.add_hud_to(owner)
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/hippocraticOath/on_remove()
|
||||
REMOVE_TRAIT(owner, TRAIT_PACIFISM, "hippocraticOath")
|
||||
var/datum/atom_hud/H = huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
var/datum/atom_hud/H = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED]
|
||||
H.remove_hud_from(owner)
|
||||
|
||||
/datum/status_effect/hippocraticOath/tick()
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
if(needs_to_bleed)
|
||||
var/turf/T = get_turf(owner)
|
||||
new /obj/effect/temp_visual/bleed/explode(T)
|
||||
for(var/d in alldirs)
|
||||
for(var/d in GLOB.alldirs)
|
||||
new /obj/effect/temp_visual/dir_setting/bloodsplatter(T, d)
|
||||
playsound(T, "desceration", 200, 1, -1)
|
||||
owner.adjustBruteLoss(bleed_damage)
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#define SUPPLY_MISC 8
|
||||
#define SUPPLY_VEND 9
|
||||
|
||||
var/list/all_supply_groups = list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY_ENGINEER,SUPPLY_MEDICAL,SUPPLY_SCIENCE,SUPPLY_ORGANIC,SUPPLY_MATERIALS,SUPPLY_MISC,SUPPLY_VEND)
|
||||
GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY_ENGINEER,SUPPLY_MEDICAL,SUPPLY_SCIENCE,SUPPLY_ORGANIC,SUPPLY_MATERIALS,SUPPLY_MISC,SUPPLY_VEND))
|
||||
|
||||
/proc/get_supply_group_name(var/cat)
|
||||
switch(cat)
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/list/outside_areas = list()
|
||||
var/list/eligible_areas = list()
|
||||
for(var/z in impacted_z_levels)
|
||||
eligible_areas += space_manager.areas_in_z["[z]"]
|
||||
eligible_areas += GLOB.space_manager.areas_in_z["[z]"]
|
||||
for(var/i in 1 to eligible_areas.len)
|
||||
var/area/place = eligible_areas[i]
|
||||
if(place.outdoors)
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
/datum/weather/rad_storm/telegraph()
|
||||
..()
|
||||
status_alarm(TRUE)
|
||||
pre_maint_all_access = maint_all_access
|
||||
if(!maint_all_access)
|
||||
pre_maint_all_access = GLOB.maint_all_access
|
||||
if(!GLOB.maint_all_access)
|
||||
make_maint_all_access()
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
/datum/weather/rad_storm/end()
|
||||
if(..())
|
||||
return
|
||||
priority_announcement.Announce("The radiation threat has passed. Please return to your workplaces.", "Anomaly Alert")
|
||||
GLOB.priority_announcement.Announce("The radiation threat has passed. Please return to your workplaces.", "Anomaly Alert")
|
||||
status_alarm(FALSE)
|
||||
if(!pre_maint_all_access)
|
||||
revoke_maint_all_access()
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(N.icon_state == "nuclearbomb2")
|
||||
N.icon_state = "nuclearbomb1"
|
||||
N.timing = 0
|
||||
bomb_set = 0
|
||||
GLOB.bomb_set = 0
|
||||
if(NUCLEARBOMB_WIRE_LIGHT)
|
||||
N.lighthack = !N.lighthack
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
|
||||
#define MAX_FLAG 65535
|
||||
|
||||
var/list/same_wires = list()
|
||||
GLOBAL_LIST_EMPTY(same_wires)
|
||||
// 12 colours, if you're adding more than 12 wires then add more colours here
|
||||
var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink")
|
||||
GLOBAL_LIST_INIT(wireColours, list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink"))
|
||||
|
||||
/datum/wires
|
||||
|
||||
@@ -39,11 +39,11 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
// Get the same wires
|
||||
else
|
||||
// We don't have any wires to copy yet, generate some and then copy it.
|
||||
if(!same_wires[holder_type])
|
||||
if(!GLOB.same_wires[holder_type])
|
||||
GenerateWires()
|
||||
same_wires[holder_type] = src.wires.Copy()
|
||||
GLOB.same_wires[holder_type] = src.wires.Copy()
|
||||
else
|
||||
var/list/wires = same_wires[holder_type]
|
||||
var/list/wires = GLOB.same_wires[holder_type]
|
||||
src.wires = wires // Reference the wires list.
|
||||
|
||||
/datum/wires/Destroy()
|
||||
@@ -51,7 +51,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
return ..()
|
||||
|
||||
/datum/wires/proc/GenerateWires()
|
||||
var/list/colours_to_pick = wireColours.Copy() // Get a copy, not a reference.
|
||||
var/list/colours_to_pick = GLOB.wireColours.Copy() // Get a copy, not a reference.
|
||||
var/list/indexes_to_pick = list()
|
||||
//Generate our indexes
|
||||
for(var/i = 1; i < MAX_FLAG && i < (1 << wire_count); i += i)
|
||||
@@ -81,7 +81,7 @@ var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown",
|
||||
ui = new(user, src, ui_key, "wires.tmpl", holder.name, window_x, window_y)
|
||||
ui.open()
|
||||
|
||||
/datum/wires/ui_data(mob/user, ui_key = "main", datum/topic_state/state = physical_state)
|
||||
/datum/wires/ui_data(mob/user, ui_key = "main", datum/topic_state/state = GLOB.physical_state)
|
||||
var/data[0]
|
||||
var/list/replace_colours = null
|
||||
if(ishuman(user))
|
||||
|
||||
@@ -155,7 +155,7 @@ Actual Adjacent procs :
|
||||
var/list/L = new()
|
||||
var/turf/simulated/T
|
||||
|
||||
for(var/dir in cardinal)
|
||||
for(var/dir in GLOB.cardinal)
|
||||
T = get_step(src,dir)
|
||||
if(!T || (simulated_only && !istype(T)))
|
||||
continue
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/var/datum/announcement/minor/minor_announcement = new()
|
||||
/var/datum/announcement/priority/priority_announcement = new(do_log = 0)
|
||||
/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 0)
|
||||
/var/datum/announcement/priority/command/event/event_announcement = new(do_log = 0, do_newscast = 0)
|
||||
GLOBAL_DATUM_INIT(minor_announcement, /datum/announcement/minor, new())
|
||||
GLOBAL_DATUM_INIT(priority_announcement, /datum/announcement/priority, new(do_log = 0))
|
||||
GLOBAL_DATUM_INIT(command_announcement, /datum/announcement/priority/command, new(do_log = 0, do_newscast = 0))
|
||||
GLOBAL_DATUM_INIT(event_announcement, /datum/announcement/priority/command/event, new(do_log = 0, do_newscast = 0))
|
||||
|
||||
/datum/announcement
|
||||
var/title = "Attention"
|
||||
|
||||
@@ -29,13 +29,6 @@
|
||||
#define BLOB 14
|
||||
// TODO: Investigate more recent type additions and see if I can handle them. - Nadrew
|
||||
|
||||
|
||||
// Deprecated! See global.dm for new configuration vars
|
||||
/*
|
||||
var/DB_SERVER = "" // This is the location of your MySQL server (localhost is USUALLY fine)
|
||||
var/DB_PORT = 3306 // This is the port your MySQL server is running on (3306 is the default)
|
||||
*/
|
||||
|
||||
DBConnection
|
||||
var/_db_con // This variable contains a reference to the actual database connection.
|
||||
var/dbi // This variable is a string containing the DBI MySQL requires.
|
||||
|
||||
@@ -35,8 +35,8 @@
|
||||
var/list/receiver_reception = new
|
||||
|
||||
/proc/get_message_server()
|
||||
if(message_servers)
|
||||
for(var/obj/machinery/message_server/MS in message_servers)
|
||||
if(GLOB.message_servers)
|
||||
for(var/obj/machinery/message_server/MS in GLOB.message_servers)
|
||||
if(MS.active)
|
||||
return MS
|
||||
return null
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
G.fields["religion"] = "Unknown"
|
||||
G.fields["photo_front"] = front
|
||||
G.fields["photo_side"] = side
|
||||
data_core.general += G
|
||||
GLOB.data_core.general += G
|
||||
|
||||
qdel(dummy)
|
||||
return G
|
||||
@@ -36,11 +36,11 @@
|
||||
R.fields["ma_crim"] = "None"
|
||||
R.fields["ma_crim_d"] = "No major crime convictions."
|
||||
R.fields["notes"] = "No notes."
|
||||
data_core.security += R
|
||||
GLOB.data_core.security += R
|
||||
return R
|
||||
|
||||
/proc/find_security_record(field, value)
|
||||
return find_record(field, value, data_core.security)
|
||||
return find_record(field, value, GLOB.data_core.security)
|
||||
|
||||
/proc/find_record(field, value, list/L)
|
||||
for(var/datum/data/record/R in L)
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
if(M.client)
|
||||
playercount += 1
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
log_game("SQL ERROR during player polling. Failed to connect.")
|
||||
else
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, time) VALUES ([playercount], '[sqltime]')")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (playercount, time) VALUES ([playercount], '[sqltime]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during player polling. Error : \[[err]\]\n")
|
||||
@@ -21,11 +21,11 @@
|
||||
return
|
||||
var/admincount = GLOB.admins.len
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
log_game("SQL ERROR during admin polling. Failed to connect.")
|
||||
else
|
||||
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (admincount, time) VALUES ([admincount], '[sqltime]')")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("legacy_population")] (admincount, time) VALUES ([admincount], '[sqltime]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during admin polling. Error : \[[err]\]\n")
|
||||
@@ -67,10 +67,10 @@
|
||||
var/coord = "[H.x], [H.y], [H.z]"
|
||||
// to_chat(world, "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()])")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||
else
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()], '[coord]')")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()], '[coord]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
@@ -102,10 +102,10 @@
|
||||
var/coord = "[H.x], [H.y], [H.z]"
|
||||
// to_chat(world, "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])")
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
log_game("SQL ERROR during death reporting. Failed to connect.")
|
||||
else
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()], '[coord]')")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("death")] (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.getBrainLoss()], [H.getOxyLoss()], '[coord]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
|
||||
@@ -121,23 +121,23 @@
|
||||
|
||||
//This proc is used for feedback. It is executed at round end.
|
||||
/proc/sql_commit_feedback()
|
||||
if(!blackbox)
|
||||
if(!GLOB.blackbox)
|
||||
log_game("Round ended without a blackbox recorder. No feedback was sent to the database.")
|
||||
return
|
||||
|
||||
//content is a list of lists. Each item in the list is a list with two fields, a variable name and a value. Items MUST only have these two values.
|
||||
var/list/datum/feedback_variable/content = blackbox.get_round_feedback()
|
||||
var/list/datum/feedback_variable/content = GLOB.blackbox.get_round_feedback()
|
||||
|
||||
if(!content)
|
||||
log_game("Round ended without any feedback being generated. No feedback was sent to the database.")
|
||||
return
|
||||
|
||||
establish_db_connection()
|
||||
if(!dbcon.IsConnected())
|
||||
if(!GLOB.dbcon.IsConnected())
|
||||
log_game("SQL ERROR during feedback reporting. Failed to connect.")
|
||||
else
|
||||
|
||||
var/DBQuery/max_query = dbcon.NewQuery("SELECT MAX(roundid) AS max_round_id FROM [format_table_name("feedback")]")
|
||||
var/DBQuery/max_query = GLOB.dbcon.NewQuery("SELECT MAX(roundid) AS max_round_id FROM [format_table_name("feedback")]")
|
||||
max_query.Execute()
|
||||
|
||||
var/newroundid
|
||||
@@ -157,7 +157,7 @@
|
||||
var/variable = item.get_variable()
|
||||
var/value = item.get_value()
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery("INSERT INTO [format_table_name("feedback")] (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')")
|
||||
var/DBQuery/query = GLOB.dbcon.NewQuery("INSERT INTO [format_table_name("feedback")] (id, roundid, time, variable, value) VALUES (null, [newroundid], Now(), '[variable]', '[value]')")
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL ERROR during feedback reporting. Error : \[[err]\]\n")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// List is required to compile the resources into the game when it loads.
|
||||
// Dynamically loading it has bad results with sounds overtaking each other, even with the wait variable.
|
||||
|
||||
var/list/vox_sounds = list("," = 'sound/vox_fem/,.ogg',
|
||||
GLOBAL_LIST_INIT(vox_sounds, list("," = 'sound/vox_fem/,.ogg',
|
||||
"." = 'sound/vox_fem/..ogg',
|
||||
"a" = 'sound/vox_fem/a.ogg',
|
||||
"abortions" = 'sound/vox_fem/abortions.ogg',
|
||||
@@ -1267,4 +1267,4 @@ var/list/vox_sounds = list("," = 'sound/vox_fem/,.ogg',
|
||||
"zero" = 'sound/vox_fem/zero.ogg',
|
||||
"zone" = 'sound/vox_fem/zone.ogg',
|
||||
"zulu" = 'sound/vox_fem/zulu.ogg'
|
||||
)
|
||||
))
|
||||
|
||||
@@ -15,30 +15,30 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
|
||||
/*Adding a wizard area teleport list because motherfucking lag -- Urist*/
|
||||
/*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/
|
||||
var/list/teleportlocs = list()
|
||||
GLOBAL_LIST_EMPTY(teleportlocs)
|
||||
/hook/startup/proc/process_teleport_locs()
|
||||
for(var/area/AR in world)
|
||||
if(AR.no_teleportlocs) continue
|
||||
if(teleportlocs.Find(AR.name)) continue
|
||||
if(GLOB.teleportlocs.Find(AR.name)) continue
|
||||
var/turf/picked = safepick(get_area_turfs(AR.type))
|
||||
if(picked && is_station_level(picked.z))
|
||||
teleportlocs += AR.name
|
||||
teleportlocs[AR.name] = AR
|
||||
GLOB.teleportlocs += AR.name
|
||||
GLOB.teleportlocs[AR.name] = AR
|
||||
|
||||
teleportlocs = sortAssoc(teleportlocs)
|
||||
GLOB.teleportlocs = sortAssoc(GLOB.teleportlocs)
|
||||
|
||||
return 1
|
||||
|
||||
var/list/ghostteleportlocs = list()
|
||||
GLOBAL_LIST_EMPTY(ghostteleportlocs)
|
||||
/hook/startup/proc/process_ghost_teleport_locs()
|
||||
for(var/area/AR in world)
|
||||
if(ghostteleportlocs.Find(AR.name)) continue
|
||||
if(GLOB.ghostteleportlocs.Find(AR.name)) continue
|
||||
var/list/turfs = get_area_turfs(AR.type)
|
||||
if(turfs.len)
|
||||
ghostteleportlocs += AR.name
|
||||
ghostteleportlocs[AR.name] = AR
|
||||
GLOB.ghostteleportlocs += AR.name
|
||||
GLOB.ghostteleportlocs[AR.name] = AR
|
||||
|
||||
ghostteleportlocs = sortAssoc(ghostteleportlocs)
|
||||
GLOB.ghostteleportlocs = sortAssoc(GLOB.ghostteleportlocs)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -2285,7 +2285,7 @@ var/list/ghostteleportlocs = list()
|
||||
*/
|
||||
|
||||
// CENTCOM
|
||||
var/list/centcom_areas = list (
|
||||
GLOBAL_LIST_INIT(centcom_areas, list(
|
||||
/area/centcom,
|
||||
/area/shuttle/escape_pod1/centcom,
|
||||
/area/shuttle/escape_pod2/centcom,
|
||||
@@ -2294,10 +2294,10 @@ var/list/centcom_areas = list (
|
||||
/area/shuttle/transport1,
|
||||
/area/shuttle/administration/centcom,
|
||||
/area/shuttle/specops/centcom,
|
||||
)
|
||||
))
|
||||
|
||||
//SPACE STATION 13
|
||||
var/list/the_station_areas = list (
|
||||
GLOBAL_LIST_INIT(the_station_areas, list(
|
||||
/area/shuttle/arrival,
|
||||
/area/shuttle/escape,
|
||||
/area/shuttle/escape_pod1/station,
|
||||
@@ -2344,4 +2344,4 @@ var/list/the_station_areas = list (
|
||||
/area/turret_protected/ai_upload, //do not try to simplify to "/area/turret_protected" --rastaf0
|
||||
/area/turret_protected/ai_upload_foyer,
|
||||
/area/turret_protected/ai,
|
||||
)
|
||||
))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
/area/proc/reg_in_areas_in_z()
|
||||
if(contents.len)
|
||||
var/list/areas_in_z = space_manager.areas_in_z
|
||||
var/list/areas_in_z = GLOB.space_manager.areas_in_z
|
||||
var/z
|
||||
for(var/i in 1 to contents.len)
|
||||
var/atom/thing = contents[i]
|
||||
@@ -155,9 +155,9 @@
|
||||
for(var/obj/machinery/alarm/AA in src)
|
||||
AA.update_icon()
|
||||
|
||||
air_alarm_repository.update_cache(src)
|
||||
GLOB.air_alarm_repository.update_cache(src)
|
||||
return 1
|
||||
air_alarm_repository.update_cache(src)
|
||||
GLOB.air_alarm_repository.update_cache(src)
|
||||
return 0
|
||||
|
||||
/area/proc/air_doors_close()
|
||||
@@ -434,7 +434,7 @@
|
||||
else
|
||||
// There's a gravity generator on our z level
|
||||
// This would do well when integrated with the z level manager
|
||||
if(T && gravity_generators["[T.z]"] && length(gravity_generators["[T.z]"]))
|
||||
if(T && GLOB.gravity_generators["[T.z]"] && length(GLOB.gravity_generators["[T.z]"]))
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
+9
-9
@@ -52,8 +52,8 @@
|
||||
//its inherent color, the colored paint applied on it, special color effect etc...
|
||||
|
||||
/atom/New(loc, ...)
|
||||
if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
_preloader.load(src)
|
||||
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
GLOB._preloader.load(src)
|
||||
. = ..()
|
||||
attempt_init(arglist(args))
|
||||
|
||||
@@ -516,7 +516,7 @@
|
||||
A.fingerprintshidden |= fingerprintshidden.Copy() //admin
|
||||
A.fingerprintslast = fingerprintslast
|
||||
|
||||
var/list/blood_splatter_icons = list()
|
||||
GLOBAL_LIST_EMPTY(blood_splatter_icons)
|
||||
|
||||
/atom/proc/blood_splatter_index()
|
||||
return "\ref[initial(icon)]-[initial(icon_state)]"
|
||||
@@ -649,13 +649,13 @@ var/list/blood_splatter_icons = list()
|
||||
if(initial(icon) && initial(icon_state))
|
||||
//try to find a pre-processed blood-splatter. otherwise, make a new one
|
||||
var/index = blood_splatter_index()
|
||||
var/icon/blood_splatter_icon = blood_splatter_icons[index]
|
||||
var/icon/blood_splatter_icon = GLOB.blood_splatter_icons[index]
|
||||
if(!blood_splatter_icon)
|
||||
blood_splatter_icon = icon(initial(icon), initial(icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object
|
||||
blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent)
|
||||
blood_splatter_icon.Blend(icon('icons/effects/blood.dmi', "itemblood"), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant
|
||||
blood_splatter_icon = fcopy_rsc(blood_splatter_icon)
|
||||
blood_splatter_icons[index] = blood_splatter_icon
|
||||
GLOB.blood_splatter_icons[index] = blood_splatter_icon
|
||||
|
||||
blood_overlay = image(blood_splatter_icon)
|
||||
blood_overlay.color = color
|
||||
@@ -722,12 +722,12 @@ var/list/blood_splatter_icons = list()
|
||||
this.icon_state = "vomittox_[pick(1,4)]"
|
||||
|
||||
/atom/proc/get_global_map_pos()
|
||||
if(!islist(global_map) || isemptylist(global_map)) return
|
||||
if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map)) return
|
||||
var/cur_x = null
|
||||
var/cur_y = null
|
||||
var/list/y_arr = null
|
||||
for(cur_x=1,cur_x<=global_map.len,cur_x++)
|
||||
y_arr = global_map[cur_x]
|
||||
for(cur_x=1,cur_x<=GLOB.global_map.len,cur_x++)
|
||||
y_arr = GLOB.global_map[cur_x]
|
||||
cur_y = y_arr.Find(src.z)
|
||||
if(cur_y)
|
||||
break
|
||||
@@ -795,7 +795,7 @@ var/list/blood_splatter_icons = list()
|
||||
return
|
||||
|
||||
/atom/vv_edit_var(var_name, var_value)
|
||||
if(!Debug2)
|
||||
if(!GLOB.debug2)
|
||||
admin_spawned = TRUE
|
||||
. = ..()
|
||||
switch(var_name)
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
|
||||
/atom/movable/attempt_init(loc, ...)
|
||||
var/turf/T = get_turf(src)
|
||||
if(T && SSatoms.initialized != INITIALIZATION_INSSATOMS && space_manager.is_zlevel_dirty(T.z))
|
||||
space_manager.postpone_init(T.z, src)
|
||||
if(T && SSatoms.initialized != INITIALIZATION_INSSATOMS && GLOB.space_manager.is_zlevel_dirty(T.z))
|
||||
GLOB.space_manager.postpone_init(T.z, src)
|
||||
return
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
/* DATA HUD DATUMS */
|
||||
|
||||
/atom/proc/add_to_all_human_data_huds()
|
||||
for(var/datum/atom_hud/data/human/hud in huds) hud.add_to_hud(src)
|
||||
for(var/datum/atom_hud/data/human/hud in GLOB.huds) hud.add_to_hud(src)
|
||||
|
||||
/atom/proc/remove_from_all_data_huds()
|
||||
for(var/datum/atom_hud/data/hud in huds) hud.remove_from_hud(src)
|
||||
for(var/datum/atom_hud/data/hud in GLOB.huds) hud.remove_from_hud(src)
|
||||
|
||||
/datum/atom_hud/data
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
|
||||
//called when a human changes suit sensors
|
||||
/mob/living/carbon/proc/update_suit_sensors()
|
||||
var/datum/atom_hud/data/human/medical/basic/B = huds[DATA_HUD_MEDICAL_BASIC]
|
||||
var/datum/atom_hud/data/human/medical/basic/B = GLOB.huds[DATA_HUD_MEDICAL_BASIC]
|
||||
B.update_suit_sensors(src)
|
||||
|
||||
|
||||
@@ -220,7 +220,7 @@
|
||||
var/perpname = get_visible_name(TRUE) //gets the name of the perp, works if they have an id or if their face is uncovered
|
||||
if(!SSticker) return //wait till the game starts or the monkeys runtime....
|
||||
if(perpname)
|
||||
var/datum/data/record/R = find_record("name", perpname, data_core.security)
|
||||
var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.security)
|
||||
if(R)
|
||||
switch(R.fields["criminal"])
|
||||
if("*Execute*")
|
||||
|
||||
+7
-63
@@ -4,76 +4,20 @@
|
||||
* @author N3X15 <nexisentertainment@gmail.com>
|
||||
*/
|
||||
|
||||
// What each index means:
|
||||
#define DNA_OFF_LOWERBOUND 1 // changed as lists start at 1 not 0
|
||||
#define DNA_OFF_UPPERBOUND 2
|
||||
#define DNA_ON_LOWERBOUND 3
|
||||
#define DNA_ON_UPPERBOUND 4
|
||||
|
||||
// Define block bounds (off-low,off-high,on-low,on-high)
|
||||
// Used in setupgame.dm
|
||||
#define DNA_DEFAULT_BOUNDS list(1,2049,2050,4095)
|
||||
#define DNA_HARDER_BOUNDS list(1,3049,3050,4095)
|
||||
#define DNA_HARD_BOUNDS list(1,3490,3500,4095)
|
||||
|
||||
// UI Indices (can change to mutblock style, if desired)
|
||||
#define DNA_UI_HAIR_R 1
|
||||
#define DNA_UI_HAIR_G 2
|
||||
#define DNA_UI_HAIR_B 3
|
||||
#define DNA_UI_HAIR2_R 4
|
||||
#define DNA_UI_HAIR2_G 5
|
||||
#define DNA_UI_HAIR2_B 6
|
||||
#define DNA_UI_BEARD_R 7
|
||||
#define DNA_UI_BEARD_G 8
|
||||
#define DNA_UI_BEARD_B 9
|
||||
#define DNA_UI_BEARD2_R 10
|
||||
#define DNA_UI_BEARD2_G 11
|
||||
#define DNA_UI_BEARD2_B 12
|
||||
#define DNA_UI_SKIN_TONE 13
|
||||
#define DNA_UI_SKIN_R 14
|
||||
#define DNA_UI_SKIN_G 15
|
||||
#define DNA_UI_SKIN_B 16
|
||||
#define DNA_UI_HACC_R 17
|
||||
#define DNA_UI_HACC_G 18
|
||||
#define DNA_UI_HACC_B 19
|
||||
#define DNA_UI_HEAD_MARK_R 20
|
||||
#define DNA_UI_HEAD_MARK_G 21
|
||||
#define DNA_UI_HEAD_MARK_B 22
|
||||
#define DNA_UI_BODY_MARK_R 23
|
||||
#define DNA_UI_BODY_MARK_G 24
|
||||
#define DNA_UI_BODY_MARK_B 25
|
||||
#define DNA_UI_TAIL_MARK_R 26
|
||||
#define DNA_UI_TAIL_MARK_G 27
|
||||
#define DNA_UI_TAIL_MARK_B 28
|
||||
#define DNA_UI_EYES_R 29
|
||||
#define DNA_UI_EYES_G 30
|
||||
#define DNA_UI_EYES_B 31
|
||||
#define DNA_UI_GENDER 32
|
||||
#define DNA_UI_BEARD_STYLE 33
|
||||
#define DNA_UI_HAIR_STYLE 34
|
||||
/*#define DNA_UI_BACC_STYLE 23*/
|
||||
#define DNA_UI_HACC_STYLE 35
|
||||
#define DNA_UI_HEAD_MARK_STYLE 36
|
||||
#define DNA_UI_BODY_MARK_STYLE 37
|
||||
#define DNA_UI_TAIL_MARK_STYLE 38
|
||||
#define DNA_UI_LENGTH 38 // Update this when you add something, or you WILL break shit.
|
||||
|
||||
#define DNA_SE_LENGTH 55 // Was STRUCDNASIZE, size 27. 15 new blocks added = 42, plus room to grow.
|
||||
|
||||
// Defines which values mean "on" or "off".
|
||||
// This is to make some of the more OP superpowers a larger PITA to activate,
|
||||
// and to tell our new DNA datum which values to set in order to turn something
|
||||
// on or off.
|
||||
var/global/list/dna_activity_bounds[DNA_SE_LENGTH]
|
||||
var/global/list/assigned_gene_blocks[DNA_SE_LENGTH]
|
||||
GLOBAL_LIST_INIT(dna_activity_bounds, new(DNA_SE_LENGTH))
|
||||
GLOBAL_LIST_INIT(assigned_gene_blocks, new(DNA_SE_LENGTH))
|
||||
|
||||
// Used to determine what each block means (admin hax and species stuff on /vg/, mostly)
|
||||
var/global/list/assigned_blocks[DNA_SE_LENGTH]
|
||||
GLOBAL_LIST_INIT(assigned_blocks, new(DNA_SE_LENGTH))
|
||||
|
||||
var/global/list/datum/dna/gene/dna_genes[0]
|
||||
GLOBAL_LIST_EMPTY(dna_genes)
|
||||
|
||||
var/global/list/good_blocks[0]
|
||||
var/global/list/bad_blocks[0]
|
||||
GLOBAL_LIST_EMPTY(good_blocks)
|
||||
GLOBAL_LIST_EMPTY(bad_blocks)
|
||||
|
||||
/datum/dna
|
||||
// READ-ONLY, GETS OVERWRITTEN
|
||||
@@ -413,7 +357,7 @@ var/global/list/bad_blocks[0]
|
||||
SE_original = SE.Copy()
|
||||
|
||||
unique_enzymes = md5(character.real_name)
|
||||
reg_dna[unique_enzymes] = character.real_name
|
||||
GLOB.reg_dna[unique_enzymes] = character.real_name
|
||||
|
||||
// Hmm, I wonder how to go about this without a huge convention break
|
||||
/datum/dna/serialize()
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
// connected: Machine we're in, type unchecked so I doubt it's used beyond monkeying
|
||||
// flags: See below, bitfield.
|
||||
/proc/domutcheck(var/mob/living/M, var/connected=null, var/flags=0)
|
||||
for(var/datum/dna/gene/gene in dna_genes)
|
||||
for(var/datum/dna/gene/gene in GLOB.dna_genes)
|
||||
if(!M || !M.dna)
|
||||
return
|
||||
if(!gene.block)
|
||||
@@ -23,7 +23,7 @@
|
||||
if(block < 0)
|
||||
return
|
||||
|
||||
var/datum/dna/gene/gene = assigned_gene_blocks[block]
|
||||
var/datum/dna/gene/gene = GLOB.assigned_gene_blocks[block]
|
||||
domutation(gene, M, connected, flags)
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// DNA Gene activation boundaries, see dna2.dm.
|
||||
// Returns a list object with 4 numbers.
|
||||
/proc/GetDNABounds(var/block)
|
||||
var/list/BOUNDS=dna_activity_bounds[block]
|
||||
var/list/BOUNDS=GLOB.dna_activity_bounds[block]
|
||||
if(!istype(BOUNDS))
|
||||
return DNA_DEFAULT_BOUNDS
|
||||
return BOUNDS
|
||||
@@ -24,14 +24,14 @@
|
||||
/proc/randmutb(var/mob/living/M)
|
||||
if(!M || !M.dna) return
|
||||
M.dna.check_integrity()
|
||||
var/block = pick(bad_blocks)
|
||||
var/block = pick(GLOB.bad_blocks)
|
||||
M.dna.SetSEState(block, 1)
|
||||
|
||||
// Give Random Good Mutation to M
|
||||
/proc/randmutg(var/mob/living/M)
|
||||
if(!M || !M.dna) return
|
||||
M.dna.check_integrity()
|
||||
var/block = pick(good_blocks)
|
||||
var/block = pick(GLOB.good_blocks)
|
||||
M.dna.SetSEState(block, 1)
|
||||
|
||||
// Random Appearance Mutation
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
mutation=HALLUCINATE
|
||||
|
||||
/datum/dna/gene/disability/hallucinate/New()
|
||||
block=HALLUCINATIONBLOCK
|
||||
block=GLOB.hallucinationblock
|
||||
|
||||
/datum/dna/gene/disability/epilepsy
|
||||
name="Epilepsy"
|
||||
@@ -64,7 +64,7 @@
|
||||
disability=EPILEPSY
|
||||
|
||||
/datum/dna/gene/disability/epilepsy/New()
|
||||
block=EPILEPSYBLOCK
|
||||
block=GLOB.epilepsyblock
|
||||
|
||||
/datum/dna/gene/disability/cough
|
||||
name="Coughing"
|
||||
@@ -74,7 +74,7 @@
|
||||
disability=COUGHING
|
||||
|
||||
/datum/dna/gene/disability/cough/New()
|
||||
block=COUGHBLOCK
|
||||
block=GLOB.coughblock
|
||||
|
||||
/datum/dna/gene/disability/clumsy
|
||||
name="Clumsiness"
|
||||
@@ -84,7 +84,7 @@
|
||||
mutation=CLUMSY
|
||||
|
||||
/datum/dna/gene/disability/clumsy/New()
|
||||
block=CLUMSYBLOCK
|
||||
block=GLOB.clumsyblock
|
||||
|
||||
/datum/dna/gene/disability/tourettes
|
||||
name="Tourettes"
|
||||
@@ -94,7 +94,7 @@
|
||||
disability=TOURETTES
|
||||
|
||||
/datum/dna/gene/disability/tourettes/New()
|
||||
block=TWITCHBLOCK
|
||||
block=GLOB.twitchblock
|
||||
|
||||
/datum/dna/gene/disability/nervousness
|
||||
name="Nervousness"
|
||||
@@ -103,7 +103,7 @@
|
||||
disability=NERVOUS
|
||||
|
||||
/datum/dna/gene/disability/nervousness/New()
|
||||
block=NERVOUSBLOCK
|
||||
block=GLOB.nervousblock
|
||||
|
||||
|
||||
/datum/dna/gene/disability/blindness
|
||||
@@ -114,7 +114,7 @@
|
||||
disability = BLIND
|
||||
|
||||
/datum/dna/gene/disability/blindness/New()
|
||||
block = BLINDBLOCK
|
||||
block = GLOB.blindblock
|
||||
|
||||
/datum/dna/gene/disability/blindness/activate(mob/M, connected, flags)
|
||||
..()
|
||||
@@ -133,7 +133,7 @@
|
||||
disability = COLOURBLIND
|
||||
|
||||
/datum/dna/gene/disability/colourblindness/New()
|
||||
block=COLOURBLINDBLOCK
|
||||
block=GLOB.colourblindblock
|
||||
|
||||
/datum/dna/gene/disability/colourblindness/activate(var/mob/M, var/connected, var/flags)
|
||||
..()
|
||||
@@ -153,7 +153,7 @@
|
||||
disability=DEAF
|
||||
|
||||
/datum/dna/gene/disability/deaf/New()
|
||||
block=DEAFBLOCK
|
||||
block=GLOB.deafblock
|
||||
|
||||
/datum/dna/gene/disability/deaf/activate(var/mob/M, var/connected, var/flags)
|
||||
..()
|
||||
@@ -167,7 +167,7 @@
|
||||
disability=NEARSIGHTED
|
||||
|
||||
/datum/dna/gene/disability/nearsighted/New()
|
||||
block=GLASSESBLOCK
|
||||
block=GLOB.glassesblock
|
||||
|
||||
/datum/dna/gene/disability/nearsighted/activate(mob/living/M, connected, flags)
|
||||
. = ..()
|
||||
@@ -186,7 +186,7 @@
|
||||
|
||||
/datum/dna/gene/disability/lisp/New()
|
||||
..()
|
||||
block=LISPBLOCK
|
||||
block=GLOB.lispblock
|
||||
|
||||
/datum/dna/gene/disability/lisp/OnSay(var/mob/M, var/message)
|
||||
return replacetext(message,"s","th")
|
||||
@@ -199,7 +199,7 @@
|
||||
mutation=COMIC
|
||||
|
||||
/datum/dna/gene/disability/comic/New()
|
||||
block = COMICBLOCK
|
||||
block = GLOB.comicblock
|
||||
|
||||
/datum/dna/gene/disability/wingdings
|
||||
name = "Alien Voice"
|
||||
@@ -210,7 +210,7 @@
|
||||
mutation = WINGDINGS
|
||||
|
||||
/datum/dna/gene/disability/wingdings/New()
|
||||
block = WINGDINGSBLOCK
|
||||
block = GLOB.wingdingsblock
|
||||
|
||||
/datum/dna/gene/disability/wingdings/OnSay(var/mob/M, var/message)
|
||||
var/list/chars = string2charlist(message)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user