mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
LIGHTING IS BACK.
AND A SHITLOAD FASTER. SANIC.
This commit is contained in:
@@ -10,7 +10,7 @@
|
||||
var/cooling_power = 40000
|
||||
base_state = "aircond"
|
||||
|
||||
l_color = LIGHT_COLOR_CYAN
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
flags = FPRINT
|
||||
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
var/heating_power = 40000
|
||||
var/base_state = "sheater"
|
||||
|
||||
l_color = LIGHT_COLOR_ORANGE
|
||||
light_power_on = 0.75
|
||||
light_range_on = 2
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
ghost_read = 0
|
||||
ghost_write = 0
|
||||
@@ -31,7 +33,7 @@
|
||||
/obj/machinery/space_heater/update_icon()
|
||||
overlays.len = 0
|
||||
icon_state = "[base_state][on]"
|
||||
SetLuminosity(on ? 1 : 0)
|
||||
set_light(on ? light_range_on : 0, light_power_on)
|
||||
if(panel_open)
|
||||
overlays += "[base_state]-open"
|
||||
return
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "R-UST Mk. 7 Core Control"
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "core_control"
|
||||
l_color = LIGHT_COLOR_ORANGE
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
var/list/connected_devices = list()
|
||||
var/scan_range = 25
|
||||
|
||||
|
||||
@@ -52,7 +52,9 @@ max volume of plasma storeable by the field = the total volume of a number of ti
|
||||
icon = 'code/WorkInProgress/Cael_Aislinn/Rust/rust.dmi'
|
||||
icon_state = "core0"
|
||||
density = 1
|
||||
l_color = LIGHT_COLOR_BLUE
|
||||
light_power_on = 2
|
||||
light_range_on = 3
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
var/obj/effect/rust_em_field/owned_field
|
||||
var/field_strength = 1//0.01
|
||||
@@ -117,7 +119,7 @@ max volume of plasma storeable by the field = the total volume of a number of ti
|
||||
owned_field = new(loc, src)
|
||||
owned_field.ChangeFieldStrength(field_strength)
|
||||
owned_field.ChangeFieldFrequency(field_frequency)
|
||||
SetLuminosity(2)
|
||||
set_light(light_range_on, light_power_on)
|
||||
icon_state = "core1"
|
||||
use_power = 2
|
||||
. = 1
|
||||
@@ -129,7 +131,7 @@ max volume of plasma storeable by the field = the total volume of a number of ti
|
||||
icon_state = "core0"
|
||||
qdel(owned_field)
|
||||
use_power = 1
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/power/rust_core/proc/AddParticles(var/name, var/quantity = 1)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/power/rust_core/proc/AddParticles() called tick#: [world.time]")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/machinery/computer/rust_core_monitor
|
||||
name = "R-UST Mk. 7 Tokamak Core Monitoring Computer"
|
||||
icon_state = "power"
|
||||
l_color = LIGHT_COLOR_YELLOW
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
circuit = /obj/item/weapon/circuitboard/rust_core_monitor
|
||||
|
||||
var/obj/machinery/power/rust_core/linked_core
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
name = "Gyrotron Remote Controller"
|
||||
icon_state = "engine"
|
||||
circuit = /obj/item/weapon/circuitboard/rust_gyrotron_control
|
||||
l_color = LIGHT_COLOR_BLUE
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
var/list/linked_gyrotrons[0] //List of linked gyrotrons.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ var/global/list/atmos_controllers = list()
|
||||
var/overridden = 0 //not set yet, can't think of a good way to do it
|
||||
req_one_access = list(access_ce)
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/atmoscontrol/New()
|
||||
..()
|
||||
|
||||
@@ -421,7 +421,7 @@ obj/effect/bmode/buildholder/New()
|
||||
A.maptext = holder.buildmode.copycat.maptext
|
||||
A.maptext_height = holder.buildmode.copycat.maptext_height
|
||||
A.maptext_width = holder.buildmode.copycat.maptext_width
|
||||
A.l_color = holder.buildmode.copycat.l_color
|
||||
A.light_color = holder.buildmode.copycat.light_color
|
||||
A.luminosity = holder.buildmode.copycat.luminosity
|
||||
A.molten = holder.buildmode.copycat.molten
|
||||
A.pixel_x = holder.buildmode.copycat.pixel_x
|
||||
|
||||
@@ -130,13 +130,13 @@ Attach to transfer valve and open. BOOM.
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
|
||||
//luminosity = 3
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
layer = TURF_LAYER
|
||||
|
||||
l_color = "#ED9200"
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
|
||||
/obj/fire/proc/Extinguish()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/fire/proc/Extinguish() called tick#: [world.time]")
|
||||
@@ -191,13 +191,13 @@ Attach to transfer valve and open. BOOM.
|
||||
|
||||
if(firelevel > 6)
|
||||
icon_state = "3"
|
||||
SetLuminosity(7)
|
||||
set_light(7, 3)
|
||||
else if(firelevel > 2.5)
|
||||
icon_state = "2"
|
||||
SetLuminosity(5)
|
||||
set_light(5, 2)
|
||||
else
|
||||
icon_state = "1"
|
||||
SetLuminosity(3)
|
||||
set_light(3, 1)
|
||||
|
||||
//im not sure how to implement a version that works for every creature so for now monkeys are firesafe
|
||||
for(var/mob/living/carbon/human/M in loc)
|
||||
@@ -253,13 +253,13 @@ Attach to transfer valve and open. BOOM.
|
||||
/obj/fire/New()
|
||||
. = ..()
|
||||
dir = pick(cardinal)
|
||||
SetLuminosity(3)
|
||||
set_light(3)
|
||||
air_master.active_hotspots.Add(src)
|
||||
|
||||
/obj/fire/Destroy()
|
||||
air_master.active_hotspots.Remove(src)
|
||||
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
..()
|
||||
|
||||
turf/simulated/var/fire_protection = 0 //Protects newly extinguished tiles from being overrun again.
|
||||
|
||||
@@ -93,6 +93,8 @@
|
||||
|
||||
#define iscamera(A) istype(A, /obj/machinery/camera)
|
||||
|
||||
#define islightingoverlay(A) (istype(A, /atom/movable/lighting_overlay))
|
||||
|
||||
//Macros for antags
|
||||
|
||||
#define isvampire(H) ((H.mind in ticker.mode.vampires) || H.mind.vampire)
|
||||
|
||||
@@ -28,8 +28,8 @@
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area_master() called tick#: [world.time]")
|
||||
var/area/A = get_area(O)
|
||||
|
||||
if (isarea(A))
|
||||
return A.master
|
||||
if(isarea(A))
|
||||
return A
|
||||
|
||||
/proc/get_area_name(N) //get area by its name
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_area_name() called tick#: [world.time]")
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
var/const/E = 2.71828183
|
||||
var/const/Sqrt2 = 1.41421356
|
||||
|
||||
/* //All point fingers and laugh at this joke of a list, I even heard using sqrt() is faster than this list lookup, honk.
|
||||
// List of square roots for the numbers 1-100.
|
||||
var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5,
|
||||
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7,
|
||||
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,
|
||||
8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10)
|
||||
*/
|
||||
|
||||
/proc/Atan2(x, y)
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/Atan2() called tick#: [world.time]")
|
||||
|
||||
@@ -800,14 +800,10 @@ proc/GaussRandRound(var/sigma,var/roundto)
|
||||
/proc/SortAreas()
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/SortAreas() called tick#: [world.time]")
|
||||
for(var/area/A in areas)
|
||||
if(A.lighting_subarea)
|
||||
continue
|
||||
sortedAreas.Add(A)
|
||||
|
||||
sortTim(sortedAreas, /proc/cmp_name_asc)
|
||||
|
||||
|
||||
|
||||
/area/proc/addSorted()
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/area/proc/addSorted() called tick#: [world.time]")
|
||||
sortedAreas.Add(src)
|
||||
@@ -1450,6 +1446,28 @@ proc/find_holder_of_type(var/atom/reference,var/typepath) //Returns the first ob
|
||||
|
||||
return locate(dest_x,dest_y,dest_z)
|
||||
|
||||
//Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
|
||||
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/dview() called tick#: [world.time]")
|
||||
if(!center)
|
||||
return
|
||||
|
||||
var/global/mob/dview/DV
|
||||
if(!DV)
|
||||
DV = new
|
||||
|
||||
DV.loc = center
|
||||
|
||||
DV.see_in_dark = range
|
||||
DV.see_invisible = invis_flags
|
||||
|
||||
. = view(range, DV)
|
||||
DV.loc = null
|
||||
|
||||
/mob/dview
|
||||
invisibility = 101
|
||||
density = 0
|
||||
|
||||
//Gets the Z level datum for this atom's Z level
|
||||
/proc/get_z_level(var/atom/A)
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/get_z_level() called tick#: [world.time]")
|
||||
|
||||
@@ -19,11 +19,10 @@
|
||||
if(!targetarea)
|
||||
return
|
||||
var/list/turfs = list()
|
||||
for(var/area/Ar in targetarea.related)
|
||||
for(var/turf/T in Ar)
|
||||
if(T.density)
|
||||
continue
|
||||
turfs.Add(T)
|
||||
for(var/turf/T in targetarea)
|
||||
if(T.density)
|
||||
continue
|
||||
turfs.Add(T)
|
||||
|
||||
targetloc = pick_n_take(turfs)
|
||||
if(!targetloc)
|
||||
|
||||
26
code/controllers/Processes/lighting (OLD).dm
Normal file
26
code/controllers/Processes/lighting (OLD).dm
Normal file
@@ -0,0 +1,26 @@
|
||||
/datum/controller/process/lighting/setup()
|
||||
name = "lighting"
|
||||
schedule_interval = 5 // every .5 second
|
||||
lighting_controller.Initialize()
|
||||
|
||||
/datum/controller/process/lighting/doWork()
|
||||
lighting_controller.lights_workload_max = \
|
||||
max(lighting_controller.lights_workload_max, lighting_controller.lights.len)
|
||||
|
||||
for(var/datum/light_source/L in lighting_controller.lights)
|
||||
if(L && L.check())
|
||||
lighting_controller.lights.Remove(L)
|
||||
|
||||
scheck()
|
||||
|
||||
lighting_controller.changed_turfs_workload_max = \
|
||||
max(lighting_controller.changed_turfs_workload_max, lighting_controller.changed_turfs.len)
|
||||
|
||||
for(var/turf/T in lighting_controller.changed_turfs)
|
||||
if(T && T.lighting_changed)
|
||||
T.shift_to_subarea()
|
||||
|
||||
scheck()
|
||||
|
||||
if(lighting_controller.changed_turfs && lighting_controller.changed_turfs.len)
|
||||
lighting_controller.changed_turfs.len = 0 // reset the changed list
|
||||
@@ -1,28 +1,38 @@
|
||||
/datum/controller/process/lighting
|
||||
schedule_interval = LIGHTING_INTERVAL // every .5 second
|
||||
schedule_interval = LIGHTING_INTERVAL
|
||||
|
||||
/datum/controller/process/lighting/setup()
|
||||
name = "lighting"
|
||||
lighting_controller.Initialize()
|
||||
|
||||
create_lighting_overlays()
|
||||
|
||||
/datum/controller/process/lighting/doWork()
|
||||
lighting_controller.lights_workload_max = \
|
||||
max(lighting_controller.lights_workload_max, lighting_controller.lights.len)
|
||||
var/list/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 = null //Nulling it first because of http://www.byond.com/forum/?post=1854520
|
||||
lighting_update_lights = list()
|
||||
|
||||
for(var/datum/light_source/L in lighting_controller.lights)
|
||||
if(L && L.check())
|
||||
lighting_controller.lights.Remove(L)
|
||||
for(var/datum/light_source/L in lighting_update_lights_old)
|
||||
. = L.check()
|
||||
if(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 = 0
|
||||
L.force_update = 0
|
||||
L.needs_update = 0
|
||||
|
||||
scheck()
|
||||
|
||||
lighting_controller.changed_turfs_workload_max = \
|
||||
max(lighting_controller.changed_turfs_workload_max, lighting_controller.changed_turfs.len)
|
||||
var/list/lighting_update_overlays_old = lighting_update_overlays //Same as above.
|
||||
lighting_update_overlays = null //Same as above
|
||||
lighting_update_overlays = list()
|
||||
|
||||
for(var/turf/T in lighting_controller.changed_turfs)
|
||||
if(T && T.lighting_changed)
|
||||
T.shift_to_subarea()
|
||||
for(var/atom/movable/lighting_overlay/O in lighting_update_overlays_old)
|
||||
O.update_overlay()
|
||||
O.needs_update = 0
|
||||
|
||||
scheck()
|
||||
|
||||
if(lighting_controller.changed_turfs && lighting_controller.changed_turfs.len)
|
||||
lighting_controller.changed_turfs.len = 0 // reset the changed list
|
||||
|
||||
@@ -59,21 +59,4 @@ var/global/datum/controller/failsafe/failsafe
|
||||
masterControllerAlertLevel = 0
|
||||
masterControllerIteration = master_controller.iteration
|
||||
|
||||
if(lighting_controller.processing)
|
||||
if(lightingControllerIteration == lighting_controller.iteration) // Lighting controller hasn't finished processing in the defined interval.
|
||||
switch(lightingControllerAlertLevel)
|
||||
if(0 to 3)
|
||||
lightingControllerAlertLevel++
|
||||
if(4)
|
||||
admins << "<font color='red' size='2'><b>Warning. The lighting_controller controller has not fired in the last [lightingControllerAlertLevel * processing_interval] ticks. Automatic restart in [processing_interval] ticks.</b></font>"
|
||||
lightingControllerAlertLevel = 5
|
||||
if(5)
|
||||
admins << "<font color='red' size='2'><b>Warning. The lighting_controller controller has still not fired within the last [lightingControllerAlertLevel * processing_interval] ticks. Killing and restarting...</b></font>"
|
||||
new /datum/controller/lighting() // Replace the old lighting_controller (hence killing the old one's process).
|
||||
lighting_controller.process() // Start it rolling again.
|
||||
lightingControllerAlertLevel = 0
|
||||
else
|
||||
lightingControllerAlertLevel = 0
|
||||
lightingControllerIteration = lighting_controller.iteration
|
||||
|
||||
sleep(processing_interval)
|
||||
|
||||
@@ -50,7 +50,7 @@ datum/shuttle_controller/proc/incall(coeff = 1)
|
||||
//turning on the red lights in hallways
|
||||
if(alert == 0)
|
||||
for(var/area/A in areas)
|
||||
if(istype(A, /area/hallway) && !A.lighting_subarea)
|
||||
if(istype(A, /area/hallway))
|
||||
A.readyalert()
|
||||
|
||||
datum/shuttle_controller/proc/shuttlealert(var/X)
|
||||
@@ -80,7 +80,7 @@ datum/shuttle_controller/proc/recall()
|
||||
setdirection(-1)
|
||||
online = 1
|
||||
for(var/area/A in areas)
|
||||
if(istype(A, /area/hallway) && !A.lighting_subarea)
|
||||
if(istype(A, /area/hallway))
|
||||
A.readyreset()
|
||||
return
|
||||
else //makes it possible to send shuttle back.
|
||||
@@ -242,6 +242,8 @@ datum/shuttle_controller/emergency_shuttle/process()
|
||||
var/turf/D = locate(T.x, throwy - 1, 1)
|
||||
//var/turf/E = get_step(D, SOUTH)
|
||||
for(var/atom/A as mob|obj in T)
|
||||
if(istype(A, /atom/movable/lighting_overlay)) //This'd be a whole nother level of dumb
|
||||
continue
|
||||
if(ismob(A))
|
||||
var/mob/M=A
|
||||
M.gib()
|
||||
|
||||
@@ -18,10 +18,6 @@
|
||||
if("Failsafe")
|
||||
new /datum/controller/failsafe()
|
||||
feedback_add_details("admin_verb","RFailsafe")
|
||||
if("Lighting")
|
||||
new /datum/controller/lighting()
|
||||
lighting_controller.process()
|
||||
feedback_add_details("admin_verb","RLighting")
|
||||
if("Supply Shuttle")
|
||||
supply_shuttle.process()
|
||||
feedback_add_details("admin_verb","RSupply")
|
||||
@@ -35,7 +31,7 @@
|
||||
return
|
||||
|
||||
|
||||
/client/proc/debug_controller(controller in list("Air", "Cameras", "Configuration", "Emergency Shuttle", "failsafe", "Garbage", "Jobs", "lighting", "master", "pAI", "Radio", "Scheduler", "Sun", "Supply Shuttle", "Ticker"))
|
||||
/client/proc/debug_controller(controller in list("Air", "Cameras", "Configuration", "Emergency Shuttle", "failsafe", "Garbage", "Jobs", "master", "pAI", "Radio", "Scheduler", "Sun", "Supply Shuttle", "Ticker"))
|
||||
set category = "Debug"
|
||||
set name = "debug controller"
|
||||
set desc = "debug the various periodic loop controllers for the game (be careful!)."
|
||||
@@ -54,9 +50,6 @@
|
||||
if("Ticker")
|
||||
debug_variables(ticker)
|
||||
feedback_add_details("admin_verb","DTicker")
|
||||
if ("lighting")
|
||||
debug_variables(lighting_controller)
|
||||
feedback_add_details("admin_verb", "dlighting")
|
||||
if("Air")
|
||||
debug_variables(air_master)
|
||||
feedback_add_details("admin_verb","DAir")
|
||||
|
||||
@@ -28,7 +28,7 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon_state = "unknown"
|
||||
layer = 10
|
||||
mouse_opacity = 0
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
luminosity = 0
|
||||
var/lightswitch = 1
|
||||
|
||||
var/eject = null
|
||||
@@ -50,9 +50,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/has_gravity = 1
|
||||
|
||||
var/no_air = null
|
||||
var/area/master // master area used for power calcluations
|
||||
// (original area before splitting due to sd_DAL)
|
||||
var/list/related // the other areas of the same type as this
|
||||
// var/list/lights // list of all lights on this area
|
||||
var/list/all_doors = list() //Added by Strumpetplaya - Alarm Change - Contains a list of doors adjacent to this area
|
||||
|
||||
@@ -146,10 +143,9 @@ proc/process_adminbus_teleport_locs()
|
||||
//place to another. Look at escape shuttle for example.
|
||||
//All shuttles show now be under shuttle since we have smooth-wall code.
|
||||
|
||||
/area/shuttle //DO NOT TURN THE lighting_use_dynamic STUFF ON FOR SHUTTLES. IT BREAKS THINGS.
|
||||
/area/shuttle
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
lighting_use_dynamic = 0 //Lighting STILL disabled, even with the new bay engine, because lighting doesn't play nice with our shuttles, might just be our shuttle code, or the small changes in the lighting engine we have from bay.
|
||||
|
||||
/area/shuttle/arrival
|
||||
name = "\improper Arrival Shuttle"
|
||||
@@ -250,15 +246,11 @@ proc/process_adminbus_teleport_locs()
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Alien Shuttle Base"
|
||||
requires_power = 1
|
||||
luminosity = 0
|
||||
lighting_use_dynamic = 1
|
||||
|
||||
/area/shuttle/alien/mine
|
||||
icon_state = "shuttle"
|
||||
name = "\improper Alien Shuttle Mine"
|
||||
requires_power = 1
|
||||
luminosity = 0
|
||||
lighting_use_dynamic = 1
|
||||
|
||||
/area/shuttle/prison/
|
||||
name = "\improper Prison Shuttle"
|
||||
@@ -337,8 +329,6 @@ proc/process_adminbus_teleport_locs()
|
||||
name = "\improper Vox Skipjack"
|
||||
icon_state = "yellow"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
luminosity=1
|
||||
|
||||
/area/shuttle/salvage
|
||||
name = "\improper Salvage Ship"
|
||||
@@ -459,7 +449,6 @@ proc/process_adminbus_teleport_locs()
|
||||
name = "start area"
|
||||
icon_state = "start"
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
has_gravity = 1
|
||||
|
||||
@@ -476,6 +465,7 @@ proc/process_adminbus_teleport_locs()
|
||||
name = "\improper Centcom"
|
||||
icon_state = "centcom"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/centcom/control
|
||||
name = "\improper Centcom Control"
|
||||
@@ -513,6 +503,7 @@ proc/process_adminbus_teleport_locs()
|
||||
name = "\improper Syndicate Mothership"
|
||||
icon_state = "syndie-ship"
|
||||
requires_power = 0
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/syndicate_mothership/control
|
||||
name = "\improper Syndicate Control Room"
|
||||
@@ -1053,7 +1044,6 @@ proc/process_adminbus_teleport_locs()
|
||||
/area/holodeck
|
||||
name = "\improper Holodeck"
|
||||
icon_state = "Holodeck"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/holodeck/alphadeck
|
||||
@@ -1187,7 +1177,6 @@ proc/process_adminbus_teleport_locs()
|
||||
|
||||
/area/solar
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/solar/fport
|
||||
@@ -1888,25 +1877,21 @@ proc/process_adminbus_teleport_locs()
|
||||
/area/turret_protected/AIsatextFP
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/AIsatextFS
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/AIsatextAS
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/AIsatextAP
|
||||
name = "\improper AI Sat Ext"
|
||||
icon_state = "storage"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/turret_protected/NewAIMain
|
||||
@@ -2061,31 +2046,26 @@ proc/process_adminbus_teleport_locs()
|
||||
/area/awaymission/wwmines
|
||||
name = "\improper Wild West Mines"
|
||||
icon_state = "away1"
|
||||
luminosity = 1
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/wwgov
|
||||
name = "\improper Wild West Mansion"
|
||||
icon_state = "away2"
|
||||
luminosity = 1
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/wwrefine
|
||||
name = "\improper Wild West Refinery"
|
||||
icon_state = "away3"
|
||||
luminosity = 1
|
||||
requires_power = 0
|
||||
|
||||
/area/awaymission/wwvault
|
||||
name = "\improper Wild West Vault"
|
||||
icon_state = "away3"
|
||||
luminosity = 0
|
||||
|
||||
/area/awaymission/wwvaultdoors
|
||||
name = "\improper Wild West Vault Doors" // this is to keep the vault area being entirely lit because of requires_power
|
||||
icon_state = "away2"
|
||||
requires_power = 0
|
||||
luminosity = 0
|
||||
|
||||
/area/awaymission/desert
|
||||
name = "Mars"
|
||||
@@ -2143,7 +2123,6 @@ proc/process_adminbus_teleport_locs()
|
||||
/area/awaymission/beach
|
||||
name = "Beach"
|
||||
icon_state = "null"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
var/sound/mysound = null
|
||||
@@ -2269,7 +2248,6 @@ var/list/the_station_areas = list (
|
||||
/area/beach/
|
||||
name = "The metaclub's private beach"
|
||||
icon_state = "null"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
requires_power = 0
|
||||
var/sound/mysound = null
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
/area/New()
|
||||
icon_state = ""
|
||||
layer = 10
|
||||
master = src //moved outside the spawn(1) to avoid runtimes in lighting.dm when it references loc.loc.master ~Carn
|
||||
uid = ++global_uid
|
||||
related = list(src)
|
||||
areas |= src
|
||||
|
||||
if(type == /area) // override defaults for space. TODO: make space areas of type /area/space rather than /area
|
||||
@@ -25,25 +23,18 @@
|
||||
// lighting_state = 4
|
||||
//has_gravity = 0 // Space has gravity. Because.. because.
|
||||
|
||||
if(requires_power)
|
||||
luminosity = 0
|
||||
else
|
||||
if(!requires_power)
|
||||
power_light = 0 //rastaf0
|
||||
power_equip = 0 //rastaf0
|
||||
power_environ = 0 //rastaf0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
..()
|
||||
|
||||
// spawn(15)
|
||||
power_change() // all machines set to current power level, also updates lighting icon
|
||||
InitializeLighting()
|
||||
|
||||
/area/Destroy()
|
||||
..()
|
||||
for(var/area/A in src.related)
|
||||
A.related -= src
|
||||
areaapc = null
|
||||
|
||||
/*
|
||||
@@ -54,18 +45,14 @@
|
||||
* If you want to find machines, mobs, etc, in the same logical area,
|
||||
* you will need to check all the related areas.
|
||||
* This returns a master contents list to assist in that.
|
||||
* NOTE: Due to a new lighting engine this is now deprecated, but we're keeping this because I can't be bothered to relace everything that references this.
|
||||
*/
|
||||
/proc/area_contents(const/area/A)
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/area_contents() called tick#: [world.time]")
|
||||
if (!isarea(A))
|
||||
return
|
||||
|
||||
var/list/contents = list()
|
||||
|
||||
for(var/area/LSA in A.related)
|
||||
contents |= LSA.contents
|
||||
|
||||
return contents
|
||||
return A.contents
|
||||
|
||||
/area/proc/poweralert(var/state, var/obj/source as obj)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/poweralert() called tick#: [world.time]")
|
||||
@@ -74,13 +61,12 @@
|
||||
poweralm = state
|
||||
if(istype(source)) //Only report power alarms on the z-level where the source is located.
|
||||
var/list/cameras = list()
|
||||
for (var/area/RA in related)
|
||||
for (var/obj/machinery/camera/C in RA)
|
||||
cameras += C
|
||||
if(state == 1)
|
||||
C.network.Remove("Power Alarms")
|
||||
else
|
||||
C.network.Add("Power Alarms")
|
||||
for(var/obj/machinery/camera/C in src)
|
||||
cameras += C
|
||||
if(state == 1)
|
||||
C.network.Remove("Power Alarms")
|
||||
else
|
||||
C.network.Add("Power Alarms")
|
||||
for (var/mob/living/silicon/aiPlayer in player_list)
|
||||
if(aiPlayer.z == source.z)
|
||||
if (state == 1)
|
||||
@@ -88,7 +74,7 @@
|
||||
else
|
||||
aiPlayer.triggerAlarm("Power", src, cameras, source)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
if(master in (a.covered_areas))
|
||||
if(src in (a.covered_areas))
|
||||
if(state == 1)
|
||||
a.cancelAlarm("Power", src, source)
|
||||
else
|
||||
@@ -109,16 +95,15 @@
|
||||
var/danger_level = 0
|
||||
|
||||
// Determine what the highest DL reported by air alarms is
|
||||
for (var/area/RA in related)
|
||||
for(var/obj/machinery/alarm/AA in RA)
|
||||
if((AA.stat & (NOPOWER|BROKEN)) || AA.shorted || AA.buildstage != 2)
|
||||
continue
|
||||
var/reported_danger_level=AA.local_danger_level
|
||||
if(AA.alarmActivated)
|
||||
reported_danger_level=2
|
||||
if(reported_danger_level>danger_level)
|
||||
danger_level=reported_danger_level
|
||||
//testing("Danger level at [AA.name]: [AA.local_danger_level] (reported [reported_danger_level])")
|
||||
for(var/obj/machinery/alarm/AA in src)
|
||||
if((AA.stat & (NOPOWER|BROKEN)) || AA.shorted || AA.buildstage != 2)
|
||||
continue
|
||||
var/reported_danger_level=AA.local_danger_level
|
||||
if(AA.alarmActivated)
|
||||
reported_danger_level=2
|
||||
if(reported_danger_level>danger_level)
|
||||
danger_level=reported_danger_level
|
||||
//testing("Danger level at [AA.name]: [AA.local_danger_level] (reported [reported_danger_level])")
|
||||
|
||||
//testing("Danger level decided upon in [name]: [danger_level] (from [atmosalm])")
|
||||
|
||||
@@ -127,27 +112,25 @@
|
||||
// Going to danger level 2 from something else
|
||||
if (danger_level == 2)
|
||||
var/list/cameras = list()
|
||||
for(var/area/RA in related)
|
||||
//updateicon()
|
||||
for(var/obj/machinery/camera/C in RA)
|
||||
cameras += C
|
||||
C.network.Add("Atmosphere Alarms")
|
||||
//updateicon()
|
||||
for(var/obj/machinery/camera/C in src)
|
||||
cameras += C
|
||||
C.network.Add("Atmosphere Alarms")
|
||||
for(var/mob/living/silicon/aiPlayer in player_list)
|
||||
aiPlayer.triggerAlarm("Atmosphere", src, cameras, src)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
if(master in (a.covered_areas))
|
||||
if(src in (a.covered_areas))
|
||||
a.triggerAlarm("Atmosphere", src, cameras, src)
|
||||
door_alerts |= DOORALERT_ATMOS
|
||||
UpdateFirelocks()
|
||||
// Dropping from danger level 2.
|
||||
else if (atmosalm == 2)
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/camera/C in RA)
|
||||
C.network.Remove("Atmosphere Alarms")
|
||||
for(var/obj/machinery/camera/C in src)
|
||||
C.network.Remove("Atmosphere Alarms")
|
||||
for(var/mob/living/silicon/aiPlayer in player_list)
|
||||
aiPlayer.cancelAlarm("Atmosphere", src, src)
|
||||
for(var/obj/machinery/computer/station_alert/a in machines)
|
||||
if(master in (a.covered_areas))
|
||||
if(src in (a.covered_areas))
|
||||
a.cancelAlarm("Atmosphere", src, src)
|
||||
door_alerts &= ~DOORALERT_ATMOS
|
||||
UpdateFirelocks()
|
||||
@@ -163,15 +146,14 @@
|
||||
var/danger_level = 0
|
||||
|
||||
// Determine what the highest DL reported by air alarms is
|
||||
for (var/area/RA in related)
|
||||
for(var/obj/machinery/alarm/AA in RA)
|
||||
if((AA.stat & (NOPOWER|BROKEN)) || AA.shorted || AA.buildstage != 2)
|
||||
continue
|
||||
var/reported_danger_level=AA.local_danger_level
|
||||
if(AA.alarmActivated)
|
||||
reported_danger_level=2
|
||||
if(reported_danger_level>danger_level)
|
||||
danger_level=reported_danger_level
|
||||
for(var/obj/machinery/alarm/AA in src)
|
||||
if((AA.stat & (NOPOWER|BROKEN)) || AA.shorted || AA.buildstage != 2)
|
||||
continue
|
||||
var/reported_danger_level=AA.local_danger_level
|
||||
if(AA.alarmActivated)
|
||||
reported_danger_level=2
|
||||
if(reported_danger_level>danger_level)
|
||||
danger_level=reported_danger_level
|
||||
|
||||
if (danger_level == 2)
|
||||
a.triggerAlarm("Atmosphere", src, null, src)
|
||||
@@ -223,14 +205,13 @@
|
||||
door_alerts |= DOORALERT_FIRE
|
||||
UpdateFirelocks()
|
||||
var/list/cameras = list()
|
||||
for(var/area/RA in related)
|
||||
for (var/obj/machinery/camera/C in RA)
|
||||
cameras.Add(C)
|
||||
C.network.Add("Fire Alarms")
|
||||
for (var/obj/machinery/camera/C in src)
|
||||
cameras.Add(C)
|
||||
C.network.Add("Fire Alarms")
|
||||
for (var/mob/living/silicon/ai/aiPlayer in player_list)
|
||||
aiPlayer.triggerAlarm("Fire", src, cameras, src)
|
||||
for (var/obj/machinery/computer/station_alert/a in machines)
|
||||
if(master in (a.covered_areas))
|
||||
if(src in (a.covered_areas))
|
||||
a.triggerAlarm("Fire", src, cameras, src)
|
||||
|
||||
/area/proc/send_firealert(var/obj/machinery/computer/station_alert/a)//sending alerts to newly built Station Alert Computers.
|
||||
@@ -244,13 +225,12 @@
|
||||
fire = 0
|
||||
mouse_opacity = 0
|
||||
updateicon()
|
||||
for(var/area/RA in related)
|
||||
for (var/obj/machinery/camera/C in RA)
|
||||
C.network.Remove("Fire Alarms")
|
||||
for (var/obj/machinery/camera/C in src)
|
||||
C.network.Remove("Fire Alarms")
|
||||
for (var/mob/living/silicon/ai/aiPlayer in player_list)
|
||||
aiPlayer.cancelAlarm("Fire", src, src)
|
||||
for (var/obj/machinery/computer/station_alert/a in machines)
|
||||
if(master in (a.covered_areas))
|
||||
if(src in (a.covered_areas))
|
||||
a.cancelAlarm("Fire", src, src)
|
||||
door_alerts &= ~DOORALERT_FIRE
|
||||
UpdateFirelocks()
|
||||
@@ -327,12 +307,6 @@
|
||||
// new lighting behaviour with obj lights
|
||||
icon_state = null
|
||||
|
||||
// We're master, Update children.
|
||||
for(var/area/A in related)
|
||||
if(A && A!=src)
|
||||
// Propogate
|
||||
A.icon_state=icon_state
|
||||
|
||||
|
||||
/*
|
||||
#define EQUIP 1
|
||||
@@ -344,17 +318,17 @@
|
||||
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/powered() called tick#: [world.time]")
|
||||
|
||||
if(!master.requires_power)
|
||||
if(!requires_power)
|
||||
return 1
|
||||
if(master.always_unpowered)
|
||||
if(always_unpowered)
|
||||
return 0
|
||||
switch(chan)
|
||||
if(EQUIP)
|
||||
return master.power_equip
|
||||
return power_equip
|
||||
if(LIGHT)
|
||||
return master.power_light
|
||||
return power_light
|
||||
if(ENVIRON)
|
||||
return master.power_environ
|
||||
return power_environ
|
||||
|
||||
return 0
|
||||
|
||||
@@ -363,29 +337,28 @@
|
||||
*/
|
||||
/area/proc/power_change()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/power_change() called tick#: [world.time]")
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/M in RA) // for each machine in the area
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
if (fire || eject || party)
|
||||
RA.updateicon()
|
||||
for(var/obj/machinery/M in src) // for each machine in the area
|
||||
M.power_change() // reverify power status (to update icons etc.)
|
||||
if (fire || eject || party)
|
||||
updateicon()
|
||||
|
||||
/area/proc/usage(const/chan)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/usage() called tick#: [world.time]")
|
||||
switch (chan)
|
||||
if (LIGHT)
|
||||
return master.used_light
|
||||
return used_light
|
||||
if (EQUIP)
|
||||
return master.used_equip
|
||||
return used_equip
|
||||
if (ENVIRON)
|
||||
return master.used_environ
|
||||
return used_environ
|
||||
if (TOTAL)
|
||||
return master.used_light + master.used_equip + master.used_environ
|
||||
return used_light + used_equip + used_environ
|
||||
if(STATIC_EQUIP)
|
||||
return master.static_equip
|
||||
return static_equip
|
||||
if(STATIC_LIGHT)
|
||||
return master.static_light
|
||||
return static_light
|
||||
if(STATIC_ENVIRON)
|
||||
return master.static_environ
|
||||
return static_environ
|
||||
return 0
|
||||
|
||||
/area/proc/addStaticPower(value, powerchannel)
|
||||
@@ -399,36 +372,36 @@
|
||||
static_environ += value
|
||||
|
||||
/area/proc/clear_usage()
|
||||
master.used_equip = 0
|
||||
master.used_light = 0
|
||||
master.used_environ = 0
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/clear_usage() called tick#: [world.time]")
|
||||
used_equip = 0
|
||||
used_light = 0
|
||||
used_environ = 0
|
||||
|
||||
/area/proc/use_power(const/amount, const/chan)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/use_power() called tick#: [world.time]")
|
||||
switch (chan)
|
||||
if(EQUIP)
|
||||
master.used_equip += amount
|
||||
used_equip += amount
|
||||
if(LIGHT)
|
||||
master.used_light += amount
|
||||
used_light += amount
|
||||
if(ENVIRON)
|
||||
master.used_environ += amount
|
||||
used_environ += amount
|
||||
|
||||
/area/Entered(atom/movable/Obj, atom/OldLoc)
|
||||
var/area/oldAreaMaster = Obj.areaMaster
|
||||
Obj.areaMaster = master
|
||||
|
||||
var/area/oldArea = Obj.areaMaster
|
||||
Obj.areaMaster = src
|
||||
if (!ismob(Obj))
|
||||
return
|
||||
|
||||
var/mob/M = Obj
|
||||
|
||||
// /vg/ - EVENTS!
|
||||
CallHook("MobAreaChange", list("mob" = M, "new" = Obj.areaMaster, "old" = oldAreaMaster))
|
||||
CallHook("MobAreaChange", list("mob" = M, "new" = Obj.areaMaster, "old" = oldArea))
|
||||
|
||||
// Being ready when you change areas gives you a chance to avoid falling all together.
|
||||
if(!oldAreaMaster || !M.areaMaster)
|
||||
if(!oldArea || !M.areaMaster)
|
||||
thunk(M)
|
||||
else if (!oldAreaMaster.has_gravity && M.areaMaster.has_gravity && M.m_intent == "run")
|
||||
else if (!oldArea.has_gravity && M.areaMaster.has_gravity && M.m_intent == "run")
|
||||
thunk(M)
|
||||
|
||||
if (isnull(M.client))
|
||||
@@ -478,12 +451,11 @@
|
||||
|
||||
A.has_gravity = gravitystate
|
||||
|
||||
for(var/area/SubA in A.related)
|
||||
SubA.has_gravity = gravitystate
|
||||
A.has_gravity = gravitystate
|
||||
|
||||
if(gravitystate)
|
||||
for(var/mob/living/carbon/human/M in SubA)
|
||||
thunk(M)
|
||||
if(gravitystate)
|
||||
for(var/mob/living/carbon/human/M in A)
|
||||
thunk(M)
|
||||
|
||||
/area/proc/thunk(mob)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/thunk() called tick#: [world.time]")
|
||||
@@ -506,11 +478,9 @@
|
||||
|
||||
/area/proc/set_apc(var/obj/machinery/power/apc/apctoset)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/set_apc() called tick#: [world.time]")
|
||||
for(var/area/A in src.related)
|
||||
A.areaapc = apctoset
|
||||
areaapc = apctoset
|
||||
|
||||
/area/proc/remove_apc(var/obj/machinery/power/apc/apctoremove)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/area/proc/remove_apc() called tick#: [world.time]")
|
||||
for(var/area/A in src.related)
|
||||
if(A.areaapc == apctoremove)
|
||||
A.areaapc = null
|
||||
if(areaapc == apctoremove)
|
||||
areaapc = null
|
||||
|
||||
@@ -20,7 +20,6 @@ var/global/list/ghdel_profiling = list()
|
||||
var/throwpass = 0
|
||||
var/germ_level = 0 // The higher the germ level, the more germ on the atom.
|
||||
var/pressure_resistance = ONE_ATMOSPHERE
|
||||
var/simulated = 1 //filter for actions - used by lighting overlays
|
||||
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
@@ -118,8 +117,6 @@ var/global/list/ghdel_profiling = list()
|
||||
..()
|
||||
|
||||
/atom/Destroy()
|
||||
SetOpacity(0)
|
||||
|
||||
if(reagents)
|
||||
reagents.Destroy()
|
||||
reagents = null
|
||||
|
||||
@@ -32,11 +32,6 @@
|
||||
getFromPool(/mob/virtualhearer, src)
|
||||
|
||||
/atom/movable/Destroy()
|
||||
if(opacity)
|
||||
if(isturf(loc))
|
||||
if(loc:lighting_lumcount > 1)
|
||||
UpdateAffectingLights()
|
||||
|
||||
if(flags & HEAR && !ismob(src))
|
||||
for(var/mob/virtualhearer/VH in virtualhearers)
|
||||
if(VH.attached == src)
|
||||
|
||||
@@ -51,13 +51,10 @@
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker = null
|
||||
machine_flags = SCREWTOGGLE | CROWDESTROY
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && src.occupant)
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
use_auto_lights = 1
|
||||
light_range_on = 3
|
||||
light_power_on = 2
|
||||
|
||||
/obj/machinery/dna_scannernew/New()
|
||||
. = ..()
|
||||
@@ -351,7 +348,7 @@
|
||||
// Fix for #274 (Mash create block injector without answering dialog to make unlimited injectors) - N3X.
|
||||
var/waiting_for_user_input = 0
|
||||
|
||||
l_color = "#0000FF"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/attackby(obj/O as obj, mob/user as mob)
|
||||
..()
|
||||
@@ -383,17 +380,6 @@
|
||||
if(prob(75))
|
||||
qdel(src)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/power_change()
|
||||
if(stat & BROKEN)
|
||||
icon_state = "broken"
|
||||
else if(powered())
|
||||
icon_state = initial(icon_state)
|
||||
stat &= ~NOPOWER
|
||||
else
|
||||
spawn(rand(0, 15))
|
||||
src.icon_state = "c_unpowered"
|
||||
stat |= NOPOWER
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/New()
|
||||
..()
|
||||
for(var/i=0;i<3;i++)
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
desc = "A floating crystal that hums with an unearthly energy"
|
||||
icon_state = "pylon"
|
||||
var/isbroken = 0
|
||||
luminosity = 5
|
||||
l_color = "#3e0000"
|
||||
light_range = 5
|
||||
light_color = LIGHT_COLOR_RED
|
||||
var/obj/item/wepon = null
|
||||
|
||||
/obj/structure/cult/pylon/attack_hand(mob/M as mob)
|
||||
@@ -48,7 +48,7 @@
|
||||
isbroken = 1
|
||||
density = 0
|
||||
icon_state = "pylon-broken"
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
else
|
||||
user << "You hit the pylon!"
|
||||
playsound(get_turf(src), 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
@@ -68,14 +68,14 @@
|
||||
isbroken = 0
|
||||
density = 1
|
||||
icon_state = "pylon"
|
||||
SetLuminosity(5)
|
||||
set_light(5)
|
||||
|
||||
/obj/structure/cult/tome
|
||||
name = "Desk"
|
||||
desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl"
|
||||
icon_state = "tomealtar"
|
||||
luminosity = 2
|
||||
l_color = "#3e0000"
|
||||
light_range = 2
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/structure/cult/tome/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
user.drop_item(W, src.loc)
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
/obj/effect/gateway/active
|
||||
luminosity=5
|
||||
l_color="#ff0000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
spawnable=list(
|
||||
/mob/living/simple_animal/hostile/scarybat,
|
||||
/mob/living/simple_animal/hostile/creature,
|
||||
@@ -122,7 +122,7 @@
|
||||
|
||||
/obj/effect/gateway/active/cult
|
||||
luminosity=5
|
||||
l_color="#ff0000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
spawnable=list(
|
||||
/mob/living/simple_animal/hostile/scarybat/cult,
|
||||
/mob/living/simple_animal/hostile/creature/cult,
|
||||
|
||||
@@ -71,8 +71,7 @@ In short:
|
||||
|
||||
/datum/universal_state/hell/proc/AreaSet()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/universal_state/hell/proc/AreaSet() called tick#: [world.time]")
|
||||
for(var/area/ca in areas)
|
||||
var/area/A=get_area_master(ca)
|
||||
for(var/area/A in areas)
|
||||
if(!istype(A,/area) || A.name=="Space")
|
||||
continue
|
||||
|
||||
@@ -110,8 +109,12 @@ In short:
|
||||
T.overlays += "hell01"
|
||||
else
|
||||
T.underlays += "hell01"
|
||||
T.update_lumcount(1, 255, 0, 0, 0)
|
||||
tcheck(85,1)
|
||||
|
||||
for(var/atom/movable/lighting_overlay/L in all_lighting_overlays)
|
||||
L.update_lumcount(0.5, 0, 0)
|
||||
tcheck(80,1)
|
||||
|
||||
/datum/universal_state/hell/proc/MiscSet()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/universal_state/hell/proc/MiscSet() called tick#: [world.time]")
|
||||
for(var/turf/simulated/floor/T in turfs)
|
||||
|
||||
@@ -32,8 +32,8 @@ var/global/list/narsie_list = list()
|
||||
// Pixel stuff centers Narsie.
|
||||
pixel_x = -236
|
||||
pixel_y = -256
|
||||
luminosity = 1
|
||||
l_color = "#3e0000"
|
||||
light_range = 1
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
current_size = 12
|
||||
consume_range = 12 // How many tiles out do we eat.
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
// Simulates stuff getting broken due to molecular bonds decaying.
|
||||
var/decay_rate = 0
|
||||
|
||||
|
||||
// Actually decay the turf.
|
||||
/datum/universal_state/proc/DecayTurf(var/turf/T)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/universal_state/proc/DecayTurf() called tick#: [world.time]")
|
||||
@@ -45,7 +46,7 @@
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/universal_state/proc/OnShuttleCall() called tick#: [world.time]")
|
||||
return 1
|
||||
|
||||
// Processed per tick
|
||||
// This gets called by lighting overlay updates, lighting_overlays.dm line #62.
|
||||
/datum/universal_state/proc/OnTurfTick(var/turf/T)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/universal_state/proc/OnTurfTick() called tick#: [world.time]")
|
||||
if(decay_rate && prob(decay_rate))
|
||||
|
||||
@@ -7,21 +7,22 @@
|
||||
icon_state = "bluespace"
|
||||
|
||||
//luminosity = 5
|
||||
//l_color="#0066FF"
|
||||
layer = LIGHTING_LAYER+1
|
||||
//light_color="#0066FF"
|
||||
layer = LIGHTING_LAYER + 1
|
||||
|
||||
var/spawned=0 // DIR mask
|
||||
var/next_check=0
|
||||
var/list/avail_dirs = list(NORTH,SOUTH,EAST,WEST)
|
||||
|
||||
dynamic_lighting = 0
|
||||
|
||||
/turf/unsimulated/wall/supermatter/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
next_check = world.time+5 SECONDS
|
||||
processing_objects |= src
|
||||
return ..()
|
||||
|
||||
/turf/unsimulated/wall/supermatter/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
processing_objects -= src
|
||||
return ..()
|
||||
|
||||
/turf/unsimulated/wall/supermatter/process()
|
||||
// Only check infrequently.
|
||||
@@ -116,4 +117,4 @@
|
||||
if(istype(user,/mob/dead/observer))
|
||||
return
|
||||
|
||||
del(user)
|
||||
qdel(user)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
announce=0
|
||||
narnar=0
|
||||
|
||||
layer=LIGHTING_LAYER+2 // ITS SO BRIGHT
|
||||
layer = LIGHTING_LAYER + 2 // ITS SO BRIGHT
|
||||
|
||||
consume_range = 6
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "Supermatter Cascade"
|
||||
desc = "Unknown harmonance affecting universal substructure, converting nearby matter to supermatter."
|
||||
|
||||
decay_rate = 5 // 5% chance of a turf decaying on lighting update/airflow (there's no actual tick for turfs)
|
||||
decay_rate = 5 // 5% chance of a turf decaying on lighting update (there's no actual tick for turfs). Code that triggers this is lighting_overlays.dm, line #62.
|
||||
|
||||
/datum/universal_state/supermatter_cascade/OnShuttleCall(var/mob/user)
|
||||
if(user)
|
||||
@@ -16,8 +16,6 @@
|
||||
T.underlays -= "end01"
|
||||
else
|
||||
T.overlays -= "end01"
|
||||
if(!T.color_lighting_lumcount)
|
||||
T.update_lumcount(1, 160, 255, 0, 0)
|
||||
|
||||
/datum/universal_state/supermatter_cascade/DecayTurf(var/turf/T)
|
||||
if(istype(T,/turf/simulated/wall))
|
||||
@@ -151,8 +149,13 @@ The access requirements on the Asteroid Shuttles' consoles have now been revoked
|
||||
else
|
||||
if(T.z != map.zCentcomm)
|
||||
T.underlays += "end01"
|
||||
T.update_lumcount(1, 160, 255, 0, 0)
|
||||
tcheck(80,1)
|
||||
|
||||
for(var/atom/movable/lighting_overlay/L in all_lighting_overlays)
|
||||
if(L.z != map.zCentcomm)
|
||||
L.update_lumcount(0.15, 0.5, 0)
|
||||
tcheck(80,1)
|
||||
|
||||
/datum/universal_state/supermatter_cascade/proc/MiscSet()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/datum/universal_state/supermatter_cascade/proc/MiscSet() called tick#: [world.time]")
|
||||
for (var/obj/machinery/firealarm/alm in machines)
|
||||
|
||||
@@ -201,10 +201,9 @@
|
||||
for(var/type in typesof(/area/hallway))
|
||||
var/area/Hallway = locate(type)
|
||||
|
||||
for(var/area/Related in Hallway.related)
|
||||
for(var/turf/simulated/floor/Floor in Related.contents)
|
||||
if(Floor.contents.len <= 0)
|
||||
Floors += Floor
|
||||
for(var/turf/simulated/floor/Floor in Hallway.contents)
|
||||
if(Floor.contents.len <= 0)
|
||||
Floors += Floor
|
||||
|
||||
if(Floors.len) // pick a floor to spawn at
|
||||
var/turf/simulated/floor/Floor = pick(Floors)
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
var/list/turf/simulated/floor/turfs = list() //list of all the empty floor turfs in the hallway areas
|
||||
for(var/areapath in typesof(/area/hallway))
|
||||
var/area/A = locate(areapath)
|
||||
for(var/area/B in A.related)
|
||||
for(var/turf/simulated/floor/F in B.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
for(var/turf/simulated/floor/F in A.contents)
|
||||
if(!F.contents.len)
|
||||
turfs += F
|
||||
|
||||
if(turfs.len) //Pick a turf to spawn at if we can
|
||||
var/turf/simulated/floor/T = pick(turfs)
|
||||
|
||||
@@ -638,9 +638,10 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
if(VAMP_MATURE in mind.vampire.powers)
|
||||
smitetemp -= 1
|
||||
if(VAMP_SHADOW in mind.vampire.powers)
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(T.lighting_lumcount < 2)
|
||||
var/turf/T = get_turf(src)
|
||||
if((T.get_lumcount() * 10) < 2)
|
||||
smitetemp -= 1
|
||||
|
||||
if(VAMP_UNDYING in mind.vampire.powers)
|
||||
smitetemp -= 1
|
||||
|
||||
|
||||
@@ -36,8 +36,8 @@
|
||||
src << "<span class='warning'>Your powers are useless on this holy ground.</span>"
|
||||
return 0
|
||||
if(check_holy(src) && !fullpower)
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(T.lighting_lumcount > 2)
|
||||
var/turf/T = get_turf(src)
|
||||
if((T.get_lumcount() * 10) > 2)
|
||||
src << "<span class='warning'>This ground has been blessed and illuminated, suppressing your abilities.</span>"
|
||||
return 0
|
||||
return 1
|
||||
@@ -349,16 +349,15 @@
|
||||
alpha = 255
|
||||
color = "#FFFFFF"
|
||||
return
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
|
||||
if(!istype(T))
|
||||
return 0
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(!mind.vampire.iscloaking)
|
||||
alpha = 255
|
||||
color = "#FFFFFF"
|
||||
return 0
|
||||
if(T.lighting_lumcount <= 2)
|
||||
|
||||
if((T.get_lumcount() * 10) <= 2)
|
||||
alpha = round((255 * 0.15))
|
||||
if(VAMP_SHADOW in mind.vampire.powers)
|
||||
color = "#000000"
|
||||
@@ -494,9 +493,7 @@
|
||||
if(T.density) continue
|
||||
if(T.x>world.maxx-outer_tele_radius || T.x<outer_tele_radius) continue //putting them at the edge is dumb
|
||||
if(T.y>world.maxy-outer_tele_radius || T.y<outer_tele_radius) continue
|
||||
|
||||
// LIGHTING CHECK
|
||||
if(T.lighting_lumcount > max_lum) continue
|
||||
if((T.get_lumcount() * 10) > max_lum) continue
|
||||
turfs += T
|
||||
|
||||
if(!turfs.len)
|
||||
@@ -543,15 +540,14 @@
|
||||
if(!mind || !mind.vampire || !ishuman(src))
|
||||
mind.vampire.ismenacing = 0
|
||||
return
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
|
||||
if(!istype(T))
|
||||
return 0
|
||||
|
||||
if(!mind.vampire.ismenacing)
|
||||
mind.vampire.ismenacing = 0
|
||||
return 0
|
||||
if(T.lighting_lumcount > 2)
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(T.get_lumcount() > 2)
|
||||
mind.vampire.ismenacing = 0
|
||||
return 0
|
||||
|
||||
|
||||
@@ -160,13 +160,15 @@
|
||||
/obj/item/weapon/stock_parts/manipulator,
|
||||
/obj/item/weapon/stock_parts/manipulator
|
||||
)
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
light_range_on = 3
|
||||
light_power_on = 2
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && occupant)
|
||||
SetLuminosity(2)
|
||||
set_light(light_range_on, light_power_on)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/sleeper/New()
|
||||
..()
|
||||
@@ -278,7 +280,7 @@
|
||||
if(user.pulling == L)
|
||||
user.stop_pulling()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
set_light(light_range_on, light_power_on)
|
||||
sedativeblock = 1
|
||||
sleep(SLEEPER_SOPORIFIC_DELAY)
|
||||
sedativeblock = 0
|
||||
@@ -327,7 +329,7 @@
|
||||
for(var/atom/movable/A as mob|obj in src)
|
||||
A.loc = src.loc
|
||||
A.blob_act()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/machinery/sleeper/crowbarDestroy(mob/user)
|
||||
@@ -385,7 +387,7 @@
|
||||
src.add_fingerprint(user)
|
||||
qdel(G)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
set_light(light_range_on, light_power_on)
|
||||
sedativeblock = 1
|
||||
spawn(SLEEPER_SOPORIFIC_DELAY)
|
||||
sedativeblock = 0
|
||||
@@ -504,6 +506,7 @@
|
||||
return
|
||||
src.go_out()
|
||||
add_fingerprint(usr)
|
||||
set_light(0)
|
||||
return
|
||||
|
||||
|
||||
@@ -540,8 +543,10 @@
|
||||
update_icon()
|
||||
|
||||
for(var/obj/O in src)
|
||||
del(O)
|
||||
qdel(O)
|
||||
src.add_fingerprint(usr)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
set_light(light_range_on, light_power_on)
|
||||
return
|
||||
return
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
var/mob/living/carbon/occupant
|
||||
var/locked
|
||||
|
||||
l_color = "#00FF00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
light_range_on = 3
|
||||
light_power_on = 2
|
||||
|
||||
/obj/machinery/bodyscanner/New()
|
||||
..()
|
||||
@@ -81,9 +83,9 @@
|
||||
/obj/machinery/bodyscanner/power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && src.occupant)
|
||||
SetLuminosity(2)
|
||||
set_light(light_range_on, light_power_on)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/bodyscanner/MouseDrop_T(atom/movable/O as mob|obj, mob/user as mob)
|
||||
if(!ismob(O)) //humans only
|
||||
@@ -131,6 +133,8 @@
|
||||
OO.loc = src.loc
|
||||
//Foreach goto(154)
|
||||
src.add_fingerprint(user)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
set_light(light_range_on, light_power_on)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/MouseDrop(over_object, src_location, var/turf/over_location, src_control, over_control, params)
|
||||
@@ -203,6 +207,8 @@
|
||||
for(var/obj/O in src)
|
||||
qdel(O)
|
||||
src.add_fingerprint(usr)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
set_light(light_range_on, light_power_on)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/proc/go_out(var/exit = loc)
|
||||
@@ -216,6 +222,7 @@
|
||||
src.occupant.reset_view()
|
||||
src.occupant = null
|
||||
update_icon()
|
||||
set_light(0)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/crowbarDestroy(mob/user)
|
||||
@@ -266,6 +273,8 @@
|
||||
O.loc = src.loc
|
||||
src.add_fingerprint(user)
|
||||
qdel(G)
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
set_light(light_range_on, light_power_on)
|
||||
return
|
||||
|
||||
/obj/machinery/bodyscanner/ex_act(severity)
|
||||
|
||||
@@ -94,11 +94,10 @@
|
||||
/obj/machinery/alarm/proc/apply_preset(var/no_cycle_after=0)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/alarm/proc/apply_preset() called tick#: [world.time]")
|
||||
// Propogate settings.
|
||||
for (var/area/A in areaMaster.related)
|
||||
for (var/obj/machinery/alarm/AA in A)
|
||||
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.preset != src.preset)
|
||||
AA.preset=preset
|
||||
apply_preset(1) // Only this air alarm should send a cycle.
|
||||
for (var/obj/machinery/alarm/AA in areaMaster)
|
||||
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.preset != src.preset)
|
||||
AA.preset=preset
|
||||
apply_preset(1) // Only this air alarm should send a cycle.
|
||||
|
||||
TLV["oxygen"] = list(16, 19, 135, 140) // Partial pressure, kpa
|
||||
TLV["nitrogen"] = list(-1, -1, -1, -1) // Partial pressure, kpa
|
||||
@@ -300,11 +299,10 @@
|
||||
|
||||
/obj/machinery/alarm/proc/elect_master()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/alarm/proc/elect_master() called tick#: [world.time]")
|
||||
for (var/area/A in areaMaster.related)
|
||||
for (var/obj/machinery/alarm/AA in A)
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)))
|
||||
areaMaster.master_air_alarm = AA
|
||||
return 1
|
||||
for (var/obj/machinery/alarm/AA in areaMaster)
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)))
|
||||
areaMaster.master_air_alarm = AA
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/alarm/proc/get_danger_level(const/current_value, const/list/danger_levels)
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
var/list/sensor_information = list()
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/general_air_control/attack_hand(mob/user)
|
||||
if(..(user))
|
||||
|
||||
@@ -9,13 +9,8 @@
|
||||
|
||||
var/range = 25
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
light_range_on = 2
|
||||
|
||||
//Simple variable to prevent me from doing attack_hand in both this and the child computer
|
||||
var/zone = "This computer is working on a wireless range, the range is currently limited to 25 meters."
|
||||
@@ -153,14 +148,10 @@
|
||||
var/turf/T_src = get_turf(src)
|
||||
if(!T_src.loc) return 0
|
||||
var/area/A_src = T_src.loc
|
||||
if (A_src.master)
|
||||
A_src = A_src.master
|
||||
|
||||
var/turf/T_scrub = get_turf(scrubber)
|
||||
if(!T_scrub.loc) return 0
|
||||
var/area/A_scrub = T_scrub.loc
|
||||
if (A_scrub.master)
|
||||
A_scrub = A_scrub.master
|
||||
|
||||
if(A_scrub != A_src)
|
||||
return 0
|
||||
@@ -179,7 +170,7 @@
|
||||
var/turf/T2 = get_turf(scrubber)
|
||||
if(T2 && T2.loc)
|
||||
var/area/A2 = T2.loc
|
||||
if(istype(A2) && A2.master && A2.master == A )
|
||||
if(istype(A2) && A2 == A )
|
||||
connectedscrubbers += scrubber
|
||||
found = 1
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/max_external_pressure=10000 // 10,000kPa ought to do it.
|
||||
var/internal_pressure=4500 // Bottleneck
|
||||
|
||||
var/light_color = "#FFFFFF"
|
||||
var/overlay_color = "#FFFFFF"
|
||||
|
||||
machine_flags = WRENCHMOVE | FIXED2WORK
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
return
|
||||
if(on)
|
||||
var/new_icon_state="on"
|
||||
var/new_color = light_color
|
||||
var/new_color = overlay_color
|
||||
if(stat & BROKEN)
|
||||
new_icon_state="broken"
|
||||
new_color="#FF0000"
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/miner/sleeping_agent
|
||||
name = "\improper N2O Gas Miner"
|
||||
light_color = "#FFCCCC"
|
||||
overlay_color = "#FFCCCC"
|
||||
|
||||
AddAir()
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
@@ -127,28 +127,28 @@
|
||||
|
||||
/obj/machinery/atmospherics/miner/nitrogen
|
||||
name = "\improper N2 Gas Miner"
|
||||
light_color = "#CCFFCC"
|
||||
overlay_color = "#CCFFCC"
|
||||
|
||||
AddAir()
|
||||
air_contents.nitrogen = internal_pressure*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
/obj/machinery/atmospherics/miner/oxygen
|
||||
name = "\improper O2 Gas Miner"
|
||||
light_color = "#007FFF"
|
||||
overlay_color = "#007FFF"
|
||||
|
||||
AddAir()
|
||||
air_contents.oxygen = internal_pressure*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
/obj/machinery/atmospherics/miner/toxins
|
||||
name = "\improper Plasma Gas Miner"
|
||||
light_color = "#FF0000"
|
||||
overlay_color = "#FF0000"
|
||||
|
||||
AddAir()
|
||||
air_contents.toxins = internal_pressure*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
/obj/machinery/atmospherics/miner/carbon_dioxide
|
||||
name = "\improper CO2 Gas Miner"
|
||||
light_color = "#CDCDCD"
|
||||
overlay_color = "#CDCDCD"
|
||||
|
||||
AddAir()
|
||||
air_contents.carbon_dioxide = internal_pressure*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
@@ -157,7 +157,7 @@
|
||||
/obj/machinery/atmospherics/miner/air
|
||||
name = "\improper Air Miner"
|
||||
desc = "You fucking <em>cheater</em>."
|
||||
light_color = "#70DBDB"
|
||||
overlay_color = "#70DBDB"
|
||||
|
||||
on = 0
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
research_flags = NANOTOUCH | TAKESMATIN | HASOUTPUT | IGNORE_CHEMS | HASMAT_OVER
|
||||
|
||||
l_color = LIGHT_COLOR_CYAN
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
part_sets = list(
|
||||
"Tools"=list(
|
||||
|
||||
@@ -221,14 +221,10 @@
|
||||
|
||||
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
|
||||
/obj/machinery/biogenerator/power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
light_range_on = 3
|
||||
light_power_on = 2
|
||||
use_auto_lights = 1
|
||||
|
||||
/obj/machinery/biogenerator/on_reagent_change() //When the reagents change, change the icon as well.
|
||||
update_icon()
|
||||
|
||||
@@ -12,14 +12,10 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 50
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
light_range_on = 3
|
||||
light_power_on = 2
|
||||
use_auto_lights = 1
|
||||
|
||||
var/prints_prosthetics
|
||||
var/stored_matter = 200
|
||||
|
||||
@@ -32,13 +32,13 @@
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/bot/proc/turn_on() called tick#: [world.time]")
|
||||
if(stat) return 0
|
||||
on = 1
|
||||
SetLuminosity(initial(luminosity))
|
||||
set_light(initial(luminosity))
|
||||
return 1
|
||||
|
||||
/obj/machinery/bot/proc/turn_off()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/bot/proc/turn_off() called tick#: [world.time]")
|
||||
on = 0
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/bot/proc/explode()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/bot/proc/explode() called tick#: [world.time]")
|
||||
|
||||
@@ -58,13 +58,13 @@
|
||||
/obj/item/weapon/gun/energy/laser/bluetag,\
|
||||
/obj/item/weapon/gun/energy/laser/redtag,\
|
||||
/obj/item/weapon/gun/energy/laser/practice)
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
power_change()
|
||||
..()
|
||||
if(src.on)
|
||||
SetLuminosity(2)
|
||||
set_light(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
|
||||
/obj/machinery/bot/secbot/beepsky
|
||||
|
||||
@@ -99,7 +99,7 @@ var/list/camera_names=list()
|
||||
network = list()
|
||||
cameranet.removeCamera(src)
|
||||
stat |= EMPED
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
triggerCameraAlarm()
|
||||
update_icon()
|
||||
spawn(900)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/damaged = 0
|
||||
var/last_change = 0
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/HolodeckControl/attack_ai(var/mob/user as mob)
|
||||
add_hiddenprint(user)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/mob/living/carbon/human/victim = null
|
||||
var/obj/machinery/optable/optable = null
|
||||
|
||||
l_color = "#0000FF"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/operating/New()
|
||||
..()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/mob/living/silicon/ai/occupant = null
|
||||
var/active = 0
|
||||
|
||||
l_color = "#CD00CD"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/aifixer/New()
|
||||
..()
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
machine_flags = EMAGGABLE | SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK
|
||||
emag_cost = 0 // because fun
|
||||
|
||||
l_color = "#00FF00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2,
|
||||
/obj/item/toy/cards = 2,
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/receive_frequency = 1437
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
|
||||
/obj/machinery/computer/atmos_alert/initialize()
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
var/list/network = list("SS13")
|
||||
var/mapping = 0//For the overview file, interesting bit of code.
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/security/attack_ai(var/mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
@@ -93,7 +93,7 @@
|
||||
density = 0
|
||||
circuit = null
|
||||
|
||||
l_color = "#000000"
|
||||
light_color = null
|
||||
|
||||
/obj/machinery/computer/security/telescreen/update_icon()
|
||||
icon_state = initial(icon_state)
|
||||
@@ -110,14 +110,14 @@
|
||||
density = 0
|
||||
circuit = null
|
||||
|
||||
l_color = "#000000"
|
||||
light_color = null
|
||||
|
||||
/obj/machinery/computer/security/wooden_tv
|
||||
name = "Security Cameras"
|
||||
desc = "An old TV hooked into the stations camera network."
|
||||
icon_state = "security_det"
|
||||
|
||||
l_color = "#000000"
|
||||
light_color = null
|
||||
|
||||
/obj/machinery/computer/security/mining
|
||||
name = "Outpost Cameras"
|
||||
@@ -126,7 +126,7 @@
|
||||
network = list("MINE")
|
||||
circuit = "/obj/item/weapon/circuitboard/mining"
|
||||
|
||||
l_color = "#CD00CD"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/security/engineering
|
||||
name = "Engineering Cameras"
|
||||
@@ -134,3 +134,5 @@
|
||||
icon_state = "engineeringcameras"
|
||||
network = list("Power Alarms","Atmosphere Alarms","Fire Alarms")
|
||||
circuit = "/obj/item/weapon/circuitboard/security/engineering"
|
||||
|
||||
light_color = LIGHT_COLOR_YELLOW
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
"ERT_medical",
|
||||
)
|
||||
|
||||
l_color = "#0000FF"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
proc/is_centcom()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/is_centcom() called tick#: [world.time]")
|
||||
|
||||
@@ -57,7 +57,7 @@ var/shuttle_call/shuttle_calls[0]
|
||||
var/stat_msg2
|
||||
var/display_type="blank"
|
||||
|
||||
l_color = "#0000FF"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..(href, href_list))
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
var/processing = 0
|
||||
machine_flags = EMAGGABLE | SCREWTOGGLE | WRENCHMOVE | FIXED2WORK | MULTITOOL_MENU
|
||||
|
||||
use_auto_lights = 1
|
||||
light_power_on = 2
|
||||
light_range_on = 3
|
||||
|
||||
/obj/machinery/computer/cultify()
|
||||
new /obj/structure/cult/tome(loc)
|
||||
..()
|
||||
@@ -59,7 +63,6 @@
|
||||
set_broken()
|
||||
..()
|
||||
|
||||
|
||||
/obj/machinery/computer/blob_act()
|
||||
if (prob(75))
|
||||
for(var/x in verbs)
|
||||
@@ -78,16 +81,9 @@
|
||||
else if(stat & NOPOWER)
|
||||
icon_state = "[initial(icon_state)]0"
|
||||
|
||||
|
||||
|
||||
/obj/machinery/computer/power_change()
|
||||
..()
|
||||
. = ..()
|
||||
update_icon()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
|
||||
|
||||
/obj/machinery/computer/proc/set_broken()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/proc/set_broken() called tick#: [world.time]")
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/mob/living/silicon/ai/current = null
|
||||
var/opened = 0
|
||||
|
||||
l_color = "#FFFFFF"
|
||||
light_color = "#555555"
|
||||
|
||||
|
||||
verb/AccessInternals()
|
||||
@@ -140,7 +140,7 @@
|
||||
circuit = "/obj/item/weapon/circuitboard/borgupload"
|
||||
var/mob/living/silicon/robot/current = null
|
||||
|
||||
l_color = "#FFFFFF"
|
||||
light_color = "#555555"
|
||||
|
||||
proc/announce_law_changes()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\proc/announce_law_changes() called tick#: [world.time]")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/temp = null
|
||||
var/printing = null
|
||||
|
||||
l_color = "#0000FF"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/med_data/attack_ai(user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
@@ -524,6 +524,6 @@
|
||||
anchored = 0
|
||||
density = 0
|
||||
|
||||
l_color = "#00FF00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
var/customjob = "Admin"
|
||||
var/custommessage = "This is a test, please ignore."
|
||||
|
||||
l_color = "#50AB00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
|
||||
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob)
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
desc = "It can be used to download Apps on your PDA."
|
||||
icon_state = "pdaterm"
|
||||
circuit = "/obj/item/weapon/circuitboard/pda_terminal"
|
||||
l_color = "#993300"
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
var/obj/item/device/pda/pda_device = null
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/default_loop = 0
|
||||
var/default_timings = 0
|
||||
|
||||
l_color = "#555555"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/obj/machinery/computer/pod/New()
|
||||
..()
|
||||
@@ -290,7 +290,7 @@
|
||||
desc = "The Syndicate operate on a tight budget. Operates external airlocks."
|
||||
req_access = list(access_syndicate)
|
||||
circuit = /obj/item/weapon/circuitboard/syndicatedoor
|
||||
l_color = "#000000"
|
||||
light_color = null
|
||||
|
||||
/obj/machinery/computer/pod/old/syndicate/attack_hand(var/mob/user as mob)
|
||||
if(!allowed(user))
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
var/stop = 0.0
|
||||
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
attack_ai(var/mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
|
||||
@@ -19,7 +19,7 @@ var/prison_shuttle_timeleft = 0
|
||||
var/temp = null
|
||||
var/allowedtocall = 0
|
||||
var/prison_break = 0
|
||||
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
attackby(I as obj, user as mob)
|
||||
if(!..())
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
var/stop = 0.0
|
||||
var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text
|
||||
|
||||
l_color = "#CD00CD"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
|
||||
/obj/machinery/computer/robotics/attack_ai(var/mob/user as mob)
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/salvage_ship/New()
|
||||
curr_location= locate(/area/shuttle/salvage/start)
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
var/sortBy = "name"
|
||||
var/order = 1 // -1 = Descending - 1 = Ascending
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob)
|
||||
if(istype(O, /obj/item/weapon/card/id) && !scan)
|
||||
@@ -603,4 +603,4 @@ What a mess.*/
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "messyfiles"
|
||||
|
||||
l_color = "#000000"
|
||||
light_color = null
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
var/auth_need = 3.0
|
||||
var/list/authorized = list( )
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER)) return
|
||||
|
||||
@@ -21,7 +21,7 @@ var/specops_shuttle_timeleft = 0
|
||||
var/allowedtocall = 0
|
||||
var/specops_shuttle_timereset = 0
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
/proc/specops_return()
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/specops_return() called tick#: [world.time]")
|
||||
@@ -320,8 +320,6 @@ var/specops_shuttle_timeleft = 0
|
||||
|
||||
var/area/centcom/specops/special_ops = locate()
|
||||
if(special_ops)
|
||||
if(special_ops.master)
|
||||
special_ops=special_ops.master
|
||||
special_ops.readyalert()//Trigger alarm for the spec ops area.
|
||||
specops_shuttle_moving_to_station = 1
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
desc = "Used to access the station's automated alert system."
|
||||
icon_state = "alert:0"
|
||||
circuit = "/obj/item/weapon/circuitboard/stationalert"
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
|
||||
var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list())
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "store"
|
||||
circuit = "/obj/item/weapon/circuitboard/merch"
|
||||
|
||||
l_color = "#993300"
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
/obj/item/weapon/circuitboard/merch
|
||||
name = "\improper Merchandise Computer Circuitboard"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
var/moving = 0
|
||||
var/lastMove = 0
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/syndicate_station/New()
|
||||
curr_location= locate(/area/syndicate_station/start)
|
||||
|
||||
@@ -19,7 +19,7 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
var/hacked = 0
|
||||
var/allowedtocall = 0
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/proc/syndicate_elite_process()
|
||||
//writepanic("[__FILE__].[__LINE__] (no type)([usr ? usr.ckey : ""]) \\/proc/syndicate_elite_process() called tick#: [world.time]")
|
||||
@@ -240,8 +240,6 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
|
||||
var/area/syndicate_mothership/elite_squad/elite_squad = locate()
|
||||
if(elite_squad)
|
||||
if(elite_squad.master)
|
||||
elite_squad=elite_squad.master
|
||||
elite_squad.readyalert()//Trigger alarm for the spec ops area.
|
||||
syndicate_elite_shuttle_moving_to_station = 1
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ var/global/list/taxi_computers = list()
|
||||
var/letter = ""
|
||||
var/list/connected_buttons = list()
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/taxi_shuttle/New()
|
||||
..()
|
||||
|
||||
@@ -12,7 +12,7 @@ var/global/vox_shuttle_location
|
||||
var/moving = FALSE
|
||||
var/lastMove = 0
|
||||
|
||||
l_color = "#B40000"
|
||||
light_color = LIGHT_COLOR_RED
|
||||
|
||||
/obj/machinery/computer/vox_station/proc/vox_move_to(var/destination)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/vox_station/proc/vox_move_to() called tick#: [world.time]")
|
||||
|
||||
@@ -22,14 +22,10 @@ var/global/list/cryo_health_indicator = list( "full" = image("icon" = 'icons/obj
|
||||
|
||||
machine_flags = SCREWTOGGLE | CROWDESTROY
|
||||
|
||||
l_color = "#00FF00"
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)) && on)
|
||||
SetLuminosity(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
light_range_on = 1
|
||||
light_power_on = 2
|
||||
use_auto_lights = 1
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/New()
|
||||
. = ..()
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
var/alert = signal.data["alert"]
|
||||
|
||||
var/area/our_area = get_area(src)
|
||||
if (our_area.master)
|
||||
our_area = our_area.master
|
||||
|
||||
if(alarm_area == our_area.name)
|
||||
switch(alert)
|
||||
|
||||
@@ -253,13 +253,13 @@ var/list/all_doors = list()
|
||||
if(!operating) operating = 1
|
||||
|
||||
door_animate("opening")
|
||||
src.SetOpacity(0)
|
||||
src.set_opacity(0)
|
||||
sleep(10)
|
||||
src.layer = base_layer
|
||||
src.density = 0
|
||||
explosion_resistance = 0
|
||||
update_icon()
|
||||
SetOpacity(0)
|
||||
set_opacity(0)
|
||||
update_nearby_tiles()
|
||||
//update_freelook_sight()
|
||||
|
||||
@@ -289,7 +289,7 @@ var/list/all_doors = list()
|
||||
update_icon()
|
||||
|
||||
if (!glass)
|
||||
src.SetOpacity(1)
|
||||
src.set_opacity(1)
|
||||
// Copypasta!!!
|
||||
var/obj/effect/beam/B = locate() in loc
|
||||
if(B)
|
||||
|
||||
@@ -48,7 +48,7 @@ var/list/poddoors = list()
|
||||
src.operating = 1
|
||||
flick("pdoorc0", src)
|
||||
src.icon_state = "pdoor0"
|
||||
src.SetOpacity(0)
|
||||
src.set_opacity(0)
|
||||
sleep(15)
|
||||
src.density = 0
|
||||
src.operating = 0
|
||||
@@ -64,7 +64,7 @@ var/list/poddoors = list()
|
||||
src.operating = 1
|
||||
flick("pdoorc0", src)
|
||||
src.icon_state = "pdoor0"
|
||||
src.SetOpacity(0)
|
||||
src.set_opacity(0)
|
||||
sleep(10)
|
||||
layer = initial(layer)
|
||||
src.density = 0
|
||||
@@ -85,7 +85,7 @@ var/list/poddoors = list()
|
||||
flick("pdoorc1", src)
|
||||
src.icon_state = "pdoor1"
|
||||
src.density = 1
|
||||
src.SetOpacity(initial(opacity))
|
||||
src.set_opacity(initial(opacity))
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
icon_state = "shutter0"
|
||||
sleep(15)
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
set_opacity(0)
|
||||
operating = 0
|
||||
return
|
||||
return
|
||||
@@ -41,7 +41,7 @@
|
||||
icon_state = "shutter0"
|
||||
sleep(10)
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
set_opacity(0)
|
||||
update_nearby_tiles()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
@@ -60,7 +60,7 @@
|
||||
icon_state = "shutter1"
|
||||
density = 1
|
||||
if(visible)
|
||||
SetOpacity(1)
|
||||
set_opacity(1)
|
||||
update_nearby_tiles()
|
||||
|
||||
sleep(10)
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
if(cell.charge < powercost)
|
||||
on = 0
|
||||
update_icon()
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
visible_message("<span class='warning'>\The [src] shuts down!</span>")
|
||||
return
|
||||
|
||||
else
|
||||
on = 0
|
||||
update_icon()
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
visible_message("<span class='warning'>\The [src] shuts down!</span>")
|
||||
return
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
|
||||
if(on)
|
||||
on = 0
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
else
|
||||
if(!cell || !cell.charge > powercost)
|
||||
return
|
||||
on = 1
|
||||
SetLuminosity(brightness_on)
|
||||
set_light(brightness_on)
|
||||
|
||||
user.visible_message("<span class='notice'>[user] turns \the [src] [on ? "on":"off"]</span>", \
|
||||
"<span class='notice'>You turn \the [src] [on ? "on":"off"]</span>")
|
||||
|
||||
@@ -98,8 +98,8 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
hologram.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
|
||||
hologram.anchored = 1//So space wind cannot drag it.
|
||||
hologram.name = "[A.name] (Hologram)"//If someone decides to right click.
|
||||
hologram.SetLuminosity(2) //hologram lighting
|
||||
SetLuminosity(2) //pad lighting
|
||||
hologram.set_light(2) //hologram lighting
|
||||
set_light(2) //pad lighting
|
||||
icon_state = "holopad1"
|
||||
A.current = src
|
||||
master = A//AI is the master.
|
||||
@@ -113,7 +113,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(master.current == src)
|
||||
master.current = null
|
||||
master = null//Null the master, since no-one is using it now.
|
||||
SetLuminosity(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
||||
set_light(0) //pad lighting (hologram lighting will be handled automatically since its owner was deleted)
|
||||
icon_state = "holopad0"
|
||||
use_power = 1//Passive power usage.
|
||||
return 1
|
||||
@@ -130,7 +130,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
var/area/holo_area = get_area(src)
|
||||
var/area/eye_area = get_area(master.eyeobj)
|
||||
|
||||
if(eye_area in holo_area.master.related)
|
||||
if(eye_area == holo_area)
|
||||
return 1
|
||||
|
||||
clear_holo()//If not, we want to get rid of the hologram.
|
||||
|
||||
@@ -26,13 +26,13 @@
|
||||
|
||||
machine_flags = SCREWTOGGLE | CROWDESTROY | EJECTNOTDEL
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
set_light(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
|
||||
/********************************************************************
|
||||
@@ -72,7 +72,7 @@
|
||||
|
||||
accepted_types = list(/obj/item/seeds)
|
||||
|
||||
l_color = "#000000"
|
||||
light_color = null
|
||||
|
||||
/obj/machinery/smartfridge/seeds/New()
|
||||
. = ..()
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
|
||||
machine_flags = SCREWTOGGLE | CROWDESTROY | WRENCHMOVE | FIXED2WORK
|
||||
|
||||
l_color = "#7BF9FF"
|
||||
light_color = LIGHT_COLOR_CYAN
|
||||
power_change()
|
||||
..()
|
||||
if(!(stat & (BROKEN|NOPOWER)))
|
||||
SetLuminosity(2)
|
||||
set_light(2)
|
||||
else
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/********************************************************************
|
||||
** Adding Stock Parts to VV so preconstructed shit has its candy **
|
||||
|
||||
@@ -99,13 +99,12 @@
|
||||
if(buildstage != 2) return
|
||||
on = !on
|
||||
|
||||
for(var/area/A in areaMaster.related)
|
||||
A.lightswitch = on
|
||||
A.updateicon()
|
||||
areaMaster.lightswitch = on
|
||||
areaMaster.updateicon()
|
||||
|
||||
for(var/obj/machinery/light_switch/L in A)
|
||||
L.on = on
|
||||
L.updateicon()
|
||||
for(var/obj/machinery/light_switch/L in areaMaster)
|
||||
L.on = on
|
||||
L.updateicon()
|
||||
|
||||
areaMaster.power_change()
|
||||
|
||||
|
||||
@@ -133,6 +133,11 @@ Class Procs:
|
||||
var/panel_open = 0
|
||||
var/state = 0 //0 is unanchored, 1 is anchored and unwelded, 2 is anchored and welded for most things
|
||||
|
||||
//These are some values to automatically set the light power/range on machines if they have power
|
||||
var/light_range_on = 0
|
||||
var/light_power_on = 0
|
||||
var/use_auto_lights = 0//Incase you want to use it, set this to 0, defaulting to 1 so machinery with no lights doesn't call set_light()
|
||||
|
||||
/**
|
||||
* Machine construction/destruction/emag flags.
|
||||
*/
|
||||
|
||||
@@ -185,7 +185,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
if (Console.department == department)
|
||||
Console.newmessagepriority = 0
|
||||
Console.icon_state = "req_comp0"
|
||||
Console.SetLuminosity(1)
|
||||
Console.set_light(1)
|
||||
newmessagepriority = 0
|
||||
icon_state = "req_comp0"
|
||||
for(var/msg in messages)
|
||||
@@ -332,7 +332,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
Console.messages += "<B>Message from <A href='?src=\ref[Console];write=[ckey(department)]'>[department]</A></FONT></B><BR>[message]"
|
||||
|
||||
screen = 6
|
||||
Console.SetLuminosity(2)
|
||||
Console.set_light(2)
|
||||
messages += "<B>Message sent to [dpt]</B><BR>[message]"
|
||||
else
|
||||
say(text("\icon[src] *The Requests Console beeps: 'NOTICE: No server detected!'"))
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
/obj/machinery/computer/telecomms
|
||||
|
||||
l_color = "#50AB00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/machinery/computer/telecomms/server
|
||||
name = "Telecommunications Server Monitor"
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
var/temp = "" // temporary feedback messages
|
||||
|
||||
l_color = "#50AB00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user as mob)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/list/access_log = list()
|
||||
var/process = 0
|
||||
|
||||
l_color = "#50AB00"
|
||||
light_color = LIGHT_COLOR_GREEN
|
||||
|
||||
req_access = list(access_tcomsat)
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
//Setting this to 1 will set src.locked to null after a player enters the portal and will not allow hand-teles to open portals to that location.
|
||||
ghost_write=0
|
||||
|
||||
l_color = "#0000FF"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
/obj/machinery/computer/teleporter/New()
|
||||
. = ..()
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
|
||||
/area/turret_protected/Entered(O)
|
||||
..()
|
||||
if( master && master != src )
|
||||
return master.Entered(O)
|
||||
|
||||
if( iscarbon(O) )
|
||||
turretTargets |= O
|
||||
@@ -31,9 +29,6 @@
|
||||
return 1
|
||||
|
||||
/area/turret_protected/Exited(O)
|
||||
if( master && master != src )
|
||||
return master.Exited(O)
|
||||
|
||||
if( ismob(O) && !issilicon(O) )
|
||||
turretTargets -= O
|
||||
// /vg/ vehicles
|
||||
@@ -129,8 +124,6 @@
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/turret/proc/get_protected_area() called tick#: [world.time]")
|
||||
var/area/turret_protected/TP = get_area(src)
|
||||
if(istype(TP))
|
||||
if(TP.master && TP.master != TP)
|
||||
TP = TP.master
|
||||
return TP
|
||||
return
|
||||
|
||||
@@ -353,7 +346,7 @@
|
||||
var/enabled = 1
|
||||
var/lethal = 0
|
||||
var/locked = 1
|
||||
var/control_area //can be area name, path or nothing.
|
||||
var/area/turret_protected/control_area //can be area name, path or nothing.
|
||||
var/ailock = 0 // AI cannot use this
|
||||
req_access = list(access_ai_upload)
|
||||
|
||||
@@ -364,11 +357,7 @@
|
||||
/obj/machinery/turretid/New()
|
||||
..()
|
||||
if(!control_area)
|
||||
var/area/CA = get_area(src)
|
||||
if(CA.master && CA.master != CA)
|
||||
control_area = CA.master
|
||||
else
|
||||
control_area = CA
|
||||
control_area = get_area(src)
|
||||
else if(istext(control_area))
|
||||
for(var/area/A in areas)
|
||||
if(A.name && A.name==control_area)
|
||||
@@ -497,7 +486,8 @@
|
||||
/obj/machinery/turretid/proc/updateTurrets()
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/turretid/proc/updateTurrets() called tick#: [world.time]")
|
||||
if(control_area)
|
||||
for (var/obj/machinery/turret/aTurret in get_area_all_atoms(control_area))
|
||||
//ASSERT(istype(control_area))
|
||||
for(var/obj/machinery/turret/aTurret in control_area.contents)
|
||||
aTurret.setState(enabled, lethal)
|
||||
src.update_icons()
|
||||
|
||||
|
||||
@@ -1876,7 +1876,7 @@
|
||||
src.build_inventory(contraband, 1)
|
||||
emagged = 1
|
||||
overlays = 0
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode",LIGHTING_LAYER+1)
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode", LIGHTING_LAYER + 1)
|
||||
overlays_vending[2] = dangerlay
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -1906,7 +1906,7 @@
|
||||
..()
|
||||
emagged = 1
|
||||
overlays = 0
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode",LIGHTING_LAYER+1)
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode", LIGHTING_LAYER + 1)
|
||||
overlays_vending[2] = dangerlay
|
||||
update_icon()
|
||||
|
||||
@@ -1949,7 +1949,7 @@
|
||||
src.build_inventory(contraband, 1)
|
||||
emagged = 1
|
||||
overlays = 0
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode",LIGHTING_LAYER+1)
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode", LIGHTING_LAYER + 1)
|
||||
overlays_vending[2] = dangerlay
|
||||
update_icon()
|
||||
return 1
|
||||
@@ -1982,7 +1982,7 @@
|
||||
..()
|
||||
emagged = 1
|
||||
overlays = 0
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode",LIGHTING_LAYER+1)
|
||||
var/image/dangerlay = image(icon,"[icon_state]-dangermode", LIGHTING_LAYER + 1)
|
||||
overlays_vending[2] = dangerlay
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -926,7 +926,7 @@
|
||||
var/pow_chan
|
||||
if(A)
|
||||
for(var/c in use_channels)
|
||||
if(A.master && A.master.powered(c))
|
||||
if(A.powered(c))
|
||||
pow_chan = c
|
||||
break
|
||||
return pow_chan
|
||||
@@ -971,13 +971,13 @@
|
||||
if(A)
|
||||
var/pow_chan
|
||||
for(var/c in list(EQUIP,ENVIRON,LIGHT))
|
||||
if(A.master.powered(c))
|
||||
if(A.powered(c))
|
||||
pow_chan = c
|
||||
break
|
||||
if(pow_chan)
|
||||
var/delta = min(12, ER.chassis.cell.maxcharge-cur_charge)
|
||||
ER.chassis.give_power(delta)
|
||||
A.master.use_power(delta*ER.coeff, pow_chan)
|
||||
A.use_power(delta*ER.coeff, pow_chan)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
var/obj/machinery/mech_bay_recharge_floor/recharge_floor
|
||||
var/obj/machinery/mech_bay_recharge_port/recharge_port
|
||||
|
||||
l_color = "#CD00CD"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/mech_bay_power_console/proc/mecha_in(var/obj/mecha/mecha)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/machinery/computer/mech_bay_power_console/proc/mecha_in() called tick#: [world.time]")
|
||||
|
||||
@@ -1050,8 +1050,8 @@
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/mecha/verb/toggle_lights() called tick#: [world.time]")
|
||||
if(usr!=occupant) return
|
||||
lights = !lights
|
||||
if(lights) SetLuminosity(luminosity + lights_power)
|
||||
else SetLuminosity(luminosity - lights_power)
|
||||
if(lights) set_light(luminosity + lights_power)
|
||||
else set_light(luminosity - lights_power)
|
||||
src.occupant_message("Toggled lights [lights?"on":"off"].")
|
||||
log_message("Toggled lights [lights?"on":"off"].")
|
||||
return
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/screen = 0
|
||||
var/stored_data
|
||||
|
||||
l_color = "#CD00CD"
|
||||
light_color = LIGHT_COLOR_PINK
|
||||
|
||||
/obj/machinery/computer/mecha/attack_ai(var/mob/user as mob)
|
||||
src.add_hiddenprint(user)
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon_state = "slagcold"
|
||||
anchored = 1
|
||||
melt_temperature=0
|
||||
l_color="#FFA500"
|
||||
light_color = LIGHT_COLOR_ORANGE
|
||||
|
||||
starting_materials = list()
|
||||
|
||||
@@ -25,10 +25,10 @@
|
||||
molten=1
|
||||
icon_state="slaghot"
|
||||
processing_objects.Add(src)
|
||||
SetLuminosity(2)
|
||||
set_light(2)
|
||||
|
||||
/obj/effect/decal/slag/Destroy()
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
@@ -63,11 +63,11 @@
|
||||
|
||||
/obj/effect/decal/slag/solidify()
|
||||
icon_state="slagcold"
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/effect/decal/slag/melt()
|
||||
icon_state="slaghot"
|
||||
SetLuminosity(2)
|
||||
set_light(2)
|
||||
|
||||
/obj/effect/decal/slag/Crossed(M as mob)
|
||||
..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
icon_state = "glowshroomf"
|
||||
|
||||
spawn(delay)
|
||||
SetLuminosity(round(potency/10))
|
||||
set_light(round(potency/10))
|
||||
// Spread() - Methinks this is broken - N3X
|
||||
|
||||
/obj/effect/glowshroom/proc/Spread()
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
|
||||
/obj/item/blueprints/Topic(href, href_list)
|
||||
. = ..()
|
||||
if(.) return 1
|
||||
if(.)
|
||||
return
|
||||
|
||||
switch(href_list["action"])
|
||||
if ("create_area")
|
||||
if (get_area_type()!=AREA_SPACE)
|
||||
@@ -79,7 +81,7 @@ move an amendment</a> to the drawing.</p>
|
||||
|
||||
/obj/item/blueprints/proc/get_area_type(var/area/A = get_area())
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/blueprints/proc/get_area_type() called tick#: [world.time]")
|
||||
if (A.name == "Space" && A.tag)
|
||||
if (A.name == "Space")
|
||||
return AREA_SPACE
|
||||
var/list/SPECIALS = list(
|
||||
/area/shuttle,
|
||||
@@ -124,8 +126,6 @@ move an amendment</a> to the drawing.</p>
|
||||
var/area/oldarea = get_area(usr)
|
||||
newarea.name = str
|
||||
newarea.tag = "[newarea.type]/[md5(str)]"
|
||||
newarea.tagbase = "[newarea.type]_[md5(str)]" // without this dynamic light system ruin everithing
|
||||
newarea.master = newarea
|
||||
newarea.power_equip = 0
|
||||
newarea.power_light = 0
|
||||
newarea.power_environ = 0
|
||||
@@ -137,7 +137,6 @@ move an amendment</a> to the drawing.</p>
|
||||
for(var/atom/allthings in T.contents)
|
||||
allthings.change_area(oldarea,newarea)
|
||||
newarea.addSorted()
|
||||
newarea.SetDynamicLighting()
|
||||
|
||||
sleep(5)
|
||||
interact()
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
item_state = "candle1"
|
||||
w_class = 1
|
||||
heat_production = 1000
|
||||
l_color = LIGHT_COLOR_FIRE
|
||||
light_color = LIGHT_COLOR_FIRE
|
||||
|
||||
var/wax = 200
|
||||
var/lit = 0
|
||||
@@ -31,7 +31,7 @@
|
||||
if(!src.lit)
|
||||
src.lit = 1
|
||||
visible_message(flavor_text)
|
||||
SetLuminosity(CANDLE_LUM)
|
||||
set_light(CANDLE_LUM)
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/candle/process()
|
||||
@@ -52,18 +52,7 @@
|
||||
if(lit)
|
||||
lit = 0
|
||||
update_icon()
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(user.luminosity - CANDLE_LUM)
|
||||
|
||||
/obj/item/candle/pickup(mob/user)
|
||||
if(lit)
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(user.luminosity + CANDLE_LUM)
|
||||
|
||||
/obj/item/candle/dropped(mob/user)
|
||||
if(lit && !luminosity)
|
||||
user.SetLuminosity(user.luminosity - CANDLE_LUM)
|
||||
SetLuminosity(CANDLE_LUM)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/candle/is_hot()
|
||||
if(lit)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user