This commit is contained in:
Arkatos1
2019-05-13 22:21:48 +02:00
586 changed files with 12352 additions and 10897 deletions
+9 -3
View File
@@ -11,7 +11,8 @@ Pipelines + Other Objects -> Pipe network
GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
/obj/machinery/atmospherics
anchored = 1
layer = 2.4 //under wires with their 2.44
layer = GAS_PIPE_HIDDEN_LAYER //under wires
plane = FLOOR_PLANE
idle_power_usage = 0
active_power_usage = 0
power_channel = ENVIRON
@@ -61,10 +62,14 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
// Icons/overlays/underlays
/obj/machinery/atmospherics/update_icon()
return null
var/turf/T = loc
if(level == 2 || !T.intact)
plane = GAME_PLANE
else
plane = FLOOR_PLANE
/obj/machinery/atmospherics/proc/update_pipe_image()
pipe_image = image(src, loc, layer = 20, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipe_image = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir) //the 20 puts it above Byond's darkness (not its opacity view)
pipe_image.plane = HUD_PLANE
/obj/machinery/atmospherics/proc/check_icon_cache(var/safety = 0)
@@ -327,3 +332,4 @@ GLOBAL_DATUM_INIT(pipe_icon_manager, /datum/pipe_icon_manager, new())
/obj/machinery/atmospherics/update_remote_sight(mob/user)
user.sight |= (SEE_TURFS|BLIND)
. = ..()
@@ -3,6 +3,8 @@
initialize_directions = SOUTH|NORTH
use_power = IDLE_POWER_USE
layer = GAS_PUMP_LAYER
var/datum/gas_mixture/air1
var/datum/gas_mixture/air2
@@ -15,8 +15,6 @@
var/obj/machinery/power/generator/generator
layer = 2.45 // Just above wires
anchored = 1
density = 1
@@ -112,6 +110,8 @@
..()
/obj/machinery/atmospherics/binary/circulator/update_icon()
..()
if(stat & (BROKEN|NOPOWER))
icon_state = "circ[side]-p"
else if(last_pressure_delta > 0)
@@ -71,6 +71,8 @@
add_underlay(T, node2, dir)
/obj/machinery/atmospherics/binary/dp_vent_pump/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
@@ -28,6 +28,7 @@
return ..()
/obj/machinery/atmospherics/binary/passive_gate/update_icon()
..()
icon_state = "[on ? "on" : "off"]"
/obj/machinery/atmospherics/binary/passive_gate/update_underlays()
@@ -79,6 +79,8 @@ Thus, the two variables affect pump operation are set in New():
on = 1
/obj/machinery/atmospherics/binary/pump/update_icon()
..()
if(!powered())
icon_state = "off"
else
@@ -16,6 +16,8 @@
icon_state = "map_valve1"
/obj/machinery/atmospherics/binary/valve/update_icon(animation)
..()
if(animation)
flick("valve[src.open][!src.open]",src)
else
@@ -83,6 +83,8 @@ Thus, the two variables affect pump operation are set in New():
set_frequency(frequency)
/obj/machinery/atmospherics/binary/volume_pump/update_icon()
..()
if(!powered())
icon_state = "off"
else
@@ -72,6 +72,8 @@
update_ports()
/obj/machinery/atmospherics/omni/update_icon()
..()
if(stat & NOPOWER)
overlays = overlays_off
on = 0
@@ -83,8 +85,6 @@
underlays = underlays_current
return
/obj/machinery/atmospherics/omni/proc/error_check()
return
@@ -79,6 +79,8 @@ Filter types:
radio_connection = SSradio.add_object(src, frequency, RADIO_ATMOSIA)
/obj/machinery/atmospherics/trinary/filter/update_icon()
..()
if(flipped)
icon_state = "m"
else
@@ -57,6 +57,8 @@
update_icon()
/obj/machinery/atmospherics/trinary/mixer/update_icon(safety = 0)
..()
if(flipped)
icon_state = "m"
else
@@ -4,6 +4,7 @@
use_power = IDLE_POWER_USE
var/on = 0
layer = GAS_FILTER_LAYER
var/datum/gas_mixture/air1
var/datum/gas_mixture/air2
@@ -135,6 +135,7 @@
/obj/machinery/atmospherics/trinary/tvalve/digital/update_icon()
..()
if(!powered())
icon_state = "tvalvenopower"
@@ -13,6 +13,8 @@
var/current_heat_capacity = 50000 //totally random
/obj/machinery/atmospherics/unary/cold_sink/update_icon()
..()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
@@ -20,8 +22,6 @@
on = 0
return
/obj/machinery/atmospherics/unary/cold_sink/process_atmos()
..()
if(!on)
@@ -9,12 +9,12 @@
var/update_cycle
/obj/machinery/atmospherics/unary/generator_input/update_icon()
..()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
return
/obj/machinery/atmospherics/unary/generator_input/proc/return_exchange_air()
return air_contents
@@ -13,13 +13,13 @@
burn_state = LAVA_PROOF
/obj/machinery/atmospherics/unary/heat_exchanger/update_icon()
..()
if(node)
icon_state = "intact"
else
icon_state = "exposed"
return
/obj/machinery/atmospherics/unary/heat_exchanger/atmos_init()
if(!partner)
var/partner_connect = turn(dir,180)
@@ -13,6 +13,8 @@
var/current_heat_capacity = 50000 //totally random
/obj/machinery/atmospherics/unary/heat_reservoir/update_icon()
..()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
@@ -20,8 +22,6 @@
on = 0
return
/obj/machinery/atmospherics/unary/heat_reservoir/process_atmos()
..()
if(!on)
@@ -2,7 +2,7 @@
icon = 'icons/atmos/injector.dmi'
icon_state = "map_injector"
use_power = IDLE_POWER_USE
layer = 3
layer = GAS_SCRUBBER_LAYER
can_unwrench = 1
@@ -38,6 +38,8 @@
return ..()
/obj/machinery/atmospherics/unary/outlet_injector/update_icon()
..()
if(!powered())
icon_state = "off"
else
@@ -14,6 +14,8 @@
var/oxygen_content = 10
/obj/machinery/atmospherics/unary/oxygen_generator/update_icon()
..()
if(node)
icon_state = "intact_[on?("on"):("off")]"
else
@@ -21,8 +23,6 @@
on = 0
return
/obj/machinery/atmospherics/unary/oxygen_generator/New()
..()
@@ -6,7 +6,7 @@
desc = "For connecting portables devices related to atmospherics control."
can_unwrench = 1
layer = 2.4
layer = GAS_FILTER_LAYER
var/obj/machinery/portable_atmospherics/connected_device
@@ -18,6 +18,7 @@
return ..()
/obj/machinery/atmospherics/unary/portables_connector/update_icon()
..()
icon_state = "connector"
/obj/machinery/atmospherics/unary/portables_connector/update_underlays()
@@ -11,10 +11,12 @@
desc = "Transfers heat to and from an area"
/obj/machinery/atmospherics/unary/thermal_plate/update_icon()
var/prefix=""
..()
var/prefix = ""
//var/suffix="_idle" // Also available: _heat, _cool
if(level == 1 && istype(loc, /turf/simulated))
prefix="h"
prefix = "h"
icon_state = "[prefix]off"
/obj/machinery/atmospherics/unary/thermal_plate/process_atmos()
@@ -10,6 +10,8 @@
desc = "Has a valve and pump attached to it"
use_power = IDLE_POWER_USE
layer = GAS_SCRUBBER_LAYER
can_unwrench = 1
var/open = 0
@@ -77,6 +79,10 @@
air_contents.volume = 1000
/obj/machinery/atmospherics/unary/vent_pump/update_icon(var/safety = 0)
..()
plane = FLOOR_PLANE
if(!check_icon_cache())
return
@@ -6,6 +6,7 @@
name = "air scrubber"
desc = "Has a valve and pump attached to it"
layer = GAS_SCRUBBER_LAYER
use_power = IDLE_POWER_USE
idle_power_usage = 10
@@ -91,6 +92,10 @@
return 1
/obj/machinery/atmospherics/unary/vent_scrubber/update_icon(var/safety = 0)
..()
plane = FLOOR_PLANE
if(!check_icon_cache())
return
+2 -1
View File
@@ -4,7 +4,6 @@
icon = 'icons/atmos/pipes.dmi'
icon_state = "cap"
level = 2
layer = 2.4 //under wires with their 2.44
volume = 35
@@ -55,6 +54,8 @@
node.update_underlays()
/obj/machinery/atmospherics/pipe/cap/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
+2 -1
View File
@@ -14,7 +14,6 @@
var/obj/machinery/atmospherics/node3
level = 1
layer = 2.4 //under wires with their 2.44
/obj/machinery/atmospherics/pipe/manifold/New()
@@ -116,6 +115,8 @@
node3.update_underlays()
/obj/machinery/atmospherics/pipe/manifold/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
+2 -1
View File
@@ -15,7 +15,6 @@
var/obj/machinery/atmospherics/node4
level = 1
layer = 2.4 //under wires with their 2.44
/obj/machinery/atmospherics/pipe/manifold4w/New()
..()
@@ -90,6 +89,8 @@
node4.update_underlays()
/obj/machinery/atmospherics/pipe/manifold4w/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
-1
View File
@@ -3,7 +3,6 @@
var/datum/pipeline/parent
var/volume = 0
force = 20
layer = 2.4 //under wires with their 2.44
use_power = NO_POWER_USE
can_unwrench = 1
var/alert_pressure = 80*ONE_ATMOSPHERE //minimum pressure before check_pressure(...) should be called
@@ -137,6 +137,8 @@
node2.update_underlays()
/obj/machinery/atmospherics/pipe/simple/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
@@ -28,6 +28,8 @@
icon_state = "map_universal"
/obj/machinery/atmospherics/pipe/simple/hidden/universal/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
@@ -39,6 +39,8 @@
icon_state = "map_universal"
/obj/machinery/atmospherics/pipe/simple/visible/universal/update_icon(var/safety = 0)
..()
if(!check_icon_cache())
return
-6
View File
@@ -52,12 +52,6 @@
#define GRAB_UPGRADING 4
#define GRAB_KILL 5
//Hostile Mob AI Status
#define AI_ON 1
#define AI_IDLE 2
#define AI_OFF 3
//Attack types for checking shields/hit reactions
#define MELEE_ATTACK 1
+1
View File
@@ -1,3 +1,4 @@
#define GAME_STATE_STARTUP 0
#define GAME_STATE_PREGAME 1
#define GAME_STATE_SETTING_UP 2
#define GAME_STATE_PLAYING 3
+6 -6
View File
@@ -8,12 +8,12 @@
#define TARGET_INVALID_EVENT 7
//gamemode istype helpers
#define GAMEMODE_IS_BLOB (ticker && istype(ticker.mode, /datum/game_mode/blob))
#define GAMEMODE_IS_CULT (ticker && istype(ticker.mode, /datum/game_mode/cult))
#define GAMEMODE_IS_HEIST (ticker && istype(ticker.mode, /datum/game_mode/heist))
#define GAMEMODE_IS_NUCLEAR (ticker && istype(ticker.mode, /datum/game_mode/nuclear))
#define GAMEMODE_IS_REVOLUTION (ticker && istype(ticker.mode, /datum/game_mode/revolution))
#define GAMEMODE_IS_WIZARD (ticker && istype(ticker.mode, /datum/game_mode/wizard))
#define GAMEMODE_IS_BLOB (SSticker && istype(SSticker.mode, /datum/game_mode/blob))
#define GAMEMODE_IS_CULT (SSticker && istype(SSticker.mode, /datum/game_mode/cult))
#define GAMEMODE_IS_HEIST (SSticker && istype(SSticker.mode, /datum/game_mode/heist))
#define GAMEMODE_IS_NUCLEAR (SSticker && istype(SSticker.mode, /datum/game_mode/nuclear))
#define GAMEMODE_IS_REVOLUTION (SSticker && istype(SSticker.mode, /datum/game_mode/revolution))
#define GAMEMODE_IS_WIZARD (SSticker && istype(SSticker.mode, /datum/game_mode/wizard))
//special roles
// Distinct from the ROLE_X defines because some antags have multiple special roles but only one ban type
+24 -16
View File
@@ -6,7 +6,9 @@
#define PLANE_SPACE -95
#define PLANE_SPACE_PARALLAX -90
#define GAME_PLANE 0
#define FLOOR_PLANE -2
#define GAME_PLANE -1
#define BLACKNESS_PLANE 0 //To keep from conflicts with SEE_BLACKNESS internals
#define SPACE_LAYER 1.8
//#define TURF_LAYER 2 //For easy recordkeeping; this is a byond define
@@ -83,23 +85,29 @@
#define ABOVE_LIGHTING_PLANE 16
#define ABOVE_LIGHTING_LAYER 16
#define BYOND_LIGHTING_PLANE 17
#define BYOND_LIGHTING_LAYER 17
#define FLOOR_OPENSPACE_PLANE 17
#define OPENSPACE_LAYER 17
#define BYOND_LIGHTING_PLANE 18
#define BYOND_LIGHTING_LAYER 18
#define CAMERA_STATIC_PLANE 19
#define CAMERA_STATIC_LAYER 19
//HUD layer defines
#define FULLSCREEN_PLANE 18
#define FLASH_LAYER 18
#define FULLSCREEN_LAYER 18.1
#define UI_DAMAGE_LAYER 18.2
#define BLIND_LAYER 18.3
#define CRIT_LAYER 18.4
#define CURSE_LAYER 18.5
#define FULLSCREEN_PLANE 20
#define FLASH_LAYER 20
#define FULLSCREEN_LAYER 20.1
#define UI_DAMAGE_LAYER 20.2
#define BLIND_LAYER 20.3
#define CRIT_LAYER 20.4
#define CURSE_LAYER 20.5
#define HUD_PLANE 19
#define HUD_LAYER 19
#define ABOVE_HUD_PLANE 20
#define ABOVE_HUD_LAYER 20
#define HUD_PLANE 21
#define HUD_LAYER 21
#define ABOVE_HUD_PLANE 22
#define ABOVE_HUD_LAYER 22
#define SPLASHSCREEN_LAYER 21
#define SPLASHSCREEN_PLANE 21
#define SPLASHSCREEN_LAYER 23
#define SPLASHSCREEN_PLANE 23
+81 -31
View File
@@ -1,42 +1,92 @@
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
//Bay lighting engine shit, not in /code/modules/lighting because BYOND is being shit about it
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
#define LIGHTING_ICON 'icons/effects/lighting_overlay.dmi' // icon used for lighting shading effects
#define MINIMUM_USEFUL_LIGHT_RANGE 1.4
#define LIGHTING_ROUND_VALUE (1 / 128) //Value used to round lumcounts, values smaller than 1/255 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
#define LIGHTING_ROUND_VALUE (1 / 64) //Value used to round lumcounts, values smaller than 1/129 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays.
#define LIGHTING_ICON 'icons/effects/lighting_object.dmi' // icon used for lighting shading effects
// If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting objects.
// Set to zero to disable soft lighting. Luminosity changes then work if it's lit at all.
#define LIGHTING_SOFT_THRESHOLD 0
// If I were you I'd leave this alone.
#define LIGHTING_BASE_MATRIX \
list \
( \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
1, 1, 1, 0, \
0, 0, 0, 1 \
) \
// Helpers so we can (more easily) control the colour matrices.
#define CL_MATRIX_RR 1
#define CL_MATRIX_RG 2
#define CL_MATRIX_RB 3
#define CL_MATRIX_RA 4
#define CL_MATRIX_GR 5
#define CL_MATRIX_GG 6
#define CL_MATRIX_GB 7
#define CL_MATRIX_GA 8
#define CL_MATRIX_BR 9
#define CL_MATRIX_BG 10
#define CL_MATRIX_BB 11
#define CL_MATRIX_BA 12
#define CL_MATRIX_AR 13
#define CL_MATRIX_AG 14
#define CL_MATRIX_AB 15
#define CL_MATRIX_AA 16
#define CL_MATRIX_CR 17
#define CL_MATRIX_CG 18
#define CL_MATRIX_CB 19
#define CL_MATRIX_CA 20
//Some defines to generalise colours used in lighting.
//Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated
#define LIGHT_COLOR_WHITE "#FFFFFF"
#define LIGHT_COLOR_RED "#FA8282" //Warm but extremely diluted red. rgb(250, 130, 130)
#define LIGHT_COLOR_GREEN "#64C864" //Bright but quickly dissipating neon green. rgb(100, 200, 100)
#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250)
#define LIGHT_COLOR_BLUEGREEN "#7DE1AF" //Light blueish green. rgb(125, 225, 175)
#define LIGHT_COLOR_CYAN "#7DE1E1" //Diluted cyan. rgb(125, 225, 225)
#define LIGHT_COLOR_LIGHT_CYAN "#40CEFF" //More-saturated cyan. rgb(64, 206, 255)
#define LIGHT_COLOR_DARK_BLUE "#6496FA" //Saturated blue. rgb(51, 117, 248)
#define LIGHT_COLOR_PINK "#E17DE1" //Diluted, mid-warmth pink. rgb(225, 125, 225)
#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125)
#define LIGHT_COLOR_BROWN "#966432" //Clear brown, mostly dim. rgb(150, 100, 50)
#define LIGHT_COLOR_ORANGE "#FA9632" //Mostly pure orange. rgb(250, 150, 50)
#define LIGHT_COLOR_PURPLE "#952CF4" //Light Purple. rgb(149, 44, 244)
#define LIGHT_COLOR_LAVENDER "#9B51FF" //Less-saturated light purple. rgb(155, 81, 255)
#define LIGHT_COLOR_HOLY_MAGIC "#FFF743" //slightly desaturated bright yellow.
#define LIGHT_COLOR_BLOOD_MAGIC "#D00000" //deep crimson
#define LIGHT_COLOR_PURE_CYAN "#00FFFF"
#define LIGHT_COLOR_DARKRED "#A91515"
#define LIGHT_COLOR_PURE_RED "#FF0000"
#define LIGHT_COLOR_DARKGREEN "#50AB00"
#define LIGHT_COLOR_PURE_GREEN "#00FF00"
#define LIGHT_COLOR_LIGHTBLUE "#0099FF"
#define LIGHT_COLOR_DARKBLUE "#315AB4"
#define LIGHT_COLOR_PURE_BLUE "#0000FF"
#define LIGHT_COLOR_FADEDPURPLE "#A97FAA"
//These ones aren't a direct colour like the ones above, because nothing would fit
#define LIGHT_COLOR_FIRE "#FAA019" //Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
#define LIGHT_COLOR_LAVA "#C48A18" //Very warm yellow, leaning slightly towards orange. rgb(196, 138, 24)
#define LIGHT_COLOR_FLARE "#FA644B" //Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B" //Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
#define LIGHT_RANGE_FIRE 3 //How many tiles standard fires glow.
#define LIGHTING_PLANE_ALPHA_VISIBLE 255
#define LIGHTING_PLANE_ALPHA_NV_TRAIT 245
#define LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE 192
#define LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE 128 //For lighting alpha, small amounts lead to big changes. even at 128 its hard to figure out what is dark and what is light, at 64 you almost can't even tell.
#define LIGHTING_PLANE_ALPHA_INVISIBLE 0
//lighting area defines
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
#define DYNAMIC_LIGHTING_FORCED 2 //dynamic lighting enabled even if the area doesn't require power
#define DYNAMIC_LIGHTING_IFSTARLIGHT 3 //dynamic lighting enabled only if starlight is.
#define IS_DYNAMIC_LIGHTING(A) A.dynamic_lighting
//code assumes higher numbers override lower numbers.
#define LIGHTING_NO_UPDATE 0
#define LIGHTING_VIS_UPDATE 1
#define LIGHTING_CHECK_UPDATE 2
#define LIGHTING_FORCE_UPDATE 3
#define FLASH_LIGHT_DURATION 2
#define FLASH_LIGHT_POWER 3
#define FLASH_LIGHT_RANGE 3.8
+46 -61
View File
@@ -114,33 +114,6 @@
#define CHRISTMAS "Christmas"
#define FRIDAY_13TH "Friday the 13th"
//Light color defs, for light-emitting things
//Some defs may be pure color- this is for neatness, and configurability. Changing #define COLOR_ is a bad idea.
#define LIGHT_COLOR_CYAN "#7BF9FF"
#define LIGHT_COLOR_PURE_CYAN "#00FFFF"
#define LIGHT_COLOR_RED "#B40000"
#define LIGHT_COLOR_ORANGE "#FF9933"
#define LIGHT_COLOR_DARKRED "#A91515"
#define LIGHT_COLOR_PURE_RED "#FF0000"
#define LIGHT_COLOR_GREEN "#00CC00"
#define LIGHT_COLOR_DARKGREEN "#50AB00"
#define LIGHT_COLOR_PURE_GREEN "#00FF00"
#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250)
#define LIGHT_COLOR_LIGHTBLUE "#0099FF"
#define LIGHT_COLOR_DARKBLUE "#315AB4"
#define LIGHT_COLOR_PURE_BLUE "#0000FF"
#define LIGHT_COLOR_FADEDPURPLE "#A97FAA"
#define LIGHT_COLOR_PURPLE "#CD00CD"
#define LIGHT_COLOR_PINK "#FF33CC"
#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125)
#define LIGHT_COLOR_WHITE "#FFFFFF"
#define RESIZE_DEFAULT_SIZE 1
//transfer_ai() defines. Main proc in ai_core.dm
@@ -208,33 +181,34 @@
#define MFOAM_IRON 2
//Human Overlays Indexes/////////
#define BODY_LAYER 37
#define MUTANTRACE_LAYER 36
#define TAIL_UNDERLIMBS_LAYER 35 //Tail split-rendering.
#define LIMBS_LAYER 34
#define INTORGAN_LAYER 33
#define MARKINGS_LAYER 32
#define UNDERWEAR_LAYER 31
#define MUTATIONS_LAYER 30
#define H_DAMAGE_LAYER 29
#define UNIFORM_LAYER 28
#define ID_LAYER 27
#define SHOES_LAYER 26
#define GLOVES_LAYER 25
#define EARS_LAYER 24
#define SUIT_LAYER 23
#define BELT_LAYER 22 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 21
#define BACK_LAYER 20
#define HEAD_ACCESSORY_LAYER 19
#define FHAIR_LAYER 18
#define GLASSES_LAYER 17
#define HAIR_LAYER 16 //TODO: make part of head layer?
#define HEAD_ACC_OVER_LAYER 15 //Select-layer rendering.
#define FHAIR_OVER_LAYER 14 //Select-layer rendering.
#define GLASSES_OVER_LAYER 13 //Select-layer rendering.
#define TAIL_LAYER 12 //bs12 specific. this hack is probably gonna come back to haunt me
#define FACEMASK_LAYER 11
#define BODY_LAYER 38
#define MUTANTRACE_LAYER 37
#define TAIL_UNDERLIMBS_LAYER 36 //Tail split-rendering.
#define LIMBS_LAYER 35
#define INTORGAN_LAYER 34
#define MARKINGS_LAYER 33
#define UNDERWEAR_LAYER 32
#define MUTATIONS_LAYER 31
#define H_DAMAGE_LAYER 30
#define UNIFORM_LAYER 29
#define ID_LAYER 28
#define SHOES_LAYER 27
#define GLOVES_LAYER 26
#define EARS_LAYER 25
#define SUIT_LAYER 24
#define BELT_LAYER 23 //Possible make this an overlay of somethign required to wear a belt?
#define SUIT_STORE_LAYER 22
#define BACK_LAYER 21
#define HEAD_ACCESSORY_LAYER 20
#define FHAIR_LAYER 19
#define GLASSES_LAYER 18
#define HAIR_LAYER 17 //TODO: make part of head layer?
#define HEAD_ACC_OVER_LAYER 16 //Select-layer rendering.
#define FHAIR_OVER_LAYER 15 //Select-layer rendering.
#define GLASSES_OVER_LAYER 14 //Select-layer rendering.
#define TAIL_LAYER 13 //bs12 specific. this hack is probably gonna come back to haunt me
#define FACEMASK_LAYER 12
#define OVER_MASK_LAYER 11 //Select-layer rendering.
#define HEAD_LAYER 10
#define COLLAR_LAYER 9
#define HANDCUFF_LAYER 8
@@ -245,7 +219,7 @@
#define FIRE_LAYER 3 //If you're on fire
#define MISC_LAYER 2
#define FROZEN_LAYER 1
#define TOTAL_LAYERS 37
#define TOTAL_LAYERS 38
///Access Region Codes///
#define REGION_ALL 0
@@ -303,7 +277,7 @@
#define TRIGGER_GUARD_NORMAL 1
// Macro to get the current elapsed round time, rather than total world runtime
#define ROUND_TIME (round_start_time ? (world.time - round_start_time) : 0)
#define ROUND_TIME (SSticker.round_start_time ? (world.time - SSticker.round_start_time) : 0)
// Macro that returns true if it's too early in a round to freely ghost out
#define TOO_EARLY_TO_GHOST (config && (ROUND_TIME < (config.round_abandon_penalty_period)))
@@ -318,10 +292,8 @@
#define SHELTER_DEPLOY_BAD_AREA "bad area"
#define SHELTER_DEPLOY_ANCHORED_OBJECTS "anchored objects"
// Client donator levels
#define DONATOR_LEVEL_NONE 0
#define DONATOR_LEVEL_ONE 1
#define DONATOR_LEVEL_TWO 2
// Maximum donation level
#define DONATOR_LEVEL_MAX 4
// The cooldown on OOC messages such as OOC, LOOC, praying and adminhelps
#define OOC_COOLDOWN 5
@@ -401,4 +373,17 @@
#define GHOST_ORBIT_TRIANGLE "triangle"
#define GHOST_ORBIT_HEXAGON "hexagon"
#define GHOST_ORBIT_SQUARE "square"
#define GHOST_ORBIT_PENTAGON "pentagon"
#define GHOST_ORBIT_PENTAGON "pentagon"
// Filters
#define FILTER_AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA")
//Fullscreen overlay resolution in tiles.
#define FULLSCREEN_OVERLAY_RESOLUTION_X 15
#define FULLSCREEN_OVERLAY_RESOLUTION_Y 15
//suit sensors: sensor_mode defines
#define SENSOR_OFF 0
#define SENSOR_LIVING 1
#define SENSOR_VITALS 2
#define SENSOR_COORDS 3
+7
View File
@@ -94,6 +94,13 @@
#define APPEARANCE_ALL_BODY APPEARANCE_ALL_HAIR|APPEARANCE_HEAD_ACCESSORY|APPEARANCE_MARKINGS|APPEARANCE_BODY_ACCESSORY|APPEARANCE_ALT_HEAD
#define APPEARANCE_ALL 32767
//If you add a new status, be sure to add a list for it to the simple_animals global in _globalvars/lists/mobs.dm
//Hostile Mob AI Status
#define AI_ON 1
#define AI_IDLE 2
#define AI_OFF 3
#define AI_Z_OFF 4
// Intents
#define INTENT_HELP "help"
#define INTENT_DISARM "disarm"
+4 -2
View File
@@ -29,10 +29,12 @@
#define UI_DARKMODE 131072
#define DISABLE_KARMA 262144
#define CHAT_NO_MENTORTICKETLOGS 524288
#define TYPING_ONCE 1048576
#define AMBIENT_OCCLUSION 2097152
#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC)
#define TOGGLES_TOTAL 4194303 // If you add or remove a preference toggle above, make sure you update this define with the total value of the toggles combined.
#define TOGGLES_DEFAULT (CHAT_OOC|CHAT_DEAD|CHAT_GHOSTEARS|CHAT_GHOSTSIGHT|CHAT_PRAYER|CHAT_RADIO|CHAT_LOOC|MEMBER_PUBLIC|DONATOR_PUBLIC|AMBIENT_OCCLUSION)
// Admin attack logs filter system, see /proc/add_attack_logs and /proc/msg_admin_attack
#define ATKLOG_ALL 0
-23
View File
@@ -1,23 +0,0 @@
#define SNPC_MAX_RANGE_FIND 32
#define SNPC_MIN_RANGE_FIND 16
#define SNPC_FUZZY_CHANCE_HIGH 85
#define SNPC_FUZZY_CHANCE_LOW 50
#define SNPC_CHANCE_TALK 15
#define SNPC_BRUTE 1
#define SNPC_STEALTH 2
#define SNPC_MARTYR 3
#define SNPC_PSYCHO 4
#define SNPC_INTERACTING 2
#define SNPC_TRAVEL 4
#define SNPC_FIGHTING 8
#define SNPC_SPECIAL 16
#define TRAIT_ROBUST 2
#define TRAIT_UNROBUST 4
#define TRAIT_SMART 8
#define TRAIT_DUMB 16
#define TRAIT_MEAN 32
#define TRAIT_FRIENDLY 64
#define TRAIT_THIEVING 128
+1 -1
View File
@@ -150,7 +150,7 @@
// A logging proc that only outputs after setup is done, to
// help devs test initialization stuff that happens a lot
/proc/log_after_setup(var/message)
if(ticker && ticker.current_state > GAME_STATE_SETTING_UP)
if(SSticker && SSticker.current_state > GAME_STATE_SETTING_UP)
to_chat(world, "<span class='danger'>[message]</span>")
log_world(message)
+1 -1
View File
@@ -114,7 +114,7 @@
return
if(QDELETED(A))
return
if((A.smooth & SMOOTH_TRUE) || (A.smooth & SMOOTH_MORE))
if(A.smooth & (SMOOTH_TRUE | SMOOTH_MORE))
var/adjacencies = calculate_adjacencies(A)
if(A.smooth & SMOOTH_DIAGONAL)
+185 -141
View File
@@ -634,170 +634,214 @@ The _flatIcons list is a cache for generated icon files.
*/
// Creates a single icon from a given /atom or /image. Only the first argument is required.
/proc/getFlatIcon(image/A, defdir=2, deficon=null, defstate="", defblend=BLEND_DEFAULT)
// We start with a blank canvas, otherwise some icon procs crash silently
var/icon/flat = icon('icons/effects/effects.dmi', "icon_state"="nothing") // Final flattened icon
if(!A)
return flat
if(A.alpha <= 0)
return flat
/proc/getFlatIcon(image/A, defdir, deficon, defstate, defblend, start = TRUE, no_anim = FALSE)
//Define... defines.
var/static/icon/flat_template = icon('icons/effects/effects.dmi', "nothing")
#define BLANK icon(flat_template)
#define SET_SELF(SETVAR) do { \
var/icon/SELF_ICON=icon(icon(curicon, curstate, base_icon_dir),"",SOUTH,no_anim?1:null); \
if(A.alpha<255) { \
SELF_ICON.Blend(rgb(255,255,255,A.alpha),ICON_MULTIPLY);\
} \
if(A.color) { \
if(islist(A.color)){ \
SELF_ICON.MapColors(arglist(A.color))} \
else{ \
SELF_ICON.Blend(A.color,ICON_MULTIPLY)} \
} \
##SETVAR=SELF_ICON;\
} while (0)
#define INDEX_X_LOW 1
#define INDEX_X_HIGH 2
#define INDEX_Y_LOW 3
#define INDEX_Y_HIGH 4
#define flatX1 flat_size[INDEX_X_LOW]
#define flatX2 flat_size[INDEX_X_HIGH]
#define flatY1 flat_size[INDEX_Y_LOW]
#define flatY2 flat_size[INDEX_Y_HIGH]
#define addX1 add_size[INDEX_X_LOW]
#define addX2 add_size[INDEX_X_HIGH]
#define addY1 add_size[INDEX_Y_LOW]
#define addY2 add_size[INDEX_Y_HIGH]
if(!A || A.alpha <= 0)
return BLANK
var/noIcon = FALSE
if(start)
if(!defdir)
defdir = A.dir
if(!deficon)
deficon = A.icon
if(!defstate)
defstate = A.icon_state
if(!defblend)
defblend = A.blend_mode
var/curicon
if(A.icon)
curicon = A.icon
else
curicon = deficon
var/curicon = A.icon || deficon
var/curstate = A.icon_state || defstate
if(!curicon)
noIcon = TRUE // Do not render this object.
var/curstate
if(A.icon_state)
curstate = A.icon_state
else
curstate = defstate
if(!noIcon && !(curstate in icon_states(curicon)))
if("" in icon_states(curicon))
curstate = ""
else
noIcon = TRUE // Do not render this object.
if(!((noIcon = (!curicon))))
var/curstates = icon_states(curicon)
if(!(curstate in curstates))
if("" in curstates)
curstate = ""
else
noIcon = TRUE // Do not render this object.
var/curdir
if(A.dir != 2)
curdir = A.dir
else
var/base_icon_dir //We'll use this to get the icon state to display if not null BUT NOT pass it to overlays as the dir we have
//These should use the parent's direction (most likely)
if(!A.dir || A.dir == SOUTH)
curdir = defdir
var/curblend
if(A.blend_mode == BLEND_DEFAULT)
curblend = defblend
else
curblend = A.blend_mode
curdir = A.dir
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/image/copy
// Add the atom's icon itself, without pixel_x/y offsets.
if(!noIcon)
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=curdir)
copy.color = A.color
copy.alpha = A.alpha
copy.blend_mode = curblend
layers[copy] = A.layer
// Loop through the underlays, then overlays, sorting them into the layers list
var/list/process = A.underlays // Current list being processed
var/pSet=0 // Which list is being processed: 0 = underlays, 1 = overlays
var/curIndex=1 // index of 'current' in list being processed
var/current // Current overlay being sorted
var/currentLayer // Calculated layer that overlay appears on (special case for FLOAT_LAYER)
var/compare // The overlay 'add' is being compared against
var/cmpIndex // The index in the layers list of 'compare'
while(TRUE)
if(curIndex<=process.len)
current = process[curIndex]
if(!current)
curIndex++ //Skip this bad layer item
continue
currentLayer = current:layer
if(currentLayer<0) // Special case for FLY_LAYER
if(currentLayer <= -1000) return flat
if(pSet == 0) // Underlay
currentLayer = A.layer+currentLayer/1000
else // Overlay
currentLayer = A.layer+(1000+currentLayer)/1000
// Sort add into layers list
for(cmpIndex=1,cmpIndex<=layers.len,cmpIndex++)
compare = layers[cmpIndex]
if(currentLayer < layers[compare]) // Associated value is the calculated layer
layers.Insert(cmpIndex,current)
layers[current] = currentLayer
break
if(cmpIndex>layers.len) // Reached end of list without inserting
layers[current]=currentLayer // Place at end
curIndex++
if(curIndex>process.len)
if(pSet == 0) // Switch to overlays
curIndex = 1
pSet = 1
process = A.overlays
else // All done
//Try to remove/optimize this section ASAP, CPU hog.
//Determines if there's directionals.
if(!noIcon && curdir != SOUTH)
var/exist = FALSE
var/static/list/checkdirs = list(NORTH, EAST, WEST)
for(var/i in checkdirs) //Not using GLOB for a reason.
if(length(icon_states(icon(curicon, curstate, i))))
exist = TRUE
break
if(!exist)
base_icon_dir = SOUTH
//
var/icon/add // Icon of overlay being added
if(!base_icon_dir)
base_icon_dir = curdir
// Current dimensions of flattened icon
var/flatX1 = 1
var/flatX2 = flat.Width()
var/flatY1 = 1
var/flatY2 = flat.Height()
// Dimensions of overlay being added
var/addX1
var/addX2
var/addY1
var/addY2
ASSERT(!BLEND_DEFAULT) //I might just be stupid but lets make sure this define is 0.
for(var/I in layers)
var/curblend = A.blend_mode || defblend
if(I:alpha == 0)
continue
if(A.overlays.len || A.underlays.len)
var/icon/flat = BLANK
// Layers will be a sorted list of icons/overlays, based on the order in which they are displayed
var/list/layers = list()
var/image/copy
// Add the atom's icon itself, without pixel_x/y offsets.
if(!noIcon)
copy = image(icon=curicon, icon_state=curstate, layer=A.layer, dir=base_icon_dir)
copy.color = A.color
copy.alpha = A.alpha
copy.blend_mode = curblend
layers[copy] = A.layer
if(I == copy) // 'I' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(I:icon, I:icon_state, I:dir)
// This checks for a silent failure mode of the icon routine. If the requested dir
// doesn't exist in this icon state it returns a 32x32 icon with 0 alpha.
if(I:dir != SOUTH && add.Width() == 32 && add.Height() == 32)
// Check every pixel for blank (computationally expensive, but the process is limited
// by the amount of film on the station, only happens when we hit something that's
// turned, and bails at the very first pixel it sees.
var/blankpixel;
for(var/y;y<=32;y++)
for(var/x;x<32;x++)
blankpixel = isnull(add.GetPixel(x,y))
if(!blankpixel)
break
if(!blankpixel)
// Loop through the underlays, then overlays, sorting them into the layers list
for(var/process_set in 0 to 1)
var/list/process = process_set? A.overlays : A.underlays
for(var/i in 1 to process.len)
var/image/current = process[i]
if(!current)
continue
if(current.plane != FLOAT_PLANE && current.plane != A.plane)
continue
var/current_layer = current.layer
if(current_layer < 0)
if(current_layer <= -1000)
return flat
current_layer = process_set + A.layer + current_layer / 1000
for(var/p in 1 to layers.len)
var/image/cmp = layers[p]
if(current_layer < layers[cmp])
layers.Insert(p, current)
break
// If we ALWAYS returned a null (which happens when GetPixel encounters something with alpha 0)
if(blankpixel)
// Pull the default direction.
add = icon(I:icon, I:icon_state)
else // 'I' is an appearance object.
add = getFlatIcon(new/image(I), curdir, curicon, curstate, curblend)
layers[current] = current_layer
// Find the new dimensions of the flat icon to fit the added overlay
addX1 = min(flatX1, I:pixel_x+1)
addX2 = max(flatX2, I:pixel_x+add.Width())
addY1 = min(flatY1, I:pixel_y+1)
addY2 = max(flatY2, I:pixel_y+add.Height())
//sortTim(layers, /proc/cmp_image_layer_asc)
if(addX1!=flatX1 || addX2!=flatX2 || addY1!=flatY1 || addY2!=flatY2)
// Resize the flattened icon so the new icon fits
flat.Crop(addX1-flatX1+1, addY1-flatY1+1, addX2-flatX1+1, addY2-flatY1+1)
flatX1=addX1;flatX2=addX2
flatY1=addY1;flatY2=addY2
var/icon/add // Icon of overlay being added
// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), I:pixel_x + 2 - flatX1, I:pixel_y + 2 - flatY1)
// Current dimensions of flattened icon
var/list/flat_size = list(1, flat.Width(), 1, flat.Height())
// Dimensions of overlay being added
var/list/add_size[4]
if(A.color)
flat.Blend(A.color, ICON_MULTIPLY)
if(A.alpha < 255)
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
for(var/V in layers)
var/image/I = V
if(I.alpha == 0)
continue
return icon(flat, "", SOUTH)
if(I == copy) // 'I' is an /image based on the object being flattened.
curblend = BLEND_OVERLAY
add = icon(I.icon, I.icon_state, base_icon_dir)
else // 'I' is an appearance object.
add = getFlatIcon(image(I), curdir, curicon, curstate, curblend, FALSE, no_anim)
if(!add)
continue
// Find the new dimensions of the flat icon to fit the added overlay
add_size = list(
min(flatX1, I.pixel_x+1),
max(flatX2, I.pixel_x+add.Width()),
min(flatY1, I.pixel_y+1),
max(flatY2, I.pixel_y+add.Height())
)
if(flat_size ~! add_size)
// Resize the flattened icon so the new icon fits
flat.Crop(
addX1 - flatX1 + 1,
addY1 - flatY1 + 1,
addX2 - flatX1 + 1,
addY2 - flatY1 + 1
)
flat_size = add_size.Copy()
// Blend the overlay into the flattened icon
flat.Blend(add, blendMode2iconMode(curblend), I.pixel_x + 2 - flatX1, I.pixel_y + 2 - flatY1)
if(A.color)
if(islist(A.color))
flat.MapColors(arglist(A.color))
else
flat.Blend(A.color, ICON_MULTIPLY)
if(A.alpha < 255)
flat.Blend(rgb(255, 255, 255, A.alpha), ICON_MULTIPLY)
if(no_anim)
//Clean up repeated frames
var/icon/cleaned = new /icon()
cleaned.Insert(flat, "", SOUTH, 1, 0)
. = cleaned
else
. = icon(flat, "", SOUTH)
else //There's no overlays.
if(!noIcon)
SET_SELF(.)
//Clear defines
#undef flatX1
#undef flatX2
#undef flatY1
#undef flatY2
#undef addX1
#undef addX2
#undef addY1
#undef addY2
#undef INDEX_X_LOW
#undef INDEX_X_HIGH
#undef INDEX_Y_LOW
#undef INDEX_Y_HIGH
#undef BLANK
#undef SET_SELF
/proc/getIconMask(atom/A)//By yours truly. Creates a dynamic mask for a mob/whatever. /N
var/icon/alpha_mask = new(A.icon,A.icon_state)//So we want the default icon and icon state of A.
for(var/I in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
if(I:layer>A.layer) continue//If layer is greater than what we need, skip it.
var/icon/image_overlay = new(I:icon,I:icon_state)//Blend only works with icon objects.
for(var/V in A.overlays)//For every image in overlays. var/image/I will not work, don't try it.
var/image/I = V
if(I.layer>A.layer)
continue//If layer is greater than what we need, skip it.
var/icon/image_overlay = new(I.icon,I.icon_state)//Blend only works with icon objects.
//Also, icons cannot directly set icon_state. Slower than changing variables but whatever.
alpha_mask.Blend(image_overlay,ICON_OR)//OR so they are lumped together in a nice overlay.
return alpha_mask//And now return the mask.
+11 -4
View File
@@ -124,9 +124,13 @@
. += A
//Like typesof() or subtypesof(), but returns a typecache instead of a list
/proc/typecacheof(path, ignore_root_path)
/proc/typecacheof(path, ignore_root_path, only_root_path = FALSE)
if(ispath(path))
var/list/types = ignore_root_path ? subtypesof(path) : typesof(path)
var/list/types = list()
if(only_root_path)
types = list(path)
else
types = ignore_root_path ? subtypesof(path) : typesof(path)
var/list/L = list()
for(var/T in types)
L[T] = TRUE
@@ -140,8 +144,11 @@
L[T] = TRUE
else
for(var/P in pathlist)
for(var/T in typesof(P))
L[T] = TRUE
if(only_root_path)
L[P] = TRUE
else
for(var/T in typesof(P))
L[T] = TRUE
return L
//Removes any null entries from the list
+2 -2
View File
@@ -112,8 +112,8 @@ var/syndicate_name = null
//Traitors and traitor silicons will get these. Revs will not.
var/syndicate_code_phrase//Code phrase for traitors.
var/syndicate_code_response//Code response for traitors.
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
/*
Should be expanded.
+2 -2
View File
@@ -35,7 +35,7 @@
* If you want to display the canonical station "time" (aka the in-character time of the station) use station_time_timestamp
*/
/proc/classic_worldtime2text(time = world.time)
time = (round_start_time ? (time - round_start_time) : (time - world.time))
time = (SSticker.round_start_time ? (time - SSticker.round_start_time) : (time - world.time))
return "[round(time / 36000)+12]:[(time / 600 % 60) < 10 ? add_zero(time / 600 % 60, 1) : time / 600 % 60]"
//Returns the world time in english
@@ -59,7 +59,7 @@
- You can use this, for example, to do "This will expire at [station_time_at(world.time + 500)]" to display a "station time" expiration date
which is much more useful for a player)*/
/proc/station_time(time=world.time, display_only=FALSE)
return ((((time - round_start_time)) + GLOB.gametime_offset) % 864000) - (display_only ? GLOB.timezoneOffset : 0)
return ((((time - SSticker.round_start_time)) + GLOB.gametime_offset) % 864000) - (display_only ? GLOB.timezoneOffset : 0)
/proc/station_time_timestamp(format = "hh:mm:ss", time=world.time)
return time2text(station_time(time, TRUE), format)
+14
View File
@@ -2029,3 +2029,17 @@ var/mob/dview/dview_mob = new
/proc/pass()
return
/proc/params2turf(scr_loc, turf/origin, client/C)
if(!scr_loc)
return null
var/tX = splittext(scr_loc, ",")
var/tY = splittext(tX[2], ":")
var/tZ = origin.z
tY = tY[1]
tX = splittext(tX[1], ":")
tX = tX[1]
var/list/actual_view = getviewsize(C ? C.view : world.view)
tX = Clamp(origin.x + text2num(tX) - round(actual_view[1] / 2) - 1, 1, world.maxx)
tY = Clamp(origin.y + text2num(tY) - round(actual_view[2] / 2) - 1, 1, world.maxy)
return locate(tX, tY, tZ)
+1 -2
View File
@@ -22,8 +22,7 @@ GLOBAL_LIST_INIT(living_mob_list, list()) //List of all alive mobs, including
GLOBAL_LIST_INIT(dead_mob_list, list()) //List of all dead mobs, including clientless. Excludes /mob/new_player
GLOBAL_LIST_INIT(respawnable_list, list()) //List of all mobs, dead or in mindless creatures that still be respawned.
GLOBAL_LIST_INIT(non_respawnable_keys, list()) //List of ckeys that are excluded from respawning for remainder of round.
GLOBAL_LIST_INIT(simple_animal_list, list()) //List of all simple animals, including clientless
GLOBAL_LIST_INIT(snpc_list, list()) //List of all snpc's, including clientless
GLOBAL_LIST_INIT(simple_animals, list(list(), list(), list(), list())) //One for each AI_* status define, List of all simple animals, including clientless
GLOBAL_LIST_INIT(bots_list, list()) //List of all bots(beepsky, medibots,etc)
GLOBAL_LIST_INIT(med_hud_users, list())
+4 -1
View File
@@ -83,4 +83,7 @@ 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
var/copier_items_printed_logged = FALSE
GLOBAL_VAR(map_name) // Self explanatory
+2 -3
View File
@@ -1,3 +1,2 @@
var/global/datum/datacore/data_core = null
var/map_name = "Unknown" //The name of the map that is loaded. Assigned in world/New()
// TODO: Move this to be not in its own fucking file all alone on its own
var/global/datum/datacore/data_core = null
+20 -2
View File
@@ -403,7 +403,25 @@
icon_state = "passage0"
plane = CLICKCATCHER_PLANE
mouse_opacity = MOUSE_OPACITY_OPAQUE
screen_loc = "CENTER-7,CENTER-7"
screen_loc = "CENTER"
#define MAX_SAFE_BYOND_ICON_SCALE_TILES (MAX_SAFE_BYOND_ICON_SCALE_PX / world.icon_size)
#define MAX_SAFE_BYOND_ICON_SCALE_PX (33 * 32) //Not using world.icon_size on purpose.
/obj/screen/click_catcher/proc/UpdateGreed(view_size_x = 15, view_size_y = 15)
var/icon/newicon = icon('icons/mob/screen_gen.dmi', "catcher")
var/ox = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_x)
var/oy = min(MAX_SAFE_BYOND_ICON_SCALE_TILES, view_size_y)
var/px = view_size_x * world.icon_size
var/py = view_size_y * world.icon_size
var/sx = min(MAX_SAFE_BYOND_ICON_SCALE_PX, px)
var/sy = min(MAX_SAFE_BYOND_ICON_SCALE_PX, py)
newicon.Scale(sx, sy)
icon = newicon
screen_loc = "CENTER-[(ox-1)*0.5],CENTER-[(oy-1)*0.5]"
var/matrix/M = new
M.Scale(px/sx, py/sy)
transform = M
/obj/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
@@ -411,6 +429,6 @@
var/mob/living/carbon/C = usr
C.swap_hand()
else
var/turf/T = screen_loc2turf(modifiers["screen-loc"], get_turf(usr))
var/turf/T = params2turf(modifiers["screen-loc"], get_turf(usr))
T.Click(location, control, params)
return 1
+3
View File
@@ -141,6 +141,9 @@
blobpwrdisplay.name = "blob power"
blobpwrdisplay.icon_state = "block"
blobpwrdisplay.screen_loc = ui_health
blobpwrdisplay.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
blobpwrdisplay.layer = ABOVE_HUD_LAYER
blobpwrdisplay.plane = ABOVE_HUD_PLANE
static_inventory += blobpwrdisplay
blobhealthdisplay = new /obj/screen()
-2
View File
@@ -40,7 +40,6 @@
using.icon = ui_style
using.icon_state = "swap_1"
using.screen_loc = ui_swaphand1
using.layer = 19
static_inventory += using
using = new /obj/screen/swap_hand()
@@ -48,7 +47,6 @@
using.icon = ui_style
using.icon_state = "swap_2"
using.screen_loc = ui_swaphand2
using.layer = 19
static_inventory += using
mymob.zone_sel = new /obj/screen/zone_sel()
+62 -16
View File
@@ -2,23 +2,21 @@
var/list/screens = list()
/mob/proc/overlay_fullscreen(category, type, severity)
var/obj/screen/fullscreen/screen
if(screens[category])
screen = screens[category]
if(screen.type != type)
clear_fullscreen(category, FALSE)
return .()
else if(!severity || severity == screen.severity)
return null
else
screen = new type
var/obj/screen/fullscreen/screen = screens[category]
if (!screen || screen.type != type)
// needs to be recreated
clear_fullscreen(category, FALSE)
screens[category] = screen = new type()
else if ((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view))
// doesn't need to be updated
return screen
screen.icon_state = "[initial(screen.icon_state)][severity]"
screen.severity = severity
screens[category] = screen
if(client)
if (client && screen.should_show_to(src))
screen.update_for_view(client.view)
client.screen += screen
return screen
/mob/proc/clear_fullscreen(category, animated = 10)
@@ -45,17 +43,38 @@
clear_fullscreen(category)
/datum/hud/proc/reload_fullscreen()
var/list/screens = mymob.screens
for(var/category in screens)
mymob.client.screen |= screens[category]
if(mymob.client)
var/obj/screen/fullscreen/screen
var/list/screens = mymob.screens
for(var/category in screens)
screen = screens[category]
if(screen.should_show_to(mymob))
screen.update_for_view(mymob.client.view)
mymob.client.screen |= screen
else
mymob.client.screen -= screen
/obj/screen/fullscreen
icon = 'icons/mob/screen_full.dmi'
icon_state = "default"
screen_loc = "CENTER-7,CENTER-7"
layer = FULLSCREEN_LAYER
plane = FULLSCREEN_PLANE
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
var/view = 7
var/severity = 0
var/show_when_dead = FALSE
/obj/screen/fullscreen/proc/update_for_view(client_view)
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
var/list/actualview = getviewsize(client_view)
view = client_view
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
/obj/screen/fullscreen/proc/should_show_to(mob/mymob)
if(!show_when_dead && mymob.stat == DEAD)
return FALSE
return TRUE
/obj/screen/fullscreen/Destroy()
severity = 0
@@ -100,6 +119,33 @@
screen_loc = "WEST,SOUTH to EAST,NORTH"
icon_state = "druggy"
/obj/screen/fullscreen/lighting_backdrop
icon = 'icons/mob/screen_gen.dmi'
icon_state = "flash"
transform = matrix(200, 0, 0, 0, 200, 0)
plane = LIGHTING_PLANE
blend_mode = BLEND_OVERLAY
show_when_dead = TRUE
//Provides darkness to the back of the lighting plane
/obj/screen/fullscreen/lighting_backdrop/lit
invisibility = INVISIBILITY_LIGHTING
layer = BACKGROUND_LAYER+21
color = "#000"
show_when_dead = TRUE
//Provides whiteness in case you don't see lights so everything is still visible
/obj/screen/fullscreen/lighting_backdrop/unlit
layer = BACKGROUND_LAYER+20
show_when_dead = TRUE
/obj/screen/fullscreen/see_through_darkness
icon_state = "nightvision"
plane = LIGHTING_PLANE
layer = LIGHTING_LAYER
blend_mode = BLEND_ADD
show_when_dead = TRUE
#undef FULLSCREEN_LAYER
#undef BLIND_LAYER
#undef CRIT_LAYER
+26 -4
View File
@@ -38,15 +38,23 @@
var/obj/screen/movable/action_button/hide_toggle/hide_actions_toggle
var/action_buttons_hidden = 0
var/list/obj/screen/plane_master/plane_masters = list() // see "appearance_flags" in the ref, assoc list of "[plane]" = object
/mob/proc/create_mob_hud()
if(client && !hud_used)
hud_used = new /datum/hud(src)
update_sight()
/datum/hud/New(mob/owner)
mymob = owner
hide_actions_toggle = new
hide_actions_toggle.InitialiseIcon(mymob)
for(var/mytype in subtypesof(/obj/screen/plane_master))
var/obj/screen/plane_master/instance = new mytype()
plane_masters["[instance.plane]"] = instance
instance.backdrop(mymob)
/datum/hud/Destroy()
if(mymob.hud_used == src)
mymob.hud_used = null
@@ -83,14 +91,16 @@
nightvisionicon = null
devilsouldisplay = null
QDEL_LIST_ASSOC_VAL(plane_masters)
mymob = null
return ..()
/datum/hud/proc/show_hud(version = 0)
if(!ismob(mymob))
return 0
return FALSE
if(!mymob.client)
return 0
return FALSE
mymob.client.screen = list()
@@ -162,13 +172,25 @@
mymob.update_action_buttons(1)
reorganize_alerts()
reload_fullscreen()
plane_masters_update()
/datum/hud/proc/plane_masters_update()
// Plane masters are always shown to OUR mob, never to observers
for(var/thing in plane_masters)
var/obj/screen/plane_master/PM = plane_masters[thing]
PM.backdrop(mymob)
mymob.client.screen += PM
/datum/hud/human/show_hud(version = 0)
..()
. = ..()
if(!.)
return
hidden_inventory_update()
/datum/hud/robot/show_hud(version = 0)
..()
. = ..()
if(!.)
return
update_robot_modules_display()
/datum/hud/proc/hidden_inventory_update()
+1
View File
@@ -83,6 +83,7 @@
/datum/hud/human/New(mob/living/carbon/human/owner, var/ui_style = 'icons/mob/screen_white.dmi', var/ui_color = "#ffffff", var/ui_alpha = 255)
..()
owner.overlay_fullscreen("see_through_darkness", /obj/screen/fullscreen/see_through_darkness)
var/obj/screen/using
var/obj/screen/inventory/inv_box
+1 -1
View File
@@ -1,7 +1,7 @@
/obj/screen/movable/pic_in_pic
name = "Picture-in-picture"
screen_loc = "CENTER"
plane = GAME_PLANE
plane = FLOOR_PLANE
var/atom/center
var/width = 0
var/height = 0
+53
View File
@@ -0,0 +1,53 @@
/obj/screen/plane_master
screen_loc = "CENTER"
icon_state = "blank"
appearance_flags = PLANE_MASTER|NO_CLIENT_COLOR
blend_mode = BLEND_OVERLAY
var/show_alpha = 255
var/hide_alpha = 0
/obj/screen/plane_master/proc/Show(override)
alpha = override || show_alpha
/obj/screen/plane_master/proc/Hide(override)
alpha = override || hide_alpha
/obj/screen/plane_master/proc/outline(_size, _color)
filters += filter(type = "outline", size = _size, color = _color)
/obj/screen/plane_master/proc/shadow(_size, _border, _offset = 0, _x = 0, _y = 0, _color = "#04080FAA")
filters += filter(type = "drop_shadow", x = _x, y = _y, color = _color, size = _size, offset = _offset, border = _border)
/obj/screen/plane_master/proc/clear_filters()
filters = list()
//Why do plane masters need a backdrop sometimes? Read http://www.byond.com/forum/?post=2141928
//Trust me, you need one. Period. If you don't think you do, you're doing something extremely wrong.
/obj/screen/plane_master/proc/backdrop(mob/mymob)
/obj/screen/plane_master/floor
name = "floor plane master"
plane = FLOOR_PLANE
appearance_flags = PLANE_MASTER
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world
name = "game world plane master"
plane = GAME_PLANE
appearance_flags = PLANE_MASTER //should use client color
blend_mode = BLEND_OVERLAY
/obj/screen/plane_master/game_world/backdrop(mob/mymob)
clear_filters()
if(istype(mymob) && mymob.client && mymob.client.prefs && (mymob.client.prefs.toggles & AMBIENT_OCCLUSION))
filters += FILTER_AMBIENT_OCCLUSION
/obj/screen/plane_master/lighting
name = "lighting plane master"
plane = LIGHTING_PLANE
blend_mode = BLEND_MULTIPLY
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/screen/plane_master/lighting/backdrop(mob/mymob)
mymob.overlay_fullscreen("lighting_backdrop_lit", /obj/screen/fullscreen/lighting_backdrop/lit)
mymob.overlay_fullscreen("lighting_backdrop_unlit", /obj/screen/fullscreen/lighting_backdrop/unlit)
+2 -2
View File
@@ -226,8 +226,8 @@
A.screen_loc = "CENTER[x]:16,SOUTH+[y]:7"
else
A.screen_loc = "CENTER+[x]:16,SOUTH+[y]:7"
A.layer = 20
A.plane = HUD_PLANE
A.layer = ABOVE_HUD_LAYER
A.plane = ABOVE_HUD_PLANE
x++
if(x == 4)
+5 -6
View File
@@ -9,9 +9,10 @@
/obj/screen
name = ""
icon = 'icons/mob/screen_gen.dmi'
layer = HUD_LAYER_SCREEN
layer = HUD_LAYER
plane = HUD_PLANE
unacidable = 1
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF
unacidable = TRUE
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
var/datum/hud/hud = null
appearance_flags = NO_CLIENT_COLOR
@@ -36,6 +37,8 @@
/obj/screen/close
name = "close"
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
/obj/screen/close/Click()
if(master)
@@ -47,7 +50,6 @@
/obj/screen/drop
name = "drop"
icon_state = "act_drop"
layer = 19
/obj/screen/drop/Click()
usr.drop_item_v()
@@ -143,7 +145,6 @@
name = "resist"
icon = 'icons/mob/screen_midnight.dmi'
icon_state = "act_resist"
layer = 19
/obj/screen/resist/Click()
if(isliving(usr))
@@ -327,7 +328,6 @@
/obj/screen/inventory
var/slot_id //The indentifier for the slot. It has nothing to do with ID cards.
var/list/object_overlays = list()
layer = 19
/obj/screen/inventory/MouseEntered()
..()
@@ -417,7 +417,6 @@
return 1
/obj/screen/swap_hand
layer = 19
name = "swap hand"
/obj/screen/swap_hand/Click()
+2 -2
View File
@@ -65,8 +65,8 @@ var/const/tk_maxrange = 15
flags = NOBLUDGEON | ABSTRACT | DROPDEL
//item_state = null
w_class = WEIGHT_CLASS_GIGANTIC
layer = 20
plane = HUD_PLANE
layer = ABOVE_HUD_LAYER
plane = ABOVE_HUD_PLANE
var/last_throw = 0
var/atom/movable/focus = null
-98
View File
@@ -1,98 +0,0 @@
/var/lighting_overlays_initialised = FALSE
/var/list/lighting_update_lights = list() // List of lighting sources queued for update.
/var/list/lighting_update_corners = list() // List of lighting corners queued for update.
/var/list/lighting_update_overlays = list() // List of lighting overlays queued for update.
/var/list/lighting_update_lights_old = list() // List of lighting sources currently being updated.
/var/list/lighting_update_corners_old = list() // List of lighting corners currently being updated.
/var/list/lighting_update_overlays_old = list() // List of lighting overlays currently being updated.
/datum/controller/process/lighting
// Queues of update counts, waiting to be rolled into stats lists
var/list/stats_queues = list(
"Source" = list(), "Corner" = list(), "Overlay" = list())
// Stats lists
var/list/stats_lists = list(
"Source" = list(), "Corner" = list(), "Overlay" = list())
var/update_stats_every = (1 SECONDS)
var/next_stats_update = 0
var/stat_updates_to_keep = 5
/datum/controller/process/lighting/setup()
name = "lighting"
schedule_interval = 0 // run as fast as you possibly can
sleep_interval = 10 // Yield every 10% of a tick
defer_usage = 80 // Defer at 80% of a tick
create_all_lighting_overlays()
lighting_overlays_initialised = TRUE
// Pre-process lighting once before the round starts. Wait 30 seconds so the away mission has time to load.
spawn(300)
doWork(1)
/datum/controller/process/lighting/doWork(roundstart)
lighting_update_lights_old = lighting_update_lights //We use a different list so any additions to the update lists during a delay from scheck() don't cause things to be cut from the list without being updated.
lighting_update_lights = list()
for(var/datum/light_source/L in lighting_update_lights_old)
if(L.check() || L.destroyed || L.force_update)
L.remove_lum()
if(!L.destroyed)
L.apply_lum()
else if(L.vis_update) //We smartly update only tiles that became (in) visible to use.
L.smart_vis_update()
L.vis_update = FALSE
L.force_update = FALSE
L.needs_update = FALSE
SCHECK
lighting_update_corners_old = lighting_update_corners //Same as above.
lighting_update_corners = list()
for(var/A in lighting_update_corners_old)
var/datum/lighting_corner/C = A
C.update_overlays()
C.needs_update = FALSE
SCHECK
lighting_update_overlays_old = lighting_update_overlays //Same as above.
lighting_update_overlays = list()
for(var/A in lighting_update_overlays_old)
var/atom/movable/lighting_overlay/O = A
O.update_overlay()
O.needs_update = 0
SCHECK
stats_queues["Source"] += lighting_update_lights_old.len
stats_queues["Corner"] += lighting_update_corners_old.len
stats_queues["Overlay"] += lighting_update_overlays_old.len
if(next_stats_update <= world.time)
next_stats_update = world.time + update_stats_every
for(var/stat_name in stats_queues)
var/stat_sum = 0
var/list/stats_queue = stats_queues[stat_name]
for(var/count in stats_queue)
stat_sum += count
stats_queue.Cut()
var/list/stats_list = stats_lists[stat_name]
stats_list.Insert(1, stat_sum)
if(stats_list.len > stat_updates_to_keep)
stats_list.Cut(stats_list.len)
/datum/controller/process/lighting/statProcess()
..()
stat(null, "[total_lighting_sources] sources, [total_lighting_corners] corners, [total_lighting_overlays] overlays")
for(var/stat_type in stats_lists)
stat(null, "[stat_type] updates: [jointext(stats_lists[stat_type], " | ")]")
-41
View File
@@ -1,41 +0,0 @@
var/global/datum/controller/process/npcai/npcai_master
/datum/controller/process/npcai
var/current_cycle
/datum/controller/process/npcai/setup()
name = "npc ai"
schedule_interval = 20 // every 2 seconds
start_delay = 16
log_startup_progress("NPC ticker starting up.")
/datum/controller/process/npcai/started()
..()
if(!GLOB.simple_animal_list)
GLOB.simple_animal_list = list()
if(!GLOB.snpc_list)
GLOB.snpc_list = list()
/datum/controller/process/npcai/statProcess()
..()
stat(null, "[GLOB.simple_animal_list.len] simple animals")
stat(null, "[GLOB.snpc_list.len] SNPC's")
/datum/controller/process/npcai/doWork()
for(last_object in GLOB.simple_animal_list)
var/mob/living/simple_animal/M = last_object
if(istype(M) && !QDELETED(M))
if(!M.client && M.stat == CONSCIOUS)
try
M.process_ai()
catch(var/exception/e)
catchException(e, M)
SCHECK
else
catchBadType(M)
GLOB.simple_animal_list -= M
current_cycle++
DECLARE_GLOBAL_CONTROLLER(npcai, npcai_master)
-36
View File
@@ -1,36 +0,0 @@
var/global/datum/controller/process/ticker/tickerProcess
/datum/controller/process/ticker
var/lastTickerTimeDuration
var/lastTickerTime
/datum/controller/process/ticker/setup()
name = "ticker"
schedule_interval = 20 // every 2 seconds
lastTickerTime = world.timeofday
log_startup_progress("Time ticker starting up.")
if(!ticker)
ticker = new
spawn(0)
if(ticker)
ticker.pregame()
DECLARE_GLOBAL_CONTROLLER(ticker, tickerProcess)
/datum/controller/process/ticker/doWork()
var/currentTime = world.timeofday
if(currentTime < lastTickerTime) // check for midnight rollover
lastTickerTimeDuration = (currentTime - (lastTickerTime - TICKS_IN_DAY)) / TICKS_IN_SECOND
else
lastTickerTimeDuration = (currentTime - lastTickerTime) / TICKS_IN_SECOND
lastTickerTime = currentTime
ticker.process_decrepit()
/datum/controller/process/ticker/proc/getLastTickerTimeDuration()
return lastTickerTimeDuration
+2 -3
View File
@@ -605,8 +605,7 @@
config.event_delay_upper[EVENT_LEVEL_MAJOR] = MinutesToTicks(values[3])
if("starlight")
var/vvalue = text2num(value)
config.starlight = vvalue >= 0 ? vvalue : 0
config.starlight = 1
if("player_reroute_cap")
var/vvalue = text2num(value)
@@ -787,7 +786,7 @@
config.sql_enabled = 0
log_config("WARNING: DB_CONFIG DEFINITION MISMATCH!")
spawn(60)
if(ticker.current_state == GAME_STATE_PREGAME)
if(SSticker.current_state == GAME_STATE_PREGAME)
going = 0
spawn(600)
to_chat(world, "<span class='alert'>DB_CONFIG MISMATCH, ROUND START DELAYED. <BR>Please check database version for recent upstream changes!</span>")
-111
View File
@@ -9,114 +9,3 @@
* Called in gameticker.dm when a round starts.
*/
/hook/roundstart
/**
* Roundend hook.
* Called in gameticker.dm when a round ends.
*/
/hook/roundend
/**
* LateSpawn hook.
* Called in newplayer.dm when a humanoid character joins the round after it started.
* Parameters: var/mob/living/carbon/human
*/
/hook/latespawn
/**
* Death hook.
* Called in death.dm when someone dies.
* Parameters: var/mob/living/carbon/human, var/gibbed
*/
/hook/death
/**
* Cloning hook.
* Called in cloning.dm when someone is brought back by the wonders of modern science.
* Parameters: var/mob/living/carbon/human
*/
/hook/clone
/**
* Debrained hook.
* Called in brain_item.dm when someone gets debrained.
* Parameters: var/obj/item/brain
*/
/hook/debrain
/**
* Borged hook.
* Called in robot_parts.dm when someone gets turned into a cyborg.
* Parameters: var/mob/living/silicon/robot
*/
/hook/borgify
/**
* Podman hook.
* Called in podmen.dm when someone is brought back as a Diona.
* Parameters: var/mob/living/carbon/primitive/diona
*/
/hook/harvest_podman
/**
* Payroll revoked hook.
* Called in Accounts_DB.dm when someone's payroll is stolen at the Accounts terminal.
* Parameters: var/datum/money_account
*/
/hook/revoke_payroll
/**
* Account suspension hook.
* Called in Accounts_DB.dm when someone's account is suspended or unsuspended at the Accounts terminal.
* Parameters: var/datum/money_account
*/
/hook/change_account_status
/**
* Employee reassignment hook.
* Called in card.dm when someone's card is reassigned at the HoP's desk.
* Parameters: var/obj/item/card/id
*/
/hook/reassign_employee
/**
* Employee terminated hook.
* Called in card.dm when someone's card is terminated at the HoP's desk.
* Parameters: var/obj/item/card/id
*/
/hook/terminate_employee
/**
* Crate sold hook.
* Called in supplyshuttle.dm when a crate is sold on the shuttle.
* Parameters: var/obj/structure/closet/crate/sold, var/area/shuttle
*/
/hook/sell_crate
/**
* Captain spawned hook.
* Called in supervisor.dm when a captain spawns
* Parameters: var/mob/living/carbon/human/captain
*/
/hook/captain_spawned
/**
* Mob login hook.
* Called in login.dm when a player logs in to a mob.
* Parameters: var/client/client, var/mob/mob
*/
/hook/mob_login
/**
* Mob logout hook.
* Called in logout.dm when a player logs out of a mob.
* Parameters: var/client/client, var/mob/mob
*/
/hook/mob_logout
/**
* Mob area change hook.
* Called in area.dm when a mob moves from one area to another.
* Parameters: var/mob/mob, var/area/newarea, var/area/oldarea
*/
/hook/mob_area_change
+2 -2
View File
@@ -194,8 +194,8 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
to_chat(world, "<span class='boldannounce'>[msg]</span>")
log_world(msg)
if(config.developer_express_start & ticker.current_state == GAME_STATE_PREGAME)
ticker.current_state = GAME_STATE_SETTING_UP
if(config.developer_express_start & SSticker.current_state == GAME_STATE_PREGAME)
SSticker.current_state = GAME_STATE_SETTING_UP
if(!current_runlevel)
SetRunLevel(1)
+41
View File
@@ -0,0 +1,41 @@
SUBSYSTEM_DEF(idlenpcpool)
name = "Idling NPC Pool"
flags = SS_POST_FIRE_TIMING|SS_BACKGROUND
priority = FIRE_PRIORITY_IDLE_NPC
wait = 60
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
var/static/list/idle_mobs_by_zlevel[][]
/datum/controller/subsystem/idlenpcpool/stat_entry()
var/list/idlelist = GLOB.simple_animals[AI_IDLE]
var/list/zlist = GLOB.simple_animals[AI_Z_OFF]
..("IdleNPCS:[idlelist.len]|Z:[zlist.len]")
/datum/controller/subsystem/idlenpcpool/Initialize(start_timeofday)
idle_mobs_by_zlevel = new /list(world.maxz,0)
return ..()
/datum/controller/subsystem/idlenpcpool/fire(resumed = FALSE)
if(!resumed)
var/list/idlelist = GLOB.simple_animals[AI_IDLE]
src.currentrun = idlelist.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
if(!SA)
GLOB.simple_animals[AI_IDLE] -= SA
continue
if(!SA.ckey)
if(SA.stat != DEAD)
SA.handle_automated_movement()
if(SA.stat != DEAD)
SA.consider_wakeup()
if(MC_TICK_CHECK)
return
+12 -5
View File
@@ -1,7 +1,8 @@
SUBSYSTEM_DEF(jobs)
name = "Jobs"
init_order = INIT_ORDER_JOBS // 12
flags = SS_NO_FIRE
wait = 3000 // 5 minutes (Deciseconds)
runlevels = RUNLEVEL_GAME
//List of all jobs
var/list/occupations = list()
@@ -21,6 +22,12 @@ SUBSYSTEM_DEF(jobs)
LoadJobs("config/jobs.txt")
return ..()
// Only fires every 5 minutes
/datum/controller/subsystem/jobs/fire()
if(!config.sql_enabled || !config.use_exp_tracking)
return
update_exp(5,0)
/datum/controller/subsystem/jobs/proc/SetupOccupations(var/list/faction = list("Station"))
occupations = list()
var/list/all_jobs = subtypesof(/datum/job)
@@ -270,9 +277,9 @@ SUBSYSTEM_DEF(jobs)
SetupOccupations()
//Holder for Triumvirate is stored in the ticker, this just processes it
if(ticker)
if(SSticker)
for(var/datum/job/ai/A in occupations)
if(ticker.triai)
if(SSticker.triai)
A.spawn_positions = 3
//Get the players who are ready
@@ -473,10 +480,10 @@ SUBSYSTEM_DEF(jobs)
T = S.loc
if(T)
H.loc = T
H.forceMove(T)
// Moving wheelchair if they have one
if(H.buckled && istype(H.buckled, /obj/structure/chair/wheelchair))
H.buckled.loc = H.loc
H.buckled.forceMove(H.loc)
H.buckled.dir = H.dir
if(job)
+87
View File
@@ -0,0 +1,87 @@
GLOBAL_LIST_EMPTY(lighting_update_lights) // List of lighting sources queued for update.
GLOBAL_LIST_EMPTY(lighting_update_corners) // List of lighting corners queued for update.
GLOBAL_LIST_EMPTY(lighting_update_objects) // List of lighting objects queued for update.
SUBSYSTEM_DEF(lighting)
name = "Lighting"
wait = 2
init_order = INIT_ORDER_LIGHTING
flags = SS_TICKER
/datum/controller/subsystem/lighting/stat_entry()
..("L:[GLOB.lighting_update_lights.len]|C:[GLOB.lighting_update_corners.len]|O:[GLOB.lighting_update_objects.len]")
/datum/controller/subsystem/lighting/Initialize(timeofday)
if(!initialized)
if(config.starlight)
for(var/I in GLOB.all_areas)
var/area/A = I
if(A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
A.luminosity = 0
create_all_lighting_objects()
initialized = TRUE
fire(FALSE, TRUE)
return ..()
/datum/controller/subsystem/lighting/fire(resumed, init_tick_checks)
MC_SPLIT_TICK_INIT(3)
if(!init_tick_checks)
MC_SPLIT_TICK
var/i = 0
for(i in 1 to GLOB.lighting_update_lights.len)
var/datum/light_source/L = GLOB.lighting_update_lights[i]
L.update_corners()
L.needs_update = LIGHTING_NO_UPDATE
if(init_tick_checks)
CHECK_TICK
else if(MC_TICK_CHECK)
break
if(i)
GLOB.lighting_update_lights.Cut(1, i+1)
i = 0
if(!init_tick_checks)
MC_SPLIT_TICK
for (i in 1 to GLOB.lighting_update_corners.len)
var/datum/lighting_corner/C = GLOB.lighting_update_corners[i]
C.update_objects()
C.needs_update = FALSE
if(init_tick_checks)
CHECK_TICK
else if(MC_TICK_CHECK)
break
if(i)
GLOB.lighting_update_corners.Cut(1, i+1)
i = 0
if(!init_tick_checks)
MC_SPLIT_TICK
for (i in 1 to GLOB.lighting_update_objects.len)
var/atom/movable/lighting_object/O = GLOB.lighting_update_objects[i]
if(QDELETED(O))
continue
O.update()
O.needs_update = FALSE
if(init_tick_checks)
CHECK_TICK
else if(MC_TICK_CHECK)
break
if(i)
GLOB.lighting_update_objects.Cut(1, i+1)
/datum/controller/subsystem/lighting/Recover()
initialized = SSlighting.initialized
..()
+6 -1
View File
@@ -1,14 +1,19 @@
SUBSYSTEM_DEF(mobs)
name = "Mobs"
priority = FIRE_PRIORITY_MOBS
flags = SS_KEEP_TIMING | SS_NO_INIT
flags = SS_KEEP_TIMING
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
var/static/list/clients_by_zlevel[][]
/datum/controller/subsystem/mobs/stat_entry()
..("P:[GLOB.mob_list.len]")
/datum/controller/subsystem/mobs/Initialize(start_timeofday)
clients_by_zlevel = new /list(world.maxz,0)
return ..()
/datum/controller/subsystem/mobs/fire(resumed = 0)
var/seconds = wait * 0.1
if(!resumed)
+1 -1
View File
@@ -20,7 +20,7 @@ SUBSYSTEM_DEF(nightshift)
return ..()
/datum/controller/subsystem/nightshift/fire(resumed = FALSE)
if(world.time - round_start_time < nightshift_first_check)
if(world.time - SSticker.round_start_time < nightshift_first_check)
return
check_nightshift()
-24
View File
@@ -1,24 +0,0 @@
SUBSYSTEM_DEF(npcai)
name = "NPC AI" // Simple AI controller, isolated from the SNPC one (NPCPool).
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = FIRE_PRIORITY_NPC
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/simple_animal_list = list()
/datum/controller/subsystem/npcai/stat_entry()
..("SimAnimals:[simple_animal_list.len]")
/datum/controller/subsystem/npcai/fire(resumed = FALSE)
if(!resumed)
src.simple_animal_list = simple_animal_list.Copy()
for(var/mob/living/simple_animal/M in simple_animal_list)
if(istype(M) && !QDELETED(M))
if(!M.client && M.stat == CONSCIOUS)
M.process_ai()
if(MC_TICK_CHECK)
return
else
simple_animal_list -= M
/datum/controller/subsystem/npcai/Recover()
simple_animal_list = SSnpcai.simple_animal_list
+23 -117
View File
@@ -1,127 +1,33 @@
#define PROCESSING_NPCS 0
#define PROCESSING_DELEGATES 1
#define PROCESSING_ASSISTANTS 2
SUBSYSTEM_DEF(npcpool)
name = "NPC Pool"
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = FIRE_PRIORITY_NPC
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
name = "NPC Pool"
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = FIRE_PRIORITY_NPC
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/canBeUsed = list()
var/list/needsDelegate = list()
var/list/needsAssistant = list()
var/list/processing = list()
var/list/currentrun = list()
var/stage
var/list/currentrun = list()
/datum/controller/subsystem/npcpool/stat_entry()
..("NPCS:[processing.len]|D:[needsDelegate.len]|A:[needsAssistant.len]|U:[canBeUsed.len]")
/datum/controller/subsystem/npcpool/proc/stop_processing(mob/living/carbon/human/interactive/I)
processing -= I
currentrun -= I
needsDelegate -= I
canBeUsed -= I
needsAssistant -= I
var/list/activelist = GLOB.simple_animals[AI_ON]
..("SimpleAnimals:[activelist.len]")
/datum/controller/subsystem/npcpool/fire(resumed = FALSE)
//bot delegation and coordination systems
//General checklist/Tasks for delegating a task or coordinating it (for SNPCs)
// 1. Bot proximity to task target: if too far, delegate, if close, coordinate
// 2. Bot Health/status: check health with bots in local area, if their health is higher, delegate task to them, else coordinate
// 3. Process delegation: if a bot (or bots) has been delegated, assign them to the task.
// 4. Process coordination: if a bot(or bots) has been asked to coordinate, assign them to help.
// 5. Do all assignments: goes through the delegated/coordianted bots and assigns the right variables/tasks to them.
if (!resumed)
currentrun = processing.Copy()
stage = PROCESSING_NPCS
//cache for sanic speed (lists are references anyways)
var/list/cachecurrentrun = currentrun
var/list/cachecanBeUsed = canBeUsed
if(!resumed)
var/list/activelist = GLOB.simple_animals[AI_ON]
src.currentrun = activelist.Copy()
if(stage == PROCESSING_NPCS)
while(cachecurrentrun.len)
var/mob/living/carbon/human/interactive/thing = cachecurrentrun[cachecurrentrun.len]
--cachecurrentrun.len
var/list/currentrun = src.currentrun
thing.InteractiveProcess()
while(currentrun.len)
var/mob/living/simple_animal/SA = currentrun[currentrun.len]
--currentrun.len
var/checkInRange = view(SNPC_MAX_RANGE_FIND,thing)
if(thing.IsDeadOrIncap(FALSE) || !(locate(thing.TARGET) in checkInRange))
needsDelegate += thing
else if(thing.doing & SNPC_FIGHTING)
needsAssistant += thing
else
cachecanBeUsed += thing
if (MC_TICK_CHECK)
return
stage = PROCESSING_DELEGATES
cachecurrentrun = needsDelegate //localcache
currentrun = cachecurrentrun
if(stage == PROCESSING_DELEGATES)
while(cachecurrentrun.len && cachecanBeUsed.len)
var/mob/living/carbon/human/interactive/check = cachecurrentrun[cachecurrentrun.len]
var/mob/living/carbon/human/interactive/candidate = cachecanBeUsed[cachecanBeUsed.len]
--cachecurrentrun.len
var/helpProb = 0
var/list/chfac = check.faction
var/list/canfac = candidate.faction
var/facCount = LAZYLEN(chfac) * LAZYLEN(canfac)
for(var/C in chfac)
if(C in canfac)
helpProb = min(100,helpProb + 25)
if(helpProb >= 100)
break
if(facCount == 1 && helpProb)
helpProb = 100
if(prob(helpProb) && candidate.takeDelegate(check))
--cachecanBeUsed.len
candidate.change_eye_color(255, 0, 0)
candidate.update_icons()
if(MC_TICK_CHECK)
return
stage = PROCESSING_ASSISTANTS
cachecurrentrun = needsAssistant //localcache
currentrun = cachecurrentrun
//no need for the stage check
while(cachecurrentrun.len && cachecanBeUsed.len)
var/mob/living/carbon/human/interactive/check = cachecurrentrun[cachecurrentrun.len]
var/mob/living/carbon/human/interactive/candidate = cachecanBeUsed[cachecanBeUsed.len]
--cachecurrentrun.len
var/helpProb = 0
var/list/chfac = check.faction
var/list/canfac = candidate.faction
var/facCount = LAZYLEN(chfac) * LAZYLEN(canfac)
for(var/C in chfac)
if(C in canfac)
helpProb = min(100,helpProb + 25)
if(helpProb >= 100)
break
if(facCount == 1 && helpProb)
helpProb = 100
if(prob(helpProb) && candidate.takeDelegate(check,FALSE))
--cachecanBeUsed.len
candidate.change_eye_color(255, 255, 0)
candidate.update_icons()
if(!cachecurrentrun.len || MC_TICK_CHECK) //don't change SS state if it isn't necessary
return
/datum/controller/subsystem/npcpool/Recover()
processing = SSnpcpool.processing
if(!SA.ckey && !SA.notransform)
if(SA.stat != DEAD)
SA.handle_automated_movement()
if(SA.stat != DEAD)
SA.handle_automated_action()
if(SA.stat != DEAD)
SA.handle_automated_speech()
if(MC_TICK_CHECK)
return
+3 -3
View File
@@ -106,8 +106,8 @@ SUBSYSTEM_DEF(shuttle)
return
emergency = backup_shuttle
if(world.time - round_start_time < config.shuttle_refuel_delay)
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
if(world.time - SSticker.round_start_time < config.shuttle_refuel_delay)
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
return
switch(emergency.mode)
@@ -169,7 +169,7 @@ SUBSYSTEM_DEF(shuttle)
return
if(!emergency.canRecall)
return
if(ticker.mode.name == "meteor")
if(SSticker.mode.name == "meteor")
return
if(seclevel2num(get_security_level()) >= SEC_LEVEL_RED)
if(emergency.timeLeft(1) < emergencyCallTime * 0.25)
@@ -1,73 +1,118 @@
var/global/datum/controller/gameticker/ticker
var/round_start_time = 0
SUBSYSTEM_DEF(ticker)
name = "Ticker"
init_order = INIT_ORDER_TICKER
/datum/controller/gameticker
priority = FIRE_PRIORITY_TICKER
flags = SS_KEEP_TIMING
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME
var/round_start_time = 0
var/const/restart_timeout = 600
var/current_state = GAME_STATE_PREGAME
var/current_state = GAME_STATE_STARTUP
var/force_start = 0 // Do we want to force-start as soon as we can
var/force_ending = 0
var/hide_mode = 0 // leave here at 0 ! setup() will take care of it when needed for Secret mode -walter0o
var/datum/game_mode/mode = null
var/event_time = null
var/event = 0
var/login_music // music played in pregame lobby
var/list/datum/mind/minds = list()//The people in the game. Used for objective tracking.
var/Bible_icon_state // icon_state the chaplain has chosen for his bible
var/Bible_item_state // item_state the chaplain has chosen for his bible
var/Bible_name // name of the bible
var/Bible_deity_name
var/datum/cult_info/cultdat = null //here instead of cult for adminbus purposes
var/random_players = 0 // if set to nonzero, ALL players who latejoin or declare-ready join will have random appearances/genders
var/list/syndicate_coalition = list() // list of traitor-compatible factions
var/list/factions = list() // list of all factions
var/list/availablefactions = list() // list of factions with openings
var/tipped = FALSE //Did we broadcast the tip of the day yet?
var/selected_tip // What will be the tip of the day?
var/pregame_timeleft = 0
var/pregame_timeleft // This is used for calculations
var/delay_end = 0 //if set to nonzero, the round will not restart on it's own
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.\
/datum/controller/gameticker/proc/pregame()
/datum/controller/subsystem/ticker/Initialize()
login_music = pick(\
'sound/music/thunderdome.ogg',\
'sound/music/space.ogg',\
'sound/music/title1.ogg',\
'sound/music/title2.ogg',\
'sound/music/title3.ogg',)
do
pregame_timeleft = config.pregame_timestart
to_chat(world, "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>")
to_chat(world, "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds")
while(current_state == GAME_STATE_PREGAME)
sleep(10)
if(going)
pregame_timeleft--
// Setup codephrase
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase()
if(!GLOB.syndicate_code_response)
GLOB.syndicate_code_response = generate_code_phrase()
if(pregame_timeleft <= 60 && !tipped)
// Map name
if(using_map && using_map.name)
GLOB.map_name = "[using_map.name]"
else
GLOB.map_name = "Unknown"
// World name
if(config && config.server_name)
world.name = "[config.server_name]: [station_name()]"
else
world.name = station_name()
return ..()
/datum/controller/subsystem/ticker/fire()
switch(current_state)
if(GAME_STATE_STARTUP)
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
round_start_time = world.time + (config.pregame_timestart * 10)
to_chat(world, "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>")
to_chat(world, "Please, setup your character and select ready. Game will start in [config.pregame_timestart] seconds")
current_state = GAME_STATE_PREGAME
fire() // TG says this is a good idea
if(GAME_STATE_PREGAME)
// This is so we dont have sleeps in controllers, because that is a bad, bad thing
pregame_timeleft = max(0,round_start_time - world.time)
if(pregame_timeleft <= 600 && !tipped) // 60 seconds
send_tip_of_the_round()
tipped = TRUE
if(pregame_timeleft <= 0)
if(pregame_timeleft <= 0 || force_start)
current_state = GAME_STATE_SETTING_UP
Master.SetRunLevel(RUNLEVEL_SETUP)
while(!setup())
if(GAME_STATE_SETTING_UP)
if(!setup()) // Setup failed
current_state = GAME_STATE_STARTUP
Master.SetRunLevel(RUNLEVEL_LOBBY)
if(GAME_STATE_PLAYING)
mode.process()
mode.process_job_tasks()
var/game_finished = SSshuttle.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked
if(config.continuous_rounds)
mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result
else
game_finished |= mode.check_finished()
if(game_finished)
current_state = GAME_STATE_FINISHED
if(GAME_STATE_FINISHED)
current_state = GAME_STATE_FINISHED
Master.SetRunLevel(RUNLEVEL_POSTGAME) // This shouldnt process more than once, but you never know
auto_toggle_ooc(1) // Turn it on
/datum/controller/gameticker/proc/votetimer()
spawn(0)
declare_completion()
spawn(50)
if(mode.station_was_nuked)
world.Reboot("Station destroyed by Nuclear Device.", "end_proper", "nuke")
else
world.Reboot("Round ended.", "end_proper", "proper completion")
/datum/controller/subsystem/ticker/proc/votetimer()
var/timerbuffer = 0
if(initialtpass == 0)
timerbuffer = config.vote_autotransfer_initial
@@ -78,7 +123,8 @@ var/round_start_time = 0
initialtpass = 1
votetimer()
/datum/controller/gameticker/proc/setup()
/datum/controller/subsystem/ticker/proc/setup()
cultdat = setupcult()
//Create and announce mode
if(master_mode=="secret")
@@ -252,9 +298,7 @@ var/round_start_time = 0
return 1
//Plus it provides an easy way to make cinematics for other events. Just use this as a template :)
//Plus it provides an easy way to make cinematics for other events. Just use this as a template
/datum/controller/gameticker/proc/station_explosion_cinematic(station_missed = 0, override = null)
/datum/controller/subsystem/ticker/proc/station_explosion_cinematic(station_missed = 0, override = null)
if(cinematic)
return //already a cinematic in progress!
@@ -350,7 +394,7 @@ var/round_start_time = 0
/datum/controller/gameticker/proc/create_characters()
/datum/controller/subsystem/ticker/proc/create_characters()
for(var/mob/new_player/player in GLOB.player_list)
if(player.ready && player.mind)
if(player.mind.assigned_role == "AI")
@@ -364,13 +408,13 @@ var/round_start_time = 0
qdel(player)
/datum/controller/gameticker/proc/collect_minds()
/datum/controller/subsystem/ticker/proc/collect_minds()
for(var/mob/living/player in GLOB.player_list)
if(player.mind)
ticker.minds += player.mind
SSticker.minds += player.mind
/datum/controller/gameticker/proc/equip_characters()
/datum/controller/subsystem/ticker/proc/equip_characters()
var/captainless=1
for(var/mob/living/carbon/human/player in GLOB.player_list)
if(player && player.mind && player.mind.assigned_role)
@@ -385,7 +429,7 @@ var/round_start_time = 0
if(!istype(M,/mob/new_player))
to_chat(M, "Captainship not forced on anyone.")
/datum/controller/gameticker/proc/send_tip_of_the_round()
/datum/controller/subsystem/ticker/proc/send_tip_of_the_round()
var/m
if(selected_tip)
m = selected_tip
@@ -400,45 +444,13 @@ var/round_start_time = 0
if(m)
to_chat(world, "<span class='purple'><b>Tip of the round: </b>[html_encode(m)]</span>")
/datum/controller/gameticker/proc/process_decrepit()
if(current_state != GAME_STATE_PLAYING)
return 0
mode.process()
mode.process_job_tasks()
//emergency_shuttle.process() DONE THROUGH PROCESS SCHEDULER
var/game_finished = SSshuttle.emergency.mode >= SHUTTLE_ENDGAME || mode.station_was_nuked
if(config.continuous_rounds)
mode.check_finished() // some modes contain var-changing code in here, so call even if we don't uses result
else
game_finished |= mode.check_finished()
if((!mode.explosion_in_progress && game_finished) || force_ending)
current_state = GAME_STATE_FINISHED
Master.SetRunLevel(RUNLEVEL_POSTGAME)
auto_toggle_ooc(1) // Turn it on
spawn
declare_completion()
spawn(50)
callHook("roundend")
if(mode.station_was_nuked)
world.Reboot("Station destroyed by Nuclear Device.", "end_proper", "nuke")
else
world.Reboot("Round ended.", "end_proper", "proper completion")
return 1
/datum/controller/gameticker/proc/getfactionbyname(var/name)
/datum/controller/subsystem/ticker/proc/getfactionbyname(var/name)
for(var/datum/faction/F in factions)
if(F.name == name)
return F
/datum/controller/gameticker/proc/declare_completion()
/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.
//Round statistics report
var/datum/station_state/end_state = new /datum/station_state()
@@ -483,9 +495,9 @@ var/round_start_time = 0
if(dronecount)
to_chat(world, "<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] this round.")
if(ticker.mode.eventmiscs.len)
if(mode.eventmiscs.len)
var/emobtext = ""
for(var/datum/mind/eventmind in ticker.mode.eventmiscs)
for(var/datum/mind/eventmind in mode.eventmiscs)
emobtext += printeventplayer(eventmind)
emobtext += "<br>"
emobtext += printobjectives(eventmind)
@@ -516,5 +528,6 @@ var/round_start_time = 0
return 1
/datum/controller/gameticker/proc/HasRoundStarted()
/datum/controller/subsystem/ticker/proc/HasRoundStarted()
return current_state >= GAME_STATE_PLAYING
+7 -7
View File
@@ -19,7 +19,7 @@ SUBSYSTEM_DEF(vote)
/datum/controller/subsystem/vote/fire()
if(mode)
// No more change mode votes after the game has started.
if(mode == "gamemode" && ticker.current_state >= GAME_STATE_SETTING_UP)
if(mode == "gamemode" && SSticker.current_state >= GAME_STATE_SETTING_UP)
to_chat(world, "<b>Voting aborted due to game start.</b>")
reset()
return
@@ -125,7 +125,7 @@ SUBSYSTEM_DEF(vote)
var/text
if(winners.len > 0)
if(winners.len > 1)
if(mode != "gamemode" || ticker.hide_mode == 0) // Here we are making sure we don't announce potential game modes
if(mode != "gamemode" || SSticker.hide_mode == 0) // Here we are making sure we don't announce potential game modes
text = "<b>Vote Tied Between:</b>\n"
for(var/option in winners)
text += "\t[option]\n"
@@ -134,7 +134,7 @@ SUBSYSTEM_DEF(vote)
for(var/key in current_votes)
if(choices[current_votes[key]] == .)
round_voters += key // Keep track of who voted for the winning round.
if(mode == "gamemode" && (. == "extended" || ticker.hide_mode == 0)) // Announce Extended gamemode, but not other gamemodes
if(mode == "gamemode" && (. == "extended" || SSticker.hide_mode == 0)) // Announce Extended gamemode, but not other gamemodes
text += "<b>Vote Result: [.] ([choices[.]] vote\s)</b>"
else
if(mode == "custom")
@@ -166,7 +166,7 @@ SUBSYSTEM_DEF(vote)
if("gamemode")
if(master_mode != .)
world.save_mode(.)
if(ticker && ticker.mode)
if(SSticker && SSticker.mode)
restart = 1
else
master_mode = .
@@ -208,17 +208,17 @@ SUBSYSTEM_DEF(vote)
if("restart")
choices.Add("Restart Round","Continue Playing")
if("gamemode")
if(ticker.current_state >= 2)
if(SSticker.current_state >= 2)
return 0
choices.Add(config.votable_modes)
if("crew_transfer")
if(check_rights(R_ADMIN|R_MOD))
if(ticker.current_state <= 2)
if(SSticker.current_state <= 2)
return 0
question = "End the shift?"
choices.Add("Initiate Crew Transfer", "Continue The Round")
else
if(ticker.current_state <= 2)
if(SSticker.current_state <= 2)
return 0
question = "End the shift?"
choices.Add("Initiate Crew Transfer", "Continue The Round")
+4 -4
View File
@@ -36,7 +36,7 @@
debug_variables(Master)
feedback_add_details("admin_verb","Dsmc")
if("Ticker")
debug_variables(ticker)
debug_variables(SSticker)
feedback_add_details("admin_verb","DTicker")
if("Air")
debug_variables(SSair)
@@ -80,9 +80,9 @@
if("Mob")
debug_variables(SSmobs)
feedback_add_details("admin_verb","DMob")
if("NPC AI")
debug_variables(SSnpcai)
feedback_add_details("admin_verb","DNPCAI")
if("NPC Pool")
debug_variables(SSnpcpool)
feedback_add_details("admin_verb","DNPCPool")
if("Shuttle")
debug_variables(SSshuttle)
feedback_add_details("admin_verb","DShuttle")
+18 -3
View File
@@ -107,6 +107,7 @@
/datum/action/item_action
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
var/use_itemicon = TRUE
/datum/action/item_action/New(Target, custom_icon, custom_icon_state)
..()
var/obj/item/I = target
@@ -136,9 +137,10 @@
var/obj/item/I = target
var/old_layer = I.layer
var/old_plane = I.plane
I.layer = HUD_LAYER_SCREEN + 1
I.plane = HUD_PLANE
current_button.overlays += I
I.layer = FLOAT_LAYER //AAAH
I.plane = FLOAT_PLANE //^ what that guy said
current_button.cut_overlays()
current_button.add_overlay(I)
I.layer = old_layer
I.plane = old_plane
else
@@ -406,6 +408,19 @@
name = "Use [target.name]"
button.name = name
/datum/action/item_action/voice_changer/toggle
name = "Toggle Voice Changer"
/datum/action/item_action/voice_changer/voice
name = "Set Voice"
/datum/action/item_action/voice_changer/voice/Trigger()
if(!IsAvailable())
return FALSE
var/obj/item/voice_changer/V = target
V.set_voice(usr)
// for clothing accessories like holsters
/datum/action/item_action/accessory
check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS
+1 -1
View File
@@ -11,7 +11,7 @@ var/global/datum/repository/air_alarm/air_alarm_repository = new()
if(!refresh)
return cache_entry.data
if(ticker && ticker.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)) // Still need sanity checks
alarms[++alarms.len] = passed_alarm.get_nano_data_console()
+2 -2
View File
@@ -1,6 +1,6 @@
/datum/cache_entry
var/timestamp
var/data
var/list/data = list()
/datum/repository
var/cache_data
+12 -16
View File
@@ -1,5 +1,3 @@
// Squeak component ported over from tg
/datum/component/squeak
var/static/list/default_squeak_sounds = list('sound/items/toysqueak1.ogg'=1, 'sound/items/toysqueak2.ogg'=1, 'sound/items/toysqueak3.ogg'=1)
var/list/override_squeak_sounds
@@ -49,21 +47,12 @@
else
playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
/datum/component/squeak/proc/step_squeak(datum/source, mob/living/carbon/human/H)
if(H.m_intent == MOVE_INTENT_RUN)
if(steps > step_delay)
play_squeak()
steps = 0
else
steps++
else
/datum/component/squeak/proc/step_squeak()
if(steps > step_delay)
play_squeak()
/datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot)
RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, TRUE)
/datum/component/squeak/proc/on_drop(datum/source, mob/user)
UnregisterSignal(user, COMSIG_MOVABLE_DISPOSING)
steps = 0
else
steps++
/datum/component/squeak/proc/play_squeak_crossed(atom/movable/AM)
if(isitem(AM))
@@ -83,6 +72,13 @@
last_use = world.time
play_squeak()
/datum/component/squeak/proc/on_equip(datum/source, mob/equipper, slot)
RegisterSignal(equipper, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, TRUE)
/datum/component/squeak/proc/on_drop(datum/source, mob/user)
UnregisterSignal(user, COMSIG_MOVABLE_DISPOSING)
// Disposal pipes related shit
/datum/component/squeak/proc/disposing_react(datum/source, obj/structure/disposalholder/holder, obj/machinery/disposal/source)
//We don't need to worry about unregistering this signal as it will happen for us automaticaly when the holder is qdeleted
RegisterSignal(holder, COMSIG_ATOM_DIR_CHANGE, .proc/holder_dir_change)
+22 -7
View File
@@ -1242,13 +1242,28 @@
return
switch(Text)
if("brute") L.adjustBruteLoss(amount, robotic=1)
if("fire") L.adjustFireLoss(amount, robotic=1)
if("toxin") L.adjustToxLoss(amount)
if("oxygen")L.adjustOxyLoss(amount)
if("brain") L.adjustBrainLoss(amount)
if("clone") L.adjustCloneLoss(amount)
if("stamina") L.adjustStaminaLoss(amount)
if("brute")
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.adjustBruteLoss(amount, robotic = TRUE)
else
L.adjustBruteLoss(amount)
if("fire")
if(ishuman(L))
var/mob/living/carbon/human/H = L
H.adjustFireLoss(amount, robotic = TRUE)
else
L.adjustFireLoss(amount)
if("toxin")
L.adjustToxLoss(amount)
if("oxygen")
L.adjustOxyLoss(amount)
if("brain")
L.adjustBrainLoss(amount)
if("clone")
L.adjustCloneLoss(amount)
if("stamina")
L.adjustStaminaLoss(amount)
else
to_chat(usr, "You caused an error. DEBUG: Text:[Text] Mob:[L]")
return
+2 -2
View File
@@ -93,8 +93,8 @@ var/datum/atom_hud/huds = list( \
// gang_huds += G.ganghud
var/serv_huds = list()//mindslaves and/or vampire thralls
if(ticker.mode)
for(var/datum/mindslaves/serv in (ticker.mode.vampires | ticker.mode.traitors))
if(SSticker.mode)
for(var/datum/mindslaves/serv in (SSticker.mode.vampires | SSticker.mode.traitors))
serv_huds += serv.thrallhud
+205 -205
View File
@@ -84,7 +84,7 @@
soulOwner = src
/datum/mind/Destroy()
ticker.minds -= src
SSticker.minds -= src
if(islist(antag_datums))
for(var/i in antag_datums)
var/datum/antagonist/antag_datum = i
@@ -163,7 +163,7 @@
/datum/mind/proc/_memory_edit_header(gamemode, list/alt)
. = gamemode
if(ticker.mode.config_tag == gamemode || (LAZYLEN(alt) && (ticker.mode.config_tag in alt)))
if(SSticker.mode.config_tag == gamemode || (LAZYLEN(alt) && (SSticker.mode.config_tag in alt)))
. = uppertext(.)
. = "<i><b>[.]</b></i>: "
@@ -183,7 +183,7 @@
. = _memory_edit_header("revolution")
if(ismindshielded(H))
. += "<b>NO</b>|headrev|rev"
else if(src in ticker.mode.head_revolutionaries)
else if(src in SSticker.mode.head_revolutionaries)
. += "<a href='?src=[UID()];revolution=clear'>no</a>|<b><font color='red'>HEADREV</font></b>|<a href='?src=[UID()];revolution=rev'>rev</a>"
. += "<br>Flash: <a href='?src=[UID()];revolution=flash'>give</a>"
@@ -200,7 +200,7 @@
. += " <a href='?src=[UID()];revolution=reequip'>Reequip</a> (gives traitor uplink)."
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];revolution=autoobjectives'>Set to kill all heads</a>."
else if(src in ticker.mode.revolutionaries)
else if(src in SSticker.mode.revolutionaries)
. += "<a href='?src=[UID()];revolution=clear'>no</a>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<b><font color='red'>REV</font></b>"
else
. += "<b>NO</b>|<a href='?src=[UID()];revolution=headrev'>headrev</a>|<a href='?src=[UID()];revolution=rev'>rev</a>"
@@ -211,7 +211,7 @@
. = _memory_edit_header("cult")
if(ismindshielded(H))
. += "<B>NO</B>|cultist"
else if(src in ticker.mode.cult)
else if(src in SSticker.mode.cult)
. += "<a href='?src=[UID()];cult=clear'>no</a>|<b><font color='red'>CULTIST</font></b>"
. += "<br>Give <a href='?src=[UID()];cult=tome'>tome</a>|<a href='?src=[UID()];cult=equip'>equip</a>."
else
@@ -221,7 +221,7 @@
/datum/mind/proc/memory_edit_wizard(mob/living/carbon/human/H)
. = _memory_edit_header("wizard")
if(src in ticker.mode.wizards)
if(src in SSticker.mode.wizards)
. += "<b><font color='red'>WIZARD</font></b>|<a href='?src=[UID()];wizard=clear'>no</a>"
. += "<br><a href='?src=[UID()];wizard=lair'>To lair</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];wizard=dressup'>dress up</a>, <a href='?src=[UID()];wizard=name'>let choose name</a>."
if(objectives.len==0)
@@ -233,7 +233,7 @@
/datum/mind/proc/memory_edit_changeling(mob/living/carbon/human/H)
. = _memory_edit_header("changeling", list("traitorchan"))
if(src in ticker.mode.changelings)
if(src in SSticker.mode.changelings)
. += "<b><font color='red'>CHANGELING</font></b>|<a href='?src=[UID()];changeling=clear'>no</a>"
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];changeling=autoobjectives'>Randomize!</a>"
@@ -246,7 +246,7 @@
/datum/mind/proc/memory_edit_vampire(mob/living/carbon/human/H)
. = _memory_edit_header("vampire", list("traitorvamp"))
if(src in ticker.mode.vampires)
if(src in SSticker.mode.vampires)
. += "<b><font color='red'>VAMPIRE</font></b>|<a href='?src=[UID()];vampire=clear'>no</a>"
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];vampire=autoobjectives'>Randomize!</a>"
@@ -256,14 +256,14 @@
. += _memory_edit_role_enabled(ROLE_VAMPIRE)
/** Enthralled ***/
. += "<br><b><i>enthralled</i></b>: "
if(src in ticker.mode.vampire_enthralled)
if(src in SSticker.mode.vampire_enthralled)
. += "<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];vampthrall=clear'>no</a>"
else
. += "thrall|<b>NO</b>"
/datum/mind/proc/memory_edit_nuclear(mob/living/carbon/human/H)
. = _memory_edit_header("nuclear")
if(src in ticker.mode.syndicates)
if(src in SSticker.mode.syndicates)
. += "<b><font color='red'>OPERATIVE</b></font>|<a href='?src=[UID()];nuclear=clear'>no</a>"
. += "<br><a href='?src=[UID()];nuclear=lair'>To shuttle</a>, <a href='?src=[UID()];common=undress'>undress</a>, <a href='?src=[UID()];nuclear=dressup'>dress up</a>."
var/code
@@ -280,9 +280,9 @@
/datum/mind/proc/memory_edit_shadowling(mob/living/carbon/human/H)
. = _memory_edit_header("shadowling")
if(src in ticker.mode.shadows)
if(src in SSticker.mode.shadows)
. += "<b><font color='red'>SHADOWLING</font></b>|thrall|<a href='?src=[UID()];shadowling=clear'>no</a>"
else if(src in ticker.mode.shadowling_thralls)
else if(src in SSticker.mode.shadowling_thralls)
. += "Shadowling|<b><font color='red'>THRALL</font></b>|<a href='?src=[UID()];shadowling=clear'>no</a>"
else
. += "<a href='?src=[UID()];shadowling=shadowling'>shadowling</a>|<a href='?src=[UID()];shadowling=thrall'>thrall</a>|<b>NO</b>"
@@ -291,7 +291,7 @@
/datum/mind/proc/memory_edit_abductor(mob/living/carbon/human/H)
. = _memory_edit_header("abductor")
if(src in ticker.mode.abductors)
if(src in SSticker.mode.abductors)
. += "<b><font color='red'>ABDUCTOR</font></b>|<a href='?src=[UID()];abductor=clear'>no</a>"
. += "|<a href='?src=[UID()];common=undress'>undress</a>|<a href='?src=[UID()];abductor=equip'>equip</a>"
else
@@ -301,14 +301,14 @@
/datum/mind/proc/memory_edit_devil(mob/living/H)
. = _memory_edit_header("devil", list("devilagents"))
if(src in ticker.mode.devils)
if(src in SSticker.mode.devils)
if(!devilinfo)
. += "<b>No devilinfo found! Yell at a coder!</b>"
else if(!devilinfo.ascendable)
. += "<b>DEVIL</b>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
else
. += "<a href='?src=[UID()];devil=devil'>DEVIL</a>|<b>ASCENDABLE DEVIL</b>|sintouched|<a href='?src=[UID()];devil=clear'>no</a>"
else if(src in ticker.mode.sintouched)
else if(src in SSticker.mode.sintouched)
. += "devil|Ascendable Devil|<b>SINTOUCHED</b>|<a href='?src=[UID()];devil=clear'>no</a>"
else
. += "<a href='?src=[UID()];devil=devil'>devil</a>|<a href='?src=[UID()];devil=ascendable_devil'>Ascendable Devil</a>|<a href='?src=[UID()];devil=sintouched'>sintouched</a>|<b>NO</b>"
@@ -317,14 +317,14 @@
/datum/mind/proc/memory_edit_eventmisc(mob/living/H)
. = _memory_edit_header("event", list())
if(src in ticker.mode.eventmiscs)
if(src in SSticker.mode.eventmiscs)
. += "<b>YES</b>|<a href='?src=[UID()];eventmisc=clear'>no</a>"
else
. += "<a href='?src=[UID()];eventmisc=eventmisc'>Event Role</a>|<b>NO</b>"
/datum/mind/proc/memory_edit_traitor()
. = _memory_edit_header("traitor", list("traitorchan", "traitorvamp"))
if(src in ticker.mode.traitors)
if(src in SSticker.mode.traitors)
. += "<b><font color='red'>TRAITOR</font></b>|<a href='?src=[UID()];traitor=clear'>no</a>"
if(objectives.len==0)
. += "<br>Objectives are empty! <a href='?src=[UID()];traitor=autoobjectives'>Randomize</a>!"
@@ -348,9 +348,9 @@
/datum/mind/proc/memory_edit_uplink()
. = ""
if(ishuman(current) && ((src in ticker.mode.head_revolutionaries) || \
(src in ticker.mode.traitors) || \
(src in ticker.mode.syndicates)))
if(ishuman(current) && ((src in SSticker.mode.head_revolutionaries) || \
(src in SSticker.mode.traitors) || \
(src in SSticker.mode.syndicates)))
. = "Uplink: <a href='?src=[UID()];common=uplink'>give</a>"
var/obj/item/uplink/hidden/suplink = find_syndicate_uplink()
var/crystals
@@ -366,7 +366,7 @@
// ^ whoever left this comment is literally a grammar nazi. stalin better. in russia grammar correct you.
/datum/mind/proc/edit_memory()
if(!ticker || !ticker.mode)
if(!SSticker || !SSticker.mode)
alert("Not before round-start!", "Alert")
return
@@ -419,7 +419,7 @@
This prioritizes antags relevant to the current round to make them appear at the top of the panel.
Traitorchan and traitorvamp are snowflaked in because they have multiple sections.
*/
if(ticker.mode.config_tag == "traitorchan")
if(SSticker.mode.config_tag == "traitorchan")
if(sections["traitor"])
out += sections["traitor"] + "<br>"
if(sections["changeling"])
@@ -427,7 +427,7 @@
sections -= "traitor"
sections -= "changeling"
// Elif technically unnecessary but it makes the following else look better
else if(ticker.mode.config_tag == "traitorvamp")
else if(SSticker.mode.config_tag == "traitorvamp")
if(sections["traitor"])
out += sections["traitor"] + "<br>"
if(sections["vampire"])
@@ -435,9 +435,9 @@
sections -= "traitor"
sections -= "vampire"
else
if(sections[ticker.mode.config_tag])
out += sections[ticker.mode.config_tag] + "<br>"
sections -= ticker.mode.config_tag
if(sections[SSticker.mode.config_tag])
out += sections[SSticker.mode.config_tag] + "<br>"
sections -= SSticker.mode.config_tag
for(var/i in sections)
if(sections[i])
@@ -512,7 +512,7 @@
var/objective_type = "[objective_type_capital][objective_type_text]"//Add them together into a text string.
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
for(var/datum/mind/possible_target in SSticker.minds)
if((possible_target != src) && istype(possible_target.current, /mob/living/carbon/human))
possible_targets += possible_target.current
@@ -612,7 +612,7 @@
if("identity theft")
var/list/possible_targets = list()
for(var/datum/mind/possible_target in ticker.minds)
for(var/datum/mind/possible_target in SSticker.minds)
if((possible_target != src) && ishuman(possible_target.current))
possible_targets += possible_target
possible_targets = sortAtom(possible_targets)
@@ -687,19 +687,19 @@
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] a mindshield implant")
to_chat(H, "<span class='warning'><Font size =3><B>You somehow have become the recepient of a mindshield transplant, and it just activated!</B></FONT></span>")
if(src in ticker.mode.revolutionaries)
if(src in SSticker.mode.revolutionaries)
special_role = null
ticker.mode.revolutionaries -= src
SSticker.mode.revolutionaries -= src
to_chat(src, "<span class='warning'><Font size = 3><B>The nanobots in the mindshield implant remove all thoughts about being a revolutionary. Get back to work!</B></Font></span>")
if(src in ticker.mode.head_revolutionaries)
if(src in SSticker.mode.head_revolutionaries)
special_role = null
ticker.mode.head_revolutionaries -=src
SSticker.mode.head_revolutionaries -=src
to_chat(src, "<span class='warning'><Font size = 3><B>The nanobots in the mindshield implant remove all thoughts about being a revolutionary. Get back to work!</B></Font></span>")
if(src in ticker.mode.cult)
ticker.mode.cult -= src
ticker.mode.update_cult_icons_removed(src)
if(src in SSticker.mode.cult)
SSticker.mode.cult -= src
SSticker.mode.update_cult_icons_removed(src)
special_role = null
var/datum/game_mode/cult/cult = ticker.mode
var/datum/game_mode/cult/cult = SSticker.mode
if(istype(cult))
cult.memorize_cult_objectives(src)
to_chat(current, "<span class='warning'><FONT size = 3><B>The nanobots in the mindshield implant remove all thoughts about being in a cult. Have a productive day!</B></FONT></span>")
@@ -709,46 +709,46 @@
switch(href_list["revolution"])
if("clear")
if(src in ticker.mode.revolutionaries)
ticker.mode.revolutionaries -= src
if(src in SSticker.mode.revolutionaries)
SSticker.mode.revolutionaries -= src
to_chat(current, "<span class='warning'><FONT size = 3><B>You have been brainwashed! You are no longer a revolutionary!</B></FONT></span>")
ticker.mode.update_rev_icons_removed(src)
SSticker.mode.update_rev_icons_removed(src)
special_role = null
if(src in ticker.mode.head_revolutionaries)
ticker.mode.head_revolutionaries -= src
if(src in SSticker.mode.head_revolutionaries)
SSticker.mode.head_revolutionaries -= src
to_chat(current, "<span class='warning'><FONT size = 3><B>You have been brainwashed! You are no longer a head revolutionary!</B></FONT></span>")
ticker.mode.update_rev_icons_removed(src)
SSticker.mode.update_rev_icons_removed(src)
special_role = null
log_admin("[key_name(usr)] has de-rev'd [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-rev'd [key_name_admin(current)]")
if("rev")
if(src in ticker.mode.head_revolutionaries)
ticker.mode.head_revolutionaries -= src
ticker.mode.update_rev_icons_removed(src)
if(src in SSticker.mode.head_revolutionaries)
SSticker.mode.head_revolutionaries -= src
SSticker.mode.update_rev_icons_removed(src)
to_chat(current, "<span class='warning'><FONT size = 3><B>Revolution has been disappointed of your leadership traits! You are a regular revolutionary now!</B></FONT></span>")
else if(!(src in ticker.mode.revolutionaries))
else if(!(src in SSticker.mode.revolutionaries))
to_chat(current, "<span class='warning'><FONT size = 3> You are now a revolutionary! Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!</FONT></span>")
else
return
ticker.mode.revolutionaries += src
ticker.mode.update_rev_icons_added(src)
SSticker.mode.revolutionaries += src
SSticker.mode.update_rev_icons_added(src)
special_role = SPECIAL_ROLE_REV
log_admin("[key_name(usr)] has rev'd [key_name(current)]")
message_admins("[key_name_admin(usr)] has rev'd [key_name_admin(current)]")
if("headrev")
if(src in ticker.mode.revolutionaries)
ticker.mode.revolutionaries -= src
ticker.mode.update_rev_icons_removed(src)
if(src in SSticker.mode.revolutionaries)
SSticker.mode.revolutionaries -= src
SSticker.mode.update_rev_icons_removed(src)
to_chat(current, "<span class='userdanger'>You have proven your devotion to revolution! You are a head revolutionary now!</span>")
else if(!(src in ticker.mode.head_revolutionaries))
else if(!(src in SSticker.mode.head_revolutionaries))
to_chat(current, "<span class='notice'>You are a member of the revolutionaries' leadership now!</span>")
else
return
if(ticker.mode.head_revolutionaries.len>0)
if(SSticker.mode.head_revolutionaries.len>0)
// copy targets
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
var/datum/mind/valid_head = locate() in SSticker.mode.head_revolutionaries
if(valid_head)
for(var/datum/objective/mutiny/O in valid_head.objectives)
var/datum/objective/mutiny/rev_obj = new
@@ -756,21 +756,21 @@
rev_obj.target = O.target
rev_obj.explanation_text = "Assassinate [O.target.name], the [O.target.assigned_role]."
objectives += rev_obj
ticker.mode.greet_revolutionary(src,0)
ticker.mode.head_revolutionaries += src
ticker.mode.update_rev_icons_added(src)
SSticker.mode.greet_revolutionary(src,0)
SSticker.mode.head_revolutionaries += src
SSticker.mode.update_rev_icons_added(src)
special_role = SPECIAL_ROLE_HEAD_REV
log_admin("[key_name(usr)] has head-rev'd [key_name(current)]")
message_admins("[key_name_admin(usr)] has head-rev'd [key_name_admin(current)]")
if("autoobjectives")
ticker.mode.forge_revolutionary_objectives(src)
ticker.mode.greet_revolutionary(src,0)
SSticker.mode.forge_revolutionary_objectives(src)
SSticker.mode.greet_revolutionary(src,0)
log_admin("[key_name(usr)] has automatically forged revolutionary objectives for [key_name(current)]")
message_admins("[key_name_admin(usr)] has automatically forged revolutionary objectives for [key_name_admin(current)]")
if("flash")
if(!ticker.mode.equip_revolutionary(current))
if(!SSticker.mode.equip_revolutionary(current))
to_chat(usr, "<span class='warning'>Spawning flash failed!</span>")
log_admin("[key_name(usr)] has given [key_name(current)] a flash")
message_admins("[key_name_admin(usr)] has given [key_name_admin(current)] a flash")
@@ -800,8 +800,8 @@
qdel(flash)
take_uplink()
var/fail = 0
fail |= !ticker.mode.equip_traitor(current, 1)
fail |= !ticker.mode.equip_revolutionary(current)
fail |= !SSticker.mode.equip_traitor(current, 1)
fail |= !SSticker.mode.equip_revolutionary(current)
if(fail)
to_chat(usr, "<span class='warning'>Reequipping revolutionary goes wrong!</span>")
return
@@ -811,17 +811,17 @@
else if(href_list["cult"])
switch(href_list["cult"])
if("clear")
if(src in ticker.mode.cult)
ticker.mode.remove_cultist(src)
if(src in SSticker.mode.cult)
SSticker.mode.remove_cultist(src)
special_role = null
log_admin("[key_name(usr)] has de-culted [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-culted [key_name_admin(current)]")
if("cultist")
if(!(src in ticker.mode.cult))
ticker.mode.add_cultist(src)
if(!(src in SSticker.mode.cult))
SSticker.mode.add_cultist(src)
special_role = SPECIAL_ROLE_CULTIST
to_chat(current, "<span class='cultitalic'>You catch a glimpse of the Realm of [ticker.cultdat.entity_name], [ticker.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [ticker.cultdat.entity_name].</span>")
to_chat(current, "<span class='cultitalic'>Assist your new compatriots in their dark dealings. Their goal is yours, and yours is theirs. You serve [ticker.cultdat.entity_title2] above all else. Bring It back.</span>")
to_chat(current, "<span class='cultitalic'>You catch a glimpse of the Realm of [SSticker.cultdat.entity_name], [SSticker.cultdat.entity_title3]. You now see how flimsy the world is, you see that it should be open to the knowledge of [SSticker.cultdat.entity_name].</span>")
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("tome")
@@ -846,7 +846,7 @@
message_admins("[key_name_admin(usr)] has spawned a tome for [key_name_admin(current)]")
if("equip")
if(!ticker.mode.equip_cultist(current))
if(!SSticker.mode.equip_cultist(current))
to_chat(usr, "<span class='warning'>Spawning equipment failed!</span>")
log_admin("[key_name(usr)] has equipped [key_name(current)] as a cultist")
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a cultist")
@@ -855,21 +855,21 @@
switch(href_list["wizard"])
if("clear")
if(src in ticker.mode.wizards)
ticker.mode.wizards -= src
if(src in SSticker.mode.wizards)
SSticker.mode.wizards -= src
special_role = null
current.spellremove(current)
current.faction = list("Station")
ticker.mode.update_wiz_icons_removed(src)
SSticker.mode.update_wiz_icons_removed(src)
to_chat(current, "<span class='warning'><FONT size = 3><B>You have been brainwashed! You are no longer a wizard!</B></FONT></span>")
log_admin("[key_name(usr)] has de-wizarded [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-wizarded [key_name_admin(current)]")
if("wizard")
if(!(src in ticker.mode.wizards))
ticker.mode.wizards += src
if(!(src in SSticker.mode.wizards))
SSticker.mode.wizards += src
special_role = SPECIAL_ROLE_WIZARD
//ticker.mode.learn_basic_spells(current)
ticker.mode.update_wiz_icons_added(src)
SSticker.mode.update_wiz_icons_added(src)
SEND_SOUND(current, 'sound/ambience/antag/ragesmages.ogg')
to_chat(current, "<span class='danger'>You are a Space Wizard!</span>")
current.faction = list("wizard")
@@ -880,15 +880,15 @@
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")
ticker.mode.equip_wizard(current)
SSticker.mode.equip_wizard(current)
log_admin("[key_name(usr)] has equipped [key_name(current)] as a wizard")
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a wizard")
if("name")
ticker.mode.name_wizard(current)
SSticker.mode.name_wizard(current)
log_admin("[key_name(usr)] has allowed wizard [key_name(current)] to name themselves")
message_admins("[key_name_admin(usr)] has allowed wizard [key_name_admin(current)] to name themselves")
if("autoobjectives")
ticker.mode.forge_wizard_objectives(src)
SSticker.mode.forge_wizard_objectives(src)
to_chat(usr, "<span class='notice'>The objectives for wizard [key] have been generated. You can edit them and announce manually.</span>")
log_admin("[key_name(usr)] has automatically forged wizard objectives for [key_name(current)]")
message_admins("[key_name_admin(usr)] has automatically forged wizard objectives for [key_name_admin(current)]")
@@ -897,20 +897,20 @@
else if(href_list["changeling"])
switch(href_list["changeling"])
if("clear")
if(src in ticker.mode.changelings)
ticker.mode.changelings -= src
if(src in SSticker.mode.changelings)
SSticker.mode.changelings -= src
special_role = null
current.remove_changeling_powers()
ticker.mode.update_change_icons_removed(src)
SSticker.mode.update_change_icons_removed(src)
if(changeling) qdel(changeling)
to_chat(current, "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a changeling and are stuck in your current form!</B></FONT>")
log_admin("[key_name(usr)] has de-changelinged [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-changelinged [key_name_admin(current)]")
if("changeling")
if(!(src in ticker.mode.changelings))
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
ticker.mode.update_change_icons_added(src)
if(!(src in SSticker.mode.changelings))
SSticker.mode.changelings += src
SSticker.mode.grant_changeling_powers(current)
SSticker.mode.update_change_icons_added(src)
special_role = SPECIAL_ROLE_CHANGELING
SEND_SOUND(current, 'sound/ambience/antag/ling_aler.ogg')
to_chat(current, "<B><font color='red'>Your powers have awoken. A flash of memory returns to us... we are a changeling!</font></B>")
@@ -918,7 +918,7 @@
message_admins("[key_name_admin(usr)] has changelinged [key_name_admin(current)]")
if("autoobjectives")
ticker.mode.forge_changeling_objectives(src)
SSticker.mode.forge_changeling_objectives(src)
to_chat(usr, "<span class='notice'>The objectives for changeling [key] have been generated. You can edit them and announce manually.</span>")
log_admin("[key_name(usr)] has automatically forged objectives for [key_name(current)]")
message_admins("[key_name_admin(usr)] has automatically forged objectives for [key_name_admin(current)]")
@@ -937,22 +937,22 @@
else if(href_list["vampire"])
switch(href_list["vampire"])
if("clear")
if(src in ticker.mode.vampires)
ticker.mode.vampires -= src
if(src in SSticker.mode.vampires)
SSticker.mode.vampires -= src
special_role = null
if(vampire)
vampire.remove_vampire_powers()
qdel(vampire)
vampire = null
ticker.mode.update_vampire_icons_removed(src)
SSticker.mode.update_vampire_icons_removed(src)
to_chat(current, "<FONT color='red' size = 3><B>You grow weak and lose your powers! You are no longer a vampire and are stuck in your current form!</B></FONT>")
log_admin("[key_name(usr)] has de-vampired [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-vampired [key_name_admin(current)]")
if("vampire")
if(!(src in ticker.mode.vampires))
ticker.mode.vampires += src
ticker.mode.grant_vampire_powers(current)
ticker.mode.update_vampire_icons_added(src)
if(!(src in SSticker.mode.vampires))
SSticker.mode.vampires += src
SSticker.mode.grant_vampire_powers(current)
SSticker.mode.update_vampire_icons_added(src)
var/datum/mindslaves/slaved = new()
slaved.masters += src
som = slaved //we MIGT want to mindslave someone
@@ -963,7 +963,7 @@
message_admins("[key_name_admin(usr)] has vampired [key_name_admin(current)]")
if("autoobjectives")
ticker.mode.forge_vampire_objectives(src)
SSticker.mode.forge_vampire_objectives(src)
to_chat(usr, "<span class='notice'>The objectives for vampire [key] have been generated. You can edit them and announce manually.</span>")
log_admin("[key_name(usr)] has automatically forged objectives for [key_name(current)]")
message_admins("[key_name_admin(usr)] has automatically forged objectives for [key_name_admin(current)]")
@@ -971,8 +971,8 @@
else if(href_list["vampthrall"])
switch(href_list["vampthrall"])
if("clear")
if(src in ticker.mode.vampire_enthralled)
ticker.mode.remove_vampire_mind(src)
if(src in SSticker.mode.vampire_enthralled)
SSticker.mode.remove_vampire_mind(src)
log_admin("[key_name(usr)] has de-vampthralled [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-vampthralled [key_name_admin(current)]")
@@ -981,9 +981,9 @@
switch(href_list["nuclear"])
if("clear")
if(src in ticker.mode.syndicates)
ticker.mode.syndicates -= src
ticker.mode.update_synd_icons_removed(src)
if(src in SSticker.mode.syndicates)
SSticker.mode.syndicates -= src
SSticker.mode.update_synd_icons_removed(src)
special_role = null
for(var/datum/objective/nuclear/O in objectives)
objectives-=O
@@ -992,17 +992,17 @@
log_admin("[key_name(usr)] has de-nuke op'd [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-nuke op'd [key_name_admin(current)]")
if("nuclear")
if(!(src in ticker.mode.syndicates))
ticker.mode.syndicates += src
ticker.mode.update_synd_icons_added(src)
if(ticker.mode.syndicates.len==1)
ticker.mode.prepare_syndicate_leader(src)
if(!(src in SSticker.mode.syndicates))
SSticker.mode.syndicates += src
SSticker.mode.update_synd_icons_added(src)
if(SSticker.mode.syndicates.len==1)
SSticker.mode.prepare_syndicate_leader(src)
else
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
current.real_name = "[syndicate_name()] Operative #[SSticker.mode.syndicates.len-1]"
special_role = SPECIAL_ROLE_NUKEOPS
to_chat(current, "<span class='notice'>You are a [syndicate_name()] agent!</span>")
ticker.mode.forge_syndicate_objectives(src)
ticker.mode.greet_syndicate(src)
SSticker.mode.forge_syndicate_objectives(src)
SSticker.mode.greet_syndicate(src)
log_admin("[key_name(usr)] has nuke op'd [key_name(current)]")
message_admins("[key_name_admin(usr)] has nuke op'd [key_name_admin(current)]")
if("lair")
@@ -1022,10 +1022,10 @@
qdel(H.wear_suit)
qdel(H.w_uniform)
if(!ticker.mode.equip_syndicate(current))
if(!SSticker.mode.equip_syndicate(current))
to_chat(usr, "<span class='warning'>Equipping a syndicate failed!</span>")
return
ticker.mode.update_syndicate_id(current.mind, ticker.mode.syndicates.len == 1)
SSticker.mode.update_syndicate_id(current.mind, SSticker.mode.syndicates.len == 1)
log_admin("[key_name(usr)] has equipped [key_name(current)] as a nuclear operative")
message_admins("[key_name_admin(usr)] has equipped [key_name_admin(current)] as a nuclear operative")
@@ -1046,27 +1046,27 @@
else if(href_list["eventmisc"])
switch(href_list["eventmisc"])
if("clear")
if(src in ticker.mode.eventmiscs)
ticker.mode.eventmiscs -= src
ticker.mode.update_eventmisc_icons_removed(src)
if(src in SSticker.mode.eventmiscs)
SSticker.mode.eventmiscs -= src
SSticker.mode.update_eventmisc_icons_removed(src)
special_role = null
message_admins("[key_name_admin(usr)] has de-eventantag'ed [current].")
log_admin("[key_name(usr)] has de-eventantag'ed [current].")
if("eventmisc")
ticker.mode.eventmiscs += src
SSticker.mode.eventmiscs += src
special_role = SPECIAL_ROLE_EVENTMISC
ticker.mode.update_eventmisc_icons_added(src)
SSticker.mode.update_eventmisc_icons_added(src)
message_admins("[key_name_admin(usr)] has eventantag'ed [current].")
log_admin("[key_name(usr)] has eventantag'ed [current].")
else if(href_list["devil"])
switch(href_list["devil"])
if("clear")
if(src in ticker.mode.devils)
if(src in SSticker.mode.devils)
if(istype(current,/mob/living/carbon/true_devil/))
to_chat(usr,"<span class='warning'>This cannot be used on true or arch-devils.</span>")
else
ticker.mode.devils -= src
ticker.mode.update_devil_icons_removed(src)
SSticker.mode.devils -= src
SSticker.mode.update_devil_icons_removed(src)
special_role = null
to_chat(current,"<span class='userdanger'>Your infernal link has been severed! You are no longer a devil!</span>")
RemoveSpell(/obj/effect/proc_holder/spell/targeted/infernal_jaunt)
@@ -1085,8 +1085,8 @@
S.laws.clear_sixsixsix_laws()
devilinfo = null
log_admin("[key_name(usr)] has de-devil'ed [current].")
else if(src in ticker.mode.sintouched)
ticker.mode.sintouched -= src
else if(src in SSticker.mode.sintouched)
SSticker.mode.sintouched -= src
message_admins("[key_name_admin(usr)] has de-sintouch'ed [current].")
log_admin("[key_name(usr)] has de-sintouch'ed [current].")
if("devil")
@@ -1098,12 +1098,12 @@
if(!ishuman(current) && !isrobot(current))
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
return
ticker.mode.devils += src
SSticker.mode.devils += src
special_role = "devil"
ticker.mode.update_devil_icons_added(src)
ticker.mode.finalize_devil(src, FALSE)
ticker.mode.forge_devil_objectives(src, 2)
ticker.mode.greet_devil(src)
SSticker.mode.update_devil_icons_added(src)
SSticker.mode.finalize_devil(src, FALSE)
SSticker.mode.forge_devil_objectives(src, 2)
SSticker.mode.greet_devil(src)
message_admins("[key_name_admin(usr)] has devil'ed [current].")
log_admin("[key_name(usr)] has devil'ed [current].")
if("ascendable_devil")
@@ -1115,12 +1115,12 @@
if(!ishuman(current) && !isrobot(current))
to_chat(usr, "<span class='warning'>This only works on humans and cyborgs!</span>")
return
ticker.mode.devils += src
SSticker.mode.devils += src
special_role = "devil"
ticker.mode.update_devil_icons_added(src)
ticker.mode.finalize_devil(src, TRUE)
ticker.mode.forge_devil_objectives(src, 2)
ticker.mode.greet_devil(src)
SSticker.mode.update_devil_icons_added(src)
SSticker.mode.finalize_devil(src, TRUE)
SSticker.mode.forge_devil_objectives(src, 2)
SSticker.mode.greet_devil(src)
message_admins("[key_name_admin(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
log_admin("[key_name(usr)] has devil'ed [current]. The devil has been marked as ascendable.")
if("sintouched")
@@ -1132,8 +1132,8 @@
else if(href_list["traitor"])
switch(href_list["traitor"])
if("clear")
if(src in ticker.mode.traitors)
ticker.mode.traitors -= src
if(src in SSticker.mode.traitors)
SSticker.mode.traitors -= src
special_role = null
to_chat(current, "<span class='warning'><FONT size = 3><B>You have been brainwashed! You are no longer a traitor!</B></FONT></span>")
log_admin("[key_name(usr)] has de-traitored [key_name(current)]")
@@ -1145,12 +1145,12 @@
A.verbs -= /mob/living/silicon/ai/proc/choose_modules
A.malf_picker.remove_verbs(A)
qdel(A.malf_picker)
ticker.mode.update_traitor_icons_removed(src)
SSticker.mode.update_traitor_icons_removed(src)
if("traitor")
if(!(src in ticker.mode.traitors))
ticker.mode.traitors += src
if(!(src in SSticker.mode.traitors))
SSticker.mode.traitors += src
var/datum/mindslaves/slaved = new()
slaved.masters += src
som = slaved //we MIGT want to mindslave someone
@@ -1160,14 +1160,14 @@
message_admins("[key_name_admin(usr)] has traitored [key_name_admin(current)]")
if(isAI(current))
var/mob/living/silicon/ai/A = current
ticker.mode.add_law_zero(A)
SSticker.mode.add_law_zero(A)
SEND_SOUND(current, 'sound/ambience/antag/malf.ogg')
else
SEND_SOUND(current, 'sound/ambience/antag/tatoralert.ogg')
ticker.mode.update_traitor_icons_added(src)
SSticker.mode.update_traitor_icons_added(src)
if("autoobjectives")
ticker.mode.forge_traitor_objectives(src)
SSticker.mode.forge_traitor_objectives(src)
to_chat(usr, "<span class='notice'>The objectives for traitor [key] have been generated. You can edit them and announce manually.</span>")
log_admin("[key_name(usr)] has automatically forged objectives for [key_name(current)]")
message_admins("[key_name_admin(usr)] has automatically forged objectives for [key_name_admin(current)]")
@@ -1175,17 +1175,17 @@
else if(href_list["shadowling"])
switch(href_list["shadowling"])
if("clear")
ticker.mode.update_shadow_icons_removed(src)
if(src in ticker.mode.shadows)
ticker.mode.shadows -= src
SSticker.mode.update_shadow_icons_removed(src)
if(src in SSticker.mode.shadows)
SSticker.mode.shadows -= src
special_role = null
to_chat(current, "<span class='userdanger'>Your powers have been quenched! You are no longer a shadowling!</span>")
message_admins("[key_name_admin(usr)] has de-shadowlinged [current].")
log_admin("[key_name(usr)] has de-shadowlinged [current].")
current.spellremove(current)
current.remove_language("Shadowling Hivemind")
else if(src in ticker.mode.shadowling_thralls)
ticker.mode.remove_thrall(src,0)
else if(src in SSticker.mode.shadowling_thralls)
SSticker.mode.remove_thrall(src,0)
message_admins("[key_name_admin(usr)] has de-thrall'ed [current].")
log_admin("[key_name(usr)] has de-thralled [key_name(current)]")
message_admins("[key_name_admin(usr)] has de-thralled [key_name_admin(current)]")
@@ -1193,20 +1193,20 @@
if(!ishuman(current))
to_chat(usr, "<span class='warning'>This only works on humans!</span>")
return
ticker.mode.shadows += src
SSticker.mode.shadows += src
special_role = SPECIAL_ROLE_SHADOWLING
to_chat(current, "<span class='shadowling'><b>Something stirs deep in your mind. A red light floods your vision, and slowly you remember. Though your human disguise has served you well, the \
time is nigh to cast it off and enter your true form. You have disguised yourself amongst the humans, but you are not one of them. You are a shadowling, and you are to ascend at all costs.\
</b></span>")
ticker.mode.finalize_shadowling(src)
ticker.mode.update_shadow_icons_added(src)
SSticker.mode.finalize_shadowling(src)
SSticker.mode.update_shadow_icons_added(src)
log_admin("[key_name(usr)] has shadowlinged [key_name(current)]")
message_admins("[key_name_admin(usr)] has shadowlinged [key_name_admin(current)]")
if("thrall")
if(!ishuman(current))
to_chat(usr, "<span class='warning'>This only works on humans!</span>")
return
ticker.mode.add_thrall(src)
SSticker.mode.add_thrall(src)
message_admins("[key_name_admin(usr)] has thralled [current].")
log_admin("[key_name(usr)] has thralled [current].")
@@ -1221,7 +1221,7 @@
return
make_Abductor()
log_admin("[key_name(usr)] turned [current] into abductor.")
ticker.mode.update_abductor_icons_added(src)
SSticker.mode.update_abductor_icons_added(src)
if("equip")
if(!ishuman(current))
to_chat(usr, "<span class='warning'>This only works on humans!</span>")
@@ -1306,7 +1306,7 @@
log_admin("[key_name(usr)] has set [key_name(current)]'s telecrystals to [crystals]")
message_admins("[key_name_admin(usr)] has set [key_name_admin(current)]'s telecrystals to [crystals]")
if("uplink")
if(!ticker.mode.equip_traitor(current, !(src in ticker.mode.traitors)))
if(!SSticker.mode.equip_traitor(current, !(src in SSticker.mode.traitors)))
to_chat(usr, "<span class='warning'>Equipping a syndicate failed!</span>")
return
log_admin("[key_name(usr)] has given [key_name(current)] an uplink")
@@ -1392,27 +1392,27 @@
qdel(H)
/datum/mind/proc/make_Traitor()
if(!(src in ticker.mode.traitors))
ticker.mode.traitors += src
if(!(src in SSticker.mode.traitors))
SSticker.mode.traitors += src
special_role = SPECIAL_ROLE_TRAITOR
ticker.mode.forge_traitor_objectives(src)
ticker.mode.finalize_traitor(src)
ticker.mode.greet_traitor(src)
ticker.mode.update_traitor_icons_added(src)
SSticker.mode.forge_traitor_objectives(src)
SSticker.mode.finalize_traitor(src)
SSticker.mode.greet_traitor(src)
SSticker.mode.update_traitor_icons_added(src)
/datum/mind/proc/make_Nuke()
if(!(src in ticker.mode.syndicates))
ticker.mode.syndicates += src
ticker.mode.update_synd_icons_added(src)
if(ticker.mode.syndicates.len==1)
ticker.mode.prepare_syndicate_leader(src)
if(!(src in SSticker.mode.syndicates))
SSticker.mode.syndicates += src
SSticker.mode.update_synd_icons_added(src)
if(SSticker.mode.syndicates.len==1)
SSticker.mode.prepare_syndicate_leader(src)
else
current.real_name = "[syndicate_name()] Operative #[ticker.mode.syndicates.len-1]"
current.real_name = "[syndicate_name()] Operative #[SSticker.mode.syndicates.len-1]"
special_role = SPECIAL_ROLE_NUKEOPS
assigned_role = SPECIAL_ROLE_NUKEOPS
to_chat(current, "<span class='notice'>You are a [syndicate_name()] agent!</span>")
ticker.mode.forge_syndicate_objectives(src)
ticker.mode.greet_syndicate(src)
SSticker.mode.forge_syndicate_objectives(src)
SSticker.mode.greet_syndicate(src)
current.loc = get_turf(locate("landmark*Syndicate-Spawn"))
@@ -1429,34 +1429,34 @@
qdel(H.wear_suit)
qdel(H.w_uniform)
ticker.mode.equip_syndicate(current)
SSticker.mode.equip_syndicate(current)
/datum/mind/proc/make_Vampire()
if(!(src in ticker.mode.vampires))
ticker.mode.vampires += src
ticker.mode.grant_vampire_powers(current)
if(!(src in SSticker.mode.vampires))
SSticker.mode.vampires += src
SSticker.mode.grant_vampire_powers(current)
special_role = SPECIAL_ROLE_VAMPIRE
ticker.mode.forge_vampire_objectives(src)
ticker.mode.greet_vampire(src)
ticker.mode.update_vampire_icons_added(src)
SSticker.mode.forge_vampire_objectives(src)
SSticker.mode.greet_vampire(src)
SSticker.mode.update_vampire_icons_added(src)
/datum/mind/proc/make_Changeling()
if(!(src in ticker.mode.changelings))
ticker.mode.changelings += src
ticker.mode.grant_changeling_powers(current)
if(!(src in SSticker.mode.changelings))
SSticker.mode.changelings += src
SSticker.mode.grant_changeling_powers(current)
special_role = SPECIAL_ROLE_CHANGELING
ticker.mode.forge_changeling_objectives(src)
ticker.mode.greet_changeling(src)
ticker.mode.update_change_icons_added(src)
SSticker.mode.forge_changeling_objectives(src)
SSticker.mode.greet_changeling(src)
SSticker.mode.update_change_icons_added(src)
/datum/mind/proc/make_Overmind()
if(!(src in ticker.mode.blob_overminds))
ticker.mode.blob_overminds += src
if(!(src in SSticker.mode.blob_overminds))
SSticker.mode.blob_overminds += src
special_role = SPECIAL_ROLE_BLOB_OVERMIND
/datum/mind/proc/make_Wizard()
if(!(src in ticker.mode.wizards))
ticker.mode.wizards += src
if(!(src in SSticker.mode.wizards))
SSticker.mode.wizards += src
special_role = SPECIAL_ROLE_WIZARD
assigned_role = SPECIAL_ROLE_WIZARD
//ticker.mode.learn_basic_spells(current)
@@ -1466,18 +1466,18 @@
else
current.loc = pick(wizardstart)
ticker.mode.equip_wizard(current)
SSticker.mode.equip_wizard(current)
for(var/obj/item/spellbook/S in current.contents)
S.op = 0
ticker.mode.name_wizard(current)
ticker.mode.forge_wizard_objectives(src)
ticker.mode.greet_wizard(src)
ticker.mode.update_wiz_icons_added(src)
SSticker.mode.name_wizard(current)
SSticker.mode.forge_wizard_objectives(src)
SSticker.mode.greet_wizard(src)
SSticker.mode.update_wiz_icons_added(src)
/datum/mind/proc/make_Rev()
if(ticker.mode.head_revolutionaries.len>0)
if(SSticker.mode.head_revolutionaries.len>0)
// copy targets
var/datum/mind/valid_head = locate() in ticker.mode.head_revolutionaries
var/datum/mind/valid_head = locate() in SSticker.mode.head_revolutionaries
if(valid_head)
for(var/datum/objective/mutiny/O in valid_head.objectives)
var/datum/objective/mutiny/rev_obj = new
@@ -1485,13 +1485,13 @@
rev_obj.target = O.target
rev_obj.explanation_text = "Assassinate [O.target.current.real_name], the [O.target.assigned_role]."
objectives += rev_obj
ticker.mode.greet_revolutionary(src,0)
ticker.mode.head_revolutionaries += src
ticker.mode.update_rev_icons_added(src)
SSticker.mode.greet_revolutionary(src,0)
SSticker.mode.head_revolutionaries += src
SSticker.mode.update_rev_icons_added(src)
special_role = SPECIAL_ROLE_HEAD_REV
ticker.mode.forge_revolutionary_objectives(src)
ticker.mode.greet_revolutionary(src,0)
SSticker.mode.forge_revolutionary_objectives(src)
SSticker.mode.greet_revolutionary(src,0)
var/list/L = current.get_contents()
var/obj/item/flash/flash = locate() in L
@@ -1499,7 +1499,7 @@
take_uplink()
var/fail = 0
// fail |= !ticker.mode.equip_traitor(current, 1)
fail |= !ticker.mode.equip_revolutionary(current)
fail |= !SSticker.mode.equip_revolutionary(current)
/datum/mind/proc/make_Abductor()
var/role = alert("Abductor Role ?","Role","Agent","Scientist")
@@ -1512,7 +1512,7 @@
if(!ishuman(current))
return
ticker.mode.abductors |= src
SSticker.mode.abductors |= src
var/datum/objective/experiment/O = new
O.owner = src
@@ -1621,15 +1621,15 @@
var/list/implanters
var/ref = "\ref[missionary.mind]"
if(!(missionary.mind in ticker.mode.implanter))
ticker.mode.implanter[ref] = list()
implanters = ticker.mode.implanter[ref]
if(!(missionary.mind in SSticker.mode.implanter))
SSticker.mode.implanter[ref] = list()
implanters = SSticker.mode.implanter[ref]
implanters.Add(src)
ticker.mode.implanted.Add(src)
ticker.mode.implanted[src] = missionary.mind
SSticker.mode.implanted.Add(src)
SSticker.mode.implanted[src] = missionary.mind
//ticker.mode.implanter[missionary.mind] += src
ticker.mode.implanter[ref] = implanters
ticker.mode.traitors += src
SSticker.mode.implanter[ref] = implanters
SSticker.mode.traitors += src
special_role = "traitor"
to_chat(current, "<span class='warning'><B>You're now a loyal zealot of [missionary.name]!</B> You now must lay down your life to protect [missionary.p_them()] and assist in [missionary.p_their()] goals at any cost.</span>")
var/datum/objective/protect/mindslave/MS = new
@@ -1640,8 +1640,8 @@
for(var/datum/objective/objective in objectives)
to_chat(current, "<B>Objective #1</B>: [objective.explanation_text]")
ticker.mode.update_traitor_icons_added(missionary.mind)
ticker.mode.update_traitor_icons_added(src)//handles datahuds/observerhuds
SSticker.mode.update_traitor_icons_added(missionary.mind)
SSticker.mode.update_traitor_icons_added(src)//handles datahuds/observerhuds
if(missionary.mind.som)//do not add if not a traitor..and you just picked up a robe and staff in the hall...
var/datum/mindslaves/slaved = missionary.mind.som
@@ -1665,7 +1665,7 @@
/datum/mind/proc/remove_zealot(obj/item/clothing/under/jumpsuit = null)
if(!zealot_master) //if they aren't a zealot, we can't remove their zealot status, obviously. don't bother with the rest so we don't confuse them with the messages
return
ticker.mode.remove_traitor_mind(src)
SSticker.mode.remove_traitor_mind(src)
add_attack_logs(zealot_master, current, "Lost control of zealot")
zealot_master = null
@@ -1696,8 +1696,8 @@
mind.key = key
else
mind = new /datum/mind(key)
if(ticker)
ticker.minds += mind
if(SSticker)
SSticker.minds += mind
else
error("mind_initialize(): No ticker ready yet! Please inform Carn")
if(!mind.name)
+8 -2
View File
@@ -4,15 +4,21 @@
// Mutable appearances are children of images, just so you know.
/mutable_appearance/New()
..()
plane = FLOAT_PLANE // No clue why this is 0 by default yet images are on FLOAT_PLANE
// And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var
// Helper similar to image()
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER)
/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE)
var/mutable_appearance/MA = new()
MA.icon = icon
MA.icon_state = icon_state
MA.layer = layer
MA.plane = plane
return MA
/mutable_appearance/clean
/mutable_appearance/clean/New()
. = ..()
alpha = 255
+8 -1
View File
@@ -25,6 +25,7 @@
var/list/implants = null
var/list/cybernetic_implants = null
var/list/chameleon_extras //extra types for chameleon outfit changes, mostly guns
/datum/outfit/proc/pre_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
//to be overriden for customization depending on client prefs,species etc
@@ -151,4 +152,10 @@
H.r_store.add_fingerprint(H, 1)
if(H.wear_pda)
H.wear_pda.add_fingerprint(H, 1)
return 1
return 1
/datum/outfit/proc/get_chameleon_disguise_info()
var/list/types = list(uniform, suit, back, belt, gloves, shoes, head, mask, l_ear, r_ear, glasses, id, l_pocket, r_pocket, suit_store, r_hand, l_hand, pda)
types += chameleon_extras
listclearnulls(types)
return types
+4 -4
View File
@@ -123,7 +123,7 @@
/datum/outfit/admin/syndicate/spy
name = "Syndicate Spy"
uniform = /obj/item/clothing/under/suit_jacket/really_black
shoes = /obj/item/clothing/shoes/syndigaloshes/black
shoes = /obj/item/clothing/shoes/chameleon/noslip
uplink_uses = 40
id_access = "Syndicate Agent"
@@ -228,7 +228,7 @@
back = /obj/item/storage/backpack
belt = /obj/item/storage/belt/utility/full/multitool
gloves = /obj/item/clothing/gloves/combat
shoes = /obj/item/clothing/shoes/syndigaloshes/black
shoes = /obj/item/clothing/shoes/chameleon/noslip
l_ear = /obj/item/radio/headset/centcom
id = /obj/item/card/id
pda = /obj/item/pda
@@ -990,7 +990,7 @@
suit = /obj/item/clothing/suit/hooded/chaplain_hoodie
back = /obj/item/storage/backpack
gloves = /obj/item/clothing/gloves/combat
shoes = /obj/item/clothing/shoes/syndigaloshes/black
shoes = /obj/item/clothing/shoes/chameleon/noslip
l_ear = /obj/item/radio/headset/syndicate
id = /obj/item/card/id/syndicate
l_hand = /obj/item/twohanded/dualsaber/red
@@ -1021,7 +1021,7 @@
suit = /obj/item/clothing/suit/draculacoat
back = /obj/item/storage/backpack
gloves = /obj/item/clothing/gloves/combat
shoes = /obj/item/clothing/shoes/syndigaloshes/black
shoes = /obj/item/clothing/shoes/chameleon/noslip
l_ear = /obj/item/radio/headset/syndicate
id = /obj/item/card/id
backpack_contents = list(
+1 -1
View File
@@ -118,7 +118,7 @@
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)
proc/process_newscaster()
check_for_newscaster_updates(ticker.mode.newscaster_announcements)
check_for_newscaster_updates(SSticker.mode.newscaster_announcements)
var/global/tmp/announced_news_types = list()
proc/check_for_newscaster_updates(type)
+15
View File
@@ -25,6 +25,11 @@
port_id = "ferry"
name = "Base Shuttle Template (Ferry)"
/datum/map_template/shuttle/admin
port_id = "admin"
name = "Base Shuttle Template (Admin)"
// Shuttles start here:
@@ -117,3 +122,13 @@
definitely no zombifyin' reagents!"
admin_notes = "Meat currently contains no zombifying reagents, people on \
meatspike must be spawned in."
/datum/map_template/shuttle/admin/hospital
suffix = "hospital"
name = "NHV Asclepius"
description = "Nanostrasen Hospital ship, for medical assistance during disasters."
/datum/map_template/shuttle/admin/admin
suffix = "admin"
name = "NTV Argos"
description = "Default Admin ship. An older ship used for special operations."
+2 -2
View File
@@ -64,9 +64,9 @@
spawn(0) // allows cast to complete even if recipient ignores the prompt
if(alert(target, "[user] wants to bless you, in the name of [user.p_their()] religion. Accept?", "Accept Blessing?", "Yes", "No") == "Yes") // prevents forced conversions
user.visible_message("[user] starts blessing [target] in the name of [ticker.Bible_deity_name].", "<span class='notice'>You start blessing [target] in the name of [ticker.Bible_deity_name].</span>")
user.visible_message("[user] starts blessing [target] in the name of [SSticker.Bible_deity_name].", "<span class='notice'>You start blessing [target] in the name of [SSticker.Bible_deity_name].</span>")
if(do_after(user, 150, target = target))
user.visible_message("[user] has blessed [target] in the name of [ticker.Bible_deity_name].", "<span class='notice'>You have blessed [target] in the name of [ticker.Bible_deity_name].</span>")
user.visible_message("[user] has blessed [target] in the name of [SSticker.Bible_deity_name].", "<span class='notice'>You have blessed [target] in the name of [SSticker.Bible_deity_name].</span>")
if(!target.mind.isblessed)
target.mind.isblessed = TRUE
user.mind.num_blessed++
+1 -1
View File
@@ -20,7 +20,7 @@
action_icon_state = "skeleton"
/obj/effect/proc_holder/spell/targeted/lichdom/Destroy()
for(var/datum/mind/M in ticker.mode.wizards) //Make sure no other bones are about
for(var/datum/mind/M in SSticker.mode.wizards) //Make sure no other bones are about
for(var/obj/effect/proc_holder/spell/S in M.spell_list)
if(istype(S,/obj/effect/proc_holder/spell/targeted/lichdom) && S != src)
return ..()
+6
View File
@@ -1073,6 +1073,12 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
containertype = /obj/structure/closet/critter/cow
containername = "cow crate"
/datum/supply_packs/organic/pig
name = "Pig Crate"
cost = 25
containertype = /obj/structure/closet/critter/pig
containername = "pig crate"
/datum/supply_packs/organic/goat
name = "Goat Crate"
cost = 25
+19 -26
View File
@@ -12,9 +12,9 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
var/datum/uplink_item/I = new path
if(!I.item)
continue
if(I.gamemodes.len && ticker && !(ticker.mode.type in I.gamemodes))
if(I.gamemodes.len && SSticker && !(SSticker.mode.type in I.gamemodes))
continue
if(I.excludefrom.len && ticker && (ticker.mode.type in I.excludefrom))
if(I.excludefrom.len && SSticker && (SSticker.mode.type in I.excludefrom))
continue
if(I.last)
last += I
@@ -1067,13 +1067,6 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/stealthy_tools
category = "Stealth and Camouflage Items"
/datum/uplink_item/stealthy_tools/chameleon_jumpsuit
name = "Chameleon Jumpsuit"
desc = "A jumpsuit used to imitate the uniforms of Nanotrasen crewmembers."
reference = "CJ"
item = /obj/item/clothing/under/chameleon
cost = 2
/datum/uplink_item/stealthy_tools/chameleon_stamp
name = "Chameleon Stamp"
desc = "A stamp that can be activated to imitate an official Nanotrasen Stamp. The disguised stamp will work exactly like the real stamp and will allow you to forge false documents to gain access or equipment; \
@@ -1092,20 +1085,19 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
surplus = 35
/datum/uplink_item/stealthy_tools/syndigaloshes
name = "No-Slip Syndicate Shoes"
desc = "These allow you to run on wet floors. They do not work on lubricated surfaces."
name = "No-Slip Chameleon Shoes"
desc = "These shoes will allow the wearer to run on wet floors and slippery objects without falling down. \
They do not work on heavily lubricated surfaces."
reference = "NSSS"
item = /obj/item/clothing/shoes/syndigaloshes
item = /obj/item/clothing/shoes/chameleon/noslip
cost = 2
excludefrom = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_tools/syndigaloshes/nuke
name = "Tactical No-Slip Brown Shoes"
desc = "These allow you to run on wet floors. They do not work on lubricated surfaces, and the maker swears they're better than normal ones, somehow."
reference = "NNSSS"
reference = "TNSSS"
cost = 4 //but they aren't
gamemodes = list(/datum/game_mode/nuclear)
excludefrom = list()
gamemodes = list(/datum/game_mode/nuclear)
/datum/uplink_item/stealthy_tools/chamsechud
name = "Chameleon Security HUD"
@@ -1146,12 +1138,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
item = /obj/item/card/id/syndicate
cost = 2
/datum/uplink_item/stealthy_tools/voice_changer
name = "Voice Changer"
desc = "A conspicuous gas mask that mimics the voice named on your identification card. When no identification is worn, the mask will render your voice unrecognisable."
reference = "VC"
item = /obj/item/clothing/mask/gas/voice
cost = 3
/datum/uplink_item/stealthy_tools/chameleon
name = "Chameleon Kit"
desc = "A set of items that contain chameleon technology allowing you to disguise as pretty much anything on the station, and more! \
Due to budget cuts, the shoes don't provide protection against slipping. The set comes with a complementary chameleon stamp."
reference = "CHAM"
item = /obj/item/storage/box/syndie_kit/chameleon
cost = 2
/datum/uplink_item/stealthy_tools/chameleon_proj
name = "Chameleon-Projector"
@@ -1210,7 +1203,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
/datum/uplink_item/stealthy_tools/clownkit
name = "Honk Brand Infiltration Kit"
desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer clown mask, magnetic clown shoes, and standard clown outfit, tools, and backpack."
desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer mask, magnetic clown shoes, and standard clown outfit, tools, and backpack."
reference = "HBIK"
item = /obj/item/storage/backpack/clown/syndie
cost = 6
@@ -1544,10 +1537,10 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
cost = 12
/datum/uplink_item/cyber_implants/reviver
name = "Reviver Implant"
desc = "This implant will attempt to revive you if you lose consciousness. Comes with an automated implanting tool."
name = "Hardened Reviver Implant"
desc = "This implant will attempt to revive you if you lose consciousness. It is invulnerable to EMPs. Comes with an automated implanting tool."
reference = "CIR"
item = /obj/item/organ/internal/cyberimp/chest/reviver
item = /obj/item/organ/internal/cyberimp/chest/reviver/hardened
cost = 8
// POINTLESS BADASSERY
+6 -4
View File
@@ -1,13 +1,15 @@
/datum/vision_override
var/name = "vision override"
var/see_in_dark = 0
var/see_invisible = 0
var/light_sensitive = 0
var/sight_flags = 0
var/see_in_dark = 0
var/lighting_alpha
var/light_sensitive = 0
/datum/vision_override/nightvision
see_in_dark = 8
see_invisible = SEE_INVISIBLE_MINIMUM
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
/datum/vision_override/nightvision/thermals
sight_flags = SEE_MOBS
+4 -2
View File
@@ -28,6 +28,7 @@
var/impacted_z_levels // The list of z-levels that this weather is actively affecting
var/overlay_layer = AREA_LAYER //Since it's above everything else, this is the layer used by default. TURF_LAYER is below mobs and walls if you need to use that.
var/overlay_plane = BLACKNESS_PLANE
var/aesthetic = FALSE //If the weather has no purpose other than looks
var/immunity_type = "storm" //Used by mobs to prevent them from being affected by the weather
@@ -121,6 +122,7 @@
for(var/V in impacted_areas)
var/area/N = V
N.layer = overlay_layer
N.plane = overlay_plane
N.icon = 'icons/effects/weather_effects.dmi'
N.invisibility = 0
N.color = weather_color
@@ -135,6 +137,6 @@
N.color = null
N.icon_state = ""
N.icon = 'icons/turf/areas.dmi'
N.layer = AREA_LAYER //Just default back to normal area stuff since I assume setting a var is faster than initial
N.invisibility = INVISIBILITY_MAXIMUM
N.layer = initial(N.layer)
N.plane = initial(N.plane)
N.set_opacity(FALSE)
@@ -19,6 +19,7 @@
target_trait = STATION_LEVEL
overlay_layer = ABOVE_OPEN_TURF_LAYER //Covers floors only
overlay_plane = FLOOR_PLANE
immunity_type = "lava"
+6 -3
View File
@@ -24,18 +24,21 @@
match_tag = "arrivals"
match_width = 5
match_height = 4
requires_power = 0
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
/area/dynamic/source/lobby_russian
name = "\improper Russian Lounge"
match_tag = "arrivals"
match_width = 5
match_height = 4
requires_power = 0
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
/area/dynamic/source/lobby_disco
name = "\improper Disco Lounge"
match_tag = "arrivals"
match_width = 5
match_height = 4
requires_power = 0
requires_power = FALSE
dynamic_lighting = DYNAMIC_LIGHTING_FORCED
File diff suppressed because it is too large Load Diff
+85 -41
View File
@@ -1,9 +1,61 @@
// Areas.dm
// ===
/area
var/fire = null
var/atmosalm = ATMOS_ALARM_NONE
var/poweralm = TRUE
var/party = null
var/report_alerts = TRUE // Should atmos alerts notify the AI/computers
level = null
name = "Space"
icon = 'icons/turf/areas.dmi'
icon_state = "unknown"
layer = AREA_LAYER
plane = BLACKNESS_PLANE //Keeping this on the default plane, GAME_PLANE, will make area overlays fail to render on FLOOR_PLANE.
luminosity = 0
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
invisibility = INVISIBILITY_LIGHTING
var/valid_territory = TRUE //used for cult summoning areas on station zlevel
var/map_name // Set in New(); preserves the name set by the map maker, even if renamed by the Blueprints.
var/lightswitch = TRUE
var/eject = null
var/debug = 0
var/requires_power = TRUE
var/always_unpowered = 0 //this gets overriden to 1 for space in area/New()
var/power_equip = TRUE
var/power_light = TRUE
var/power_environ = TRUE
var/music = null
var/used_equip = FALSE
var/used_light = FALSE
var/used_environ = FALSE
var/static_equip
var/static_light = FALSE
var/static_environ
var/has_gravity = TRUE
var/list/apc = list()
var/no_air = null
var/air_doors_activated = FALSE
var/tele_proof = FALSE
var/no_teleportlocs = FALSE
var/outdoors = FALSE //For space, the asteroid, lavaland, etc. Used with blueprints to determine if we are adding a new area (vs editing a station room)
var/xenobiology_compatible = FALSE //Can the Xenobio management console transverse this area by default?
var/nad_allowed = FALSE //is the station NAD allowed on this area?
// This var is used with the maploader (modules/awaymissions/maploader/reader.dm)
// if this is 1, when used in a map snippet, this will instantiate a unique
// area from any other instances already present (meaning you can have
// separate APCs, and so on)
var/there_can_be_many = FALSE
var/global/global_uid = 0
var/uid
var/list/ambientsounds = list('sound/ambience/ambigen1.ogg','sound/ambience/ambigen3.ogg',\
'sound/ambience/ambigen4.ogg','sound/ambience/ambigen5.ogg',\
'sound/ambience/ambigen6.ogg','sound/ambience/ambigen7.ogg',\
@@ -11,42 +63,47 @@
'sound/ambience/ambigen10.ogg','sound/ambience/ambigen11.ogg',\
'sound/ambience/ambigen12.ogg','sound/ambience/ambigen14.ogg')
// This var is used with the maploader (modules/awaymissions/maploader/reader.dm)
// if this is 1, when used in a map snippet, this will instantiate a unique
// area from any other instances already present (meaning you can have
// separate APCs, and so on)
var/there_can_be_many = 0
var/fast_despawn = FALSE
/area/New()
..()
/area/Initialize(mapload)
GLOB.all_areas += src
icon_state = ""
layer = AREA_LAYER
uid = ++global_uid
GLOB.all_areas += src
map_name = name // Save the initial (the name set in the map) name of the area.
if(type == /area) // override defaults for space. TODO: make space areas of type /area/space rather than /area
requires_power = 1
always_unpowered = 1
dynamic_lighting = 1
power_light = 0
power_equip = 0
power_environ = 0
// lighting_state = 4
//has_gravity = 0 // Space has gravity. Because.. because.
if(requires_power)
luminosity = 0
else
power_light = TRUE
power_equip = TRUE
power_environ = TRUE
if(requires_power != 0)
power_light = 0 //rastaf0
power_equip = 0 //rastaf0
power_environ = 0 //rastaf0
if(dynamic_lighting == DYNAMIC_LIGHTING_FORCED)
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
luminosity = 0
else if(dynamic_lighting != DYNAMIC_LIGHTING_IFSTARLIGHT)
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
if(dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
dynamic_lighting = config.starlight ? DYNAMIC_LIGHTING_ENABLED : DYNAMIC_LIGHTING_DISABLED
. = ..()
blend_mode = BLEND_MULTIPLY // Putting this in the constructor so that it stops the icons being screwed up in the map editor.
/area/Initialize()
. = ..()
if(!IS_DYNAMIC_LIGHTING(src))
add_overlay(/obj/effect/fullbright)
reg_in_areas_in_z()
return INITIALIZE_HINT_LATELOAD
/area/LateInitialize()
. = ..()
power_change() // all machines set to current power level, also updates lighting icon
/area/proc/reg_in_areas_in_z()
if(contents.len)
var/list/areas_in_z = space_manager.areas_in_z
var/z
@@ -63,12 +120,6 @@
areas_in_z["[z]"] = list()
areas_in_z["[z]"] += src
return INITIALIZE_HINT_LATELOAD
/area/LateInitialize()
. = ..()
power_change() // all machines set to current power level, also updates lighting icon
/area/proc/get_cameras()
var/list/cameras = list()
for(var/obj/machinery/camera/C in src)
@@ -199,7 +250,6 @@
icon_state = "party"
else
icon_state = "blue-red"
invisibility = INVISIBILITY_LIGHTING
else
var/weather_icon
for(var/V in SSweather.processing)
@@ -209,12 +259,9 @@
weather_icon = TRUE
if(!weather_icon)
icon_state = null
invisibility = INVISIBILITY_MAXIMUM
/area/space/updateicon()
icon_state = null
invisibility = INVISIBILITY_MAXIMUM
/*
#define EQUIP 1
@@ -317,9 +364,6 @@
M.lastarea = src
// /vg/ - EVENTS!
callHook("mob_area_change", list("mob" = M, "newarea" = newarea, "oldarea" = oldarea))
if(!istype(A,/mob/living)) return
var/mob/living/L = A
+2
View File
@@ -30,7 +30,9 @@ var/global/max_secret_rooms = 6
T.ChangeTurf(floor)
room_turfs["floors"] += T
var/old_area = T.loc
A.contents += T
T.change_area(old_area, A)
return room_turfs

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