mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-19 11:05:03 +01:00
Merge pull request #11357 from Markolie/lighting
Lighting system update
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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,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
|
||||
|
||||
+81
-31
@@ -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
|
||||
+8
-29
@@ -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
|
||||
@@ -402,9 +375,15 @@
|
||||
#define GHOST_ORBIT_SQUARE "square"
|
||||
#define GHOST_ORBIT_PENTAGON "pentagon"
|
||||
|
||||
//suit sensors: sensor_mode defines
|
||||
// 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
|
||||
#define SENSOR_COORDS 3
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
+20
-2
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
@@ -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)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
name = ""
|
||||
icon = 'icons/mob/screen_gen.dmi'
|
||||
layer = HUD_LAYER_SCREEN
|
||||
plane = HUD_PLANE
|
||||
plane = ABOVE_HUD_PLANE
|
||||
unacidable = 1
|
||||
var/obj/master = null //A reference to the object in the slot. Grabs or items, generally.
|
||||
var/datum/hud/hud = null
|
||||
@@ -47,7 +47,8 @@
|
||||
/obj/screen/drop
|
||||
name = "drop"
|
||||
icon_state = "act_drop"
|
||||
layer = 19
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/drop/Click()
|
||||
usr.drop_item_v()
|
||||
@@ -143,8 +144,9 @@
|
||||
name = "resist"
|
||||
icon = 'icons/mob/screen_midnight.dmi'
|
||||
icon_state = "act_resist"
|
||||
layer = 19
|
||||
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/resist/Click()
|
||||
if(isliving(usr))
|
||||
var/mob/living/L = usr
|
||||
@@ -327,7 +329,8 @@
|
||||
/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
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
|
||||
/obj/screen/inventory/MouseEntered()
|
||||
..()
|
||||
@@ -417,7 +420,8 @@
|
||||
return 1
|
||||
|
||||
/obj/screen/swap_hand
|
||||
layer = 19
|
||||
layer = HUD_LAYER
|
||||
plane = HUD_PLANE
|
||||
name = "swap hand"
|
||||
|
||||
/obj/screen/swap_hand/Click()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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], " | ")]")
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
@@ -137,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
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
// Mutable appearances are children of images, just so you know.
|
||||
|
||||
// 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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
+2339
-2735
File diff suppressed because it is too large
Load Diff
+85
-38
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
+7
-2
@@ -1,5 +1,6 @@
|
||||
/atom
|
||||
layer = 2
|
||||
layer = TURF_LAYER
|
||||
plane = GAME_PLANE
|
||||
var/level = 2
|
||||
var/flags = NONE
|
||||
var/flags_2 = NONE
|
||||
@@ -144,9 +145,12 @@
|
||||
alternate_appearances = null
|
||||
|
||||
QDEL_NULL(reagents)
|
||||
invisibility = 101
|
||||
invisibility = INVISIBILITY_MAXIMUM
|
||||
LAZYCLEARLIST(overlays)
|
||||
LAZYCLEARLIST(priority_overlays)
|
||||
|
||||
QDEL_NULL(light)
|
||||
|
||||
return ..()
|
||||
|
||||
//Hook for running code when a dir change occurs
|
||||
@@ -681,6 +685,7 @@ var/list/blood_splatter_icons = list()
|
||||
|
||||
//the sight changes to give to the mob whose perspective is set to that atom (e.g. A mob with nightvision loses its nightvision while looking through a normal camera)
|
||||
/atom/proc/update_remote_sight(mob/living/user)
|
||||
user.sync_lighting_plane_alpha()
|
||||
return
|
||||
|
||||
/atom/proc/checkpass(passflag)
|
||||
|
||||
@@ -178,7 +178,8 @@
|
||||
environment_smash = ENVIRONMENT_SMASH_RWALLS
|
||||
pressure_resistance = 100 //100 kPa difference required to push
|
||||
throw_pressure_limit = 120 //120 kPa difference required to throw
|
||||
|
||||
see_in_dark = 8
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
|
||||
/mob/living/simple_animal/hostile/blob/blobbernaut/blob_act()
|
||||
return
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
icon_state = "marker"
|
||||
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
invisibility = INVISIBILITY_OBSERVER
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
|
||||
pass_flags = PASSBLOB
|
||||
faction = list("blob")
|
||||
@@ -20,7 +20,6 @@
|
||||
var/is_offspring = FALSE
|
||||
var/datum/reagent/blob/blob_reagent_datum = new/datum/reagent/blob()
|
||||
var/list/blob_mobs = list()
|
||||
var/ghostimage = null
|
||||
|
||||
/mob/camera/blob/New()
|
||||
var/new_name = "[initial(name)] ([rand(1, 999)])"
|
||||
@@ -35,9 +34,6 @@
|
||||
blob_core.adjustcolors(blob_reagent_datum.color)
|
||||
|
||||
color = blob_reagent_datum.complementary_color
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
ghost_darkness_images |= ghostimage //so ghosts can see the blob cursor when they disable darkness
|
||||
updateallghostimages()
|
||||
..()
|
||||
|
||||
/mob/camera/blob/Life(seconds, times_fired)
|
||||
@@ -45,13 +41,6 @@
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/mob/camera/blob/Destroy()
|
||||
if(ghostimage)
|
||||
ghost_darkness_images -= ghostimage
|
||||
QDEL_NULL(ghostimage)
|
||||
updateallghostimages()
|
||||
return ..()
|
||||
|
||||
/mob/camera/blob/Login()
|
||||
..()
|
||||
sync_mind()
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
name = "zealot's blindfold"
|
||||
icon_state = "blindfold"
|
||||
item_state = "blindfold"
|
||||
darkness_view = 8
|
||||
see_in_dark = 8
|
||||
flash_protect = 1
|
||||
|
||||
/obj/item/clothing/glasses/night/cultblind/equipped(mob/user, slot)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
melee_damage_lower = 10
|
||||
melee_damage_upper = 15
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
var/boost
|
||||
var/playstyle_string = "<B><font size=3 color='red'>You are an imp,</font> a mischevious creature from hell. You are the lowest rank on the hellish totem pole \
|
||||
Though you are not obligated to help, perhaps by aiding a higher ranking devil, you might just get a promotion. However, you are incapable \
|
||||
|
||||
@@ -30,22 +30,6 @@
|
||||
E.insert()
|
||||
..()
|
||||
|
||||
|
||||
/mob/living/carbon/true_devil/update_sight()
|
||||
if(stat == DEAD)
|
||||
sight |= SEE_TURFS
|
||||
sight |= SEE_MOBS
|
||||
sight |= SEE_OBJS
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
else
|
||||
sight = (SEE_TURFS | SEE_OBJS)
|
||||
see_in_dark = 2
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
|
||||
if(see_override)
|
||||
see_invisible = see_override
|
||||
|
||||
// inventory system could use some love
|
||||
/mob/living/carbon/true_devil/put_in_hands(obj/item/W)
|
||||
if(!W)
|
||||
|
||||
@@ -496,22 +496,22 @@
|
||||
return
|
||||
|
||||
var/upgradedcams = 0
|
||||
see_override = SEE_INVISIBLE_MINIMUM //Night-vision, without which X-ray would be very limited in power.
|
||||
RegisterSignal(src, COMSIG_MOB_UPDATE_SIGHT, .proc/update_upgraded_cameras_sight) //Makes sure the AI has night vision, without which X-ray would be very limited in power.
|
||||
update_sight()
|
||||
|
||||
for(var/obj/machinery/camera/C in cameranet.cameras)
|
||||
if(C.assembly)
|
||||
var/upgraded = 0
|
||||
var/upgraded = FALSE
|
||||
|
||||
if(!C.isXRay())
|
||||
C.upgradeXRay()
|
||||
//Update what it can see.
|
||||
cameranet.updateVisibility(C, 0)
|
||||
upgraded = 1
|
||||
upgraded = TRUE
|
||||
|
||||
if(!C.isEmpProof())
|
||||
C.upgradeEmpProof()
|
||||
upgraded = 1
|
||||
upgraded = TRUE
|
||||
|
||||
if(upgraded)
|
||||
upgradedcams++
|
||||
@@ -519,6 +519,8 @@
|
||||
to_chat(src, "<span class='notice'>OTA firmware distribution complete! Cameras upgraded: [upgradedcams]. Light amplification system online.</span>")
|
||||
verbs -= /mob/living/silicon/ai/proc/upgrade_cameras
|
||||
|
||||
/mob/living/silicon/ai/proc/update_upgraded_cameras_sight()
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
|
||||
/datum/AI_Module/large/eavesdrop
|
||||
module_name = "Enhanced Surveillance"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
ranged = 1
|
||||
rapid = 1
|
||||
range = 13
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
see_in_dark = 8
|
||||
playstyle_string = "As a <b>Ranged</b> type, you have only light damage resistance, but are capable of spraying shards of crystal at incredibly high speed. You can also deploy surveillance snares to monitor enemy movement. Finally, you can switch to scout mode, in which you can't attack, but can move without limit."
|
||||
magic_fluff_string = "..And draw the Sentinel, an alien master of ranged combat."
|
||||
@@ -53,12 +53,24 @@
|
||||
to_chat(src, "<span class='danger'>You have to be recalled to toggle modes!</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/ranged/ToggleLight()
|
||||
if(see_invisible == SEE_INVISIBLE_MINIMUM)
|
||||
to_chat(src, "<span class='notice'>You deactivate your night vision.</span>")
|
||||
see_invisible = SEE_INVISIBLE_LIVING
|
||||
else
|
||||
to_chat(src, "<span class='notice'>You activate your night vision.</span>")
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
var/msg
|
||||
switch(lighting_alpha)
|
||||
if (LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
msg = "You activate your night vision."
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
msg = "You increase your night vision."
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
|
||||
msg = "You maximize your night vision."
|
||||
else
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE
|
||||
msg = "You deactivate your night vision."
|
||||
|
||||
update_sight()
|
||||
|
||||
to_chat(src, "<span class='notice'>[msg]</span>")
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/ranged/verb/Snare()
|
||||
set name = "Set Surveillance Trap"
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
melee_damage_lower = 20
|
||||
melee_damage_upper = 20
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
idle_vision_range = 1 // Only attack when target is close
|
||||
wander = 0
|
||||
attacktext = "glomps"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
health = INFINITY //Revenants don't use health, they use essence instead
|
||||
maxHealth = INFINITY
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
universal_understand = 1
|
||||
response_help = "passes through"
|
||||
response_disarm = "swings at"
|
||||
@@ -53,7 +53,6 @@
|
||||
var/draining = 0 //If the revenant is draining someone.
|
||||
var/list/drained_mobs = list() //Cannot harvest the same mob twice
|
||||
var/perfectsouls = 0 //How many perfect, regen-cap increasing souls the revenant has.
|
||||
var/image/ghostimage = null //Visible to ghost with darkness off
|
||||
|
||||
|
||||
/mob/living/simple_animal/revenant/Life(seconds, times_fired)
|
||||
@@ -93,13 +92,6 @@
|
||||
if(essence == 0)
|
||||
to_chat(src, "<span class='revendanger'>You feel your essence fraying!</span>")
|
||||
|
||||
/mob/living/simple_animal/revenant/update_sight()
|
||||
if(!client)
|
||||
return
|
||||
if(stat == DEAD)
|
||||
grant_death_vision()
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/revenant/say(message)
|
||||
if(!message)
|
||||
return
|
||||
@@ -122,9 +114,6 @@
|
||||
/mob/living/simple_animal/revenant/New()
|
||||
..()
|
||||
|
||||
ghostimage = image(src.icon,src,src.icon_state)
|
||||
ghost_darkness_images |= ghostimage
|
||||
updateallghostimages()
|
||||
remove_from_all_data_huds()
|
||||
random_revenant_name()
|
||||
|
||||
@@ -206,8 +195,6 @@
|
||||
. = ..()
|
||||
if(!.)
|
||||
return FALSE
|
||||
ghost_darkness_images -= ghostimage
|
||||
updateallghostimages()
|
||||
|
||||
to_chat(src, "<span class='revendanger'>NO! No... it's too late, you can feel your essence breaking apart...</span>")
|
||||
notransform = 1
|
||||
|
||||
@@ -110,8 +110,6 @@
|
||||
message = "<span class='revennotice'>You toggle your night vision.</span>"
|
||||
action_icon_state = "r_nightvision"
|
||||
action_background_icon_state = "bg_revenant"
|
||||
non_night_vision = INVISIBILITY_REVENANT
|
||||
night_vision = SEE_INVISIBLE_OBSERVER_NOLIGHTING
|
||||
|
||||
//Transmit: the revemant's only direct way to communicate. Sends a single message silently to a single mob
|
||||
/obj/effect/proc_holder/spell/targeted/revenant_transmit
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
melee_damage_lower = 30
|
||||
melee_damage_upper = 30
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
var/boost = 0
|
||||
bloodcrawl = BLOODCRAWL_EAT
|
||||
|
||||
|
||||
@@ -457,7 +457,7 @@ proc/issyndicate(mob/living/M as mob)
|
||||
var/turf/T = get_turf(nuke)
|
||||
var/area/A = T.loc
|
||||
|
||||
var/list/thousand_penalty = list(/area/syndicate_station, /area/wizard_station, /area/solar, /area)
|
||||
var/list/thousand_penalty = list(/area/wizard_station, /area/solar, /area)
|
||||
var/list/fiftythousand_penalty = list(/area/security/main, /area/security/brig, /area/security/armoury, /area/security/checkpoint2)
|
||||
|
||||
if(is_type_in_list(A, thousand_penalty))
|
||||
|
||||
@@ -67,32 +67,32 @@ datum/hSB
|
||||
P.wear_suit.plane = initial(P.wear_suit.plane)
|
||||
P.wear_suit = null
|
||||
P.wear_suit = new/obj/item/clothing/suit/space(P)
|
||||
P.wear_suit.layer = 20
|
||||
P.wear_suit.plane = HUD_PLANE
|
||||
P.wear_suit.layer = ABOVE_HUD_LAYER
|
||||
P.wear_suit.plane = ABOVE_HUD_PLANE
|
||||
if(P.head)
|
||||
P.head.loc = P.loc
|
||||
P.head.layer = initial(P.head.layer)
|
||||
P.head.plane = initial(P.head.plane)
|
||||
P.head = null
|
||||
P.head = new/obj/item/clothing/head/helmet/space(P)
|
||||
P.head.layer = 20
|
||||
P.head.plane = HUD_PLANE
|
||||
P.head.layer = ABOVE_HUD_LAYER
|
||||
P.head.plane = ABOVE_HUD_PLANE
|
||||
if(P.wear_mask)
|
||||
P.wear_mask.loc = P.loc
|
||||
P.wear_mask.layer = initial(P.wear_mask.layer)
|
||||
P.wear_mask.plane = initial(P.wear_mask.plane)
|
||||
P.wear_mask = null
|
||||
P.wear_mask = new/obj/item/clothing/mask/gas(P)
|
||||
P.wear_mask.layer = 20
|
||||
P.wear_mask.plane = HUD_PLANE
|
||||
P.wear_mask.layer = ABOVE_HUD_LAYER
|
||||
P.wear_mask.plane = ABOVE_HUD_PLANE
|
||||
if(P.back)
|
||||
P.back.loc = P.loc
|
||||
P.back.layer = initial(P.back.layer)
|
||||
P.back.plane = initial(P.back.plane)
|
||||
P.back = null
|
||||
P.back = new/obj/item/tank/jetpack(P)
|
||||
P.back.layer = 20
|
||||
P.back.plane = HUD_PLANE
|
||||
P.back.layer = ABOVE_HUD_LAYER
|
||||
P.back.plane = ABOVE_HUD_PLANE
|
||||
P.internal = P.back
|
||||
if("hsbmetal")
|
||||
var/obj/item/stack/sheet/hsb = new/obj/item/stack/sheet/metal
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
speed = 0
|
||||
var/phasing = 0
|
||||
see_in_dark = 8
|
||||
see_invisible = SEE_INVISIBLE_MINIMUM
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
|
||||
universal_speak = 1
|
||||
|
||||
|
||||
@@ -81,4 +81,5 @@
|
||||
unacidable = 1
|
||||
flash_protect = -1
|
||||
vision_flags = SEE_MOBS
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
flags = ABSTRACT | NODROP
|
||||
@@ -107,6 +107,8 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind(null))
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor(null))
|
||||
H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle(null))
|
||||
|
||||
QDEL_NULL(H.hud_used)
|
||||
H.hud_used = new /datum/hud/human(H, ui_style2icon(H.client.prefs.UI_style), H.client.prefs.UI_style_color, H.client.prefs.UI_style_alpha)
|
||||
H.hud_used.show_hud(H.hud_used.hud_version)
|
||||
|
||||
|
||||
@@ -438,9 +438,6 @@
|
||||
steam.start()
|
||||
sleep(jaunt_duration)
|
||||
var/mobloc = get_turf(user.loc)
|
||||
if(get_area(mobloc) == /area/security/armoury/gamma)
|
||||
to_chat(user, "A strange energy repels you!")
|
||||
mobloc = originalloc
|
||||
animation.loc = mobloc
|
||||
steam.location = mobloc
|
||||
steam.start()
|
||||
|
||||
@@ -146,7 +146,8 @@
|
||||
H.mutations.Add(XRAY)
|
||||
H.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
H.see_in_dark = 8
|
||||
H.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
H.update_sight()
|
||||
to_chat(H, "<span class='notice'>The walls suddenly disappear.</span>")
|
||||
if("voodoo")
|
||||
new /obj/item/voodoo(get_turf(H))
|
||||
|
||||
@@ -333,7 +333,7 @@
|
||||
user.mutations.Add(XRAY)
|
||||
user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS)
|
||||
user.see_in_dark = 8
|
||||
user.see_invisible = SEE_INVISIBLE_LEVEL_TWO
|
||||
user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
to_chat(user, "<span class='notice'>The walls suddenly disappear.</span>")
|
||||
return 1
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ var/const/access_free_golems = 300
|
||||
|
||||
var/acc = M.get_access() //see mob.dm
|
||||
|
||||
if(acc == IGNORE_ACCESS)
|
||||
if(acc == IGNORE_ACCESS || M.can_admin_interact())
|
||||
return 1 //Mob ignores access
|
||||
|
||||
else
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
icon = 'icons/obj/device.dmi'
|
||||
icon_state = "motion3"
|
||||
layer = 3
|
||||
plane = FLOOR_PLANE
|
||||
anchored = 1.0
|
||||
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0)
|
||||
var/uses = 20
|
||||
|
||||
@@ -375,38 +375,6 @@
|
||||
if(ATMOS_ALARM_DANGER)
|
||||
icon_state = "alarm1"
|
||||
|
||||
/obj/machinery/alarm/receive_signal(datum/signal/signal)
|
||||
if(stat & (NOPOWER|BROKEN) || !alarm_area)
|
||||
return
|
||||
if(alarm_area.master_air_alarm != src)
|
||||
if(master_is_operating())
|
||||
return
|
||||
elect_master()
|
||||
if(alarm_area.master_air_alarm != src)
|
||||
return
|
||||
if(!signal || signal.encryption)
|
||||
return
|
||||
var/id_tag = signal.data["tag"]
|
||||
if(!id_tag)
|
||||
return
|
||||
if(signal.data["area"] != area_uid)
|
||||
return
|
||||
if(signal.data["sigtype"] != "status")
|
||||
return
|
||||
|
||||
var/dev_type = signal.data["device"]
|
||||
if(!(id_tag in alarm_area.air_scrub_names) && !(id_tag in alarm_area.air_vent_names))
|
||||
register_env_machine(id_tag, dev_type)
|
||||
var/got_update=0
|
||||
if(dev_type == "AScr")
|
||||
alarm_area.air_scrub_info[id_tag] = signal.data
|
||||
got_update=1
|
||||
else if(dev_type == "AVP")
|
||||
alarm_area.air_vent_info[id_tag] = signal.data
|
||||
got_update=1
|
||||
if(got_update && waiting_on_device==id_tag)
|
||||
waiting_on_device=null
|
||||
|
||||
/obj/machinery/alarm/proc/register_env_machine(var/m_id, var/device_type)
|
||||
var/new_name
|
||||
if(device_type=="AVP")
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
desc = "It measures something."
|
||||
icon = 'icons/obj/meter.dmi'
|
||||
icon_state = "meterX"
|
||||
|
||||
layer = GAS_PUMP_LAYER
|
||||
|
||||
var/obj/machinery/atmospherics/pipe/target = null
|
||||
anchored = TRUE
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100)
|
||||
|
||||
@@ -382,14 +382,17 @@
|
||||
user.overlay_fullscreen("remote_view", /obj/screen/fullscreen/impaired, 2)
|
||||
|
||||
/obj/machinery/camera/update_remote_sight(mob/living/user)
|
||||
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
|
||||
if(isXRay())
|
||||
user.sight |= (SEE_TURFS|SEE_MOBS|SEE_OBJS)
|
||||
user.see_in_dark = max(user.see_in_dark, 8)
|
||||
user.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
else
|
||||
user.sight = 0
|
||||
user.see_in_dark = 2
|
||||
return 1
|
||||
user.sight = initial(user.sight)
|
||||
user.see_in_dark = initial(user.see_in_dark)
|
||||
user.lighting_alpha = initial(user.lighting_alpha)
|
||||
|
||||
..()
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/camera/portable //Cameras which are placed inside of things, such as helmets.
|
||||
var/turf/prev_turf
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
icon_state = "pod0"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
layer = 2.8
|
||||
layer = ABOVE_WINDOW_LAYER
|
||||
plane = GAME_PLANE
|
||||
interact_offline = 1
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 100, bomb = 0, bio = 100, rad = 100)
|
||||
var/on = 0
|
||||
@@ -324,7 +325,6 @@
|
||||
overlays += "lid[on]" //if no occupant, just put the lid overlay on, and ignore the rest
|
||||
return
|
||||
|
||||
|
||||
if(occupant)
|
||||
var/image/pickle = image(occupant.icon, occupant.icon_state)
|
||||
pickle.overlays = occupant.overlays
|
||||
|
||||
@@ -44,6 +44,7 @@ var/list/holopads = list()
|
||||
idle_power_usage = 5
|
||||
active_power_usage = 100
|
||||
layer = TURF_LAYER+0.1 //Preventing mice and drones from sneaking under them.
|
||||
plane = FLOOR_PLANE
|
||||
armor = list(melee = 50, bullet = 20, laser = 20, energy = 20, bomb = 0, bio = 0, rad = 0)
|
||||
var/list/masters = list()//List of living mobs that use the holopad
|
||||
var/list/holorays = list()//Holoray-mob link.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "It's useful for igniting plasma."
|
||||
icon = 'icons/obj/stationobjs.dmi'
|
||||
icon_state = "igniter1"
|
||||
plane = FLOOR_PLANE
|
||||
armor = list(melee = 50, bullet = 30, laser = 70, energy = 50, bomb = 20, bio = 0, rad = 0)
|
||||
var/id = null
|
||||
var/on = 1.0
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
// called when turf state changes
|
||||
// hide the object if turf is intact
|
||||
/obj/machinery/navbeacon/hide(intact)
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : SEE_INVISIBLE_MINIMUM
|
||||
invisibility = intact ? INVISIBILITY_MAXIMUM : 0
|
||||
updateicon()
|
||||
|
||||
// update the icon_state
|
||||
|
||||
@@ -183,8 +183,8 @@
|
||||
qdel(I)
|
||||
qdel(J)
|
||||
H.icon = HI
|
||||
H.layer = 25
|
||||
H.plane = HUD_PLANE
|
||||
H.layer = ABOVE_HUD_LAYER
|
||||
H.plane = ABOVE_HUD_PLANE
|
||||
usr.mapobjs += H
|
||||
#else
|
||||
|
||||
|
||||
@@ -1518,6 +1518,8 @@
|
||||
if(user == occupant)
|
||||
user.sight |= occupant_sight_flags
|
||||
|
||||
..()
|
||||
|
||||
/obj/mecha/do_attack_animation(atom/A, visual_effect_icon, obj/item/used_item, no_effect, end_pixel_y)
|
||||
if(!no_effect)
|
||||
if(selected)
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
return FALSE
|
||||
|
||||
/obj/effect/decal
|
||||
plane = FLOOR_PLANE
|
||||
var/no_scoop = FALSE //if it has this, don't let it be scooped up
|
||||
var/no_clear = FALSE //if it has this, don't delete it when its' scooped up
|
||||
var/list/scoop_reagents = null
|
||||
|
||||
@@ -92,4 +92,36 @@
|
||||
name = "horrific experiment"
|
||||
desc = "Some sort of pod filled with blood and vicerea. You swear you can see it moving..."
|
||||
icon = 'icons/obj/cloning.dmi'
|
||||
icon_state = "pod_g"
|
||||
icon_state = "pod_g"
|
||||
|
||||
|
||||
//Makes a tile fully lit no matter what
|
||||
/obj/effect/fullbright
|
||||
icon = 'icons/effects/alphacolors.dmi'
|
||||
icon_state = "white"
|
||||
plane = LIGHTING_PLANE
|
||||
layer = LIGHTING_LAYER
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
|
||||
/obj/effect/dummy/lighting_obj
|
||||
name = "lighting fx obj"
|
||||
desc = "Tell a coder if you're seeing this."
|
||||
icon_state = "nothing"
|
||||
light_color = "#FFFFFF"
|
||||
light_range = MINIMUM_USEFUL_LIGHT_RANGE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
|
||||
/obj/effect/dummy/lighting_obj/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
set_light(_range ? _range : light_range, _power ? _power : light_power, _color ? _color : light_color)
|
||||
if(_duration)
|
||||
QDEL_IN(src, _duration)
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight
|
||||
name = "mob lighting fx"
|
||||
|
||||
/obj/effect/dummy/lighting_obj/moblight/Initialize(mapload, _color, _range, _power, _duration)
|
||||
. = ..()
|
||||
if(!ismob(loc))
|
||||
return INITIALIZE_HINT_QDEL
|
||||
@@ -37,4 +37,5 @@
|
||||
|
||||
/obj/effect/temp_visual/cult/turf/open/floor
|
||||
icon_state = "floorglow"
|
||||
duration = 5
|
||||
duration = 5
|
||||
plane = FLOOR_PLANE
|
||||
@@ -174,14 +174,10 @@
|
||||
var/list/SPECIALS = list(
|
||||
/area/shuttle,
|
||||
/area/admin,
|
||||
/area/arrival,
|
||||
/area/centcom,
|
||||
/area/asteroid,
|
||||
/area/tdome,
|
||||
/area/syndicate_station,
|
||||
/area/wizard_station,
|
||||
/area/prison
|
||||
// /area/derelict //commented out, all hail derelict-rebuilders!
|
||||
/area/wizard_station
|
||||
)
|
||||
for(var/type in SPECIALS)
|
||||
if( istype(A,type) )
|
||||
@@ -211,23 +207,21 @@
|
||||
return
|
||||
var/area/A = new
|
||||
A.name = str
|
||||
//var/ma
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
// to_chat(world, "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]")
|
||||
A.power_equip = 0
|
||||
A.power_light = 0
|
||||
A.power_environ = 0
|
||||
A.always_unpowered = 0
|
||||
move_turfs_to_area(turfs, A)
|
||||
A.power_equip = FALSE
|
||||
A.power_light = FALSE
|
||||
A.power_environ = FALSE
|
||||
A.always_unpowered = FALSE
|
||||
A.set_dynamic_lighting()
|
||||
|
||||
for(var/i in 1 to turfs.len)
|
||||
var/turf/thing = turfs[i]
|
||||
var/area/old_area = thing.loc
|
||||
A.contents += thing
|
||||
thing.change_area(old_area, A)
|
||||
|
||||
interact()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/areaeditor/proc/move_turfs_to_area(var/list/turf/turfs, var/area/A)
|
||||
A.contents.Add(turfs)
|
||||
|
||||
|
||||
/obj/item/areaeditor/proc/edit_area()
|
||||
var/area/A = get_area()
|
||||
var/prevname = "[sanitize(A.name)]"
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes)
|
||||
if(M.stat == DEAD || !eyes || M.disabilities & BLIND) //mob is dead or fully blind
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils are unresponsive to the light!</span>")
|
||||
else if((XRAY in M.mutations) || eyes.get_dark_view() >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
|
||||
else if((XRAY in M.mutations) || eyes.see_in_dark >= 8) //The mob's either got the X-RAY vision or has a tapetum lucidum (extreme nightvision, i.e. Vulp/Tajara with COLOURBLIND & their monkey forms).
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils glow eerily!</span>")
|
||||
else //they're okay!
|
||||
if(M.flash_eyes(visual = 1))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "An alarm which monitors host vital signs and transmits a radio message upon death."
|
||||
var/mobname = "Will Robinson"
|
||||
activated = 0
|
||||
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_station, /area/syndicate_mothership, /area/shuttle/syndicate_elite))
|
||||
var/static/list/stealth_areas = typecacheof(list(/area/syndicate_mothership, /area/shuttle/syndicate_elite))
|
||||
|
||||
/obj/item/implant/death_alarm/get_data()
|
||||
var/dat = {"<b>Implant Specifications:</b><BR>
|
||||
|
||||
@@ -151,8 +151,8 @@
|
||||
src.boxes.screen_loc = "[tx]:,[ty] to [mx],[my]"
|
||||
for(var/obj/O in src.contents)
|
||||
O.screen_loc = "[cx],[cy]"
|
||||
O.layer = 20
|
||||
O.plane = HUD_PLANE
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > mx)
|
||||
cx = tx
|
||||
@@ -171,8 +171,8 @@
|
||||
ND.sample_object.mouse_opacity = MOUSE_OPACITY_OPAQUE
|
||||
ND.sample_object.screen_loc = "[cx]:16,[cy]:16"
|
||||
ND.sample_object.maptext = "<font color='white'>[(ND.number > 1)? "[ND.number]" : ""]</font>"
|
||||
ND.sample_object.layer = 20
|
||||
ND.sample_object.plane = HUD_PLANE
|
||||
ND.sample_object.layer = ABOVE_HUD_LAYER
|
||||
ND.sample_object.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -182,8 +182,8 @@
|
||||
O.mouse_opacity = MOUSE_OPACITY_OPAQUE //This is here so storage items that spawn with contents correctly have the "click around item to equip"
|
||||
O.screen_loc = "[cx]:16,[cy]:16"
|
||||
O.maptext = ""
|
||||
O.layer = 20
|
||||
O.plane = HUD_PLANE
|
||||
O.layer = ABOVE_HUD_LAYER
|
||||
O.plane = ABOVE_HUD_PLANE
|
||||
cx++
|
||||
if(cx > (4+cols))
|
||||
cx = 4
|
||||
@@ -333,8 +333,8 @@
|
||||
if(ismob(loc))
|
||||
W.dropped(usr)
|
||||
if(ismob(new_location))
|
||||
W.layer = 20
|
||||
W.plane = HUD_PLANE
|
||||
W.layer = ABOVE_HUD_LAYER
|
||||
W.plane = ABOVE_HUD_PLANE
|
||||
else
|
||||
W.layer = initial(W.layer)
|
||||
W.plane = initial(W.plane)
|
||||
@@ -448,17 +448,18 @@
|
||||
else
|
||||
verbs -= /obj/item/storage/verb/toggle_gathering_mode
|
||||
|
||||
src.boxes = new /obj/screen/storage( )
|
||||
src.boxes.name = "storage"
|
||||
src.boxes.master = src
|
||||
src.boxes.icon_state = "block"
|
||||
src.boxes.screen_loc = "7,7 to 10,8"
|
||||
src.boxes.layer = 19
|
||||
src.closer = new /obj/screen/close( )
|
||||
src.closer.master = src
|
||||
src.closer.icon_state = "x"
|
||||
src.closer.layer = 20
|
||||
src.closer.plane = HUD_PLANE
|
||||
boxes = new /obj/screen/storage( )
|
||||
boxes.name = "storage"
|
||||
boxes.master = src
|
||||
boxes.icon_state = "block"
|
||||
boxes.screen_loc = "7,7 to 10,8"
|
||||
boxes.layer = HUD_LAYER
|
||||
boxes.plane = HUD_PLANE
|
||||
closer = new /obj/screen/close( )
|
||||
closer.master = src
|
||||
closer.icon_state = "x"
|
||||
closer.layer = ABOVE_HUD_LAYER
|
||||
closer.plane = ABOVE_HUD_PLANE
|
||||
orient2hud()
|
||||
|
||||
/obj/item/storage/Destroy()
|
||||
@@ -470,7 +471,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/item/storage/emp_act(severity)
|
||||
if(!istype(src.loc, /mob/living))
|
||||
if(!istype(loc, /mob/living))
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
..()
|
||||
|
||||
@@ -113,6 +113,7 @@
|
||||
anchored = TRUE
|
||||
density = FALSE
|
||||
layer = TURF_LAYER
|
||||
plane = FLOOR_PLANE
|
||||
icon_state = "weeds"
|
||||
max_integrity = 15
|
||||
var/obj/structure/alien/weeds/node/linked_node = null
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
anchored = 1.0
|
||||
armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0)
|
||||
layer = 2.3 //under pipes
|
||||
plane = FLOOR_PLANE
|
||||
// flags = CONDUCT
|
||||
|
||||
/obj/structure/lattice/New()
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
/obj/structure/chair/proc/handle_layer()
|
||||
if(buckled_mob && dir == NORTH)
|
||||
layer = FLY_LAYER
|
||||
layer = ABOVE_MOB_LAYER
|
||||
else
|
||||
layer = OBJ_LAYER
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
|
||||
/obj/proc/color_windows(obj/W)
|
||||
var/list/wcBarAreas = list(/area/crew_quarters/bar)
|
||||
var/list/wcBrigAreas = list(/area/security,/area/prison,/area/shuttle/gamma)
|
||||
var/list/wcBrigAreas = list(/area/security, /area/shuttle/gamma)
|
||||
|
||||
var/newcolor
|
||||
var/turf/T = get_turf(W)
|
||||
|
||||
@@ -17,7 +17,7 @@ var/list/icons_to_ignore_at_floor_init = list("damaged1","damaged2","damaged3","
|
||||
name = "floor"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "dont_use_this_floor"
|
||||
|
||||
plane = FLOOR_PLANE
|
||||
var/icon_regular_floor = "floor" //used to remember what icon the tile should have by default
|
||||
var/icon_plating = "plating"
|
||||
thermal_conductivity = 0.040
|
||||
|
||||
@@ -2,26 +2,35 @@
|
||||
icon = 'icons/turf/space.dmi'
|
||||
name = "\proper space"
|
||||
icon_state = "0"
|
||||
dynamic_lighting = 0
|
||||
luminosity = 1
|
||||
|
||||
temperature = TCMB
|
||||
thermal_conductivity = OPEN_HEAT_TRANSFER_COEFFICIENT
|
||||
heat_capacity = HEAT_CAPACITY_VACUUM
|
||||
|
||||
plane = PLANE_SPACE
|
||||
layer = SPACE_LAYER
|
||||
light_power = 0.25
|
||||
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
|
||||
|
||||
var/destination_z
|
||||
var/destination_x
|
||||
var/destination_y
|
||||
|
||||
/turf/space/New()
|
||||
. = ..()
|
||||
|
||||
/turf/space/Initialize(mapload)
|
||||
if(!istype(src, /turf/space/transit))
|
||||
icon_state = SPACE_ICON_STATE
|
||||
if(update_starlight() && is_station_level(z))
|
||||
// before you ask: Yes, this is fucking stupid, but looping through turf/space in world is how you make the server freeze
|
||||
// so I don't see a better way of doing this
|
||||
LAZYADD(GLOB.station_level_space_turfs, src)
|
||||
|
||||
var/area/A = loc
|
||||
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
|
||||
if (opacity)
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
/turf/space/Destroy(force)
|
||||
if(force)
|
||||
@@ -29,7 +38,6 @@
|
||||
else
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
|
||||
/turf/space/BeforeChange()
|
||||
..()
|
||||
var/datum/space_level/S = space_manager.get_zlev(z)
|
||||
@@ -44,14 +52,14 @@
|
||||
S.apply_transition(src)
|
||||
|
||||
/turf/space/proc/update_starlight()
|
||||
if(!config.starlight)
|
||||
return FALSE
|
||||
if(locate(/turf/simulated) in orange(src,1))
|
||||
set_light(config.starlight)
|
||||
return TRUE
|
||||
else
|
||||
if(config.starlight)
|
||||
for(var/t in RANGE_TURFS(1,src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
if(isspaceturf(t))
|
||||
//let's NOT update this that much pls
|
||||
continue
|
||||
set_light(2)
|
||||
return
|
||||
set_light(0)
|
||||
return FALSE
|
||||
|
||||
/turf/space/attackby(obj/item/C as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
+27
-8
@@ -41,6 +41,19 @@
|
||||
if(smooth && ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
queue_smooth(src)
|
||||
|
||||
/turf/Initialize(mapload)
|
||||
. = ..()
|
||||
|
||||
var/area/A = loc
|
||||
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if(light_power && light_range)
|
||||
update_light()
|
||||
|
||||
if (opacity)
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
/hook/startup/proc/smooth_world()
|
||||
var/watch = start_watch()
|
||||
log_startup_progress("Smoothing atoms...")
|
||||
@@ -173,11 +186,12 @@
|
||||
return
|
||||
if(!use_preloader && path == type) // Don't no-op if the map loader requires it to be reconstructed
|
||||
return src
|
||||
|
||||
set_light(0)
|
||||
var/old_opacity = opacity
|
||||
var/old_dynamic_lighting = dynamic_lighting
|
||||
var/old_affecting_lights = affecting_lights
|
||||
var/old_lighting_overlay = lighting_overlay
|
||||
var/old_lighting_object = lighting_object
|
||||
var/old_blueprint_data = blueprint_data
|
||||
var/old_obscured = obscured
|
||||
var/old_corners = corners
|
||||
@@ -191,23 +205,26 @@
|
||||
|
||||
W.blueprint_data = old_blueprint_data
|
||||
|
||||
for(var/turf/space/S in range(W,1))
|
||||
S.update_starlight()
|
||||
|
||||
recalc_atom_opacity()
|
||||
|
||||
if(lighting_overlays_initialised)
|
||||
lighting_overlay = old_lighting_overlay
|
||||
if(SSlighting.initialized)
|
||||
recalc_atom_opacity()
|
||||
lighting_object = old_lighting_object
|
||||
|
||||
affecting_lights = old_affecting_lights
|
||||
corners = old_corners
|
||||
if((old_opacity != opacity) || (dynamic_lighting != old_dynamic_lighting))
|
||||
if(old_opacity != opacity || dynamic_lighting != old_dynamic_lighting)
|
||||
reconsider_lights()
|
||||
|
||||
if(dynamic_lighting != old_dynamic_lighting)
|
||||
if(dynamic_lighting)
|
||||
if(IS_DYNAMIC_LIGHTING(src))
|
||||
lighting_build_overlay()
|
||||
else
|
||||
lighting_clear_overlay()
|
||||
|
||||
for(var/turf/space/S in RANGE_TURFS(1, src)) //RANGE_TURFS is in code\__HELPERS\game.dm
|
||||
S.update_starlight()
|
||||
|
||||
obscured = old_obscured
|
||||
|
||||
return W
|
||||
@@ -470,6 +487,8 @@
|
||||
continue
|
||||
if(istype(A, /obj/docking_port))
|
||||
continue
|
||||
if(istype(A, /atom/movable/lighting_object))
|
||||
continue
|
||||
if(!A.simulated)
|
||||
continue
|
||||
qdel(A, force=TRUE)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user