mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into newmalf-merge
This commit is contained in:
@@ -85,15 +85,12 @@
|
||||
#include "code\ATMOSPHERICS\components\unary\unary_base.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_pump.dm"
|
||||
#include "code\ATMOSPHERICS\components\unary\vent_scrubber.dm"
|
||||
#include "code\controllers\_DynamicAreaLighting_TG.dm"
|
||||
#include "code\controllers\autotransfer.dm"
|
||||
#include "code\controllers\communications.dm"
|
||||
#include "code\controllers\configuration.dm"
|
||||
#include "code\controllers\emergency_shuttle_controller.dm"
|
||||
#include "code\controllers\failsafe.dm"
|
||||
#include "code\controllers\hooks-defs.dm"
|
||||
#include "code\controllers\hooks.dm"
|
||||
#include "code\controllers\lighting_controller.dm"
|
||||
#include "code\controllers\master_controller.dm"
|
||||
#include "code\controllers\shuttle_controller.dm"
|
||||
#include "code\controllers\subsystems.dm"
|
||||
@@ -106,7 +103,6 @@
|
||||
#include "code\controllers\Processes\event.dm"
|
||||
#include "code\controllers\Processes\garbage.dm"
|
||||
#include "code\controllers\Processes\inactivity.dm"
|
||||
#include "code\controllers\Processes\lighting.dm"
|
||||
#include "code\controllers\Processes\machinery.dm"
|
||||
#include "code\controllers\Processes\mob.dm"
|
||||
#include "code\controllers\Processes\nanoui.dm"
|
||||
@@ -822,6 +818,7 @@
|
||||
#include "code\modules\admin\verbs\deadsay.dm"
|
||||
#include "code\modules\admin\verbs\debug.dm"
|
||||
#include "code\modules\admin\verbs\diagnostics.dm"
|
||||
#include "code\modules\admin\verbs\dice.dm"
|
||||
#include "code\modules\admin\verbs\getlogs.dm"
|
||||
#include "code\modules\admin\verbs\icarus.dm"
|
||||
#include "code\modules\admin\verbs\mapping.dm"
|
||||
@@ -996,6 +993,7 @@
|
||||
#include "code\modules\examine\descriptions\engineering.dm"
|
||||
#include "code\modules\examine\descriptions\medical.dm"
|
||||
#include "code\modules\examine\descriptions\mobs.dm"
|
||||
#include "code\modules\examine\descriptions\paperwork.dm"
|
||||
#include "code\modules\examine\descriptions\stacks.dm"
|
||||
#include "code\modules\examine\descriptions\structures.dm"
|
||||
#include "code\modules\examine\descriptions\turfs.dm"
|
||||
@@ -1035,6 +1033,14 @@
|
||||
#include "code\modules\library\lib_items.dm"
|
||||
#include "code\modules\library\lib_machines.dm"
|
||||
#include "code\modules\library\lib_readme.dm"
|
||||
#include "code\modules\lighting\_lighting_defs.dm"
|
||||
#include "code\modules\lighting\light_source.dm"
|
||||
#include "code\modules\lighting\lighting_atom.dm"
|
||||
#include "code\modules\lighting\lighting_overlay.dm"
|
||||
#include "code\modules\lighting\lighting_process.dm"
|
||||
#include "code\modules\lighting\lighting_system.dm"
|
||||
#include "code\modules\lighting\lighting_turf.dm"
|
||||
#include "code\modules\lighting\~lighting_undefs.dm"
|
||||
#include "code\modules\liquid\splash_simulation.dm"
|
||||
#include "code\modules\maps\dmm_suite.dm"
|
||||
#include "code\modules\maps\reader.dm"
|
||||
|
||||
@@ -67,8 +67,6 @@
|
||||
|
||||
icon = null
|
||||
initial_loc = get_area(loc)
|
||||
if (initial_loc.master)
|
||||
initial_loc = initial_loc.master
|
||||
area_uid = initial_loc.uid
|
||||
if (!id_tag)
|
||||
assign_uid()
|
||||
|
||||
@@ -36,8 +36,6 @@
|
||||
|
||||
icon = null
|
||||
initial_loc = get_area(loc)
|
||||
if (initial_loc.master)
|
||||
initial_loc = initial_loc.master
|
||||
area_uid = initial_loc.uid
|
||||
if (!id_tag)
|
||||
assign_uid()
|
||||
|
||||
@@ -91,11 +91,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
|
||||
//luminosity = 3
|
||||
blend_mode = BLEND_ADD
|
||||
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
l_color = "#ED9200"
|
||||
light_color = "#ED9200"
|
||||
layer = TURF_LAYER
|
||||
|
||||
var/firelevel = 10000 //Calculated by gas_mixture.calculate_firelevel()
|
||||
@@ -114,13 +114,13 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
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/L in loc)
|
||||
@@ -158,6 +158,9 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
else
|
||||
enemy_tile.adjacent_fire_act(loc, air_contents, air_contents.temperature, air_contents.volume)
|
||||
|
||||
animate(src, color = heat2color(air_contents.temperature), 5)
|
||||
set_light(l_color = color)
|
||||
|
||||
/obj/fire/New(newLoc,fl)
|
||||
..()
|
||||
|
||||
@@ -165,7 +168,11 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
qdel(src)
|
||||
|
||||
set_dir(pick(cardinal))
|
||||
SetLuminosity(3)
|
||||
|
||||
var/datum/gas_mixture/air_contents = loc.return_air()
|
||||
color = heat2color(air_contents.temperature)
|
||||
set_light(3, 1, color)
|
||||
|
||||
firelevel = fl
|
||||
air_master.active_hotspots.Add(src)
|
||||
|
||||
@@ -178,7 +185,7 @@ turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
/obj/fire/proc/RemoveFire()
|
||||
if (istype(loc, /turf))
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
loc = null
|
||||
air_master.active_hotspots.Remove(src)
|
||||
|
||||
@@ -16,11 +16,14 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/proc/max_default_z_level()
|
||||
return max(config.station_levels, max(config.admin_levels, config.player_levels))
|
||||
|
||||
/proc/get_area(O)
|
||||
var/turf/loc = get_turf(O)
|
||||
if(loc)
|
||||
var/area/res = loc.loc
|
||||
.= res.master
|
||||
.= res
|
||||
|
||||
/proc/get_area_name(N) //get area by its name
|
||||
for(var/area/A in world)
|
||||
@@ -31,7 +34,7 @@
|
||||
/proc/get_area_master(const/O)
|
||||
var/area/A = get_area(O)
|
||||
if (isarea(A))
|
||||
return A.master
|
||||
return A
|
||||
|
||||
/proc/in_range(source, user)
|
||||
if(get_dist(source, user) <= 1)
|
||||
@@ -66,18 +69,6 @@
|
||||
/proc/isNotAdminLevel(var/level)
|
||||
return !isAdminLevel(level)
|
||||
|
||||
//Magic constants obtained by using linear regression on right-angled triangles of sides 0<x<1, 0<y<1
|
||||
//They should approximate pythagoras theorem well enough for our needs.
|
||||
#define k1 0.934
|
||||
#define k2 0.427
|
||||
/proc/cheap_hypotenuse(Ax,Ay,Bx,By) // T is just the second atom to check distance to center with
|
||||
var/dx = abs(Ax - Bx) //sides of right-angled triangle
|
||||
var/dy = abs(Ay - By)
|
||||
if(dx>=dy) return (k1*dx) + (k2*dy) //No sqrt or powers :)
|
||||
else return (k2*dx) + (k1*dy)
|
||||
#undef k1
|
||||
#undef k2
|
||||
|
||||
/proc/circlerange(center=usr,radius=3)
|
||||
|
||||
var/turf/centerturf = get_turf(center)
|
||||
|
||||
@@ -182,11 +182,9 @@ proc/listclearnulls(list/list)
|
||||
|
||||
//Return a list with no duplicate entries
|
||||
/proc/uniquelist(var/list/L)
|
||||
var/list/K = list()
|
||||
for(var/item in L)
|
||||
if(!(item in K))
|
||||
K += item
|
||||
return K
|
||||
. = list()
|
||||
for(var/i in L)
|
||||
. |= i
|
||||
|
||||
//Mergesort: divides up the list into halves to begin the sort
|
||||
/proc/sortKey(var/list/client/L, var/order = 1)
|
||||
|
||||
@@ -94,6 +94,7 @@ var/list/delayed_garbage = list()
|
||||
if(!istype(A))
|
||||
//warning("qdel() passed object of type [A.type]. qdel() can only handle /datum types.")
|
||||
del(A)
|
||||
if(garbage_collector)
|
||||
garbage_collector.dels++
|
||||
garbage_collector.hard_dels++
|
||||
else if(isnull(A.gcDestroyed))
|
||||
|
||||
@@ -11,5 +11,10 @@
|
||||
|
||||
powernets.Remove(powerNetwork)
|
||||
|
||||
// This is necessary to ensure powersinks are always the first devices that drain power from powernet.
|
||||
// Otherwise APCs or other stuff go first, resulting in bad things happening.
|
||||
for(var/obj/item/device/powersink/S in processing_objects)
|
||||
S.drain()
|
||||
|
||||
/datum/controller/process/powernet/getStatName()
|
||||
return ..()+"([powernets.len])"
|
||||
@@ -1,450 +0,0 @@
|
||||
/*
|
||||
Modified DynamicAreaLighting for TGstation - Coded by Carnwennan
|
||||
|
||||
This is TG's 'new' lighting system. It's basically a heavily modified combination of Forum_Account's and
|
||||
ShadowDarke's respective lighting libraries. Credits, where due, to them.
|
||||
|
||||
Like sd_DAL (what we used to use), it changes the shading overlays of areas by splitting each type of area into sub-areas
|
||||
by using the var/tag variable and moving turfs into the contents list of the correct sub-area. This method is
|
||||
much less costly than using overlays or objects.
|
||||
|
||||
Unlike sd_DAL however it uses a queueing system. Everytime we call a change to opacity or luminosity
|
||||
(through SetOpacity() or SetLuminosity()) we are simply updating variables and scheduling certain lights/turfs for an
|
||||
update. Actual updates are handled periodically by the lighting_controller. This carries additional overheads, however it
|
||||
means that each thing is changed only once per lighting_controller.processing_interval ticks. Allowing for greater control
|
||||
over how much priority we'd like lighting updates to have. It also makes it possible for us to simply delay updates by
|
||||
setting lighting_controller.processing = 0 at say, the start of a large explosion, waiting for it to finish, and then
|
||||
turning it back on with lighting_controller.processing = 1.
|
||||
|
||||
Unlike our old system there are hardcoded maximum luminositys (different for certain atoms).
|
||||
This is to cap the cost of creating lighting effects.
|
||||
(without this, an atom with luminosity of 20 would have to update 41^2 turfs!) :s
|
||||
|
||||
Also, in order for the queueing system to work, each light remembers the effect it casts on each turf. This is going to
|
||||
have larger memory requirements than our previous system but it's easily worth the hassle for the greater control we
|
||||
gain. It also reduces cost of removing lighting effects by a lot!
|
||||
|
||||
Known Issues/TODO:
|
||||
Shuttles still do not have support for dynamic lighting (I hope to fix this at some point)
|
||||
No directional lighting support. (prototype looked ugly)
|
||||
*/
|
||||
|
||||
#define LIGHTING_CIRCULAR 1 //comment this out to use old square lighting effects.
|
||||
#define LIGHTING_LAYER 10 //Drawing layer for lighting overlays
|
||||
#define LIGHTING_ICON 'icons/effects/ss13_dark_alpha6.dmi' //Icon used for lighting shading effects
|
||||
|
||||
datum/light_source
|
||||
var/atom/owner
|
||||
var/changed = 1
|
||||
var/list/effect = list()
|
||||
var/__x = 0 //x coordinate at last update
|
||||
var/__y = 0 //y coordinate at last update
|
||||
var/__z = 0 //z coordinate at last update
|
||||
|
||||
var/_l_color //do not use directly, only used as reference for updating
|
||||
var/col_r
|
||||
var/col_g
|
||||
var/col_b
|
||||
|
||||
|
||||
New(atom/A)
|
||||
if(!istype(A))
|
||||
CRASH("The first argument to the light object's constructor must be the atom that is the light source. Expected atom, received '[A]' instead.")
|
||||
..()
|
||||
owner = A
|
||||
readrgb(owner.l_color)
|
||||
__x = owner.x
|
||||
__y = owner.y
|
||||
__z = owner.z
|
||||
// the lighting object maintains a list of all light sources
|
||||
lighting_controller.lights += src
|
||||
|
||||
|
||||
//Check a light to see if its effect needs reprocessing. If it does, remove any old effect and create a new one
|
||||
proc/check()
|
||||
if(!owner)
|
||||
remove_effect()
|
||||
return 1 //causes it to be removed from our list of lights. The garbage collector will then destroy it.
|
||||
|
||||
// check to see if we've moved since last update
|
||||
if(owner.x != __x || owner.y != __y || owner.z != __z)
|
||||
__x = owner.x
|
||||
__y = owner.y
|
||||
__z = owner.z
|
||||
changed = 1
|
||||
|
||||
if (owner.l_color != _l_color)
|
||||
readrgb(owner.l_color)
|
||||
changed = 1
|
||||
|
||||
if(changed)
|
||||
changed = 0
|
||||
remove_effect()
|
||||
return add_effect()
|
||||
return 0
|
||||
|
||||
|
||||
proc/remove_effect()
|
||||
// before we apply the effect we remove the light's current effect.
|
||||
for(var/turf/T in effect) // negate the effect of this light source
|
||||
T.update_lumcount(-effect[T], col_r, col_g, col_b, 1)
|
||||
effect.Cut() // clear the effect list
|
||||
|
||||
proc/add_effect()
|
||||
// only do this if the light is turned on and is on the map
|
||||
if(owner.loc && owner.luminosity > 0)
|
||||
readrgb(owner.l_color)
|
||||
effect = list()
|
||||
for(var/turf/T in view(owner.get_light_range(),get_turf(owner)))
|
||||
var/delta_lumen = lum(T)
|
||||
if(delta_lumen > 0)
|
||||
effect[T] = delta_lumen
|
||||
T.update_lumcount(delta_lumen, col_r, col_g, col_b, 0)
|
||||
|
||||
return 0
|
||||
else
|
||||
owner.light = null
|
||||
return 1 //cause the light to be removed from the lights list and garbage collected once it's no
|
||||
//longer referenced by the queue
|
||||
|
||||
proc/lum(turf/A)
|
||||
if (owner.trueLuminosity < 1)
|
||||
return 0
|
||||
var/dist
|
||||
if(!A)
|
||||
dist = 0
|
||||
else
|
||||
#ifdef LIGHTING_CIRCULAR
|
||||
dist = cheap_hypotenuse(A.x, A.y, __x, __y)
|
||||
#else
|
||||
dist = max(abs(A.x - __x), abs(A.y - __y))
|
||||
#endif
|
||||
if (owner.trueLuminosity > 100) // This will never happen... right?
|
||||
return sqrt(owner.trueLuminosity) - dist
|
||||
else
|
||||
return sqrtTable[owner.trueLuminosity] - dist
|
||||
|
||||
proc/readrgb(col)
|
||||
_l_color = col
|
||||
if(col)
|
||||
col_r = GetRedPart(col)
|
||||
col_g = GetGreenPart(col)
|
||||
col_b = GetBluePart(col)
|
||||
else
|
||||
col_r = null
|
||||
|
||||
atom
|
||||
var/datum/light_source/light
|
||||
var/trueLuminosity = 0 // Typically 'luminosity' squared. The builtin luminosity must remain linear.
|
||||
// We may read it, but NEVER set it directly.
|
||||
var/l_color
|
||||
|
||||
//Turfs with opacity when they are constructed will trigger nearby lights to update
|
||||
//Turfs and atoms with luminosity when they are constructed will create a light_source automatically
|
||||
turf/New()
|
||||
..()
|
||||
if(luminosity)
|
||||
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
|
||||
trueLuminosity = luminosity * luminosity
|
||||
light = new(src)
|
||||
|
||||
//Movable atoms with opacity when they are constructed will trigger nearby lights to update
|
||||
//Movable atoms with luminosity when they are constructed will create a light_source automatically
|
||||
atom/movable/New()
|
||||
..()
|
||||
if(opacity)
|
||||
if(isturf(loc))
|
||||
if(loc:lighting_lumcount > 1)
|
||||
UpdateAffectingLights()
|
||||
if(luminosity)
|
||||
if(light) WARNING("[type] - Don't set lights up manually during New(), We do it automatically.")
|
||||
trueLuminosity = luminosity * luminosity
|
||||
light = new(src)
|
||||
|
||||
//Sets our luminosity.
|
||||
//If we have no light it will create one.
|
||||
//If we are setting luminosity to 0 the light will be cleaned up by the controller and garbage collected once all its
|
||||
//queues are complete.
|
||||
//if we have a light already it is merely updated, rather than making a new one.
|
||||
atom/proc/SetLuminosity(new_luminosity, trueLum = FALSE)
|
||||
if(new_luminosity < 0)
|
||||
new_luminosity = 0
|
||||
if(!trueLum)
|
||||
new_luminosity *= new_luminosity
|
||||
if(light)
|
||||
if(trueLuminosity != new_luminosity) //non-luminous lights are removed from the lights list in add_effect()
|
||||
light.changed = 1
|
||||
else
|
||||
if(new_luminosity)
|
||||
light = new(src)
|
||||
trueLuminosity = new_luminosity
|
||||
if (trueLuminosity < 1)
|
||||
luminosity = 0
|
||||
else if (trueLuminosity <= 100)
|
||||
luminosity = sqrtTable[trueLuminosity]
|
||||
else
|
||||
luminosity = sqrt(trueLuminosity)
|
||||
|
||||
atom/proc/AddLuminosity(delta_luminosity)
|
||||
if(delta_luminosity > 0)
|
||||
SetLuminosity(trueLuminosity + delta_luminosity*delta_luminosity, TRUE)
|
||||
else if(delta_luminosity < 0)
|
||||
SetLuminosity(trueLuminosity - delta_luminosity*delta_luminosity, TRUE)
|
||||
|
||||
area/SetLuminosity(new_luminosity) //we don't want dynamic lighting for areas
|
||||
luminosity = !!new_luminosity
|
||||
trueLuminosity = luminosity
|
||||
|
||||
|
||||
//change our opacity (defaults to toggle), and then update all lights that affect us.
|
||||
atom/proc/SetOpacity(new_opacity)
|
||||
if(new_opacity == null)
|
||||
new_opacity = !opacity //default = toggle opacity
|
||||
else if(opacity == new_opacity)
|
||||
return 0 //opacity hasn't changed! don't bother doing anything
|
||||
opacity = new_opacity //update opacity, the below procs now call light updates.
|
||||
return 1
|
||||
|
||||
turf/SetOpacity(new_opacity)
|
||||
if(..()==1) //only bother if opacity changed
|
||||
if(lighting_lumcount) //only bother with an update if our turf is currently affected by a light
|
||||
UpdateAffectingLights()
|
||||
|
||||
/atom/movable/SetOpacity(new_opacity)
|
||||
if(..()==1) //only bother if opacity changed
|
||||
if(isturf(loc)) //only bother with an update if we're on a turf
|
||||
var/turf/T = loc
|
||||
if(T.lighting_lumcount) //only bother with an update if our turf is currently affected by a light
|
||||
UpdateAffectingLights()
|
||||
|
||||
|
||||
turf
|
||||
var/lighting_lumcount = 0
|
||||
var/lighting_changed = 0
|
||||
var/color_lighting_lumcount = 0
|
||||
|
||||
var/lumcount_r = 0
|
||||
var/lumcount_g = 0
|
||||
var/lumcount_b = 0
|
||||
var/light_col_sources = 0
|
||||
|
||||
turf/space
|
||||
lighting_lumcount = 4 //starlight
|
||||
|
||||
turf/proc/update_lumcount(amount, col_r, col_g, col_b, removing = 0)
|
||||
lighting_lumcount += amount
|
||||
|
||||
if(!isnull(col_r)) //col_r is the "key" var, if it's null so will the rest
|
||||
if(removing)
|
||||
light_col_sources--
|
||||
lumcount_r -= col_r
|
||||
lumcount_g -= col_g
|
||||
lumcount_b -= col_b
|
||||
else
|
||||
light_col_sources++
|
||||
lumcount_r += col_r
|
||||
lumcount_g += col_g
|
||||
lumcount_b += col_b
|
||||
|
||||
if(light_col_sources)
|
||||
var/r_avg = max(0, min(255, round(lumcount_r / light_col_sources, 16) + 15))
|
||||
var/g_avg = max(0, min(255, round(lumcount_g / light_col_sources, 16) + 15))
|
||||
var/b_avg = max(0, min(255, round(lumcount_b / light_col_sources, 16) + 15))
|
||||
l_color = rgb(r_avg, g_avg, b_avg)
|
||||
else
|
||||
l_color = null
|
||||
|
||||
color_lighting_lumcount = max(color_lighting_lumcount + amount, 0) // Minimum of 0.
|
||||
|
||||
if(!lighting_changed)
|
||||
lighting_controller.changed_turfs += src
|
||||
lighting_changed = 1
|
||||
|
||||
turf/proc/lighting_tag(const/level)
|
||||
var/area/A = loc
|
||||
return A.tagbase + "sd_L[level]"
|
||||
|
||||
turf/proc/build_lighting_area(const/tag, const/level, const/color_light)
|
||||
var/area/Area = loc
|
||||
var/area/A = new Area.type() // create area if it wasn't found
|
||||
// replicate vars
|
||||
for(var/V in Area.vars)
|
||||
switch(V)
|
||||
if ("contents","lighting_overlay", "color_overlay", "overlays")
|
||||
continue
|
||||
else
|
||||
if(issaved(Area.vars[V])) A.vars[V] = Area.vars[V]
|
||||
|
||||
A.tag = tag
|
||||
A.lighting_subarea = 1
|
||||
A.lighting_space = 0 // in case it was copied from a space subarea
|
||||
|
||||
if (l_color != A.l_color)
|
||||
A.l_color = l_color
|
||||
//color_light = min(max(round(color_lighting_lumcount, 1), 0), lighting_controller.lighting_states)
|
||||
//world << "[color_light] [color_lighting_lumcount]"
|
||||
|
||||
A.SetLightLevel(level, color_light)
|
||||
Area.related += A
|
||||
return A
|
||||
|
||||
turf/proc/shift_to_subarea()
|
||||
lighting_changed = 0
|
||||
var/area/Area = loc
|
||||
|
||||
if(!istype(Area) || !Area.lighting_use_dynamic) return
|
||||
|
||||
var/level = min(max(round(lighting_lumcount,1),0),lighting_controller.lighting_states)
|
||||
var/new_tag = lighting_tag(level)
|
||||
|
||||
// pomf - If we have a lighting color that is not null, apply the new tag to seperate the areas.
|
||||
if (l_color)
|
||||
// pomf - We append the (rounded!) color lighting lumcount so we can have colored lights.
|
||||
new_tag += "[l_color][min(max(round(color_lighting_lumcount,1),0),lighting_controller.lighting_states)]"
|
||||
|
||||
if(Area.tag!=new_tag) //skip if already in this area
|
||||
var/area/A = locate(new_tag) // find an appropriate area
|
||||
var/color_light = min(max(round(color_lighting_lumcount,1),0),lighting_controller.lighting_states)
|
||||
|
||||
if (!A)
|
||||
A = build_lighting_area(new_tag, level, color_light)
|
||||
else if (l_color != A.l_color)
|
||||
A.l_color = l_color
|
||||
//color_light = min(max(round(color_lighting_lumcount, 1), 0), lighting_controller.lighting_states)
|
||||
A.SetLightLevel(level, color_light)
|
||||
|
||||
A.contents += src // move the turf into the area
|
||||
universe.OnTurfTick(src)
|
||||
|
||||
// Dedicated lighting sublevel for space turfs
|
||||
// helps us depower things in space, remove space fire alarms,
|
||||
// and evens out space lighting
|
||||
turf/space/lighting_tag(var/level)
|
||||
var/area/A = loc
|
||||
return A.tagbase + "sd_L_space"
|
||||
turf/space/build_lighting_area(var/tag,var/level)
|
||||
var/area/A = ..(tag,4)
|
||||
A.lighting_space = 1
|
||||
A.SetLightLevel(4)
|
||||
A.icon_state = null
|
||||
return A
|
||||
|
||||
|
||||
area
|
||||
var/lighting_use_dynamic = 1 //Turn this flag off to prevent sd_DynamicAreaLighting from affecting this area
|
||||
var/image/lighting_overlay //tracks the darkness image of the area for easy removal
|
||||
var/lighting_subarea = 0 //tracks whether we're a lighting sub-area
|
||||
var/lighting_space = 0 // true for space-only lighting subareas
|
||||
var/tagbase
|
||||
var/image/color_overlay //Tracks the color image.
|
||||
|
||||
proc/SetLightLevel(light, color_light = 0)
|
||||
if(!src) return
|
||||
if(light <= 0)
|
||||
light = 0
|
||||
luminosity = 0
|
||||
else
|
||||
if(light > lighting_controller.lighting_states)
|
||||
light = lighting_controller.lighting_states
|
||||
luminosity = 1
|
||||
|
||||
if(lighting_overlay)
|
||||
overlays -= lighting_overlay
|
||||
lighting_overlay.icon_state = "[light]"
|
||||
else
|
||||
lighting_overlay = image(LIGHTING_ICON,,num2text(light),LIGHTING_LAYER)
|
||||
|
||||
if (color_overlay)
|
||||
overlays.Remove(color_overlay)
|
||||
color_overlay.icon_state = "5"
|
||||
else
|
||||
if (l_color)
|
||||
color_overlay = image('icons/effects/effects.dmi', ,"5", 10.1)
|
||||
//color_overlay = image('icons/effects/effects.dmi', ,"white", 10.1)
|
||||
|
||||
if (istype(color_overlay))
|
||||
color_overlay.color = l_color
|
||||
|
||||
|
||||
switch (color_light)
|
||||
if (6)
|
||||
color_overlay.icon_state = "5"
|
||||
//color_overlay.alpha = 180
|
||||
if (5)
|
||||
color_overlay.icon_state = "4"
|
||||
//color_overlay.alpha = 150
|
||||
if (4)
|
||||
color_overlay.icon_state = "3"
|
||||
//color_overlay.alpha = 120
|
||||
if (3)
|
||||
color_overlay.icon_state = "2"
|
||||
//color_overlay.alpha = 90
|
||||
if (2)
|
||||
color_overlay.icon_state = "1"
|
||||
//color_overlay.alpha = 60
|
||||
if (1)
|
||||
color_overlay.icon_state = "1"
|
||||
color_overlay.alpha = 200
|
||||
//color_overlay.alpha = 30
|
||||
if (-INFINITY to 0)
|
||||
//world << "Zero or below, [color_light]."
|
||||
color_overlay.alpha = 0
|
||||
else
|
||||
//world << "Setting the alpha to max... color_light [color_light]."
|
||||
color_overlay.alpha = 180
|
||||
|
||||
color_overlay.blend_mode = BLEND_ADD
|
||||
if (color_overlay.color)
|
||||
overlays.Add(color_overlay)
|
||||
|
||||
if (isnull(color_overlay))
|
||||
overlays.Add(lighting_overlay)
|
||||
else if (light < 6)
|
||||
overlays.Add(lighting_overlay)
|
||||
|
||||
proc/SetDynamicLighting()
|
||||
|
||||
src.lighting_use_dynamic = 1
|
||||
for(var/turf/T in src.contents)
|
||||
T.update_lumcount(0)
|
||||
|
||||
proc/InitializeLighting() //TODO: could probably improve this bit ~Carn
|
||||
tagbase = "[type]"
|
||||
if(!tag) tag = tagbase
|
||||
if(!lighting_use_dynamic)
|
||||
if(!lighting_subarea) // see if this is a lighting subarea already
|
||||
//show the dark overlay so areas, not yet in a lighting subarea, won't be bright as day and look silly.
|
||||
SetLightLevel(4)
|
||||
|
||||
//#undef LIGHTING_LAYER
|
||||
#undef LIGHTING_CIRCULAR
|
||||
//#undef LIGHTING_ICON
|
||||
|
||||
#define LIGHTING_MAX_LUMINOSITY_STATIC 8 //Maximum luminosity to reduce lag.
|
||||
#define LIGHTING_MAX_LUMINOSITY_MOBILE 5 //Moving objects have a lower max luminosity since these update more often. (lag reduction)
|
||||
#define LIGHTING_MAX_LUMINOSITY_TURF 1 //turfs have a severely shortened range to protect from inevitable floor-lighttile spam.
|
||||
|
||||
//set the changed status of all lights which could have possibly lit this atom.
|
||||
//We don't need to worry about lights which lit us but moved away, since they will have change status set already
|
||||
//This proc can cause lots of lights to be updated. :(
|
||||
atom/proc/UpdateAffectingLights()
|
||||
for(var/atom/A in oview(LIGHTING_MAX_LUMINOSITY_STATIC-1,src))
|
||||
if(A.light)
|
||||
A.light.changed = 1 //force it to update at next process()
|
||||
|
||||
//caps luminosity effects max-range based on what type the light's owner is.
|
||||
atom/proc/get_light_range()
|
||||
return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
|
||||
|
||||
atom/movable/get_light_range()
|
||||
return min(luminosity, LIGHTING_MAX_LUMINOSITY_MOBILE)
|
||||
|
||||
obj/machinery/light/get_light_range()
|
||||
return min(luminosity, LIGHTING_MAX_LUMINOSITY_STATIC)
|
||||
|
||||
turf/get_light_range()
|
||||
return min(luminosity, LIGHTING_MAX_LUMINOSITY_TURF)
|
||||
|
||||
#undef LIGHTING_MAX_LUMINOSITY_STATIC
|
||||
#undef LIGHTING_MAX_LUMINOSITY_MOBILE
|
||||
#undef LIGHTING_MAX_LUMINOSITY_TURF
|
||||
@@ -25,7 +25,6 @@ var/datum/controller/failsafe/Failsafe
|
||||
set background = 1
|
||||
while(1) //more efficient than recursivly calling ourself over and over. background = 1 ensures we do not trigger an infinite loop
|
||||
if(!master_controller) new /datum/controller/game_controller() //replace the missing master_controller! This should never happen.
|
||||
if(!lighting_controller) new /datum/controller/lighting() //replace the missing lighting_controller
|
||||
|
||||
if(processing)
|
||||
if(lighting_controller.processing)
|
||||
|
||||
@@ -1,130 +0,0 @@
|
||||
var/datum/controller/lighting/lighting_controller = new ()
|
||||
|
||||
datum/controller/lighting
|
||||
var/processing = 0
|
||||
var/processing_interval = 5 //setting this too low will probably kill the server. Don't be silly with it!
|
||||
var/process_cost = 0
|
||||
var/iteration = 0
|
||||
|
||||
var/lighting_states = 7
|
||||
|
||||
var/list/lights = list()
|
||||
var/lights_workload_max = 0
|
||||
|
||||
// var/list/changed_lights() //TODO: possibly implement this to reduce on overheads?
|
||||
|
||||
var/list/changed_turfs = list()
|
||||
var/changed_turfs_workload_max = 0
|
||||
|
||||
|
||||
datum/controller/lighting/New()
|
||||
lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
|
||||
if(lighting_controller != src)
|
||||
if(istype(lighting_controller,/datum/controller/lighting))
|
||||
Recover() //if we are replacing an existing lighting_controller (due to a crash) we attempt to preserve as much as we can
|
||||
qdel(lighting_controller)
|
||||
lighting_controller = src
|
||||
|
||||
|
||||
//Workhorse of lighting. It cycles through each light to see which ones need their effects updating. It updates their
|
||||
//effects and then processes every turf in the queue, moving the turfs to the corresponing lighting sub-area.
|
||||
//All queue lists prune themselves, which will cause lights with no luminosity to be garbage collected (cheaper and safer
|
||||
//than deleting them). Processing interval should be roughly half a second for best results.
|
||||
//By using queues we are ensuring we don't perform more updates than are necessary
|
||||
datum/controller/lighting/proc/process()
|
||||
processing = 1
|
||||
spawn(0)
|
||||
set background = 1
|
||||
while(1)
|
||||
if(processing)
|
||||
iteration++
|
||||
var/started = world.timeofday
|
||||
|
||||
lights_workload_max = max(lights_workload_max,lights.len)
|
||||
for(var/i=1, i<=lights.len, i++)
|
||||
var/datum/light_source/L = lights[i]
|
||||
if(L && !L.check())
|
||||
continue
|
||||
lights.Cut(i,i+1)
|
||||
i--
|
||||
|
||||
sleep(-1)
|
||||
|
||||
changed_turfs_workload_max = max(changed_turfs_workload_max,changed_turfs.len)
|
||||
for(var/i=1, i<=changed_turfs.len, i++)
|
||||
var/turf/T = changed_turfs[i]
|
||||
if(T && T.lighting_changed)
|
||||
T.shift_to_subarea()
|
||||
changed_turfs.Cut() // reset the changed list
|
||||
|
||||
process_cost = (world.timeofday - started)
|
||||
|
||||
sleep(processing_interval)
|
||||
|
||||
//same as above except it attempts to shift ALL turfs in the world regardless of lighting_changed status
|
||||
//Does not loop. Should be run prior to process() being called for the first time.
|
||||
//Note: if we get additional z-levels at runtime (e.g. if the gateway thin ever gets finished) we can initialize specific
|
||||
//z-levels with the z_level argument
|
||||
datum/controller/lighting/proc/initializeLighting(var/z_level)
|
||||
processing = 0
|
||||
spawn(-1)
|
||||
set background = 1
|
||||
for(var/i=1, i<=lights.len, i++)
|
||||
var/datum/light_source/L = lights[i]
|
||||
if(L.check())
|
||||
lights.Cut(i,i+1)
|
||||
i--
|
||||
|
||||
var/z_start = 1
|
||||
var/z_finish = world.maxz
|
||||
if(z_level)
|
||||
z_level = round(z_level,1)
|
||||
if(z_level > 0 && z_level <= world.maxz)
|
||||
z_start = z_level
|
||||
z_finish = z_level
|
||||
|
||||
for(var/k=z_start,k<=z_finish,k++)
|
||||
for(var/i=1,i<=world.maxx,i++)
|
||||
for(var/j=1,j<=world.maxy,j++)
|
||||
var/turf/T = locate(i,j,k)
|
||||
if(T) T.shift_to_subarea()
|
||||
|
||||
changed_turfs.Cut() // reset the changed list
|
||||
|
||||
|
||||
//Used to strip valid information from an existing controller and transfer it to a replacement
|
||||
//It works by using spawn(-1) to transfer the data, if there is a runtime the data does not get transfered but the loop
|
||||
//does not crash
|
||||
datum/controller/lighting/proc/Recover()
|
||||
if(!istype(lighting_controller.changed_turfs,/list))
|
||||
lighting_controller.changed_turfs = list()
|
||||
if(!istype(lighting_controller.lights,/list))
|
||||
lighting_controller.lights = list()
|
||||
|
||||
for(var/i=1, i<=lighting_controller.lights.len, i++)
|
||||
var/datum/light_source/L = lighting_controller.lights[i]
|
||||
if(istype(L))
|
||||
spawn(-1) //so we don't crash the loop (inefficient)
|
||||
L.check()
|
||||
lights += L //If we didn't runtime then this will get transferred over
|
||||
|
||||
for(var/i=1, i<=lighting_controller.changed_turfs.len, i++)
|
||||
var/turf/T = lighting_controller.changed_turfs[i]
|
||||
if(istype(T) && T.lighting_changed)
|
||||
spawn(-1)
|
||||
T.shift_to_subarea()
|
||||
|
||||
var/msg = "## DEBUG: [time2text(world.timeofday)] lighting_controller restarted. Reports:\n"
|
||||
for(var/varname in lighting_controller.vars)
|
||||
switch(varname)
|
||||
if("tag","bestF","type","parent_type","vars") continue
|
||||
else
|
||||
var/varval1 = lighting_controller.vars[varname]
|
||||
var/varval2 = vars[varname]
|
||||
if(istype(varval1,/list))
|
||||
varval1 = "/list([length(varval1)])"
|
||||
varval2 = "/list([length(varval2)])"
|
||||
msg += "\t [varname] = [varval1] -> [varval2]\n"
|
||||
world.log << msg
|
||||
|
||||
#undef LIGHTING_ICON
|
||||
@@ -30,7 +30,7 @@
|
||||
var/tz = input("Z? (default 1)") as text|null
|
||||
new map_datum(seed,tx,ty,tz)
|
||||
|
||||
/client/proc/restart_controller(controller in list("Master","Failsafe","Lighting","Supply"))
|
||||
/client/proc/restart_controller(controller in list("Supply"))
|
||||
set category = "Debug"
|
||||
set name = "Restart Controller"
|
||||
set desc = "Restart one of the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -39,13 +39,6 @@
|
||||
usr = null
|
||||
src = null
|
||||
switch(controller)
|
||||
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")
|
||||
supply_controller.process()
|
||||
feedback_add_details("admin_verb","RSupply")
|
||||
@@ -62,7 +55,7 @@
|
||||
usr.client.debug_variables(antag)
|
||||
message_admins("Admin [key_name_admin(usr)] is debugging the [antag.role_text] template.")
|
||||
|
||||
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Ticker Process","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
|
||||
/client/proc/debug_controller(controller in list("Master","Ticker","Ticker Process","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data","Event","Plants","Alarm","Nano"))
|
||||
set category = "Debug"
|
||||
set name = "Debug Controller"
|
||||
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
|
||||
@@ -72,18 +65,12 @@
|
||||
if("Master")
|
||||
debug_variables(master_controller)
|
||||
feedback_add_details("admin_verb","DMC")
|
||||
if("Failsafe")
|
||||
debug_variables(Failsafe)
|
||||
feedback_add_details("admin_verb","DFailsafe")
|
||||
if("Ticker")
|
||||
debug_variables(ticker)
|
||||
feedback_add_details("admin_verb","DTicker")
|
||||
if("Ticker Process")
|
||||
debug_variables(tickerProcess)
|
||||
feedback_add_details("admin_verb","DTickerProcess")
|
||||
if("Lighting")
|
||||
debug_variables(lighting_controller)
|
||||
feedback_add_details("admin_verb","DLighting")
|
||||
if("Air")
|
||||
debug_variables(air_master)
|
||||
feedback_add_details("admin_verb","DAir")
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
var/force_teleport = 1 //if false, teleport will use Move() proc (dense objects will prevent teleportation)
|
||||
|
||||
|
||||
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
/datum/teleport/New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
..()
|
||||
if(!initTeleport(arglist(args)))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
|
||||
/datum/teleport/proc/initTeleport(ateleatom,adestination,aprecision,afteleport,aeffectin,aeffectout,asoundin,asoundout)
|
||||
if(!setTeleatom(ateleatom))
|
||||
return 0
|
||||
if(!setDestination(adestination))
|
||||
@@ -32,22 +32,22 @@
|
||||
setSounds(asoundin,asoundout)
|
||||
return 1
|
||||
|
||||
//must succeed
|
||||
proc/setPrecision(aprecision)
|
||||
//must succeed
|
||||
/datum/teleport/proc/setPrecision(aprecision)
|
||||
if(isnum(aprecision))
|
||||
precision = aprecision
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//must succeed
|
||||
proc/setDestination(atom/adestination)
|
||||
//must succeed
|
||||
/datum/teleport/proc/setDestination(atom/adestination)
|
||||
if(istype(adestination))
|
||||
destination = adestination
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//must succeed in most cases
|
||||
proc/setTeleatom(atom/movable/ateleatom)
|
||||
//must succeed in most cases
|
||||
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
|
||||
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
|
||||
qdel(ateleatom)
|
||||
return 0
|
||||
@@ -56,29 +56,29 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//custom effects must be properly set up first for instant-type teleports
|
||||
//optional
|
||||
proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
|
||||
//custom effects must be properly set up first for instant-type teleports
|
||||
//optional
|
||||
/datum/teleport/proc/setEffects(datum/effect/effect/system/aeffectin=null,datum/effect/effect/system/aeffectout=null)
|
||||
effectin = istype(aeffectin) ? aeffectin : null
|
||||
effectout = istype(aeffectout) ? aeffectout : null
|
||||
return 1
|
||||
|
||||
//optional
|
||||
proc/setForceTeleport(afteleport)
|
||||
//optional
|
||||
/datum/teleport/proc/setForceTeleport(afteleport)
|
||||
force_teleport = afteleport
|
||||
return 1
|
||||
|
||||
//optional
|
||||
proc/setSounds(asoundin=null,asoundout=null)
|
||||
//optional
|
||||
/datum/teleport/proc/setSounds(asoundin=null,asoundout=null)
|
||||
soundin = isfile(asoundin) ? asoundin : null
|
||||
soundout = isfile(asoundout) ? asoundout : null
|
||||
return 1
|
||||
|
||||
//placeholder
|
||||
proc/teleportChecks()
|
||||
//placeholder
|
||||
/datum/teleport/proc/teleportChecks()
|
||||
return 1
|
||||
|
||||
proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
|
||||
/datum/teleport/proc/playSpecials(atom/location,datum/effect/effect/system/effect,sound)
|
||||
if(location)
|
||||
if(effect)
|
||||
spawn(-1)
|
||||
@@ -91,8 +91,8 @@
|
||||
playsound(location,sound,60,1)
|
||||
return
|
||||
|
||||
//do the monkey dance
|
||||
proc/doTeleport()
|
||||
//do the monkey dance
|
||||
/datum/teleport/proc/doTeleport()
|
||||
|
||||
var/turf/destturf
|
||||
var/turf/curturf = get_turf(teleatom)
|
||||
@@ -126,22 +126,20 @@
|
||||
|
||||
return 1
|
||||
|
||||
proc/teleport()
|
||||
/datum/teleport/proc/teleport()
|
||||
if(teleportChecks())
|
||||
return doTeleport()
|
||||
return 0
|
||||
|
||||
/datum/teleport/instant //teleports when datum is created
|
||||
|
||||
New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
/datum/teleport/instant/New(ateleatom, adestination, aprecision=0, afteleport=1, aeffectin=null, aeffectout=null, asoundin=null, asoundout=null)
|
||||
if(..())
|
||||
teleport()
|
||||
return
|
||||
|
||||
|
||||
/datum/teleport/instant/science
|
||||
|
||||
setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
|
||||
/datum/teleport/instant/science/setEffects(datum/effect/effect/system/aeffectin,datum/effect/effect/system/aeffectout)
|
||||
if(!aeffectin || !aeffectout)
|
||||
var/datum/effect/effect/system/spark_spread/aeffect = new
|
||||
aeffect.set_up(5, 1, teleatom)
|
||||
@@ -151,7 +149,7 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
setPrecision(aprecision)
|
||||
/datum/teleport/instant/science/setPrecision(aprecision)
|
||||
..()
|
||||
if(istype(teleatom, /obj/item/weapon/storage/backpack/holding))
|
||||
precision = rand(1,100)
|
||||
@@ -161,32 +159,32 @@
|
||||
precision = max(rand(1,100)*bagholding.len,100)
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
MM << "\red The Bluespace interface on your Bag of Holding interferes with the teleport!"
|
||||
MM << "<span class='danger>The Bluespace interface on your [teleatom] interferes with the teleport!</span>"
|
||||
return 1
|
||||
|
||||
teleportChecks()
|
||||
/datum/teleport/instant/science/teleportChecks()
|
||||
if(istype(teleatom, /obj/item/weapon/disk/nuclear)) // Don't let nuke disks get teleported --NeoFite
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/disk/nuclear)))
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
MM.visible_message("\red <B>The [MM] bounces off of the portal!</B>","\red Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.")
|
||||
MM.visible_message("<span class='danger'>\The [MM] bounces off of the portal!</span>","<span class='warning'>Something you are carrying seems to be unable to pass through the portal. Better drop it if you want to go through.</span>")
|
||||
else
|
||||
teleatom.visible_message("\red <B>The [teleatom] bounces off of the portal!</B>")
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
if(destination.z == 2) //centcomm z-level
|
||||
if(destination.z in config.admin_levels) //centcomm z-level
|
||||
if(istype(teleatom, /obj/mecha))
|
||||
var/obj/mecha/MM = teleatom
|
||||
MM.occupant << "\red <B>The mech would not survive the jump to a location so far away!</B>"
|
||||
MM.occupant << "<span class='danger'>\The [MM] would not survive the jump to a location so far away!</span>"
|
||||
return 0
|
||||
if(!isemptylist(teleatom.search_contents_for(/obj/item/weapon/storage/backpack/holding)))
|
||||
teleatom.visible_message("\red <B>The Bag of Holding bounces off of the portal!</B>")
|
||||
teleatom.visible_message("<span class='danger'>\The [teleatom] bounces off of the portal!</span>")
|
||||
return 0
|
||||
|
||||
|
||||
if(destination.z > 7) //Away mission z-levels
|
||||
if(destination.z > max_default_z_level()) //Away mission z-levels
|
||||
return 0
|
||||
return 1
|
||||
@@ -80,7 +80,8 @@
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
var/name = t.fields["name"]
|
||||
var/rank = t.fields["rank"]
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
var/real_rank = make_list_rank(t.fields["real_rank"])
|
||||
|
||||
if(OOC)
|
||||
var/active = 0
|
||||
for(var/mob/M in player_list)
|
||||
@@ -165,6 +166,15 @@
|
||||
return dat
|
||||
|
||||
|
||||
/var/list/acting_rank_prefixes = list("acting", "temporary", "interim")
|
||||
|
||||
/proc/make_list_rank(rank)
|
||||
for(var/prefix in acting_rank_prefixes)
|
||||
if(findtext(rank, "[prefix] ", 1, 2+length(prefix)))
|
||||
return copytext(rank, 2+length(prefix))
|
||||
return rank
|
||||
|
||||
|
||||
/*
|
||||
We can't just insert in HTML into the nanoUI so we need the raw data to play with.
|
||||
Instead of creating this list over and over when someone leaves their PDA open to the page
|
||||
@@ -189,7 +199,8 @@ var/global/ManifestJSON
|
||||
for(var/datum/data/record/t in data_core.general)
|
||||
var/name = sanitize(t.fields["name"])
|
||||
var/rank = sanitize(t.fields["rank"])
|
||||
var/real_rank = t.fields["real_rank"]
|
||||
var/real_rank = make_list_rank(t.fields["real_rank"])
|
||||
|
||||
var/isactive = t.fields["p_stat"]
|
||||
var/department = 0
|
||||
var/depthead = 0 // Department Heads will be placed at the top of their lists.
|
||||
|
||||
@@ -32,13 +32,9 @@ var/datum/antagonist/ert/ert
|
||||
player.equip_to_slot_or_del(new /obj/item/clothing/gloves/swat(src), slot_gloves)
|
||||
player.equip_to_slot_or_del(new /obj/item/clothing/glasses/sunglasses(src), slot_glasses)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(src)
|
||||
W.assignment = "Emergency Response Team"
|
||||
var/obj/item/weapon/card/id/centcom/ERT/W = new(src)
|
||||
W.registered_name = player.real_name
|
||||
W.name = "[player.real_name]'s ID Card ([W.assignment])"
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
player.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
return 1
|
||||
|
||||
@@ -26,8 +26,8 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
icon = 'icons/turf/areas.dmi'
|
||||
icon_state = "unknown"
|
||||
layer = 10
|
||||
luminosity = 1
|
||||
mouse_opacity = 0
|
||||
invisibility = INVISIBILITY_LIGHTING
|
||||
var/lightswitch = 1
|
||||
|
||||
var/eject = null
|
||||
@@ -48,9 +48,6 @@ NOTE: there are two lists of areas in the end of this file: centcom and station
|
||||
var/has_gravity = 1
|
||||
var/list/apc = list()
|
||||
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
|
||||
var/air_doors_activated = 0
|
||||
@@ -102,7 +99,6 @@ var/list/ghostteleportlocs = list()
|
||||
icon_state = "space"
|
||||
requires_power = 1
|
||||
always_unpowered = 1
|
||||
lighting_use_dynamic = 1
|
||||
power_light = 0
|
||||
power_equip = 0
|
||||
power_environ = 0
|
||||
@@ -145,10 +141,8 @@ area/space/atmosalert()
|
||||
//place to another. Look at escape shuttle for example.
|
||||
//All shuttles should 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
|
||||
|
||||
/area/shuttle/arrival
|
||||
name = "\improper Arrival Shuttle"
|
||||
@@ -249,15 +243,11 @@ area/space/atmosalert()
|
||||
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"
|
||||
@@ -343,7 +333,6 @@ area/space/atmosalert()
|
||||
name = "start area"
|
||||
icon_state = "start"
|
||||
requires_power = 0
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
has_gravity = 1
|
||||
|
||||
@@ -361,6 +350,7 @@ area/space/atmosalert()
|
||||
icon_state = "centcom"
|
||||
requires_power = 0
|
||||
unlimited_power = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/centcom/control
|
||||
name = "\improper Centcom Control"
|
||||
@@ -399,6 +389,7 @@ area/space/atmosalert()
|
||||
icon_state = "syndie-ship"
|
||||
requires_power = 0
|
||||
unlimited_power = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/syndicate_mothership/control
|
||||
name = "\improper Mercenary Control Room"
|
||||
@@ -1009,7 +1000,6 @@ area/space/atmosalert()
|
||||
/area/holodeck
|
||||
name = "\improper Holodeck"
|
||||
icon_state = "Holodeck"
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
/area/holodeck/alphadeck
|
||||
@@ -1139,7 +1129,6 @@ area/space/atmosalert()
|
||||
/area/solar
|
||||
requires_power = 1
|
||||
always_unpowered = 1
|
||||
luminosity = 1
|
||||
lighting_use_dynamic = 0
|
||||
|
||||
auxport
|
||||
|
||||
@@ -10,42 +10,36 @@
|
||||
/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)
|
||||
all_areas += src
|
||||
|
||||
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/proc/get_contents()
|
||||
return contents
|
||||
|
||||
/area/proc/get_cameras()
|
||||
var/list/cameras = list()
|
||||
for (var/area/RA in related)
|
||||
for (var/obj/machinery/camera/C in RA)
|
||||
for (var/obj/machinery/camera/C in src)
|
||||
cameras += C
|
||||
return cameras
|
||||
|
||||
/area/proc/atmosalert(danger_level, var/alarm_source)
|
||||
if (danger_level == 0)
|
||||
atmosphere_alarm.clearAlarm(master, alarm_source)
|
||||
atmosphere_alarm.clearAlarm(src, alarm_source)
|
||||
else
|
||||
atmosphere_alarm.triggerAlarm(master, alarm_source, severity = danger_level)
|
||||
atmosphere_alarm.triggerAlarm(src, alarm_source, severity = danger_level)
|
||||
|
||||
//Check all the alarms before lowering atmosalm. Raising is perfectly fine.
|
||||
for (var/area/RA in related)
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
for (var/obj/machinery/alarm/AA in src)
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.report_danger_level)
|
||||
danger_level = max(danger_level, AA.danger_level)
|
||||
|
||||
@@ -57,17 +51,16 @@
|
||||
air_doors_close()
|
||||
|
||||
atmosalm = danger_level
|
||||
for(var/area/RA in related)
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
for (var/obj/machinery/alarm/AA in src)
|
||||
AA.update_icon()
|
||||
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/area/proc/air_doors_close()
|
||||
if(!src.master.air_doors_activated)
|
||||
src.master.air_doors_activated = 1
|
||||
for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
|
||||
if(!air_doors_activated)
|
||||
air_doors_activated = 1
|
||||
for(var/obj/machinery/door/firedoor/E in all_doors)
|
||||
if(!E.blocked)
|
||||
if(E.operating)
|
||||
E.nextstate = CLOSED
|
||||
@@ -76,9 +69,9 @@
|
||||
E.close()
|
||||
|
||||
/area/proc/air_doors_open()
|
||||
if(src.master.air_doors_activated)
|
||||
src.master.air_doors_activated = 0
|
||||
for(var/obj/machinery/door/firedoor/E in src.master.all_doors)
|
||||
if(air_doors_activated)
|
||||
air_doors_activated = 0
|
||||
for(var/obj/machinery/door/firedoor/E in all_doors)
|
||||
if(!E.blocked)
|
||||
if(E.operating)
|
||||
E.nextstate = OPEN
|
||||
@@ -89,11 +82,8 @@
|
||||
|
||||
/area/proc/fire_alert()
|
||||
if(!fire)
|
||||
master.fire = 1 //used for firedoor checks
|
||||
master.updateicon()
|
||||
for(var/area/A in related)
|
||||
A.fire = 1
|
||||
A.updateicon()
|
||||
fire = 1 //used for firedoor checks
|
||||
updateicon()
|
||||
mouse_opacity = 0
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
@@ -105,11 +95,8 @@
|
||||
|
||||
/area/proc/fire_reset()
|
||||
if (fire)
|
||||
master.fire = 0 //used for firedoor checks
|
||||
master.updateicon()
|
||||
for(var/area/A in related)
|
||||
A.fire = 0
|
||||
A.updateicon()
|
||||
fire = 0 //used for firedoor checks
|
||||
updateicon()
|
||||
mouse_opacity = 0
|
||||
for(var/obj/machinery/door/firedoor/D in all_doors)
|
||||
if(!D.blocked)
|
||||
@@ -153,7 +140,7 @@
|
||||
return
|
||||
|
||||
/area/proc/updateicon()
|
||||
if ((fire || eject || party) && (!requires_power||power_environ) && !lighting_space)//If it doesn't require power, can still activate this proc.
|
||||
if ((fire || eject || party) && (!requires_power||power_environ) && !istype(src, /area/space))//If it doesn't require power, can still activate this proc.
|
||||
if(fire && !eject && !party)
|
||||
icon_state = "blue"
|
||||
/*else if(atmosalm && !fire && !eject && !party)
|
||||
@@ -177,56 +164,53 @@
|
||||
|
||||
/area/proc/powered(var/chan) // return true if the area has power to given channel
|
||||
|
||||
if(!master.requires_power)
|
||||
if(!requires_power)
|
||||
return 1
|
||||
if(master.always_unpowered)
|
||||
if(always_unpowered)
|
||||
return 0
|
||||
if(src.lighting_space)
|
||||
return 0 // Nope sorry
|
||||
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
|
||||
|
||||
// called when power status changes
|
||||
/area/proc/power_change()
|
||||
for(var/area/RA in related)
|
||||
for(var/obj/machinery/M in RA) // for each machine in the area
|
||||
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)
|
||||
RA.updateicon()
|
||||
updateicon()
|
||||
|
||||
/area/proc/usage(var/chan)
|
||||
var/used = 0
|
||||
switch(chan)
|
||||
if(LIGHT)
|
||||
used += master.used_light
|
||||
used += used_light
|
||||
if(EQUIP)
|
||||
used += master.used_equip
|
||||
used += used_equip
|
||||
if(ENVIRON)
|
||||
used += master.used_environ
|
||||
used += used_environ
|
||||
if(TOTAL)
|
||||
used += master.used_light + master.used_equip + master.used_environ
|
||||
used += used_light + used_equip + used_environ
|
||||
return used
|
||||
|
||||
/area/proc/clear_usage()
|
||||
master.used_equip = 0
|
||||
master.used_light = 0
|
||||
master.used_environ = 0
|
||||
used_equip = 0
|
||||
used_light = 0
|
||||
used_environ = 0
|
||||
|
||||
/area/proc/use_power(var/amount, var/chan)
|
||||
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
|
||||
|
||||
|
||||
var/list/mob/living/forced_ambiance_list = new
|
||||
@@ -274,19 +258,15 @@ var/list/mob/living/forced_ambiance_list = new
|
||||
L.client.played = world.time
|
||||
|
||||
/area/proc/gravitychange(var/gravitystate = 0, var/area/A)
|
||||
|
||||
A.has_gravity = gravitystate
|
||||
|
||||
for(var/area/SubA in A.related)
|
||||
SubA.has_gravity = gravitystate
|
||||
|
||||
if(gravitystate)
|
||||
for(var/mob/living/carbon/human/M in SubA)
|
||||
for(var/mob/living/carbon/human/M in A)
|
||||
thunk(M)
|
||||
for(var/mob/M1 in SubA)
|
||||
for(var/mob/M1 in A)
|
||||
M1.make_floating(0)
|
||||
else
|
||||
for(var/mob/M in SubA)
|
||||
for(var/mob/M in A)
|
||||
if(M.Check_Dense_Object() && istype(src,/mob/living/carbon/human/))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(istype(H.shoes, /obj/item/clothing/shoes/magboots) && (H.shoes.flags & NOSLIP)) //magboots + dense_object = no floaty effect
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
var/pass_flags = 0
|
||||
var/throwpass = 0
|
||||
var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom.
|
||||
var/simulated = 1 //filter for actions - used by lighting overlays
|
||||
|
||||
///Chemistry.
|
||||
var/datum/reagents/reagents = null
|
||||
@@ -25,7 +26,7 @@
|
||||
/atom/Destroy()
|
||||
. = ..()
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
set_opacity(0)
|
||||
|
||||
if(reagents)
|
||||
qdel(reagents)
|
||||
|
||||
@@ -30,15 +30,10 @@
|
||||
..()
|
||||
|
||||
/atom/movable/Destroy()
|
||||
if(opacity)
|
||||
if(isturf(loc))
|
||||
if(loc:lighting_lumcount > 1)
|
||||
UpdateAffectingLights()
|
||||
. = ..()
|
||||
|
||||
loc = null
|
||||
|
||||
..()
|
||||
|
||||
|
||||
/atom/movable/proc/initialize()
|
||||
return
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
name = "blob"
|
||||
icon = 'icons/mob/blob.dmi'
|
||||
icon_state = "blob"
|
||||
luminosity = 3
|
||||
light_range = 3
|
||||
desc = "Some blob creature thingy"
|
||||
density = 1
|
||||
opacity = 0
|
||||
|
||||
@@ -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 = "#3e0000"
|
||||
var/obj/item/wepon = null
|
||||
|
||||
/obj/structure/cult/pylon/attack_hand(mob/M as mob)
|
||||
@@ -47,7 +47,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)
|
||||
@@ -66,13 +66,12 @@
|
||||
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 = 5
|
||||
|
||||
//sprites for this no longer exist -Pete
|
||||
//(they were stolen from another game anyway)
|
||||
@@ -105,8 +104,8 @@
|
||||
return
|
||||
|
||||
/obj/effect/gateway/active
|
||||
luminosity=5
|
||||
l_color="#ff0000"
|
||||
light_range=5
|
||||
light_color="#ff0000"
|
||||
spawnable=list(
|
||||
/mob/living/simple_animal/hostile/scarybat,
|
||||
/mob/living/simple_animal/hostile/creature,
|
||||
@@ -114,8 +113,8 @@
|
||||
)
|
||||
|
||||
/obj/effect/gateway/active/cult
|
||||
luminosity=5
|
||||
l_color="#ff0000"
|
||||
light_range=5
|
||||
light_color="#ff0000"
|
||||
spawnable=list(
|
||||
/mob/living/simple_animal/hostile/scarybat/cult,
|
||||
/mob/living/simple_animal/hostile/creature/cult,
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
narsimage = image('icons/obj/narsie.dmi',src.loc,"narsie",9,1)
|
||||
narsimage.mouse_opacity = 0
|
||||
if(!narglow) //Create narglow
|
||||
narglow = image('icons/obj/narsie.dmi',narsimage.loc,"glow-narsie",LIGHTING_LAYER+2,1)
|
||||
narglow = image('icons/obj/narsie.dmi',narsimage.loc,"glow-narsie",12,1)
|
||||
narglow.mouse_opacity = 0
|
||||
//Else if no dir is given, simply send them the image of narsie
|
||||
var/new_x = 32 * (N.x - src.x) + N.pixel_x
|
||||
|
||||
@@ -54,9 +54,8 @@ In short:
|
||||
runedec += 9000 //basically removing the rune cap
|
||||
|
||||
/datum/universal_state/hell/proc/AreaSet()
|
||||
for(var/area/ca in world)
|
||||
var/area/A = ca.master
|
||||
if(!istype(A,/area) || A.name=="Space")
|
||||
for(var/area/A in world)
|
||||
if(A.name=="Space")
|
||||
continue
|
||||
|
||||
// Reset all alarms.
|
||||
@@ -74,9 +73,8 @@ In short:
|
||||
spess.overlays += I
|
||||
|
||||
/datum/universal_state/hell/proc/AmbientSet()
|
||||
for(var/turf/T in world)
|
||||
if(istype(T, /turf/space)) continue
|
||||
T.update_lumcount(1, 255, 0, 0, 0)
|
||||
for(var/atom/movable/lighting_overlay/L in world)
|
||||
L.update_lumcount(1, 0, 0)
|
||||
|
||||
/datum/universal_state/hell/proc/MiscSet()
|
||||
for(var/turf/simulated/floor/T in world)
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
//luminosity = 5
|
||||
//l_color="#0066FF"
|
||||
layer = LIGHTING_LAYER+1
|
||||
layer = 11
|
||||
|
||||
var/spawned=0 // DIR mask
|
||||
var/next_check=0
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
announce=0
|
||||
narnar=0
|
||||
|
||||
layer=LIGHTING_LAYER+2 // ITS SO BRIGHT
|
||||
layer=12 // ITS SO BRIGHT
|
||||
|
||||
consume_range = 6
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
/mob/proc/see_rift(var/obj/singularity/narsie/large/exit/R)
|
||||
if((R.z == src.z) && (get_dist(R,src) <= (R.consume_range+10)) && !(R in view(src)))
|
||||
if(!riftimage)
|
||||
riftimage = image('icons/obj/rift.dmi',src.loc,"rift",LIGHTING_LAYER+2,1)
|
||||
riftimage = image('icons/obj/rift.dmi',src.loc,"rift",12,1)
|
||||
riftimage.mouse_opacity = 0
|
||||
|
||||
var/new_x = 32 * (R.x - src.x) + R.pixel_x
|
||||
|
||||
@@ -83,11 +83,10 @@ AUTOMATED ALERT: Link to [command_name()] lost."}
|
||||
return
|
||||
|
||||
/datum/universal_state/supermatter_cascade/proc/AreaSet()
|
||||
for(var/area/ca in world)
|
||||
var/area/A=ca.master
|
||||
for(var/area/A in world)
|
||||
if(A.z in config.admin_levels)
|
||||
continue
|
||||
if(!istype(A,/area) || istype(A,/area/space))
|
||||
if(istype(A,/area/space))
|
||||
continue
|
||||
|
||||
// Reset all alarms.
|
||||
@@ -111,10 +110,9 @@ AUTOMATED ALERT: Link to [command_name()] lost."}
|
||||
spess.overlays += "end01"
|
||||
|
||||
/datum/universal_state/supermatter_cascade/proc/AmbientSet()
|
||||
for(var/turf/T in world)
|
||||
if(istype(T, /turf/space)) continue
|
||||
if(!(T.z in config.admin_levels))
|
||||
T.update_lumcount(1, 160, 255, 0, 0)
|
||||
for(var/atom/movable/lighting_overlay/L in world)
|
||||
if(!(L.z in config.admin_levels))
|
||||
L.update_lumcount(0.5, 1, 0)
|
||||
|
||||
/datum/universal_state/supermatter_cascade/proc/MiscSet()
|
||||
for (var/obj/machinery/firealarm/alm in world)
|
||||
|
||||
@@ -231,7 +231,7 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/snacks/grown/banana(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/stamp/clown(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/rainbow(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/fancy/crayons(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/toy/waterflower(H), slot_in_backpack)
|
||||
H.mutations.Add(CLUMSY)
|
||||
@@ -265,11 +265,11 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/suspenders(H), slot_wear_suit)
|
||||
if(H.backbag == 1)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H), slot_r_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_l_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_l_store)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_l_hand)
|
||||
else
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/toy/crayon/mime(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pen/crayon/mime(H), slot_in_backpack)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/reagent_containers/food/drinks/bottle/bottleofnothing(H), slot_in_backpack)
|
||||
H.verbs += /client/proc/mimespeak
|
||||
H.verbs += /client/proc/mimewall
|
||||
|
||||
@@ -124,8 +124,6 @@
|
||||
|
||||
/obj/machinery/alarm/proc/first_run()
|
||||
alarm_area = get_area(src)
|
||||
if (alarm_area.master)
|
||||
alarm_area = alarm_area.master
|
||||
area_uid = alarm_area.uid
|
||||
if (name == "alarm")
|
||||
name = "[alarm_area.name] Air Alarm"
|
||||
@@ -286,8 +284,7 @@
|
||||
|
||||
|
||||
/obj/machinery/alarm/proc/elect_master()
|
||||
for (var/area/A in alarm_area.related)
|
||||
for (var/obj/machinery/alarm/AA in A)
|
||||
for (var/obj/machinery/alarm/AA in alarm_area)
|
||||
if (!(AA.stat & (NOPOWER|BROKEN)))
|
||||
alarm_area.master_air_alarm = AA
|
||||
return 1
|
||||
@@ -397,8 +394,7 @@
|
||||
/obj/machinery/alarm/proc/apply_mode()
|
||||
//propagate mode to other air alarms in the area
|
||||
//TODO: make it so that players can choose between applying the new mode to the room they are in (related area) vs the entire alarm area
|
||||
for (var/area/RA in alarm_area.related)
|
||||
for (var/obj/machinery/alarm/AA in RA)
|
||||
for (var/obj/machinery/alarm/AA in alarm_area)
|
||||
AA.mode = mode
|
||||
|
||||
switch(mode)
|
||||
@@ -622,7 +618,7 @@
|
||||
if(buildstage != 2)
|
||||
return STATUS_CLOSE
|
||||
|
||||
if(aidisabled && user.isAI())
|
||||
if(aidisabled && user.isMobAI())
|
||||
user << "<span class='warning'>AI control for \the [src] interface has been disabled.</span>"
|
||||
return STATUS_CLOSE
|
||||
|
||||
@@ -1070,7 +1066,6 @@ FIRE ALARM
|
||||
var/d2
|
||||
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon))
|
||||
A = A.loc
|
||||
A = A.master
|
||||
|
||||
if (A.fire)
|
||||
d1 = text("<A href='?src=\ref[];reset=1'>Reset - Lockdown</A>", src)
|
||||
@@ -1137,8 +1132,7 @@ FIRE ALARM
|
||||
if (!( src.working ))
|
||||
return
|
||||
var/area/area = get_area(src)
|
||||
for(var/area/A in area.related)
|
||||
for(var/obj/machinery/firealarm/FA in A)
|
||||
for(var/obj/machinery/firealarm/FA in area)
|
||||
fire_alarm.clearAlarm(loc, FA)
|
||||
update_icon()
|
||||
return
|
||||
@@ -1147,8 +1141,7 @@ FIRE ALARM
|
||||
if (!( src.working))
|
||||
return
|
||||
var/area/area = get_area(src)
|
||||
for(var/area/A in area.related)
|
||||
for(var/obj/machinery/firealarm/FA in A)
|
||||
for(var/obj/machinery/firealarm/FA in area)
|
||||
fire_alarm.triggerAlarm(loc, FA, duration)
|
||||
update_icon()
|
||||
//playsound(src.loc, 'sound/ambience/signal.ogg', 75, 0)
|
||||
@@ -1260,8 +1253,6 @@ Code shamelessly copied from apc_frame
|
||||
user.machine = src
|
||||
var/area/A = get_area(src)
|
||||
ASSERT(isarea(A))
|
||||
if(A.master)
|
||||
A = A.master
|
||||
var/d1
|
||||
var/d2
|
||||
if (istype(user, /mob/living/carbon/human) || istype(user, /mob/living/silicon/ai))
|
||||
@@ -1300,8 +1291,6 @@ Code shamelessly copied from apc_frame
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
ASSERT(isarea(A))
|
||||
if(A.master)
|
||||
A = A.master
|
||||
A.partyreset()
|
||||
return
|
||||
|
||||
@@ -1310,8 +1299,6 @@ Code shamelessly copied from apc_frame
|
||||
return
|
||||
var/area/A = get_area(src)
|
||||
ASSERT(isarea(A))
|
||||
if(A.master)
|
||||
A = A.master
|
||||
A.partyalert()
|
||||
return
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "Area Air Control"
|
||||
desc = "A computer used to control the stationary scrubbers and pumps in the area."
|
||||
icon_state = "area_atmos"
|
||||
light_color = "#e6ffff"
|
||||
circuit = "/obj/item/weapon/circuitboard/area_atmos"
|
||||
|
||||
var/list/connectedscrubbers = new()
|
||||
@@ -147,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
|
||||
@@ -169,13 +166,11 @@
|
||||
var/turf/T = get_turf(src)
|
||||
if(!T.loc) return
|
||||
var/area/A = T.loc
|
||||
if (A.master)
|
||||
A = A.master
|
||||
for(var/obj/machinery/portable_atmospherics/powered/scrubber/huge/scrubber in world )
|
||||
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
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
/obj/machinery/bot
|
||||
icon = 'icons/obj/aibots.dmi'
|
||||
layer = MOB_LAYER
|
||||
luminosity = 3
|
||||
light_range = 3
|
||||
use_power = 0
|
||||
var/obj/item/weapon/card/id/botcard // the ID card that the bot "holds"
|
||||
var/on = 1
|
||||
@@ -18,12 +18,12 @@
|
||||
/obj/machinery/bot/proc/turn_on()
|
||||
if(stat) return 0
|
||||
on = 1
|
||||
SetLuminosity(initial(luminosity))
|
||||
set_light(initial(light_range))
|
||||
return 1
|
||||
|
||||
/obj/machinery/bot/proc/turn_off()
|
||||
on = 0
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/machinery/bot/proc/explode()
|
||||
qdel(src)
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
if(!isEmpProof())
|
||||
if(prob(100/severity))
|
||||
stat |= EMPED
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
kick_viewers()
|
||||
triggerCameraAlarm(30 / severity)
|
||||
update_icon()
|
||||
|
||||
@@ -102,6 +102,12 @@ var/global/list/engineering_networks = list(
|
||||
..()
|
||||
upgradeMotion()
|
||||
|
||||
/obj/machinery/camera/motion/engineering_outpost
|
||||
network = list(NETWORK_ENGINEERING_OUTPOST)
|
||||
|
||||
/obj/machinery/camera/motion/security
|
||||
network = list(NETWORK_SECURITY)
|
||||
|
||||
// ALL UPGRADES
|
||||
|
||||
|
||||
|
||||
@@ -174,17 +174,9 @@
|
||||
//So clones don't die of oxyloss in a running pod.
|
||||
if(occupant.reagents.get_reagent_amount("inaprovaline") < 30)
|
||||
occupant.reagents.add_reagent("inaprovaline", 60)
|
||||
|
||||
//So clones will remain asleep for long enough to get them into cryo (Bay RP edit)
|
||||
if(occupant.reagents.get_reagent_amount("stoxin") < 10)
|
||||
occupant.reagents.add_reagent("stoxin", 5)
|
||||
if(occupant.reagents.get_reagent_amount("chloralhydrate") < 1)
|
||||
occupant.reagents.add_reagent("chloralhydrate", 1)
|
||||
|
||||
occupant.Sleeping(30)
|
||||
//Also heal some oxyloss ourselves because inaprovaline is so bad at preventing it!!
|
||||
occupant.adjustOxyLoss(-4)
|
||||
if(notoxin)
|
||||
occupant.adjustToxLoss(-2) // If sufficiently upgraded - remove toxin damage from chloral
|
||||
|
||||
use_power(7500) //This might need tweaking.
|
||||
return
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
icon_state = "operating"
|
||||
light_color = "#315ab4"
|
||||
circuit = "/obj/item/weapon/circuitboard/operating"
|
||||
var/mob/living/carbon/human/victim = null
|
||||
var/obj/machinery/optable/table = null
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
desc = "Console used to remotely control machinery on the station."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "ai-fixer"
|
||||
light_color = "#a97faa"
|
||||
circuit = /obj/item/weapon/circuitboard/rcon_console
|
||||
req_one_access = list(access_engine)
|
||||
var/current_tag = null
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "\improper AI system integrity restorer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "ai-fixer"
|
||||
light_color = "#a97faa"
|
||||
circuit = /obj/item/weapon/circuitboard/aifixer
|
||||
req_one_access = list(access_robotics, access_heads)
|
||||
var/mob/living/silicon/ai/occupant = null
|
||||
|
||||
@@ -9,6 +9,7 @@ var/global/list/minor_air_alarms = list()
|
||||
desc = "Used to access the station's atmospheric sensors."
|
||||
circuit = "/obj/item/weapon/circuitboard/atmos_alert"
|
||||
icon_state = "alert:0"
|
||||
light_color = "#e6ffff"
|
||||
|
||||
/obj/machinery/computer/atmos_alert/New()
|
||||
..()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
name = "\improper Central Atmospherics Computer"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "computer_generic"
|
||||
light_color = "#00b000"
|
||||
density = 1
|
||||
anchored = 1.0
|
||||
circuit = "/obj/item/weapon/circuitboard/atmoscontrol"
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
/var/camera_cache_id = 1
|
||||
|
||||
/proc/invalidateCameraCache()
|
||||
for(var/obj/machinery/computer/security/s in world)
|
||||
s.camera_cache = null
|
||||
for(var/datum/alarm/A in world)
|
||||
A.cameras = null
|
||||
camera_cache_id = (++camera_cache_id % 999999)
|
||||
|
||||
/obj/machinery/computer/security
|
||||
name = "security camera monitor"
|
||||
desc = "Used to access the various cameras on the station."
|
||||
icon_state = "cameras"
|
||||
light_color = "#a91515"
|
||||
var/obj/machinery/camera/current = null
|
||||
var/last_pic = 1.0
|
||||
var/list/network
|
||||
var/mapping = 0//For the overview file, interesting bit of code.
|
||||
var/cache_id = 0
|
||||
circuit = /obj/item/weapon/circuitboard/security
|
||||
var/camera_cache = null
|
||||
|
||||
@@ -42,7 +43,8 @@
|
||||
|
||||
data["current"] = null
|
||||
|
||||
if(isnull(camera_cache))
|
||||
if(camera_cache_id != cache_id)
|
||||
cache_id = camera_cache_id
|
||||
cameranet.process_sort()
|
||||
|
||||
var/cameras[0]
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "\improper ID card modification console"
|
||||
desc = "Terminal for programming NanoTrasen employee ID cards to access parts of the station."
|
||||
icon_state = "id"
|
||||
light_color = "#0099ff"
|
||||
req_access = list(access_change_ids)
|
||||
circuit = "/obj/item/weapon/circuitboard/card"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "cloning control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "dna"
|
||||
light_color = "#315ab4"
|
||||
circuit = "/obj/item/weapon/circuitboard/cloning"
|
||||
req_access = list(access_heads) //Only used for record deletion right now.
|
||||
var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning.
|
||||
@@ -14,20 +15,18 @@
|
||||
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
|
||||
var/loading = 0 // Nice loading text
|
||||
|
||||
/obj/machinery/computer/cloning/New()
|
||||
/obj/machinery/computer/cloning/initialize()
|
||||
..()
|
||||
spawn(5)
|
||||
updatemodules()
|
||||
return
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/Destroy()
|
||||
releasecloner()
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/cloning/proc/updatemodules()
|
||||
src.scanner = findscanner()
|
||||
releasecloner()
|
||||
findcloner()
|
||||
var/num = 1
|
||||
for (var/obj/machinery/clonepod/pod in pods)
|
||||
pod.connected = src
|
||||
pod.name = "[initial(pod.name)] #[num++]"
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findscanner()
|
||||
var/obj/machinery/dna_scannernew/scannerf = null
|
||||
@@ -40,18 +39,26 @@
|
||||
|
||||
//Then look for a free one in the area
|
||||
if(!scannerf)
|
||||
for(var/obj/machinery/dna_scannernew/S in get_area(src))
|
||||
var/area/A = get_area(src)
|
||||
for(var/obj/machinery/dna_scannernew/S in A.get_contents())
|
||||
return S
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findcloner()
|
||||
/obj/machinery/computer/cloning/proc/releasecloner()
|
||||
for(var/obj/machinery/clonepod/P in pods)
|
||||
P.connected = null
|
||||
P.name = initial(P.name)
|
||||
pods.Cut()
|
||||
for(var/obj/machinery/clonepod/P in get_area(src))
|
||||
|
||||
/obj/machinery/computer/cloning/proc/findcloner()
|
||||
var/num = 1
|
||||
var/area/A = get_area(src)
|
||||
for(var/obj/machinery/clonepod/P in A.get_contents())
|
||||
if(!P.connected)
|
||||
pods += P
|
||||
|
||||
return
|
||||
P.connected = src
|
||||
P.name = "[initial(P.name)] #[num++]"
|
||||
|
||||
/obj/machinery/computer/cloning/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if (istype(W, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "command and communications console"
|
||||
desc = "Used to command and control the station. Can relay long-range communications."
|
||||
icon_state = "comm"
|
||||
light_color = "#0099ff"
|
||||
req_access = list(access_heads)
|
||||
circuit = "/obj/item/weapon/circuitboard/communications"
|
||||
var/prints_intercept = 1
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
var/circuit = null //The path to the circuit board type. If circuit==null, the computer can't be disassembled.
|
||||
var/processing = 0
|
||||
|
||||
var/light_range_on = 3
|
||||
var/light_power_on = 1
|
||||
|
||||
/obj/machinery/computer/initialize()
|
||||
power_change()
|
||||
|
||||
@@ -54,6 +57,9 @@
|
||||
return
|
||||
|
||||
/obj/machinery/computer/bullet_act(var/obj/item/projectile/Proj)
|
||||
if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
return
|
||||
|
||||
if(prob(Proj.damage))
|
||||
set_broken()
|
||||
..()
|
||||
@@ -83,6 +89,10 @@
|
||||
/obj/machinery/computer/power_change()
|
||||
..()
|
||||
update_icon()
|
||||
if(stat & NOPOWER)
|
||||
set_light(0)
|
||||
else
|
||||
set_light(light_range_on, light_power_on)
|
||||
|
||||
|
||||
/obj/machinery/computer/proc/set_broken()
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "crew monitoring computer"
|
||||
desc = "Used to monitor active health sensors built into most of the crew's uniforms."
|
||||
icon_state = "crew"
|
||||
light_color = "#315ab4"
|
||||
use_power = 1
|
||||
idle_power_usage = 250
|
||||
active_power_usage = 500
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
name = "guest pass"
|
||||
desc = "Allows temporary access to station areas."
|
||||
icon_state = "guest"
|
||||
light_color = "#0099ff"
|
||||
|
||||
var/temp_access = list() //to prevent agent cards stealing access as permanent
|
||||
var/expiration_time = 0
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "medical records console"
|
||||
desc = "Used to view, edit and maintain medical records."
|
||||
icon_state = "medcomp"
|
||||
light_color = "#315ab4"
|
||||
req_one_access = list(access_medical, access_forensics_lockers)
|
||||
circuit = "/obj/item/weapon/circuitboard/med_data"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "messaging monitor console"
|
||||
desc = "Used to access and maintain data on messaging servers. Allows you to view PDA and request console messages."
|
||||
icon_state = "comm_logs"
|
||||
light_color = "#00b000"
|
||||
var/hack_icon = "comm_logsc"
|
||||
var/normal_icon = "comm_logs"
|
||||
circuit = "/obj/item/weapon/circuitboard/message_monitor"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "pod launch control console"
|
||||
desc = "A control console for launching pods. Some people prefer firing Mechas."
|
||||
icon_state = "computer_generic"
|
||||
light_color = "#00b000"
|
||||
circuit = /obj/item/weapon/circuitboard/pod
|
||||
var/id = 1.0
|
||||
var/obj/machinery/mass_driver/connected = null
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "prisoner management console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "explosive"
|
||||
light_color = "#a91515"
|
||||
req_access = list(access_armory)
|
||||
circuit = "/obj/item/weapon/circuitboard/prisoner"
|
||||
var/id = 0.0
|
||||
|
||||
@@ -14,6 +14,7 @@ var/prison_shuttle_timeleft = 0
|
||||
name = "prison shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
light_color = "#00ffff"
|
||||
req_access = list(access_security)
|
||||
circuit = "/obj/item/weapon/circuitboard/prison_shuttle"
|
||||
var/temp = null
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
desc = "Used to remotely lockdown or detonate linked cyborgs."
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "robot"
|
||||
light_color = "#a97faa"
|
||||
req_access = list(access_robotics)
|
||||
circuit = "/obj/item/weapon/circuitboard/robotics"
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "security records console"
|
||||
desc = "Used to view, edit and maintain security records"
|
||||
icon_state = "security"
|
||||
light_color = "#a91515"
|
||||
req_one_access = list(access_security, access_forensics_lockers)
|
||||
circuit = "/obj/item/weapon/circuitboard/secure_data"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "Shuttle"
|
||||
desc = "For shuttle control."
|
||||
icon_state = "shuttle"
|
||||
light_color = "#00ffff"
|
||||
var/auth_need = 3.0
|
||||
var/list/authorized = list( )
|
||||
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
name = "employment records console"
|
||||
desc = "Used to view, edit and maintain employment records."
|
||||
icon_state = "medlaptop"
|
||||
light_color = "#00b000"
|
||||
req_one_access = list(access_heads)
|
||||
circuit = "/obj/item/weapon/circuitboard/skills"
|
||||
var/obj/item/weapon/card/id/scan = null
|
||||
|
||||
@@ -15,6 +15,7 @@ var/specops_shuttle_timeleft = 0
|
||||
name = "special operations shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "shuttle"
|
||||
light_color = "#00ffff"
|
||||
req_access = list(access_cent_specops)
|
||||
// req_access = list(ACCESS_CENT_SPECOPS)
|
||||
var/temp = null
|
||||
|
||||
@@ -3,13 +3,18 @@
|
||||
name = "Station Alert Console"
|
||||
desc = "Used to access the station's automated alert system."
|
||||
icon_state = "alert:0"
|
||||
circuit = "/obj/item/weapon/circuitboard/stationalert"
|
||||
light_color = "#e6ffff"
|
||||
circuit = /obj/item/weapon/circuitboard/stationalert_engineering
|
||||
var/obj/nano_module/alarm_monitor/alarm_monitor
|
||||
var/monitor_type = /obj/nano_module/alarm_monitor/engineering
|
||||
|
||||
/obj/machinery/computer/station_alert/security
|
||||
name = "Security Alert Console"
|
||||
monitor_type = /obj/nano_module/alarm_monitor/security
|
||||
circuit = /obj/item/weapon/circuitboard/stationalert_security
|
||||
|
||||
/obj/machinery/computer/station_alert/all
|
||||
monitor_type = /obj/nano_module/alarm_monitor/all
|
||||
circuit = /obj/item/weapon/circuitboard/stationalert_all
|
||||
|
||||
/obj/machinery/computer/station_alert/New()
|
||||
..()
|
||||
@@ -18,6 +23,7 @@
|
||||
|
||||
/obj/machinery/computer/station_alert/Destroy()
|
||||
alarm_monitor.unregister(src)
|
||||
qdel(alarm_monitor)
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/station_alert/attack_ai(mob/user)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "supply control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "supply"
|
||||
light_color = "#b88b2e"
|
||||
req_access = list(access_cargo)
|
||||
circuit = "/obj/item/weapon/circuitboard/supplycomp"
|
||||
var/temp = null
|
||||
|
||||
@@ -14,6 +14,7 @@ var/syndicate_elite_shuttle_timeleft = 0
|
||||
name = "elite syndicate squad shuttle control console"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "syndishuttle"
|
||||
light_color = "#00ffff"
|
||||
req_access = list(access_cent_specops)
|
||||
var/temp = null
|
||||
var/hacked = 0
|
||||
|
||||
@@ -278,8 +278,8 @@
|
||||
chan = power_channel
|
||||
|
||||
var/area/A = get_area(loc)
|
||||
if(istype(A) && A.master && A.master.powered(chan))
|
||||
A.master.use_power(amount, chan)
|
||||
if(istype(A) && A.powered(chan))
|
||||
A.use_power(amount, chan)
|
||||
else if(battery && battery.charge > 0)
|
||||
battery.use(amount)
|
||||
|
||||
|
||||
@@ -143,8 +143,7 @@
|
||||
if(typekey == null)
|
||||
typekey = /obj/machinery
|
||||
var/list/machines = list()
|
||||
for(var/area/area in A.related)
|
||||
for(var/obj/O in area.contents)
|
||||
for(var/obj/O in A.contents)
|
||||
if(istype(O,typekey))
|
||||
machines |= O
|
||||
return machines
|
||||
|
||||
@@ -34,8 +34,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)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
src.density = 0
|
||||
update_nearby_tiles()
|
||||
src.update_icon()
|
||||
src.SetOpacity(0)
|
||||
src.set_opacity(0)
|
||||
sleep(15)
|
||||
src.layer = open_layer
|
||||
src.operating = 0
|
||||
@@ -71,7 +71,7 @@
|
||||
src.density = 1
|
||||
update_nearby_tiles()
|
||||
src.update_icon()
|
||||
src.SetOpacity(initial(opacity))
|
||||
src.set_opacity(initial(opacity))
|
||||
sleep(15)
|
||||
src.operating = 0
|
||||
|
||||
|
||||
@@ -35,11 +35,11 @@
|
||||
..()
|
||||
|
||||
spawn(20)
|
||||
for(var/obj/machinery/door/window/brigdoor/M in world)
|
||||
for(var/obj/machinery/door/window/brigdoor/M in machines)
|
||||
if (M.id == src.id)
|
||||
targets += M
|
||||
|
||||
for(var/obj/machinery/flasher/F in world)
|
||||
for(var/obj/machinery/flasher/F in machines)
|
||||
if(F.id == src.id)
|
||||
targets += F
|
||||
|
||||
|
||||
@@ -394,14 +394,14 @@
|
||||
|
||||
do_animate("opening")
|
||||
icon_state = "door0"
|
||||
src.SetOpacity(0)
|
||||
set_opacity(0)
|
||||
sleep(3)
|
||||
src.density = 0
|
||||
sleep(7)
|
||||
src.layer = open_layer
|
||||
explosion_resistance = 0
|
||||
update_icon()
|
||||
SetOpacity(0)
|
||||
set_opacity(0)
|
||||
update_nearby_tiles()
|
||||
operating = 0
|
||||
|
||||
@@ -427,7 +427,7 @@
|
||||
sleep(7)
|
||||
update_icon()
|
||||
if(visible && !glass)
|
||||
SetOpacity(1) //caaaaarn!
|
||||
set_opacity(1) //caaaaarn!
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
else
|
||||
on = 0
|
||||
updateicon()
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
src.visible_message("<span class='warning'>[src] shuts down due to lack of power!</span>")
|
||||
return
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(on)
|
||||
on = 0
|
||||
user << "\blue You turn off the light"
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
else
|
||||
if(!cell)
|
||||
return
|
||||
@@ -58,7 +58,7 @@
|
||||
return
|
||||
on = 1
|
||||
user << "\blue You turn on the light"
|
||||
SetLuminosity(brightness_on)
|
||||
set_light(brightness_on)
|
||||
|
||||
updateicon()
|
||||
|
||||
|
||||
@@ -120,10 +120,10 @@ 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
|
||||
hologram.set_light(2) //hologram lighting
|
||||
hologram.color = color //painted holopad gives coloured holograms
|
||||
masters[A] = hologram
|
||||
SetLuminosity(2) //pad lighting
|
||||
set_light(2) //pad lighting
|
||||
icon_state = "holopad1"
|
||||
A.holo = src
|
||||
return 1
|
||||
@@ -134,7 +134,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
qdel(masters[user])//Get rid of user's hologram
|
||||
masters -= user //Discard AI from the list of those who use holopad
|
||||
if (!masters.len)//If no users left
|
||||
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"
|
||||
return 1
|
||||
|
||||
@@ -152,8 +152,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
|
||||
if(HOLOPAD_MODE == AREA_BASED)
|
||||
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)
|
||||
clear_holo(master)
|
||||
continue
|
||||
|
||||
|
||||
@@ -188,11 +188,10 @@ datum/track/New(var/title_name, var/audio)
|
||||
/obj/machinery/media/jukebox/proc/StopPlaying()
|
||||
var/area/main_area = get_area(src)
|
||||
// Always kill the current sound
|
||||
for(var/area/related_area in main_area.related)
|
||||
for(var/mob/living/M in mobs_in_area(related_area))
|
||||
for(var/mob/living/M in mobs_in_area(main_area))
|
||||
M << sound(null, channel = 1)
|
||||
|
||||
related_area.forced_ambience = null
|
||||
main_area.forced_ambience = null
|
||||
playing = 0
|
||||
update_use_power(1)
|
||||
update_icon()
|
||||
@@ -204,12 +203,10 @@ datum/track/New(var/title_name, var/audio)
|
||||
return
|
||||
|
||||
var/area/main_area = get_area(src)
|
||||
for(var/area/related_area in main_area.related)
|
||||
related_area.forced_ambience = list(current_track.sound)
|
||||
|
||||
for(var/mob/living/M in mobs_in_area(related_area))
|
||||
main_area.forced_ambience = list(current_track.sound)
|
||||
for(var/mob/living/M in mobs_in_area(main_area))
|
||||
if(M.mind)
|
||||
related_area.play_ambience(M)
|
||||
main_area.play_ambience(M)
|
||||
|
||||
playing = 1
|
||||
update_use_power(2)
|
||||
|
||||
@@ -42,15 +42,14 @@
|
||||
|
||||
on = !on
|
||||
|
||||
for(var/area/A in area.master.related)
|
||||
A.lightswitch = on
|
||||
A.updateicon()
|
||||
area.lightswitch = on
|
||||
area.updateicon()
|
||||
|
||||
for(var/obj/machinery/light_switch/L in A)
|
||||
for(var/obj/machinery/light_switch/L in area)
|
||||
L.on = on
|
||||
L.updateicon()
|
||||
|
||||
area.master.power_change()
|
||||
area.power_change()
|
||||
|
||||
/obj/machinery/light_switch/power_change()
|
||||
|
||||
|
||||
@@ -264,8 +264,8 @@ Class Procs:
|
||||
s.start()
|
||||
if (electrocute_mob(user, get_area(src), src, 0.7))
|
||||
var/area/temp_area = get_area(src)
|
||||
if(temp_area && temp_area.master)
|
||||
var/obj/machinery/power/apc/temp_apc = temp_area.master.get_apc()
|
||||
if(temp_area)
|
||||
var/obj/machinery/power/apc/temp_apc = temp_area.get_apc()
|
||||
|
||||
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
|
||||
temp_apc.terminal.powernet.trigger_warning()
|
||||
|
||||
@@ -164,7 +164,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
|
||||
var/c_locked=0; //Will our new channel be locked to public submissions?
|
||||
var/hitstaken = 0 //Death at 3 hits from an item with force>=15
|
||||
var/datum/feed_channel/viewing_channel = null
|
||||
luminosity = 0
|
||||
light_range = 0
|
||||
anchored = 1
|
||||
|
||||
|
||||
|
||||
@@ -510,42 +510,12 @@
|
||||
|
||||
/obj/machinery/porta_turret/proc/assess_perp(var/mob/living/carbon/human/H)
|
||||
if(!H || !istype(H))
|
||||
return
|
||||
return 0
|
||||
|
||||
if(emagged)
|
||||
return 10
|
||||
|
||||
var/threatcount = 0
|
||||
var/obj/item/weapon/card/id/id = GetIdCard(H) //Agent cards lower threatlevel.
|
||||
if(id && istype(id, /obj/item/weapon/card/id/syndicate))
|
||||
threatcount -= 2
|
||||
|
||||
if(check_weapons && !allowed(H))
|
||||
if(istype(H.l_hand, /obj/item/weapon/gun) || istype(H.l_hand, /obj/item/weapon/melee))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(H.r_hand, /obj/item/weapon/gun) || istype(H.r_hand, /obj/item/weapon/melee))
|
||||
threatcount += 4
|
||||
|
||||
if(istype(H.belt, /obj/item/weapon/gun) || istype(H.belt, /obj/item/weapon/melee))
|
||||
threatcount += 2
|
||||
|
||||
if(H.species.name != "Human")
|
||||
threatcount += 2
|
||||
|
||||
if(check_records || check_arrest)
|
||||
var/perpname = H.name
|
||||
if(id)
|
||||
perpname = id.registered_name
|
||||
|
||||
var/datum/data/record/R = find_security_record("name", perpname)
|
||||
if(check_records && !R)
|
||||
threatcount += 4
|
||||
|
||||
if(check_arrest && R && (R.fields["criminal"] == "*Arrest*"))
|
||||
threatcount += 4
|
||||
|
||||
return threatcount
|
||||
return H.assess_perp(src, check_weapons, check_records, check_arrest)
|
||||
|
||||
/obj/machinery/porta_turret/proc/tryToShootAt(var/list/mob/living/targets)
|
||||
if(targets.len && last_target && (last_target in targets) && target(last_target))
|
||||
@@ -593,17 +563,6 @@
|
||||
invisibility = INVISIBILITY_LEVEL_TWO
|
||||
update_icon()
|
||||
|
||||
|
||||
/*
|
||||
/obj/machinery/porta_turret/on_assess_perp(mob/living/carbon/human/perp)
|
||||
if((check_access || attacked) && !allowed(perp))
|
||||
//if the turret has been attacked or is angry, target all non-authorized personnel, see req_access
|
||||
return 10
|
||||
|
||||
return ..()
|
||||
*/
|
||||
|
||||
|
||||
/obj/machinery/porta_turret/proc/target(var/mob/living/target)
|
||||
if(disabled)
|
||||
return
|
||||
@@ -619,7 +578,7 @@
|
||||
|
||||
/obj/machinery/porta_turret/proc/shootAt(var/mob/living/target)
|
||||
//any emagged turrets will shoot extremely fast! This not only is deadly, but drains a lot power!
|
||||
if(!emagged) //if it hasn't been emagged, it has to obey a cooldown rate
|
||||
if(!(emagged || attacked)) //if it hasn't been emagged or attacked, it has to obey a cooldown rate
|
||||
if(last_fired || !raised) //prevents rapid-fire shooting, unless it's been emagged
|
||||
return
|
||||
last_fired = 1
|
||||
|
||||
@@ -54,7 +54,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
var/message = "";
|
||||
var/dpt = ""; //the department which will be receiving the message
|
||||
var/priority = -1 ; //Priority of the message being sent
|
||||
luminosity = 0
|
||||
light_range = 0
|
||||
var/datum/announcement/announcement = new
|
||||
|
||||
/obj/machinery/requests_console/power_change()
|
||||
@@ -176,7 +176,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
if (Console.department == department)
|
||||
Console.newmessagepriority = 0
|
||||
Console.icon_state = "req_comp0"
|
||||
Console.luminosity = 1
|
||||
Console.set_light(1)
|
||||
newmessagepriority = 0
|
||||
icon_state = "req_comp0"
|
||||
for(var/msg in messages)
|
||||
@@ -320,7 +320,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.luminosity = 2
|
||||
Console.set_light(2)
|
||||
messages += "<B>Message sent to [dpt]</B><BR>[message]"
|
||||
else
|
||||
for (var/mob/O in hearers(4, src.loc))
|
||||
|
||||
@@ -63,64 +63,37 @@
|
||||
// If the log is a speech file
|
||||
if(C.input_type == "Speech File")
|
||||
|
||||
dat += "<li><font color = #008F00>[C.name]</font color> <font color = #FF0000><a href='?src=\ref[src];delete=[i]'>\[X\]</a></font color><br>"
|
||||
dat += "<li><font color = #008F00>[C.name]</font> <font color = #FF0000><a href='?src=\ref[src];delete=[i]'>\[X\]</a></font><br>"
|
||||
|
||||
// -- Determine race of orator --
|
||||
|
||||
var/race // The actual race of the mob
|
||||
var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human
|
||||
var/mobtype = C.parameters["mobtype"]
|
||||
var/mob/M = new mobtype
|
||||
|
||||
if(ishuman(M) || isbrain(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
race = "[H.species.name]"
|
||||
|
||||
|
||||
else if(issmall(M))
|
||||
race = "Monkey"
|
||||
language = race
|
||||
|
||||
else if(issilicon(M) || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job
|
||||
race = "Artificial Life"
|
||||
|
||||
else if(isslime(M)) // NT knows a lot about slimes, but not aliens. Can identify slimes
|
||||
race = "slime"
|
||||
language = race
|
||||
|
||||
else if(isanimal(M))
|
||||
race = "Domestic Animal"
|
||||
language = race
|
||||
|
||||
else
|
||||
race = "<i>Unidentifiable</i>"
|
||||
language = race
|
||||
|
||||
qdel(M)
|
||||
var/race = C.parameters["race"] // The actual race of the mob
|
||||
var/language = C.parameters["language"] // The language spoken, or null/""
|
||||
|
||||
// -- If the orator is a human, or universal translate is active, OR mob has universal speech on --
|
||||
|
||||
if(language == "Human" || universal_translate || C.parameters["uspeech"])
|
||||
dat += "<u><font color = #18743E>Data type</font color></u>: [C.input_type]<br>"
|
||||
dat += "<u><font color = #18743E>Source</font color></u>: [C.parameters["name"]] (Job: [C.parameters["job"]])<br>"
|
||||
dat += "<u><font color = #18743E>Class</font color></u>: [race]<br>"
|
||||
dat += "<u><font color = #18743E>Contents</font color></u>: \"[C.parameters["message"]]\"<br>"
|
||||
|
||||
if(universal_translate || C.parameters["uspeech"] || C.parameters["intelligible"])
|
||||
dat += "<u><font color = #18743E>Data type</font></u>: [C.input_type]<br>"
|
||||
dat += "<u><font color = #18743E>Source</font></u>: [C.parameters["name"]] (Job: [C.parameters["job"]])<br>"
|
||||
dat += "<u><font color = #18743E>Class</font></u>: [race]<br>"
|
||||
dat += "<u><font color = #18743E>Contents</font></u>: \"[C.parameters["message"]]\"<br>"
|
||||
if(language)
|
||||
dat += "<u><font color = #18743E>Language</font></u>: [language]<br/>"
|
||||
|
||||
// -- Orator is not human and universal translate not active --
|
||||
|
||||
else
|
||||
dat += "<u><font color = #18743E>Data type</font color></u>: Audio File<br>"
|
||||
dat += "<u><font color = #18743E>Source</font color></u>: <i>Unidentifiable</i><br>"
|
||||
dat += "<u><font color = #18743E>Class</font color></u>: [race]<br>"
|
||||
dat += "<u><font color = #18743E>Contents</font color></u>: <i>Unintelligble</i><br>"
|
||||
dat += "<u><font color = #18743E>Data type</font></u>: Audio File<br>"
|
||||
dat += "<u><font color = #18743E>Source</font></u>: <i>Unidentifiable</i><br>"
|
||||
dat += "<u><font color = #18743E>Class</font></u>: [race]<br>"
|
||||
dat += "<u><font color = #18743E>Contents</font></u>: <i>Unintelligble</i><br>"
|
||||
|
||||
dat += "</li><br>"
|
||||
|
||||
else if(C.input_type == "Execution Error")
|
||||
|
||||
dat += "<li><font color = #990000>[C.name]</font color> <font color = #FF0000><a href='?src=\ref[src];delete=[i]'>\[X\]</a></font color><br>"
|
||||
dat += "<u><font color = #787700>Output</font color></u>: \"[C.parameters["message"]]\"<br>"
|
||||
dat += "<li><font color = #990000>[C.name]</font> <font color = #FF0000><a href='?src=\ref[src];delete=[i]'>\[X\]</a></font color><br>"
|
||||
dat += "<u><font color = #787700>Output</font></u>: \"[C.parameters["message"]]\"<br>"
|
||||
dat += "</li><br>"
|
||||
|
||||
|
||||
|
||||
@@ -537,6 +537,28 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
|
||||
log.parameters["message"] = signal.data["message"]
|
||||
log.parameters["name"] = signal.data["name"]
|
||||
log.parameters["realname"] = signal.data["realname"]
|
||||
log.parameters["language"] = signal.data["language"]
|
||||
|
||||
var/race = "unknown"
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
race = "[H.species.name]"
|
||||
log.parameters["intelligible"] = 1
|
||||
else if(isbrain(M))
|
||||
var/mob/living/carbon/brain/B = M
|
||||
race = "[B.species.name]"
|
||||
log.parameters["intelligible"] = 1
|
||||
else if(M.isMonkey())
|
||||
race = "Monkey"
|
||||
else if(M.isSilicon())
|
||||
race = "Artificial Life"
|
||||
log.parameters["intelligible"] = 1
|
||||
else if(isslime(M))
|
||||
race = "Slime"
|
||||
else if(isanimal(M))
|
||||
race = "Domestic Animal"
|
||||
|
||||
log.parameters["race"] = race
|
||||
|
||||
if(!istype(M, /mob/new_player) && M)
|
||||
log.parameters["uspeech"] = M.universal_speak
|
||||
|
||||
@@ -46,12 +46,11 @@
|
||||
|
||||
/obj/machinery/turretid/initialize()
|
||||
if(!control_area)
|
||||
var/area/CA = get_area(src)
|
||||
control_area = CA.master
|
||||
control_area = get_area(src)
|
||||
else if(istext(control_area))
|
||||
for(var/area/A in world)
|
||||
if(A.name && A.name==control_area)
|
||||
control_area = A.master
|
||||
control_area = A
|
||||
break
|
||||
|
||||
if(control_area)
|
||||
@@ -178,8 +177,7 @@
|
||||
TC.ailock = ailock
|
||||
|
||||
if(istype(control_area))
|
||||
for(var/area/sub_area in control_area.related)
|
||||
for (var/obj/machinery/porta_turret/aTurret in sub_area)
|
||||
for (var/obj/machinery/porta_turret/aTurret in control_area)
|
||||
aTurret.setState(TC)
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -13,9 +13,6 @@
|
||||
|
||||
/area/turret_protected/Entered(O)
|
||||
..()
|
||||
if( master && master != src )
|
||||
return master.Entered(O)
|
||||
|
||||
if( iscarbon(O) )
|
||||
turretTargets |= O
|
||||
else if( istype(O, /obj/mecha) )
|
||||
@@ -27,9 +24,6 @@
|
||||
return 1
|
||||
|
||||
/area/turret_protected/Exited(O)
|
||||
if( master && master != src )
|
||||
return master.Exited(O)
|
||||
|
||||
if( ismob(O) && !issilicon(O) )
|
||||
turretTargets -= O
|
||||
else if( istype(O, /obj/mecha) )
|
||||
@@ -151,8 +145,6 @@
|
||||
/obj/machinery/turret/proc/get_protected_area()
|
||||
var/area/turret_protected/TP = get_area(src)
|
||||
if(istype(TP))
|
||||
if(TP.master && TP.master != TP)
|
||||
TP = TP.master
|
||||
return TP
|
||||
return
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
/*if(istype(W,/obj/item/weapon/screwdriver))
|
||||
panel = !panel
|
||||
user << "\blue you [panel ? "open" : "close"] the [src]'s maintenance panel"*/
|
||||
if(istype(W,/obj/item/toy/crayon) ||istype(W,/obj/item/weapon/stamp))
|
||||
if(istype(W,/obj/item/weapon/pen/crayon) || istype(W,/obj/item/weapon/stamp))
|
||||
if( state in list( 1, 3, 6 ) )
|
||||
if(!crayon)
|
||||
user.drop_item()
|
||||
|
||||
@@ -772,7 +772,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
|
||||
@@ -819,13 +819,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
|
||||
|
||||
|
||||
|
||||
@@ -139,6 +139,7 @@
|
||||
anchored = 1
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "recharge_comp"
|
||||
light_color = "#a97faa"
|
||||
circuit = "/obj/item/weapon/circuitboard/mech_bay_power_console"
|
||||
var/autostart = 1
|
||||
var/voltage = 45
|
||||
|
||||
@@ -511,7 +511,7 @@
|
||||
src.updateUsrDialog()
|
||||
sleep(30) //only sleep if called by user
|
||||
var/found = 0
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in get_area(src))
|
||||
for(var/obj/machinery/computer/rdconsole/RDC in get_area_all_atoms(get_area(src)))
|
||||
if(!RDC.sync)
|
||||
continue
|
||||
found++
|
||||
|
||||
@@ -1004,8 +1004,8 @@
|
||||
set popup_menu = 0
|
||||
if(usr!=occupant) return
|
||||
lights = !lights
|
||||
if(lights) SetLuminosity(luminosity + lights_power)
|
||||
else SetLuminosity(luminosity - lights_power)
|
||||
if(lights) set_light(light_range + lights_power)
|
||||
else set_light(light_range - lights_power)
|
||||
src.occupant_message("Toggled lights [lights?"on":"off"].")
|
||||
log_message("Toggled lights [lights?"on":"off"].")
|
||||
return
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
name = "Exosuit Control"
|
||||
icon = 'icons/obj/computer.dmi'
|
||||
icon_state = "mecha"
|
||||
light_color = "#a97faa"
|
||||
req_access = list(access_robotics)
|
||||
circuit = "/obj/item/weapon/circuitboard/mecha_control"
|
||||
var/list/located = list()
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
name = "purple sac"
|
||||
desc = "Weird purple octopus-like thing."
|
||||
layer = 3
|
||||
luminosity = NODERANGE
|
||||
light_range = NODERANGE
|
||||
var/node_range = NODERANGE
|
||||
|
||||
/obj/effect/alien/weeds/node/New()
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
density = 0
|
||||
anchored = 1
|
||||
layer = 2
|
||||
luminosity = 1
|
||||
light_range = 1
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "greenglow"
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ steam.start() -- spawns the effect
|
||||
/obj/effect/effect/smoke/illumination/New(var/newloc, var/brightness=15, var/lifetime=10)
|
||||
time_to_live=lifetime
|
||||
..()
|
||||
SetLuminosity(brightness)
|
||||
set_light(brightness)
|
||||
|
||||
/////////////////////////////////////////////
|
||||
// Bad smoke
|
||||
|
||||
@@ -37,4 +37,4 @@
|
||||
name = "Bluespace"
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "bluespacify"
|
||||
layer = LIGHTING_LAYER
|
||||
layer = 10
|
||||
|
||||
@@ -68,8 +68,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
message_admins("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ([epicenter.x],[epicenter.y],[epicenter.z]) (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[epicenter.x];Y=[epicenter.y];Z=[epicenter.z]'>JMP</a>)")
|
||||
log_game("Explosion with size ([devastation_range], [heavy_impact_range], [light_impact_range]) in area [epicenter.loc.name] ")
|
||||
|
||||
var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
|
||||
lighting_controller.processing = 0
|
||||
// var/lighting_controller_was_processing = lighting_controller.processing //Pause the lighting updates for a bit
|
||||
// lighting_controller.processing = 0
|
||||
|
||||
|
||||
var/approximate_intensity = (devastation_range * 3) + (heavy_impact_range * 2) + light_impact_range
|
||||
@@ -87,8 +87,8 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
var/y0 = epicenter.y
|
||||
var/z0 = epicenter.z
|
||||
|
||||
for(var/turf/T in range(epicenter, max_range))
|
||||
var/dist = cheap_pythag(T.x - x0,T.y - y0)
|
||||
for(var/turf/T in trange(max_range, epicenter))
|
||||
var/dist = sqrt((T.x - x0)**2 + (T.y - y0)**2)
|
||||
|
||||
if(dist < devastation_range) dist = 1
|
||||
else if(dist < heavy_impact_range) dist = 2
|
||||
@@ -99,7 +99,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
if(T)
|
||||
for(var/atom_movable in T.contents) //bypass type checking since only atom/movable can be contained by turfs anyway
|
||||
var/atom/movable/AM = atom_movable
|
||||
if(AM) AM.ex_act(dist)
|
||||
if(AM && AM.simulated) AM.ex_act(dist)
|
||||
|
||||
var/took = (world.timeofday-start)/10
|
||||
//You need to press the DebugGame verb to see these now....they were getting annoying and we've collected a fair bit of data. Just -test- changes to explosion code using this please so we can compare
|
||||
@@ -113,7 +113,7 @@ proc/explosion(turf/epicenter, devastation_range, heavy_impact_range, light_impa
|
||||
|
||||
sleep(8)
|
||||
|
||||
if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
|
||||
// if(!lighting_controller.processing) lighting_controller.processing = lighting_controller_was_processing
|
||||
if(!powernet_rebuild_was_deferred_already && defer_powernet_rebuild)
|
||||
makepowernets()
|
||||
defer_powernet_rebuild = 0
|
||||
|
||||
@@ -76,7 +76,6 @@ move an amendment</a> to the drawing.</p>
|
||||
/obj/item/blueprints/proc/get_area()
|
||||
var/turf/T = get_turf(usr)
|
||||
var/area/A = T.loc
|
||||
A = A.master
|
||||
return A
|
||||
|
||||
/obj/item/blueprints/proc/get_area_type(var/area/A = get_area())
|
||||
@@ -122,7 +121,6 @@ move an amendment</a> to the drawing.</p>
|
||||
return
|
||||
var/area/A = new
|
||||
A.name = str
|
||||
A.tagbase = "[A.type]_[md5(str)]" // without this dynamic light system ruin everithing
|
||||
//var/ma
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
//world << "DEBUG: create_area: <br>A.name=[A.name]<br>A.tag=[A.tag]<br>A.master=[ma]"
|
||||
@@ -133,9 +131,6 @@ move an amendment</a> to the drawing.</p>
|
||||
move_turfs_to_area(turfs, A)
|
||||
|
||||
A.always_unpowered = 0
|
||||
for(var/turf/T in A.contents)
|
||||
T.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += T
|
||||
|
||||
spawn(5)
|
||||
//ma = A.master ? "[A.master]" : "(null)"
|
||||
@@ -161,8 +156,7 @@ move an amendment</a> to the drawing.</p>
|
||||
usr << "\red Text too long."
|
||||
return
|
||||
set_area_machinery_title(A,str,prevname)
|
||||
for(var/area/RA in A.related)
|
||||
RA.name = str
|
||||
A.name = str
|
||||
usr << "\blue You set the area '[prevname]' title to '[str]'."
|
||||
interact()
|
||||
return
|
||||
@@ -172,16 +166,16 @@ move an amendment</a> to the drawing.</p>
|
||||
/obj/item/blueprints/proc/set_area_machinery_title(var/area/A,var/title,var/oldtitle)
|
||||
if (!oldtitle) // or replacetext goes to infinite loop
|
||||
return
|
||||
for(var/area/RA in A.related)
|
||||
for(var/obj/machinery/alarm/M in RA)
|
||||
|
||||
for(var/obj/machinery/alarm/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/power/apc/M in RA)
|
||||
for(var/obj/machinery/power/apc/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in RA)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_scrubber/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/M in RA)
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
for(var/obj/machinery/door/M in RA)
|
||||
for(var/obj/machinery/door/M in A)
|
||||
M.name = replacetext(M.name,oldtitle,title)
|
||||
//TODO: much much more. Unnamed airlocks, cameras, etc.
|
||||
|
||||
|
||||
@@ -1,40 +1,40 @@
|
||||
/obj/item/toy/crayon/red
|
||||
/obj/item/weapon/pen/crayon/red
|
||||
icon_state = "crayonred"
|
||||
colour = "#DA0000"
|
||||
shadeColour = "#810C0C"
|
||||
colourName = "red"
|
||||
|
||||
/obj/item/toy/crayon/orange
|
||||
/obj/item/weapon/pen/crayon/orange
|
||||
icon_state = "crayonorange"
|
||||
colour = "#FF9300"
|
||||
shadeColour = "#A55403"
|
||||
colourName = "orange"
|
||||
|
||||
/obj/item/toy/crayon/yellow
|
||||
/obj/item/weapon/pen/crayon/yellow
|
||||
icon_state = "crayonyellow"
|
||||
colour = "#FFF200"
|
||||
shadeColour = "#886422"
|
||||
colourName = "yellow"
|
||||
|
||||
/obj/item/toy/crayon/green
|
||||
/obj/item/weapon/pen/crayon/green
|
||||
icon_state = "crayongreen"
|
||||
colour = "#A8E61D"
|
||||
shadeColour = "#61840F"
|
||||
colourName = "green"
|
||||
|
||||
/obj/item/toy/crayon/blue
|
||||
/obj/item/weapon/pen/crayon/blue
|
||||
icon_state = "crayonblue"
|
||||
colour = "#00B7EF"
|
||||
shadeColour = "#0082A8"
|
||||
colourName = "blue"
|
||||
|
||||
/obj/item/toy/crayon/purple
|
||||
/obj/item/weapon/pen/crayon/purple
|
||||
icon_state = "crayonpurple"
|
||||
colour = "#DA00FF"
|
||||
shadeColour = "#810CFF"
|
||||
colourName = "purple"
|
||||
|
||||
/obj/item/toy/crayon/mime
|
||||
/obj/item/weapon/pen/crayon/mime
|
||||
icon_state = "crayonmime"
|
||||
desc = "A very sad-looking crayon."
|
||||
colour = "#FFFFFF"
|
||||
@@ -42,7 +42,7 @@
|
||||
colourName = "mime"
|
||||
uses = 0
|
||||
|
||||
/obj/item/toy/crayon/mime/attack_self(mob/living/user as mob) //inversion
|
||||
/obj/item/weapon/pen/crayon/mime/attack_self(mob/living/user as mob) //inversion
|
||||
if(colour != "#FFFFFF" && shadeColour != "#000000")
|
||||
colour = "#FFFFFF"
|
||||
shadeColour = "#000000"
|
||||
@@ -53,19 +53,19 @@
|
||||
user << "You will now draw in black and white with this crayon."
|
||||
return
|
||||
|
||||
/obj/item/toy/crayon/rainbow
|
||||
/obj/item/weapon/pen/crayon/rainbow
|
||||
icon_state = "crayonrainbow"
|
||||
colour = "#FFF000"
|
||||
shadeColour = "#000FFF"
|
||||
colourName = "rainbow"
|
||||
uses = 0
|
||||
|
||||
/obj/item/toy/crayon/rainbow/attack_self(mob/living/user as mob)
|
||||
/obj/item/weapon/pen/crayon/rainbow/attack_self(mob/living/user as mob)
|
||||
colour = input(user, "Please select the main colour.", "Crayon colour") as color
|
||||
shadeColour = input(user, "Please select the shade colour.", "Crayon colour") as color
|
||||
return
|
||||
|
||||
/obj/item/toy/crayon/afterattack(atom/target, mob/user as mob, proximity)
|
||||
/obj/item/weapon/pen/crayon/afterattack(atom/target, mob/user as mob, proximity)
|
||||
if(!proximity) return
|
||||
if(istype(target,/turf/simulated/floor))
|
||||
var/drawtype = input("Choose what you'd like to draw.", "Crayon scribbles") in list("graffiti","rune","letter")
|
||||
@@ -88,7 +88,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/item/toy/crayon/attack(mob/M as mob, mob/user as mob)
|
||||
/obj/item/weapon/pen/crayon/attack(mob/M as mob, mob/user as mob)
|
||||
if(M == user)
|
||||
user << "You take a bite of the crayon and swallow it."
|
||||
user.nutrition += 1
|
||||
|
||||
@@ -308,15 +308,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
/*
|
||||
* The Actual PDA
|
||||
*/
|
||||
/obj/item/device/pda/pickup(mob/user)
|
||||
if(fon)
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(user.luminosity + f_lum)
|
||||
|
||||
/obj/item/device/pda/dropped(mob/user)
|
||||
if(fon)
|
||||
user.SetLuminosity(user.luminosity - f_lum)
|
||||
SetLuminosity(f_lum)
|
||||
|
||||
/obj/item/device/pda/New()
|
||||
..()
|
||||
@@ -644,12 +635,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
if("Light")
|
||||
if(fon)
|
||||
fon = 0
|
||||
if(src in U.contents) U.SetLuminosity(U.luminosity - f_lum)
|
||||
else SetLuminosity(0)
|
||||
set_light(0)
|
||||
else
|
||||
fon = 1
|
||||
if(src in U.contents) U.SetLuminosity(U.luminosity + f_lum)
|
||||
else SetLuminosity(f_lum)
|
||||
set_light(f_lum)
|
||||
if("Medical Scan")
|
||||
if(scanmode == 1)
|
||||
scanmode = 0
|
||||
|
||||
@@ -18,24 +18,17 @@
|
||||
..()
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
SetLuminosity(brightness_on)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/proc/update_brightness(var/mob/user = null)
|
||||
if(on)
|
||||
icon_state = "[initial(icon_state)]-on"
|
||||
if(loc == user)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
else if(isturf(loc))
|
||||
SetLuminosity(brightness_on)
|
||||
set_light(brightness_on)
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
if(loc == user)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
else if(isturf(loc))
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
|
||||
/obj/item/device/flashlight/attack_self(mob/user)
|
||||
if(!isturf(user.loc))
|
||||
@@ -88,19 +81,6 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pickup(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity + brightness_on)
|
||||
SetLuminosity(0)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/dropped(mob/user)
|
||||
if(on)
|
||||
user.SetLuminosity(user.luminosity - brightness_on)
|
||||
SetLuminosity(brightness_on)
|
||||
|
||||
|
||||
/obj/item/device/flashlight/pen
|
||||
name = "penlight"
|
||||
desc = "A pen-sized light, used by medical staff."
|
||||
@@ -217,7 +197,7 @@
|
||||
on = 1 //Bio-luminesence has one setting, on.
|
||||
|
||||
/obj/item/device/flashlight/slime/New()
|
||||
SetLuminosity(brightness_on)
|
||||
set_light(brightness_on)
|
||||
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
|
||||
update_brightness()
|
||||
icon_state = initial(icon_state)
|
||||
|
||||
@@ -140,7 +140,9 @@
|
||||
var/obj/item/weapon/light/L1 = new target.light_type(target.loc)
|
||||
L1.status = target.status
|
||||
L1.rigged = target.rigged
|
||||
L1.brightness = target.brightness
|
||||
L1.brightness_range = target.brightness_range
|
||||
L1.brightness_power = target.brightness_power
|
||||
L1.brightness_color = target.brightness_color
|
||||
L1.switchcount = target.switchcount
|
||||
target.switchcount = 0
|
||||
L1.update()
|
||||
@@ -153,7 +155,9 @@
|
||||
target.status = L2.status
|
||||
target.switchcount = L2.switchcount
|
||||
target.rigged = emagged
|
||||
target.brightness = L2.brightness
|
||||
target.brightness_range = L2.brightness_range
|
||||
target.brightness_power = L2.brightness_power
|
||||
target.brightness_color = L2.brightness_color
|
||||
target.on = target.has_power()
|
||||
target.update()
|
||||
qdel(L2)
|
||||
|
||||
@@ -14,16 +14,22 @@
|
||||
matter = list("metal" = 750,"waste" = 750)
|
||||
|
||||
origin_tech = "powerstorage=3;syndicate=5"
|
||||
var/drain_rate = 1000000 // amount of power to drain per tick
|
||||
var/dissipation_rate = 20000
|
||||
var/power_drained = 0 // has drained this much power
|
||||
var/max_power = 5e9 // maximum power that can be drained before exploding
|
||||
var/drain_rate = 1500000 // amount of power to drain per tick
|
||||
var/apc_drain_rate = 5000 // Max. amount drained from single APC. In Watts.
|
||||
var/dissipation_rate = 20000 // Passive dissipation of drained power. In Watts.
|
||||
var/power_drained = 0 // Amount of power drained.
|
||||
var/max_power = 5e9 // Detonation point.
|
||||
var/mode = 0 // 0 = off, 1=clamped (off), 2=operating
|
||||
var/drained_this_tick = 0 // This is unfortunately necessary to ensure we process powersinks BEFORE other machinery such as APCs.
|
||||
|
||||
|
||||
var/datum/powernet/PN // Our powernet
|
||||
var/obj/structure/cable/attached // the attached cable
|
||||
|
||||
attackby(var/obj/item/I, var/mob/user)
|
||||
/obj/item/device/powersink/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
..()
|
||||
|
||||
/obj/item/device/powersink/attackby(var/obj/item/I, var/mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(mode == 0)
|
||||
var/turf/T = loc
|
||||
@@ -35,10 +41,7 @@
|
||||
else
|
||||
anchored = 1
|
||||
mode = 1
|
||||
user << "You attach the device to the cable."
|
||||
for(var/mob/M in viewers(user))
|
||||
if(M == user) continue
|
||||
M << "[user] attaches the power sink to the cable."
|
||||
src.visible_message("<span class='notice'>[user] attaches [src] to the cable!</span>")
|
||||
return
|
||||
else
|
||||
user << "Device must be placed over an exposed cable to attach to it."
|
||||
@@ -48,54 +51,50 @@
|
||||
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
|
||||
anchored = 0
|
||||
mode = 0
|
||||
user << "You detach the device from the cable."
|
||||
for(var/mob/M in viewers(user))
|
||||
if(M == user) continue
|
||||
M << "[user] detaches the power sink from the cable."
|
||||
SetLuminosity(0)
|
||||
src.visible_message("<span class='notice'>[user] detaches [src] from the cable!</span>")
|
||||
set_light(0)
|
||||
icon_state = "powersink0"
|
||||
|
||||
return
|
||||
else
|
||||
..()
|
||||
|
||||
attack_ai()
|
||||
/obj/item/device/powersink/attack_ai()
|
||||
return
|
||||
|
||||
attack_hand(var/mob/user)
|
||||
/obj/item/device/powersink/attack_hand(var/mob/user)
|
||||
switch(mode)
|
||||
if(0)
|
||||
..()
|
||||
|
||||
if(1)
|
||||
user << "You activate the device!"
|
||||
for(var/mob/M in viewers(user))
|
||||
if(M == user) continue
|
||||
M << "[user] activates the power sink!"
|
||||
src.visible_message("<span class='notice'>[user] activates [src]!</span>")
|
||||
mode = 2
|
||||
icon_state = "powersink1"
|
||||
processing_objects.Add(src)
|
||||
|
||||
if(2) //This switch option wasn't originally included. It exists now. --NeoFite
|
||||
user << "You deactivate the device!"
|
||||
for(var/mob/M in viewers(user))
|
||||
if(M == user) continue
|
||||
M << "[user] deactivates the power sink!"
|
||||
src.visible_message("<span class='notice'>[user] deactivates [src]!</span>")
|
||||
mode = 1
|
||||
SetLuminosity(0)
|
||||
set_light(0)
|
||||
icon_state = "powersink0"
|
||||
processing_objects.Remove(src)
|
||||
|
||||
process()
|
||||
power_drained -= min(dissipation_rate, power_drained)
|
||||
if(attached)
|
||||
var/datum/powernet/PN = attached.get_powernet()
|
||||
if(PN)
|
||||
SetLuminosity(12)
|
||||
/obj/item/device/powersink/proc/drain()
|
||||
if(!attached)
|
||||
return
|
||||
|
||||
if(drained_this_tick)
|
||||
return
|
||||
drained_this_tick = 1
|
||||
|
||||
var/drained = 0
|
||||
|
||||
if(!PN)
|
||||
return
|
||||
|
||||
set_light(12)
|
||||
PN.trigger_warning()
|
||||
// found a powernet, so drain up to max power from it
|
||||
var/drained = PN.draw_power(drain_rate)
|
||||
|
||||
drained = PN.draw_power(drain_rate)
|
||||
// if tried to drain more than available on powernet
|
||||
// now look for APCs and drain their cells
|
||||
if(drained < drain_rate)
|
||||
@@ -107,15 +106,22 @@
|
||||
var/obj/machinery/power/apc/A = T.master
|
||||
if(A.operating && A.cell)
|
||||
var/cur_charge = A.cell.charge / CELLRATE
|
||||
var/drain_val = min(2000, cur_charge)
|
||||
|
||||
var/drain_val = min(apc_drain_rate, cur_charge)
|
||||
A.cell.use(drain_val * CELLRATE)
|
||||
drained += drain_val
|
||||
power_drained += drained
|
||||
|
||||
|
||||
/obj/item/device/powersink/process()
|
||||
drained_this_tick = 0
|
||||
power_drained -= min(dissipation_rate, power_drained)
|
||||
if(power_drained > max_power * 0.95)
|
||||
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
|
||||
if(power_drained >= max_power)
|
||||
processing_objects.Remove(src)
|
||||
explosion(src.loc, 3,6,9,12)
|
||||
qdel(src)
|
||||
return
|
||||
if(attached && attached.powernet)
|
||||
PN = attached.powernet
|
||||
else
|
||||
PN = null
|
||||
|
||||
@@ -58,10 +58,10 @@
|
||||
on = 0
|
||||
else
|
||||
var/area/A = src.loc.loc
|
||||
if(!A || !isarea(A) || !A.master)
|
||||
if(!A || !isarea(A))
|
||||
on = 0
|
||||
else
|
||||
on = A.master.powered(EQUIP) // set "on" to the power status
|
||||
on = A.powered(EQUIP) // set "on" to the power status
|
||||
|
||||
if(!on)
|
||||
icon_state = "intercom-p"
|
||||
|
||||
@@ -35,9 +35,6 @@
|
||||
|
||||
R.notify_ai(ROBOT_NOTIFICATION_MODULE_RESET, R.module.name)
|
||||
R.module.Reset(R)
|
||||
qdel(R.module)
|
||||
R.module = null
|
||||
|
||||
R.updatename("Default")
|
||||
|
||||
return 1
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
* Toy swords
|
||||
* Toy bosun's whistle
|
||||
* Toy mechs
|
||||
* Crayons
|
||||
* Snap pops
|
||||
* Water flower
|
||||
* Therapy dolls
|
||||
@@ -375,31 +374,6 @@
|
||||
w_class = 3
|
||||
attack_verb = list("attacked", "slashed", "stabbed", "sliced")
|
||||
|
||||
/*
|
||||
* Crayons
|
||||
*/
|
||||
|
||||
/obj/item/toy/crayon
|
||||
name = "crayon"
|
||||
desc = "A colourful crayon. Please refrain from eating it or putting it in your nose."
|
||||
icon = 'icons/obj/crayons.dmi'
|
||||
icon_state = "crayonred"
|
||||
w_class = 1.0
|
||||
attack_verb = list("attacked", "coloured")
|
||||
var/colour = "#FF0000" //RGB
|
||||
var/shadeColour = "#220000" //RGB
|
||||
var/uses = 30 //0 for unlimited uses
|
||||
var/instant = 0
|
||||
var/colourName = "red" //for updateIcon purposes
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "\red <b>[user] is jamming the [src.name] up \his nose and into \his brain. It looks like \he's trying to commit suicide.</b>"
|
||||
return (BRUTELOSS|OXYLOSS)
|
||||
|
||||
New()
|
||||
name = "[colourName] crayon"
|
||||
..()
|
||||
|
||||
/*
|
||||
* Snap pops
|
||||
*/
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
//src.damtype = "fire"
|
||||
for(var/mob/O in viewers(usr, null))
|
||||
O.show_message(flavor_text, 1)
|
||||
SetLuminosity(CANDLE_LUM)
|
||||
set_light(CANDLE_LUM)
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
@@ -66,22 +66,8 @@
|
||||
var/turf/T = loc
|
||||
T.hotspot_expose(700, 5)
|
||||
|
||||
|
||||
/obj/item/weapon/flame/candle/attack_self(mob/user as mob)
|
||||
if(lit)
|
||||
lit = 0
|
||||
update_icon()
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(user.luminosity - CANDLE_LUM)
|
||||
|
||||
|
||||
/obj/item/weapon/flame/candle/pickup(mob/user)
|
||||
if(lit)
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(user.luminosity + CANDLE_LUM)
|
||||
|
||||
|
||||
/obj/item/weapon/flame/candle/dropped(mob/user)
|
||||
if(lit)
|
||||
user.SetLuminosity(user.luminosity - CANDLE_LUM)
|
||||
SetLuminosity(CANDLE_LUM)
|
||||
set_light(0)
|
||||
|
||||
@@ -293,3 +293,11 @@
|
||||
New()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/card/id/centcom/ERT
|
||||
name = "\improper Emergency Response Team ID"
|
||||
assignment = "Emergency Response Team"
|
||||
|
||||
/obj/item/weapon/card/id/centcom/ERT/New()
|
||||
..()
|
||||
access += get_all_accesses()
|
||||
|
||||
@@ -456,7 +456,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.apply_damage(2,BURN,"r_hand")
|
||||
user.visible_message("<span class='notice'>After a few attempts, [user] manages to light the [src], they however burn their finger in the process.</span>")
|
||||
|
||||
user.SetLuminosity(user.luminosity + 2)
|
||||
set_light(2)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
lit = 0
|
||||
@@ -467,7 +467,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] quietly shuts off the [src].")
|
||||
|
||||
user.SetLuminosity(user.luminosity - 2)
|
||||
set_light(0)
|
||||
processing_objects.Remove(src)
|
||||
else
|
||||
return ..()
|
||||
@@ -496,17 +496,3 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(location)
|
||||
location.hotspot_expose(700, 5)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/flame/lighter/pickup(mob/user)
|
||||
if(lit)
|
||||
SetLuminosity(0)
|
||||
user.SetLuminosity(user.luminosity+2)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/flame/lighter/dropped(mob/user)
|
||||
if(lit)
|
||||
user.SetLuminosity(user.luminosity-2)
|
||||
SetLuminosity(2)
|
||||
return
|
||||
|
||||
@@ -57,10 +57,18 @@
|
||||
name = T_BOARD("employment records console")
|
||||
build_path = /obj/machinery/computer/skills
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert
|
||||
name = T_BOARD("station alert console")
|
||||
/obj/item/weapon/circuitboard/stationalert_engineering
|
||||
name = T_BOARD("station alert console (engineering)")
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert_security
|
||||
name = T_BOARD("station alert console (security)")
|
||||
build_path = /obj/machinery/computer/station_alert
|
||||
|
||||
/obj/item/weapon/circuitboard/stationalert_all
|
||||
name = T_BOARD("station alert console (all)")
|
||||
build_path = /obj/machinery/computer/station_alert/all
|
||||
|
||||
/obj/item/weapon/circuitboard/atmos_alert
|
||||
name = T_BOARD("atmospheric alert console")
|
||||
build_path = /obj/machinery/computer/atmos_alert
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user