Glorious /vg/ Lighting Port (#66)

* fuck

* [CANT WAKE UP]

* AAAAAAAAAHHHHHHHHHHHH

* SAAAAVE MEEEEEEEEEEEEEEEE

* this is so bad how can i even call myself a coder

* thanks fam

* hello darkness my old friend

i've come to talk with you again

* ugh go away

* OH

* much less broken

* ayy

* aaaaa

* OH YEAAAAAAAAHHHHHHHHHHH

* aaaa

* k

* dfgjtxkytkjyd

* debug

* dangerously cheesy

* mm

* OH YEAAAAAAAAAAAAAAAAAAAAAAAAAA

* oH YEAH

* Some final touches and cleanup of the lighting port.

* One more

* More fixes.

* varedit hack for easy modification

* fixed

* C O L O R

* slym

* fffff

* oh great what the fuck is wrong now

* Revert "oh great what the fuck is wrong now"

This reverts commit e589ad51facb5464e107ca515317d41136dd1e5e.

* fu

* will it blend

* aaaaaaaaaaaaaaaaaaaa

* this is why im bad at porting

falalalala, lala la la

* k

* yeh

* can't forget majestic fire
This commit is contained in:
L.E.D
2016-11-06 09:51:16 -05:00
committed by TalkingCactus
parent 9b07cb4798
commit e1956df149
141 changed files with 1508 additions and 958 deletions
+79
View File
@@ -0,0 +1,79 @@
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
#define DYNAMIC_LIGHTING_IFSTARLIGHT 2 //dynamic lighting enabled only if starlight is.
#define IS_DYNAMIC_LIGHTING(A) ( A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.dynamic_lighting )
//Bay lighting engine shit, not in /code/modules/lighting because BYOND is being shit about it
#define LIGHTING_INTERVAL 5 // frequency, in 1/10ths of a second, of the lighting process
#ifndef LIGHTING_INSTANT_UPDATES
#define LIGHTING_INTERVAL 5 // Frequency, in 1/10ths of a second, of the lighting process.
#include "../controllers/subsystem/lighting.dm"
#endif
#define LIGHTING_FALLOFF 1 // type of falloff to use for lighting; 1 for circular, 2 for square
#define LIGHTING_LAMBERTIAN 0 // use lambertian shading for light sources
#define LIGHTING_HEIGHT 1 // height off the ground of light sources on the pseudo-z-axis, you should probably leave this alone
#define LIGHTING_ROUND_VALUE 1 / 128 //Value used to round lumcounts, values smaller than 1/255 don't matter (if they do, thanks sinking points), greater values will make lighting less precise, but in turn increase performance, VERY SLIGHTLY.
#define LIGHTING_ICON 'icons/effects/lighting_overlay.png' // icon used for lighting shading effects
#define LIGHTING_SOFT_THRESHOLD 0.05 // If the max of the lighting lumcounts of each spectrum drops below this, disable luminosity on the lighting overlays.
// If I were you I'd leave this alone.
#define LIGHTING_BASE_MATRIX \
list \
( \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, LIGHTING_SOFT_THRESHOLD, 0, \
0, 0, 0, 1 \
) \
// Helpers so we can (more easily) control the colour matrices.
#define CL_MATRIX_RR 1
#define CL_MATRIX_RG 2
#define CL_MATRIX_RB 3
#define CL_MATRIX_RA 4
#define CL_MATRIX_GR 5
#define CL_MATRIX_GG 6
#define CL_MATRIX_GB 7
#define CL_MATRIX_GA 8
#define CL_MATRIX_BR 9
#define CL_MATRIX_BG 10
#define CL_MATRIX_BB 11
#define CL_MATRIX_BA 12
#define CL_MATRIX_AR 13
#define CL_MATRIX_AG 14
#define CL_MATRIX_AB 15
#define CL_MATRIX_AA 16
#define CL_MATRIX_CR 17
#define CL_MATRIX_CG 18
#define CL_MATRIX_CB 19
#define CL_MATRIX_CA 20
//Some defines to generalise colours used in lighting.
//Important note on colors. Colors can end up significantly different from the basic html picture, especially when saturated
#define LIGHT_COLOR_RED "#FA8282" //Warm but extremely diluted red. rgb(250, 130, 130)
#define LIGHT_COLOR_GREEN "#64C864" //Bright but quickly dissipating neon green. rgb(100, 200, 100)
#define LIGHT_COLOR_BLUE "#6496FA" //Cold, diluted blue. rgb(100, 150, 250)
#define LIGHT_COLOR_CYAN "#7DE1E1" //Diluted cyan. rgb(125, 225, 225)
#define LIGHT_COLOR_PINK "#E17DE1" //Diluted, mid-warmth pink. rgb(225, 125, 225)
#define LIGHT_COLOR_YELLOW "#E1E17D" //Dimmed yellow, leaning kaki. rgb(225, 225, 125)
#define LIGHT_COLOR_BROWN "#966432" //Clear brown, mostly dim. rgb(150, 100, 50)
#define LIGHT_COLOR_ORANGE "#FA9632" //Mostly pure orange. rgb(250, 150, 50)
//These ones aren't a direct colour like the ones above, because nothing would fit
#define LIGHT_COLOR_FIRE "#FAA019" //Warm orange color, leaning strongly towards yellow. rgb(250, 160, 25)
#define LIGHT_COLOR_FLARE "#FA644B" //Bright, non-saturated red. Leaning slightly towards pink for visibility. rgb(250, 100, 75)
#define LIGHT_COLOR_SLIME_LAMP "#AFC84B" //Weird color, between yellow and green, very slimy. rgb(175, 200, 75)
#define LIGHT_COLOR_TUNGSTEN "#FAE1AF" //Extremely diluted yellow, close to skin color (for some reason). rgb(250, 225, 175)
#define LIGHT_COLOR_HALOGEN "#F0FAFA" //Barely visible cyan-ish hue, as the doctor prescribed. rgb(240, 250, 250)
#define FOR_DVIEW(type, range, center, invis_flags) \
dview_mob.forceMove(center); \
dview_mob.see_invisible = invis_flags; \
for(type in view(range, dview_mob))
-8
View File
@@ -307,14 +307,6 @@ var/list/bloody_footprints_cache = list()
#define POLLTYPE_MULTI "MULTICHOICE"
#define POLLTYPE_IRV "IRV"
//lighting area defines
#define DYNAMIC_LIGHTING_DISABLED 0 //dynamic lighting disabled (area stays at full brightness)
#define DYNAMIC_LIGHTING_ENABLED 1 //dynamic lighting enabled
#define DYNAMIC_LIGHTING_IFSTARLIGHT 2 //dynamic lighting enabled only if starlight is.
#define IS_DYNAMIC_LIGHTING(A) ( A.lighting_use_dynamic == DYNAMIC_LIGHTING_IFSTARLIGHT ? config.starlight : A.lighting_use_dynamic )
//subtypesof(), typesof() without the parent path
#define subtypesof(typepath) ( typesof(typepath) - typepath )
+1
View File
@@ -21,6 +21,7 @@ var/list/sqrtTable = list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4,
return -round(-x / y) * y
#define Clamp(CLVALUE,CLMIN,CLMAX) ( max( (CLMIN), min((CLVALUE), (CLMAX)) ) )
#define CLAMP01(x) (Clamp(x,0,1))
// cotangent
/proc/Cot(x)
+11
View File
@@ -574,6 +574,17 @@ for(var/t in test_times)
var/B = hex2num(copytext(A,6,0))
return R+G+B
//get just one color
/proc/GetRedPart(A)
return hex2num(copytext(A,2,4))
/proc/GetGreenPart(A)
return hex2num(copytext(A,4,6))
/proc/GetBluePart(A)
return hex2num(copytext(A,6,0))
//Converts a positive interger to its roman numeral equivilent. Ignores any decimals.
//Numbers over 3999 will display with extra "M"s (don't tell the Romans) and can get comically long, so be careful.
/proc/num2roman(A)
+35
View File
@@ -359,6 +359,41 @@ Turf and target are seperate in case you want to teleport some distance from a t
moblist.Add(M)
return moblist
/var/mob/dview/dview_mob = new
//Version of view() which ignores darkness, because BYOND doesn't have it (I actually suggested it but it was tagged redundant, BUT HEARERS IS A T- /rant).
/proc/dview(var/range = world.view, var/center, var/invis_flags = 0)
if(!center)
return
dview_mob.forceMove(center)
dview_mob.see_invisible = invis_flags
. = view(range, dview_mob)
dview_mob.forceMove(null)
/mob/dview
invisibility = 101
density = 0
see_in_dark = 1e6
anchored = 1
// Finds ALL mobs on turfs in line of sight. Similar to "in dview", but catches mobs that are not on a turf (e.g. inside a locker or such).
/proc/get_all_mobs_in_dview(var/turf/T, var/range = world.view, var/list/ignore_types = list())
. = list()
var/list/can_see = dview(range, T)
for(var/mob/M in can_see)
if(is_type_in_list(M, ignore_types))
continue
. += M
for(var/mob/M in mob_list) //Got the ones in vision, now let's go for the ones not on a turf.
if(M.z == 0) //Mobs not on a turf will have XYZ = 0,0,0. They also won't show up in dview() so we're not checking anything twice.
if(is_type_in_list(M, ignore_types))
continue
if(get_turf(M) in can_see) //Checking the mob's turf now, since those are it's "true" coordinates (plus dview() did pick up on turfs, so we can check using that).
. += M
//E = MC^2
/proc/convert2energy(M)
var/E = M*(SPEED_OF_LIGHT_SQ)
+1 -1
View File
@@ -262,7 +262,7 @@
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You clean \the [target.name].</span>"
target.color = initial(target.color)
target.SetOpacity(initial(target.opacity))
target.set_opacity(initial(target.opacity))
else
user.visible_message("[user] begins to lick \the [target.name] clean...", "<span class='notice'>You begin to lick \the [target.name] clean...</span>")
if(do_after(user, src.cleanspeed, target = target))
-1
View File
@@ -161,4 +161,3 @@
if (edited_var == "can_fire" && can_fire)
next_fire = world.time + wait
..()
+43 -94
View File
@@ -1,116 +1,65 @@
var/datum/subsystem/lighting/SSlighting
#define SSLIGHTING_LIGHTS 1
#define SSLIGHTING_TURFS 2
/var/list/lighting_update_lights = list() // List of lighting sources queued for update.
/var/list/lighting_update_corners = list() // List of lighting corners queued for update.
/var/list/lighting_update_overlays = list() // List of lighting overlays queued for update.
/var/list/lighting_update_lights_old = list() // List of lighting sources currently being updated.
/var/list/lighting_update_corners_old = list() // List of lighting corners currently being updated.
/var/list/lighting_update_overlays_old = list() // List of lighting overlays currently being updated.
/datum/subsystem/lighting
name = "Lighting"
name = "lighting"
init_order = 1
wait = 1
flags = SS_POST_FIRE_TIMING
priority = 40
wait = 2
display_order = 5
var/list/changed_lights = list() //list of all datum/light_source that need updating
var/changed_lights_workload = 0 //stats on the largest number of lights (max changed_lights.len)
var/list/changed_turfs = list() //list of all turfs which may have a different light level
var/changed_turfs_workload = 0 //stats on the largest number of turfs changed (max changed_turfs.len)
priority = 40
flags = SS_POST_FIRE_TIMING
/datum/subsystem/lighting/New()
NEW_SS_GLOBAL(SSlighting)
return ..()
/datum/subsystem/lighting/stat_entry()
..("L:[round(changed_lights_workload,1)]|T:[round(changed_turfs_workload,1)]")
//Workhorse of lighting. It cycles through each light that needs updating. It updates their
//effects and then processes every turf in the queue, updating their lighting object's appearance
//Any light that returns 1 in check() deletes itself
//By using queues we are ensuring we don't perform more updates than are necessary
/datum/subsystem/lighting/fire(resumed = 0)
var/ticklimit = CURRENT_TICKLIMIT
//split our tick allotment in half so we don't spend it all on lightshift checks
CURRENT_TICKLIMIT = world.tick_usage + ((ticklimit-world.tick_usage)/2)
var/list/changed_lights = src.changed_lights
if (!resumed)
changed_lights_workload = MC_AVERAGE(changed_lights_workload, changed_lights.len)
var/i = 1
while (i <= changed_lights.len)
var/datum/light_source/LS = changed_lights[i++]
LS.check()
if (MC_TICK_CHECK)
break
if (i > 1)
changed_lights.Cut(1,i)
CURRENT_TICKLIMIT = ticklimit
var/list/changed_turfs = src.changed_turfs
if (!resumed)
changed_turfs_workload = MC_AVERAGE(changed_turfs_workload, changed_turfs.len)
i = 1
while (i <= changed_turfs.len)
var/turf/T = changed_turfs[i++]
if(T.lighting_changed)
T.redraw_lighting()
if (MC_TICK_CHECK)
break
if (i > 1)
changed_turfs.Cut(1,i)
//same as above except it attempts to shift ALL turfs in the world regardless of lighting_changed status
/datum/subsystem/lighting/Initialize(timeofday)
var/list/turfs_to_init = block(locate(1, 1, 1), locate(world.maxx, world.maxy, world.maxz))
/datum/subsystem/lighting/Initialize()
if (config.starlight)
for(var/area/A in world)
if (A.lighting_use_dynamic == DYNAMIC_LIGHTING_IFSTARLIGHT)
if (A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
A.luminosity = 0
for(var/thing in changed_lights)
var/datum/light_source/LS = thing
LS.check()
changed_lights.Cut()
create_all_lighting_overlays()
for(var/thing in turfs_to_init)
var/turf/T = thing
T.init_lighting()
changed_turfs.Cut()
/datum/subsystem/lighting/fire()
..()
lighting_update_lights_old = lighting_update_lights //We use a different list so any additions to the update lists during a delay from scheck() don't cause things to be cut from the list without being updated.
lighting_update_lights = list()
for(var/datum/light_source/L in lighting_update_lights_old)
//Used to strip valid information from an existing instance and transfer it to the replacement. i.e. when a crash occurs
//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/subsystem/lighting/Recover()
if(!istype(SSlighting.changed_turfs))
SSlighting.changed_turfs = list()
if(!istype(SSlighting.changed_lights))
SSlighting.changed_lights = list()
if(L.check() || L.destroyed || L.force_update)
L.remove_lum()
if(!L.destroyed)
L.apply_lum()
for(var/thing in SSlighting.changed_lights)
var/datum/light_source/LS = thing
spawn(-1) //so we don't crash the loop (inefficient)
LS.check()
else if(L.vis_update) //We smartly update only tiles that became (in) visible to use.
L.smart_vis_update()
for(var/thing in changed_turfs)
var/turf/T = thing
if(T.lighting_changed)
spawn(-1)
T.redraw_lighting()
L.vis_update = FALSE
L.force_update = FALSE
L.needs_update = FALSE
var/msg = "## DEBUG: [time2text(world.timeofday)] [name] subsystem restarted. Reports:\n"
for(var/varname in SSlighting.vars)
switch(varname)
if("tag","bestF","type","parent_type","vars")
continue
else
var/varval1 = SSlighting.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
lighting_update_corners_old = lighting_update_corners //Same as above.
lighting_update_corners = list()
for(var/A in lighting_update_corners_old)
var/datum/lighting_corner/C = A
C.update_overlays()
C.needs_update = FALSE
lighting_update_overlays_old = lighting_update_overlays //Same as above.
lighting_update_overlays = list()
for(var/atom/movable/lighting_overlay/O in lighting_update_overlays_old)
O.update_overlay()
O.needs_update = 0
+11 -11
View File
@@ -98,7 +98,7 @@ var/list/teleportlocs = list()
icon_state = "space"
requires_power = 1
always_unpowered = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
power_light = 0
power_equip = 0
power_environ = 0
@@ -109,7 +109,7 @@ var/list/teleportlocs = list()
/area/space/nearstation
icon_state = "space_near"
lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
//These are shuttle areas; all subtypes are only used as teleportation markers, they have no actual function beyond that.
@@ -117,7 +117,7 @@ var/list/teleportlocs = list()
name = "Shuttle"
requires_power = 0
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
has_gravity = 1
valid_territory = 0
icon_state = "shuttle"
@@ -166,7 +166,7 @@ var/list/teleportlocs = list()
icon_state = "start"
requires_power = 0
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
has_gravity = 1
// CENTCOM
@@ -237,7 +237,7 @@ var/list/teleportlocs = list()
/area/asteroid/artifactroom/New()
..()
SetDynamicLighting()
dynamic_lighting = TRUE
/area/planet/clown
name = "Clown Planet"
@@ -656,7 +656,7 @@ var/list/teleportlocs = list()
/area/solar
requires_power = 0
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
valid_territory = 0
/area/solar/auxport
@@ -1239,25 +1239,25 @@ var/list/teleportlocs = list()
name = "AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/turret_protected/AIsatextFS
name = "AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/turret_protected/AIsatextAS
name = "AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/turret_protected/AIsatextAP
name = "AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_IFSTARLIGHT
dynamic_lighting = DYNAMIC_LIGHTING_IFSTARLIGHT
/area/turret_protected/NewAIMain
name = "AI Main New"
@@ -1380,7 +1380,7 @@ var/list/teleportlocs = list()
name = "Beach"
icon_state = "away"
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
requires_power = 0
has_gravity = 1
ambientsounds = list('sound/ambience/shore.ogg', 'sound/ambience/seag1.ogg','sound/ambience/seag2.ogg','sound/ambience/seag2.ogg')
+2 -2
View File
@@ -39,8 +39,8 @@
power_equip = 1
power_environ = 1
if (lighting_use_dynamic != DYNAMIC_LIGHTING_IFSTARLIGHT)
lighting_use_dynamic = DYNAMIC_LIGHTING_DISABLED
if (dynamic_lighting != DYNAMIC_LIGHTING_IFSTARLIGHT)
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
..()
+6
View File
@@ -339,6 +339,12 @@ var/list/blood_splatter_icons = list()
/atom/proc/wash_cream()
return 1
/atom/proc/change_area(var/area/oldarea, var/area/newarea)
change_area_name(oldarea.name, newarea.name)
/atom/proc/change_area_name(var/oldname, var/newname)
name = replacetext(name,oldname,newname)
/atom/proc/get_global_map_pos()
if(!islist(global_map) || isemptylist(global_map)) return
var/cur_x = null
+1 -1
View File
@@ -366,4 +366,4 @@
//called when a mob resists while inside a container that is itself inside something.
/atom/movable/proc/relay_container_resist(mob/living/user, obj/O)
return
return
@@ -400,9 +400,9 @@
/obj/structure/clockwork/powered/interdiction_lens/toggle(fast_process, mob/living/user)
..()
if(active)
SetLuminosity(4,2)
set_light(4,2)
else
SetLuminosity(0)
set_light(0)
/obj/structure/clockwork/powered/interdiction_lens/attack_hand(mob/living/user)
if(user.canUseTopic(src, BE_CLOSE))
@@ -519,7 +519,7 @@
recharging = world.time + recharge_time
flick("interdiction_lens_discharged", src)
icon_state = "interdiction_lens_inactive"
SetLuminosity(2,1)
set_light(2,1)
disabled = TRUE
+2 -2
View File
@@ -52,7 +52,7 @@
/mob/living/simple_animal/hostile/clockwork/fragment/New()
..()
SetLuminosity(2,1)
set_light(2,1)
if(prob(1))
name = "anime fragment"
real_name = name
@@ -128,7 +128,7 @@
..()
combattimer = 0
true_name = pick(possible_true_names)
SetLuminosity(2,1)
set_light(2,1)
/mob/living/simple_animal/hostile/clockwork/marauder/Life()
..()
@@ -156,7 +156,7 @@
..()
START_PROCESSING(SSobj, src)
clockwork_caches++
SetLuminosity(2,1)
set_light(2,1)
/obj/structure/clockwork/cache/Destroy()
clockwork_caches--
@@ -755,7 +755,7 @@
/obj/effect/clockwork/sigil/submission/New()
..()
SetLuminosity(glow_light,glow_falloff)
set_light(glow_light,glow_falloff)
/obj/effect/clockwork/sigil/submission/proc/post_channel(mob/living/L)
+3 -3
View File
@@ -19,7 +19,7 @@
/obj/machinery/dominator/New()
..()
SetLuminosity(2)
set_light(2)
poi_list |= src
spark_system = new
spark_system.set_up(5, 1, src)
@@ -113,7 +113,7 @@
gang.message_gangtools("Hostile takeover cancelled: Dominator is no longer operational.[gang.dom_attempts ? " You have [gang.dom_attempts] attempt remaining." : " The station network will have likely blocked any more attempts by us."]",1,1)
SetLuminosity(0)
set_light(0)
icon_state = "dominator-broken"
cut_overlays()
operating = 0
@@ -201,7 +201,7 @@
countdown.text_color = gang.color_hex
countdown.start()
SetLuminosity(3)
set_light(3)
START_PROCESSING(SSmachine, src)
gang.message_gangtools("Hostile takeover in progress: Estimated [time] minutes until victory.[gang.dom_attempts ? "" : " This is your final attempt."]")
@@ -549,9 +549,9 @@
/mob/living/simple_animal/hostile/swarmer/proc/ToggleLight()
if(!luminosity)
SetLuminosity(3)
set_light(3)
else
SetLuminosity(0)
set_light(0)
/mob/living/simple_animal/hostile/swarmer/proc/ContactSwarmers()
var/message = input(src, "Announce to other swarmers", "Swarmer contact")
+5
View File
@@ -13,6 +13,10 @@
density = FALSE
anchored = TRUE
state_open = TRUE
use_auto_lights = 1
light_power_on = 1
light_range_on = 3
light_color = LIGHT_COLOR_HALOGEN
var/efficiency = 1
var/min_health = -25
var/list/available_chems
@@ -24,6 +28,7 @@
list("omnizine")
)
/obj/machinery/sleeper/New()
..()
var/obj/item/weapon/circuitboard/machine/B = new /obj/item/weapon/circuitboard/machine/sleeper(null)
@@ -9,6 +9,11 @@ var/list/announcement_systems = list()
icon_state = "AAS_On"
var/obj/item/device/radio/headset/radio
use_auto_lights = 1
light_power_on = 1
light_range_on = 2
light_color = LIGHT_COLOR_BLUE
verb_say = "coldly states"
verb_ask = "queries"
verb_exclaim = "alarms"
+5
View File
@@ -8,6 +8,11 @@
icon_state = "autolathe"
density = 1
use_auto_lights = 1
light_power_on = 1
light_range_on = 3
light_color = LIGHT_COLOR_CYAN
var/operating = 0
anchored = 1
var/list/L = list()
+4 -4
View File
@@ -83,7 +83,7 @@
network = list()
cameranet.removeCamera(src)
stat |= EMPED
SetLuminosity(0)
set_light(0)
emped = emped+1 //Increase the number of consecutive EMP's
update_icon()
var/thisemp = emped //Take note of which EMP this proc is for
@@ -274,7 +274,7 @@
if(can_use())
cameranet.addCamera(src)
else
SetLuminosity(0)
set_light(0)
cameranet.removeCamera(src)
cameranet.updateChunk(x, y, z)
var/change_msg = "deactivates"
@@ -385,9 +385,9 @@
if(cam == src)
return
if(on)
src.SetLuminosity(AI_CAMERA_LUMINOSITY)
src.set_light(AI_CAMERA_LUMINOSITY)
else
src.SetLuminosity(0)
src.set_light(0)
/obj/machinery/camera/bullet_act(obj/item/projectile/P)
. = ..()
+2 -1
View File
@@ -6,6 +6,7 @@
circuit = /obj/item/weapon/circuitboard/computer/operating
var/mob/living/carbon/human/patient = null
var/obj/structure/table/optable/table = null
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/New()
@@ -66,4 +67,4 @@
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
dat += "Next step: [capitalize(surgery_step.name)]<BR>"
dat += "</div>"
return dat
return dat
+2 -1
View File
@@ -7,6 +7,7 @@
circuit = /obj/item/weapon/circuitboard/computer/aifixer
icon_keyboard = "tech_key"
icon_screen = "ai-fixer"
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/aifixer/attackby(obj/I, mob/user, params)
if(occupier && istype(I, /obj/item/weapon/screwdriver))
@@ -144,4 +145,4 @@
else if (active)
user << "<span class='boldannounce'>ERROR</span>: Reconstruction in progress."
else if (!occupier)
user << "<span class='boldannounce'>ERROR</span>: Unable to locate artificial intelligence."
user << "<span class='boldannounce'>ERROR</span>: Unable to locate artificial intelligence."
+2
View File
@@ -5,6 +5,8 @@
icon_keyboard = null
icon_screen = "invaders"
clockwork = TRUE //it'd look weird
light_color = LIGHT_COLOR_GREEN
light_range_on = 2
var/list/prizes = list(
/obj/item/weapon/storage/box/snappops = 2,
/obj/item/toy/talking/AI = 2,
+2 -1
View File
@@ -8,6 +8,7 @@
var/list/minor_alarms = list()
var/receive_frequency = 1437
var/datum/radio_frequency/radio_connection
light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/atmos_alert/initialize()
..()
@@ -82,4 +83,4 @@
if(priority_alarms.len)
add_overlay("alert:2")
else if(minor_alarms.len)
add_overlay("alert:1")
add_overlay("alert:1")
@@ -69,6 +69,7 @@
icon_screen = "tank"
icon_keyboard = "atmos_key"
circuit = /obj/item/weapon/circuitboard/computer/atmos_control
light_color = LIGHT_COLOR_CYAN
var/frequency = 1441
var/list/sensors = list(
+3
View File
@@ -8,6 +8,8 @@
var/list/network = list("SS13")
var/mapping = 0//For the overview file, interesting bit of code.
var/list/watchers = list() //who's using the console, associated with the camera they're on.
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/security/check_eye(mob/user)
if( (stat & (NOPOWER|BROKEN)) || user.incapacitated() || user.eye_blind )
@@ -147,6 +149,7 @@
density = 0
circuit = null
clockwork = TRUE //it'd look very weird
use_auto_lights = 0
/obj/machinery/computer/security/telescreen/update_icon()
icon_state = initial(icon_state)
+4
View File
@@ -19,6 +19,7 @@ var/time_last_changed_position = 0
var/list/region_access = null
var/list/head_subordinates = null
var/target_dept = 0 //Which department this computer has access to. 0=all departments
light_color = LIGHT_COLOR_BLUE
//Cooldown for closing positions in seconds
//if set to -1: No cooldown... probably a bad idea
@@ -505,6 +506,7 @@ var/time_last_changed_position = 0
/obj/machinery/computer/card/minor/hos
target_dept = 2
icon_screen = "idhos"
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/card/minor/cmo
target_dept = 3
@@ -513,7 +515,9 @@ var/time_last_changed_position = 0
/obj/machinery/computer/card/minor/rd
target_dept = 4
icon_screen = "idrd"
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/card/minor/ce
target_dept = 5
icon_screen = "idce"
light_color = LIGHT_COLOR_ORANGE
+1
View File
@@ -17,6 +17,7 @@
var/obj/item/weapon/disk/data/diskette = null //Mostly so the geneticist can steal everything.
var/loading = 0 // Nice loading text
var/autoprocess = 0
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/cloning/New()
..()
@@ -36,6 +36,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12
var/stat_msg1
var/stat_msg2
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/communications/New()
shuttle_caller_list += src
+6 -4
View File
@@ -15,6 +15,10 @@
var/computer_health = 25
var/clockwork = FALSE
use_auto_lights = 1
light_power_on = 1
light_range_on = 3
/obj/machinery/computer/New(location, obj/item/weapon/circuitboard/C)
..(location)
if(C && istype(C))
@@ -82,15 +86,13 @@
add_overlay(icon_keyboard)
if(stat & BROKEN)
add_overlay("[icon_state]_broken")
set_light(l_color = LIGHT_COLOR_BLUE)
else
add_overlay(icon_screen)
set_light(l_color = initial(light_color))
/obj/machinery/computer/power_change()
..()
if(stat & NOPOWER)
SetLuminosity(0)
else
SetLuminosity(brightness_on)
update_icon()
return
+1
View File
@@ -7,6 +7,7 @@
idle_power_usage = 250
active_power_usage = 500
circuit = /obj/item/weapon/circuitboard/computer/crew
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/crew/attack_ai(mob/user)
if(stat & (BROKEN|NOPOWER))
@@ -37,6 +37,7 @@
use_power = 1
idle_power_usage = 10
active_power_usage = 400
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params)
if (istype(I, /obj/item/weapon/disk/data)) //INSERT SOME DISKETTES
@@ -12,6 +12,7 @@
var/obj/structure/gulag_beacon/beacon = null
var/mob/living/carbon/human/prisoner = null
var/datum/data/record/temporary_record = null
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/gulag_teleporter_computer/New()
..()
@@ -155,10 +156,3 @@
teleporter.toggle_open()
id = null
temporary_record = null
+1
View File
@@ -19,6 +19,7 @@
//Sorting Variables
var/sortBy = "name"
var/order = 1 // -1 = Descending - 1 = Ascending
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/med_data/attackby(obj/item/O, mob/user, params)
if(istype(O, /obj/item/weapon/card/id) && !scan)
+3 -2
View File
@@ -17,7 +17,7 @@
var/noserver = "<span class='alert'>ALERT: No server detected.</span>"
var/incorrectkey = "<span class='warning'>ALERT: Incorrect decryption key!</span>"
var/defaultmsg = "<span class='notice'>Welcome. Please select an option.</span>"
var/rebootmsg = "<span class='warning'>%$&(£: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!</span>"
var/rebootmsg = "<span class='warning'>%$&(: Critical %$$@ Error // !RestArting! <lOadiNg backUp iNput ouTput> - ?pLeaSe wAit!</span>"
//Computer properties
var/screen = 0 // 0 = Main menu, 1 = Message Logs, 2 = Hacked screen, 3 = Custom Message
var/hacking = 0 // Is it being hacked into by the AI/Cyborg
@@ -29,6 +29,7 @@
var/obj/item/device/pda/customrecepient = null
var/customjob = "Admin"
var/custommessage = "This is a test, please ignore."
light_color = LIGHT_COLOR_GREEN
/obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O, mob/living/user, params)
if(istype(O, /obj/item/weapon/screwdriver) && emagged)
@@ -47,7 +48,7 @@
var/obj/item/weapon/paper/monitorkey/MK = new/obj/item/weapon/paper/monitorkey
MK.loc = src.loc
// Will help make emagging the console not so easy to get away with.
MK.info += "<br><br><font color='red'>£%@%(*$%&(£&?*(%&£/{}</font>"
MK.info += "<br><br><font color='red'>%@%(*$%&(&?*(%&/{}</font>"
var/time = 100 * length(src.linkedServer.decryptkey)
addtimer(src, "UnmagConsole", time)
message = rebootmsg
+3
View File
@@ -7,6 +7,9 @@
var/timing = 0
var/time = 30
var/range = 4
light_color = LIGHT_COLOR_GREEN
light_power_on = 0.5
light_range_on = 1
/obj/machinery/computer/pod/initialize()
+1 -2
View File
@@ -12,6 +12,7 @@
var/screen = 0 // 0 - No Access Denied, 1 - Access allowed
var/obj/item/weapon/card/id/prisoner/inserted_id
circuit = /obj/item/weapon/circuitboard/computer/prisoner
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/prisoner/attack_hand(mob/user)
if(..())
@@ -145,5 +146,3 @@
src.add_fingerprint(usr)
src.updateUsrDialog()
return
+1
View File
@@ -9,6 +9,7 @@
req_access = list(access_robotics)
circuit = /obj/item/weapon/circuitboard/computer/robotics
var/temp = null
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/robotics/proc/can_control(mob/user, mob/living/silicon/robot/R)
if(!istype(R))
+1
View File
@@ -22,6 +22,7 @@
//Sorting Variables
var/sortBy = "name"
var/order = 1 // -1 = Descending - 1 = Ascending
light_color = LIGHT_COLOR_RED
/obj/machinery/computer/secure_data/attackby(obj/item/O, mob/user, params)
@@ -5,6 +5,7 @@
icon_keyboard = "atmos_key"
circuit = /obj/item/weapon/circuitboard/computer/stationalert
var/alarms = list("Fire" = list(), "Atmosphere" = list(), "Power" = list())
light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/station_alert/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \
datum/tgui/master_ui = null, datum/ui_state/state = default_state)
@@ -80,4 +81,4 @@
if(L.len)
active_alarms = TRUE
if(active_alarms)
add_overlay("alert:2")
add_overlay("alert:2")
@@ -9,6 +9,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F
icon_keyboard = "tcstation_key"
icon_screen = "syndie"
clockwork = TRUE //it'd look weird, at least if ratvar ever got there
light_color = LIGHT_COLOR_RED
/////////////////////////////////////////////
/obj/machinery/computer/telecrystals/uplinker
+5 -1
View File
@@ -12,6 +12,10 @@
var/damage_coeff
var/scan_level
var/precision_coeff
use_auto_lights = 1
light_power_on = 1
light_range_on = 2
light_color = LIGHT_COLOR_GREEN
/obj/machinery/dna_scannernew/New()
..()
@@ -158,4 +162,4 @@
if(..(user,1,0)) //don't set the machine, since there's no dialog
return
toggle_open(user)
toggle_open(user)
+3 -3
View File
@@ -1011,13 +1011,13 @@ var/list/airlock_overlays = list()
return 0
operating = 1
update_icon(AIRLOCK_OPENING, 1)
src.SetOpacity(0)
src.set_opacity(0)
sleep(5)
src.density = 0
sleep(9)
src.layer = OPEN_DOOR_LAYER
update_icon(AIRLOCK_OPEN, 1)
SetOpacity(0)
set_opacity(0)
operating = 0
air_update_turf(1)
update_freelook_sight()
@@ -1060,7 +1060,7 @@ var/list/airlock_overlays = list()
sleep(9)
update_icon(AIRLOCK_CLOSED, 1)
if(visible && !glass)
SetOpacity(1)
set_opacity(1)
operating = 0
air_update_turf(1)
update_freelook_sight()
+3 -3
View File
@@ -235,13 +235,13 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
return 0
operating = 1
do_animate("opening")
SetOpacity(0)
set_opacity(0)
sleep(5)
density = 0
sleep(5)
layer = OPEN_DOOR_LAYER
update_icon()
SetOpacity(0)
set_opacity(0)
operating = 0
air_update_turf(1)
update_freelook_sight()
@@ -270,7 +270,7 @@ obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user)
sleep(5)
update_icon()
if(visible && !glass)
SetOpacity(1)
set_opacity(1)
operating = 0
air_update_turf(1)
update_freelook_sight()
+1 -1
View File
@@ -128,7 +128,7 @@
sleep(10)
src.density = 0
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
// src.sd_set_opacity(0) //TODO: why is this here? Opaque windoors? ~Carn
air_update_turf(1)
update_freelook_sight()
+1 -1
View File
@@ -108,4 +108,4 @@ var/list/doppler_arrays = list()
name = "integrated tachyon-doppler module"
integrated = 1
max_dist = 21 //Should detect most explosions in hearing range.
use_power = 0
use_power = 0
+5 -1
View File
@@ -12,6 +12,10 @@
var/list/stored_items = list()
var/obj/item/weapon/card/id/prisoner/inserted_id = null
var/obj/machinery/gulag_teleporter/linked_teleporter = null
use_auto_lights = 1
light_power_on = 1
light_range_on = 3
light_color = LIGHT_COLOR_BLUE
/obj/machinery/gulag_item_reclaimer/Destroy()
for(var/i in contents)
@@ -105,4 +109,4 @@
var/obj/item/W = i
stored_items[user] -= W
W.forceMove(get_turf(src))
stored_items -= user
stored_items -= user
+3 -3
View File
@@ -163,9 +163,9 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
h.layer = FLY_LAYER//Above all the other objects/mobs. Or the vast majority of them.
h.anchored = 1//So space wind cannot drag it.
h.name = "[A.name] (Hologram)"//If someone decides to right click.
h.SetLuminosity(2) //hologram lighting
h.set_light(2) //hologram lighting
masters[A] = h
SetLuminosity(2) //pad lighting
set_light(2) //pad lighting
icon_state = "holopad1"
A.current = src
use_power += HOLOGRAM_POWER_USAGE
@@ -178,7 +178,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
masters -= user //Discard AI from the list of those who use holopad
use_power = max(HOLOPAD_PASSIVE_POWER_USAGE, use_power - HOLOGRAM_POWER_USAGE)//Reduce power usage
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"
use_power = HOLOPAD_PASSIVE_POWER_USAGE
return 1
+2 -2
View File
@@ -72,11 +72,11 @@
if ( powered() && disable == 0 )
stat &= ~NOPOWER
icon_state = "[base_state]"
// src.sd_SetLuminosity(2)
// src.sd_set_light(2)
else
stat |= ~NOPOWER
icon_state = "[base_state]-p"
// src.sd_SetLuminosity(0)
// src.sd_set_light(0)
/obj/machinery/sparker/attackby(obj/item/weapon/W, mob/user, params)
if (istype(W, /obj/item/weapon/screwdriver))
+1 -2
View File
@@ -9,7 +9,6 @@
var/on = 1
var/area/area = null
var/otherarea = null
// luminosity = 1
/obj/machinery/light_switch/New()
..()
@@ -73,4 +72,4 @@
..(severity)
return
power_change()
..(severity)
..(severity)
+4
View File
@@ -120,6 +120,10 @@ Class Procs:
var/interact_offline = 0 // Can the machine be interacted with while de-powered.
var/speed_process = 0 // Process as fast as possible?
var/light_range_on = 0
var/light_power_on = 0
var/use_auto_lights = 0
/obj/machinery/New()
..()
machines += src
+5 -2
View File
@@ -189,7 +189,10 @@ var/list/obj/machinery/newscaster/allCasters = list()
var/health = 60
var/datum/newscaster/feed_channel/viewing_channel = null
var/allow_comments = 1
luminosity = 0
use_auto_lights = 1
light_power_on = 0.5
light_range_on = 1
light_color = LIGHT_COLOR_GREEN
anchored = 1
var/hitstaken = 0 //TO BE REMOVED, no longer used, the var is present in a map var edit which must be removed.
@@ -1048,4 +1051,4 @@ var/list/obj/machinery/newscaster/allCasters = list()
scribble = s
attack_self(user)
else
return ..()
return ..()
+7 -4
View File
@@ -56,7 +56,10 @@ var/list/obj/machinery/requests_console/allConsoles = list()
var/priority = -1 ; //Priority of the message being sent
var/obj/item/device/radio/Radio
var/emergency //If an emergency has been called by this device. Acts as both a cooldown and lets the responder know where it the emergency was triggered from
luminosity = 0
use_auto_lights = 1
light_power_on = 0.5
light_range_on = 1
light_color = LIGHT_COLOR_GREEN
/obj/machinery/requests_console/power_change()
..()
@@ -185,7 +188,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if (Console.department == department)
Console.newmessagepriority = 0
Console.update_icon()
Console.SetLuminosity(1)
Console.set_light(1)
newmessagepriority = 0
update_icon()
var/messageComposite = ""
@@ -375,7 +378,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
alert = "Message from [department][authentic]"
Console.createmessage(src, alert , sending, 1, 1)
screen = 6
Console.SetLuminosity(2)
Console.set_light(2)
if(radio_freq)
Radio.talk_into(src,"[alert]: <i>[message]</i>",radio_freq)
@@ -476,7 +479,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
playsound(src.loc, 'sound/machines/twobeep.ogg', 50, 1)
say(title)
src.messages += "<b>From:</b> [linkedsender]<BR>[message]"
SetLuminosity(2)
set_light(2)
/obj/machinery/requests_console/attackby(obj/item/weapon/O, mob/user, params)
if(istype(O, /obj/item/weapon/crowbar))
+1
View File
@@ -22,6 +22,7 @@
use_power = 1
idle_power_usage = 50
circuit = /obj/item/weapon/circuitboard/computer/slot_machine
light_range_on = 0
var/money = 3000 //How much money it has CONSUMED
var/plays = 0
var/working = 0
+6 -1
View File
@@ -26,6 +26,11 @@
var/uv_super = FALSE
var/uv_cycles = 6
use_auto_lights = 1
light_power_on = 1
light_range_on = 3
light_color = LIGHT_COLOR_ORANGE
/obj/machinery/suit_storage_unit/standard_unit
suit_type = /obj/item/clothing/suit/space/eva
helmet_type = /obj/item/clothing/head/helmet/space/eva
@@ -378,4 +383,4 @@
storage.loc = loc
storage = null
. = TRUE
update_icon()
update_icon()
@@ -16,6 +16,8 @@
req_access = list(access_tcomsat)
circuit = /obj/item/weapon/circuitboard/computer/comm_server
light_color = LIGHT_COLOR_GREEN
/obj/machinery/computer/telecomms/server/attack_hand(mob/user)
if(..())
return
@@ -8,6 +8,7 @@
/obj/machinery/computer/telecomms/monitor
name = "telecommunications monitoring console"
icon_screen = "comm_monitor"
light_color = LIGHT_COLOR_GREEN
var/screen = 0 // the screen number:
var/list/machinelist = list() // the machines located by the computer
@@ -124,4 +125,4 @@
/obj/machinery/computer/telecomms/monitor/attackby()
. = ..()
updateUsrDialog()
updateUsrDialog()
@@ -16,6 +16,7 @@
use_power = 1
idle_power_usage = 30
machinetype = 1
light_color = LIGHT_COLOR_GREEN
//heatgen = 0
/obj/machinery/telecomms/receiver/receive_signal(datum/signal/signal)
@@ -96,4 +97,4 @@
/obj/machinery/telecomms/receiver/preset_left/birdstation
name = "Receiver"
freq_listening = list()
freq_listening = list()
@@ -32,6 +32,11 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
var/hide = 0 // Is it a hidden machine?
var/listening_level = 0 // 0 = auto set in New() - this is the z level that the machine is listening to.
use_auto_lights = 1
light_power_on = 1
light_range_on = 3
light_color = LIGHT_COLOR_BLUE
/obj/machinery/telecomms/proc/relay_information(datum/signal/signal, filter, copysig, amount = 20)
// relay signal to all linked machinery that are of type [filter]. If signal has been sent [amount] times, stop sending
+1
View File
@@ -4,6 +4,7 @@
icon_screen = "teleport"
icon_keyboard = "teleport_key"
circuit = /obj/item/weapon/circuitboard/computer/teleporter
light_color = LIGHT_COLOR_BLUE
var/obj/item/device/gps/locked = null
var/regime_set = "Teleporter"
var/id = null
+6 -2
View File
@@ -4,6 +4,11 @@
icon = 'icons/obj/device.dmi'
icon_state = "syndbeacon"
use_auto_lights = 1
light_power_on = 2
light_range_on = 2
light_color = LIGHT_COLOR_RED
use_power = 0
anchored = 1
density = 1
@@ -22,7 +27,6 @@
else if(is_special_character(user))
user << "Even to a heart as dark as yours, you know nothing good will come of this. Something instinctual makes you pull away."
else if (!insisting)
user << "Your first touch makes the Wish Granter stir, listening to you. Are you really sure you want to do this?"
insisting++
@@ -53,4 +57,4 @@
user << "You have a very bad feeling about this."
return
return
+1
View File
@@ -85,6 +85,7 @@
icon_keyboard = "rd_key"
circuit = /obj/item/weapon/circuitboard/computer/mech_bay_power_console
var/obj/machinery/mech_bay_recharge_port/recharge_port
light_color = LIGHT_COLOR_PINK
/obj/machinery/computer/mech_bay_power_console/attack_ai(mob/user)
return interact(user)
+2 -2
View File
@@ -106,10 +106,10 @@
return
chassis.lights = !chassis.lights
if(chassis.lights)
chassis.AddLuminosity(chassis.lights_power)
chassis.set_light(chassis.lights_power)
button_icon_state = "mech_lights_on"
else
chassis.AddLuminosity(-chassis.lights_power)
chassis.set_light(0)
button_icon_state = "mech_lights_off"
chassis.occupant_message("Toggled lights [chassis.lights?"on":"off"].")
chassis.log_message("Toggled lights [chassis.lights?"on":"off"].")
+1 -1
View File
@@ -14,7 +14,7 @@
/obj/effect/anomaly/New()
..()
poi_list |= src
SetLuminosity(initial(luminosity))
set_light(initial(luminosity))
aSignal = new(src)
aSignal.code = rand(1,100)
+1 -1
View File
@@ -34,7 +34,7 @@ obj/effect/glowshroom/glowcap
/obj/effect/glowshroom/New()
..()
SetLuminosity(round(potency/10))
set_light(round(potency/10))
setDir(CalcDir())
var/base_icon_state = initial(icon_state)
if(!floor)
+2 -2
View File
@@ -213,12 +213,12 @@
turfs -= key
if(A)
A.contents += turfs
A.SetDynamicLighting()
A.set_dynamic_lighting()
else
A = new
A.setup(str)
A.contents += turfs
A.SetDynamicLighting()
A.set_dynamic_lighting()
A.has_gravity = old_gravity
interact()
return 1
+2 -17
View File
@@ -64,7 +64,7 @@
if(show_message)
usr.visible_message(
"<span class='danger'>[usr] lights the [name].</span>")
SetLuminosity(CANDLE_LUMINOSITY)
set_light(CANDLE_LUMINOSITY)
START_PROCESSING(SSobj, src)
update_icon()
@@ -89,22 +89,7 @@
"<span class='notice'>[user] snuffs [src].</span>")
lit = FALSE
update_icon()
SetLuminosity(0)
user.AddLuminosity(-CANDLE_LUMINOSITY)
/obj/item/candle/pickup(mob/user)
..()
if(lit)
SetLuminosity(0)
user.AddLuminosity(CANDLE_LUMINOSITY)
/obj/item/candle/dropped(mob/user)
..()
if(lit)
user.AddLuminosity(-CANDLE_LUMINOSITY)
SetLuminosity(CANDLE_LUMINOSITY)
set_light(0)
/obj/item/candle/is_hot()
return lit * heat
+2 -2
View File
@@ -655,9 +655,9 @@
if(actually_paints)
target.color = paint_color
if(color_hex2num(paint_color) < 255)
target.SetOpacity(255)
target.set_opacity(255)
else
target.SetOpacity(initial(target.opacity))
target.set_opacity(initial(target.opacity))
. = use_charges(2)
var/fraction = min(1, . / reagents.maximum_volume)
reagents.reaction(target, TOUCH, fraction * volume_multiplier)
+3 -26
View File
@@ -50,27 +50,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/image/photo = null //Scanned photo
/obj/item/device/pda/pickup(mob/user)
..()
if(fon)
SetLuminosity(0)
user.AddLuminosity(f_lum)
/obj/item/device/pda/dropped(mob/user)
..()
if(fon)
user.AddLuminosity(-f_lum)
SetLuminosity(f_lum)
/obj/item/device/pda/New()
..()
if(fon)
if(!isturf(loc))
loc.AddLuminosity(f_lum)
SetLuminosity(0)
else
SetLuminosity(f_lum)
set_light(f_lum)
PDAs += src
if(default_cartridge)
cartridge = new default_cartridge(src)
@@ -343,16 +326,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
if("Light")
if(fon)
fon = 0
if(src in U.contents)
U.AddLuminosity(-f_lum)
else
SetLuminosity(0)
set_light(0)
else
fon = 1
if(src in U.contents)
U.AddLuminosity(f_lum)
else
SetLuminosity(f_lum)
set_light(f_lum)
if("Medical Scan")
if(scanmode == 1)
scanmode = 0
+11 -41
View File
@@ -14,33 +14,19 @@
/obj/item/device/flashlight/initialize()
..()
if(on)
icon_state = "[initial(icon_state)]-on"
SetLuminosity(brightness_on)
else
icon_state = initial(icon_state)
SetLuminosity(0)
update_brightness()
/obj/item/device/flashlight/proc/update_brightness(mob/user = null)
/obj/item/device/flashlight/proc/update_brightness()
if(on)
icon_state = "[initial(icon_state)]-on"
if(loc == user)
user.AddLuminosity(brightness_on)
else if(isturf(loc))
SetLuminosity(brightness_on)
set_light(brightness_on)
else
icon_state = initial(icon_state)
if(loc == user)
user.AddLuminosity(-brightness_on)
else if(isturf(loc))
SetLuminosity(0)
set_light(0)
/obj/item/device/flashlight/attack_self(mob/user)
if(!isturf(user.loc))
user << "<span class='warning'>You cannot turn the light on while in this [user.loc]!</span>" //To prevent some lighting anomalities.
return 0
on = !on
update_brightness(user)
update_brightness()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
@@ -85,21 +71,6 @@
else
return ..()
/obj/item/device/flashlight/pickup(mob/user)
..()
if(on)
user.AddLuminosity(brightness_on)
SetLuminosity(0)
/obj/item/device/flashlight/dropped(mob/user)
..()
if(on)
user.AddLuminosity(-brightness_on)
SetLuminosity(brightness_on)
/obj/item/device/flashlight/pen
name = "penlight"
desc = "A pen-sized light, used by medical staff. It can also be used to create a hologram to alert people of incoming medical assistance."
@@ -193,6 +164,7 @@ obj/item/device/flashlight/lamp/bananalamp
var/on_damage = 7
var/produce_heat = 1500
heat = 1000
light_color = LIGHT_COLOR_FLARE
/obj/item/device/flashlight/flare/New()
fuel = rand(800, 1000) // Sorry for changing this so much but I keep under-estimating how long X number of ticks last in seconds.
@@ -213,13 +185,9 @@ obj/item/device/flashlight/lamp/bananalamp
on = 0
force = initial(src.force)
damtype = initial(src.damtype)
if(ismob(loc))
var/mob/U = loc
update_brightness(U)
else
update_brightness(null)
update_brightness()
/obj/item/device/flashlight/flare/update_brightness(mob/user = null)
/obj/item/device/flashlight/flare/update_brightness()
..()
if(on)
item_state = "[initial(item_state)]-on"
@@ -262,6 +230,7 @@ obj/item/device/flashlight/lamp/bananalamp
item_state = "lantern"
desc = "A mining lantern."
brightness_on = 6 // luminosity when on
light_color = LIGHT_COLOR_FIRE
/obj/item/device/flashlight/slime
@@ -275,9 +244,10 @@ obj/item/device/flashlight/lamp/bananalamp
slot_flags = SLOT_BELT
materials = list()
brightness_on = 6 //luminosity when on
light_color = LIGHT_COLOR_SLIME_LAMP
/obj/item/device/flashlight/emp
origin_tech = "magnets=3;syndicate=´1"
origin_tech = "magnets=3;syndicate=1"
var/emp_max_charges = 4
var/emp_cur_charges = 4
var/charge_tick = 0
+2 -2
View File
@@ -52,7 +52,7 @@
mode = value
update_icon()
SetLuminosity(0)
set_light(0)
/obj/item/device/powersink/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/screwdriver))
@@ -113,7 +113,7 @@
var/datum/powernet/PN = attached.powernet
if(PN)
SetLuminosity(5)
set_light(5)
// found a powernet, so drain up to max power from it
@@ -188,6 +188,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
hitsound = 'sound/items/welder.ogg'
damtype = "fire"
force = 4
update_brightness()
if(reagents.get_reagent_amount("plasma")) // the plasma explodes when exposed to fire
var/datum/effect_system/reagents_explosion/e = new()
e.set_up(round(reagents.get_reagent_amount("plasma") / 2.5, 1), get_turf(src), 0, 0)
@@ -223,6 +224,11 @@ CIGARETTE PACKETS ARE IN FANCY.DM
M.update_inv_l_hand()
M.update_inv_r_hand()
/obj/item/clothing/mask/cigarette/proc/update_brightness()
if(lit)
set_light(1)
else
set_light(0)
/obj/item/clothing/mask/cigarette/proc/handle_reagents()
if(reagents.total_volume)
@@ -245,6 +251,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM
smoketime--
if(smoketime < 1)
new type_butt(location)
lit = 0
update_brightness()
if(ismob(loc))
M << "<span class='notice'>Your [name] goes out.</span>"
M.unEquip(src, 1) //un-equip it so the overlays can update //Force the un-equip so the overlays update
@@ -259,6 +267,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("<span class='notice'>[user] calmly drops and treads on \the [src], putting it out instantly.</span>")
new type_butt(user.loc)
new /obj/effect/decal/cleanable/ash(user.loc)
update_brightness()
qdel(src)
return ..()
@@ -511,7 +520,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.apply_damage(5, BURN, hitzone)
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - they however burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
user.AddLuminosity(1)
set_light(1)
START_PROCESSING(SSobj, src)
else
lit = 0
@@ -523,7 +532,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing. Wow.", "<span class='notice'>You quietly shut off [src] without even looking at what you're doing. Wow.</span>")
else
user.visible_message("[user] quietly shuts off [src].", "<span class='notice'>You quietly shut off [src].")
user.AddLuminosity(-1)
set_light(0)
STOP_PROCESSING(SSobj, src)
else
return ..()
@@ -553,22 +562,6 @@ CIGARETTE PACKETS ARE IN FANCY.DM
location.hotspot_expose(700, 5)
return
/obj/item/weapon/lighter/pickup(mob/user)
..()
if(lit)
SetLuminosity(0)
user.AddLuminosity(1)
return
/obj/item/weapon/lighter/dropped(mob/user)
..()
if(lit)
if(user)
user.AddLuminosity(-1)
SetLuminosity(1)
return
/obj/item/weapon/lighter/is_hot()
return lit * heat
@@ -72,7 +72,7 @@
if(do_after(user, src.cleanspeed, target = target))
user << "<span class='notice'>You clean \the [target.name].</span>"
target.color = initial(target.color)
target.SetOpacity(initial(target.opacity))
target.set_opacity(initial(target.opacity))
else
user.visible_message("[user] begins to clean \the [target.name] with [src]...", "<span class='notice'>You begin to clean \the [target.name] with [src]...</span>")
if(do_after(user, src.cleanspeed, target = target))
+1 -1
View File
@@ -25,7 +25,7 @@
if(ticker)
cameranet.updateVisibility(src)
if(opacity)
UpdateAffectingLights()
update_light()
if(smooth)
queue_smooth_neighbors(src)
return ..()
+2 -2
View File
@@ -45,7 +45,7 @@
sleep(5)
if(!qdeleted(src))
density = 0
SetOpacity(0)
set_opacity(0)
update_icon()
else
var/srcturf = get_turf(src)
@@ -56,7 +56,7 @@
density = 1
sleep(5)
if(!qdeleted(src))
SetOpacity(1)
set_opacity(1)
update_icon()
air_update_turf(1)
opening = 0
+32
View File
@@ -23,6 +23,8 @@ For almost all pooling purposes, it is better to use the QDEL hint than to pool
*/
#define MAINTAINING_OBJECT_POOL_COUNT 500
var/global/list/GlobalPool = list()
//You'll be using this proc 90% of the time.
@@ -133,3 +135,33 @@ var/list/pooledvariables = list()
/image/ResetVars()
..()
loc = null
/proc/returnToPool(const/datum/D)
ASSERT(D)
if(istype(D, /atom/movable) && length(GlobalPool[D.type]) > MAINTAINING_OBJECT_POOL_COUNT)
#ifdef DEBUG_DATUM_POOL
to_chat(world, text("DEBUG_DATUM_POOL: returnToPool([]) exceeds [] discarding...", D.type, MAINTAINING_OBJECT_POOL_COUNT))
#endif
qdel(D)
return
if(isnull(GlobalPool[D.type]))
GlobalPool[D.type] = list()
D.Destroy()
D.ResetVars()
#ifdef DEBUG_DATUM_POOL
if(D in GlobalPool[D.type])
to_chat(world, text("returnToPool has been called twice for the same datum of type [] time to panic.", D.type))
#endif
GlobalPool[D.type] |= D
#ifdef DEBUG_DATUM_POOL
to_chat(world, text("DEBUG_DATUM_POOL: returnToPool([]) [] left.", D.type, length(GlobalPool[D.type])))
#endif
#undef MAINTAINING_OBJECT_POOL_COUNT
@@ -24,24 +24,24 @@
switch(state)
if(0)
icon_state = "light_on-[coloredlights[currentcolor]]"
SetLuminosity(1)
set_light(1)
if(1)
var/num = pick("1","2","3","4")
icon_state = "light_on_flicker[num]"
SetLuminosity(1)
set_light(1)
if(2)
icon_state = "light_on_broken"
SetLuminosity(1)
set_light(1)
if(3)
icon_state = "light_off"
SetLuminosity(0)
set_light(0)
else
SetLuminosity(0)
set_light(0)
icon_state = "light_off"
/turf/open/floor/light/ChangeTurf(turf/T)
SetLuminosity(0)
set_light(0)
..()
/turf/open/floor/light/attack_hand(mob/user)
+3 -1
View File
@@ -215,7 +215,9 @@
baseturf = /turf/open/floor/plating/lava //lava all the way down
slowdown = 2
var/processing = 0
luminosity = 1
light_range = 2
light_power = 0.75
light_color = "#c48a18"
/turf/open/floor/plating/lava/airless
initial_gas_mix = "TEMP=2.7"
+4 -2
View File
@@ -14,6 +14,8 @@
var/destination_y
var/global/datum/gas_mixture/space/space_gas = new
light_power = 0.25
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
/turf/open/space/New()
@@ -52,9 +54,9 @@
if(istype(t, /turf/open/space))
//let's NOT update this that much pls
continue
SetLuminosity(4,1)
set_light(2)
return
SetLuminosity(0)
set_light(0)
/turf/open/space/attack_paw(mob/user)
return src.attack_hand(user)
+2 -1
View File
@@ -148,6 +148,7 @@
W.AfterChange()
W.blueprint_data = old_blueprint_data
return W
/turf/proc/AfterChange() //called after a turf has been replaced in ChangeTurf()
levelupdate()
@@ -316,7 +317,7 @@
T0.ChangeTurf(turf_type)
T0.redraw_lighting()
T0.reconsider_lights()
SSair.remove_from_active(T0)
T0.CalculateAdjacentTurfs()
SSair.add_to_active(T0,1)
+1 -1
View File
@@ -302,7 +302,7 @@ var/list/admin_verbs_hideable = list(
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control,
/client/proc/startSinglo,
/client/proc/fps,
/client/proc/set_fps,
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/readmin
+2 -2
View File
@@ -1,5 +1,5 @@
//replaces the old Ticklag verb, fps is easier to understand
/client/proc/fps()
/client/proc/set_fps()
set category = "Debug"
set name = "Set fps"
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
@@ -21,4 +21,4 @@
message_admins(msg, 0)
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
world.fps = fps
world.fps = fps
+1 -1
View File
@@ -33,7 +33,7 @@ var/list/admin_verbs_debug_mapping = list(
/client/proc/count_objects_all,
/client/proc/cmd_assume_direct_control, //-errorage
/client/proc/startSinglo,
/client/proc/fps, //allows you to set the ticklag.
/client/proc/set_fps, //allows you to set the ticklag.
/client/proc/cmd_admin_grantfullaccess,
/client/proc/cmd_admin_areatest,
/client/proc/cmd_admin_rejuvenate,
+7 -7
View File
@@ -308,7 +308,7 @@
if(new_value == null) return
if(variable=="luminosity")
O.SetLuminosity(new_value)
O.set_light(new_value)
else
O.vars[variable] = new_value
@@ -317,7 +317,7 @@
for(var/mob/M in mob_list)
if ( istype(M , O.type) )
if(variable=="luminosity")
M.SetLuminosity(new_value)
M.set_light(new_value)
else
M.vars[variable] = O.vars[variable]
CHECK_TICK
@@ -326,7 +326,7 @@
for(var/obj/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
A.SetLuminosity(new_value)
A.set_light(new_value)
else
A.vars[variable] = O.vars[variable]
CHECK_TICK
@@ -335,7 +335,7 @@
for(var/turf/A in world)
if ( istype(A , O.type) )
if(variable=="luminosity")
A.SetLuminosity(new_value)
A.set_light(new_value)
else
A.vars[variable] = O.vars[variable]
CHECK_TICK
@@ -345,7 +345,7 @@
for(var/mob/M in mob_list)
if (M.type == O.type)
if(variable=="luminosity")
M.SetLuminosity(new_value)
M.set_light(new_value)
else
M.vars[variable] = O.vars[variable]
CHECK_TICK
@@ -354,7 +354,7 @@
for(var/obj/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.SetLuminosity(new_value)
A.set_light(new_value)
else
A.vars[variable] = O.vars[variable]
CHECK_TICK
@@ -363,7 +363,7 @@
for(var/turf/A in world)
if (A.type == O.type)
if(variable=="luminosity")
A.SetLuminosity(new_value)
A.set_light(new_value)
else
A.vars[variable] = O.vars[variable]
CHECK_TICK
+16 -3
View File
@@ -607,6 +607,11 @@ var/list/VVckey_edit = list("key", "ckey")
var/var_new = input("Enter new text:","Text",O.vars[variable]) as null|message
if(var_new==null) return
if(variable == "light_color")
O.set_light(l_color = var_new)
else
O.vars[variable] = var_new
if(findtext(var_new,"\["))
var/process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No")
if(process_vars == "Yes")
@@ -617,10 +622,18 @@ var/list/VVckey_edit = list("key", "ckey")
O.vars[variable] = var_new
if("num")
if(variable=="luminosity")
if(variable=="light_range")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return
O.SetLuminosity(var_new)
if(var_new == null)
return
O.set_light(var_new)
else if(variable=="light_power")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null)
return
O.set_light(l_power = var_new)
else if(variable=="stat")
var/var_new = input("Enter new number:","Num",O.vars[variable]) as null|num
if(var_new == null) return
@@ -59,6 +59,7 @@
/obj/effect/hotspot/New()
..()
set_light(3,1,LIGHT_COLOR_FIRE)
SSair.hotspots += src
perform_exposure()
setDir(pick(cardinal))
@@ -146,7 +147,6 @@
return 1
/obj/effect/hotspot/Destroy()
SetLuminosity(0)
SSair.hotspots -= src
DestroyTurf()
if(istype(loc, /turf))
@@ -4,14 +4,14 @@
icon_state = "away"
requires_power = 0
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/cabin
name = "Cabin"
icon_state = "away2"
requires_power = 1
luminosity = 0
lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowforest/lumbermill
name = "Lumbermill"
@@ -54,10 +54,10 @@
/obj/structure/fireplace/proc/toggleFireplace()
if(active)
SetLuminosity(8)
set_light(8)
icon_state = "fireplace-active"
else
SetLuminosity(0)
set_light(0)
icon_state = "fireplace"
/obj/structure/fireplace/extinguish()
@@ -4,7 +4,7 @@
name = "Research Outpost"
icon_state = "away"
luminosity = 0
lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/research/interior
name = "Research Inside"
@@ -5,7 +5,7 @@
icon_state = "away"
requires_power = 0
luminosity = 1
lighting_use_dynamic = DYNAMIC_LIGHTING_ENABLED
dynamic_lighting = DYNAMIC_LIGHTING_ENABLED
/area/awaymission/snowdin/post
name = "Snowdin Outpost"
+1 -1
View File
@@ -9,7 +9,7 @@
/obj/structure/signpost/New()
. = ..()
SetLuminosity(2)
set_light(2)
/obj/structure/signpost/attackby(obj/item/weapon/W, mob/user, params)
return attack_hand(user)
+1 -1
View File
@@ -8,6 +8,7 @@
var/safety_warning = "For safety reasons the automated supply shuttle \
cannot transport live organisms, classified nuclear weaponry or \
homing beacons."
light_color = LIGHT_COLOR_BROWN
/obj/machinery/computer/cargo/request
name = "supply request console"
@@ -197,4 +198,3 @@
status_signal.data["command"] = command
frequency.post_signal(src, status_signal)
+2 -17
View File
@@ -14,9 +14,6 @@
dog_fashion = /datum/dog_fashion/head
/obj/item/clothing/head/hardhat/attack_self(mob/user)
if(!isturf(user.loc))
user << "<span class='warning'>You cannot turn the light on while in this [user.loc]!</span>" //To prevent some lighting anomalities.
return
on = !on
icon_state = "hardhat[on]_[item_color]"
item_state = "hardhat[on]_[item_color]"
@@ -30,23 +27,11 @@
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/head/hardhat/pickup(mob/user)
..()
if(on)
user.AddLuminosity(brightness_on)
SetLuminosity(0)
/obj/item/clothing/head/hardhat/dropped(mob/user)
..()
if(on)
user.AddLuminosity(-brightness_on)
SetLuminosity(brightness_on)
/obj/item/clothing/head/hardhat/proc/turn_on(mob/user)
user.AddLuminosity(brightness_on)
set_light(brightness_on)
/obj/item/clothing/head/hardhat/proc/turn_off(mob/user)
user.AddLuminosity(-brightness_on)
set_light(0)
/obj/item/clothing/head/hardhat/orange
icon_state = "hardhat0_orange"
+4 -28
View File
@@ -247,7 +247,7 @@
return
user << "<span class='notice'>You click [S] into place on [src].</span>"
if(S.on)
SetLuminosity(0)
set_light(0)
F = S
S.loc = src
update_icon()
@@ -298,37 +298,13 @@
/obj/item/clothing/head/helmet/proc/update_helmlight(mob/user = null)
if(F)
if(F.on)
if(loc == user)
user.AddLuminosity(F.brightness_on)
else if(isturf(loc))
SetLuminosity(F.brightness_on)
set_light(F.brightness_on)
else
if(loc == user)
user.AddLuminosity(-F.brightness_on)
else if(isturf(loc))
SetLuminosity(0)
set_light(0)
update_icon()
else
if(loc == user)
user.AddLuminosity(-5)
else if(isturf(loc))
SetLuminosity(0)
set_light(0)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/head/helmet/pickup(mob/user)
..()
if(F)
if(F.on)
user.AddLuminosity(F.brightness_on)
SetLuminosity(0)
/obj/item/clothing/head/helmet/dropped(mob/user)
..()
if(F)
if(F.on)
user.AddLuminosity(-F.brightness_on)
SetLuminosity(F.brightness_on)
+5 -17
View File
@@ -14,33 +14,21 @@
/obj/item/clothing/head/helmet/space/hardsuit/attack_self(mob/user)
if(!isturf(user.loc))
user << "<span class='warning'>You cannot turn the light on while in this [user.loc]!</span>" //To prevent some lighting anomalities.
return
on = !on
icon_state = "[basestate][on]-[item_color]"
user.update_inv_head() //so our mob-overlays update
if(on)
user.AddLuminosity(brightness_on)
set_light(brightness_on)
else
user.AddLuminosity(-brightness_on)
set_light(0)
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/clothing/head/helmet/space/hardsuit/pickup(mob/user)
..()
if(on)
user.AddLuminosity(brightness_on)
SetLuminosity(0)
/obj/item/clothing/head/helmet/space/hardsuit/dropped(mob/user)
..()
if(on)
user.AddLuminosity(-brightness_on)
SetLuminosity(brightness_on)
if(suit)
suit.RemoveHelmet()
@@ -228,7 +216,7 @@
user << "<span class='notice'>You switch your hardsuit to EVA mode, sacrificing speed for space protection.</span>"
name = initial(name)
desc = initial(desc)
user.AddLuminosity(brightness_on)
set_light(brightness_on)
flags |= visor_flags
flags_cover |= HEADCOVERSEYES | HEADCOVERSMOUTH
flags_inv |= visor_flags_inv
@@ -237,7 +225,7 @@
user << "<span class='notice'>You switch your hardsuit to combat mode and can now run at full speed.</span>"
name += " (combat)"
desc = alt_desc
user.AddLuminosity(-brightness_on)
set_light(0)
flags &= ~visor_flags
flags_cover &= ~(HEADCOVERSEYES | HEADCOVERSMOUTH)
flags_inv &= ~visor_flags_inv
+5 -5
View File
@@ -110,7 +110,7 @@
for(var/obj/effect/spacevine/SV in src)
qdel(SV)
..()
UpdateAffectingLights()
reconsider_lights()
/datum/spacevine_mutation/space_covering/on_grow(obj/effect/spacevine/holder)
if(istype(holder.loc, /turf/open/space))
@@ -144,7 +144,7 @@
/datum/spacevine_mutation/light/on_grow(obj/effect/spacevine/holder)
if(holder.energy)
holder.SetLuminosity(severity, 3)
holder.set_light(severity, 3)
/datum/spacevine_mutation/toxicity
name = "toxic"
@@ -219,7 +219,7 @@
quality = POSITIVE
/datum/spacevine_mutation/transparency/on_grow(obj/effect/spacevine/holder)
holder.SetOpacity(0)
holder.set_opacity(0)
holder.alpha = 125
/datum/spacevine_mutation/oxy_eater
@@ -359,7 +359,7 @@
KZ.potency = min(100, master.mutativness * 10)
KZ.production = (master.spread_cap / initial(master.spread_cap)) * 50
mutations = list()
SetOpacity(0)
set_opacity(0)
if(has_buckled_mobs())
unbuckle_all_mobs(force=1)
return ..()
@@ -519,7 +519,7 @@
if(!energy)
src.icon_state = pick("Med1", "Med2", "Med3")
energy = 1
SetOpacity(1)
set_opacity(1)
else
src.icon_state = pick("Hvy1", "Hvy2", "Hvy3")
energy = 2
+2 -2
View File
@@ -2,7 +2,7 @@
name = "Holodeck"
icon_state = "Holodeck"
luminosity = 1
lighting_use_dynamic = 0
dynamic_lighting = DYNAMIC_LIGHTING_DISABLED
var/obj/machinery/computer/holodeck/linked
var/restricted = 0 // if true, program goes on emag list
@@ -99,4 +99,4 @@
/area/holodeck/rec_center/anthophila
name = "Holodeck - Anthophila"
restricted = 1
restricted = 1
+2 -1
View File
@@ -25,6 +25,7 @@
var/area/holodeck/program
var/area/holodeck/last_program
var/area/offline_program = /area/holodeck/rec_center/offline
light_color = LIGHT_COLOR_CYAN
var/list/program_cache = list()
var/list/emag_programs = list()
@@ -206,4 +207,4 @@
/obj/machinery/computer/holodeck/blob_act(obj/effect/blob/B)
emergency_shutdown()
..()
..()
+4
View File
@@ -7,6 +7,10 @@
anchored = 1
use_power = 1
idle_power_usage = 40
use_auto_lights = 1
light_power_on = 2
light_range_on = 3
light_color = LIGHT_COLOR_BLUE
var/processing = 0
var/obj/item/weapon/reagent_containers/glass/beaker = null
var/points = 0

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