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:
@@ -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')
|
||||
|
||||
@@ -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
|
||||
|
||||
..()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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)
|
||||
. = ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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."
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"].")
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
if(ticker)
|
||||
cameranet.updateVisibility(src)
|
||||
if(opacity)
|
||||
UpdateAffectingLights()
|
||||
update_light()
|
||||
if(smooth)
|
||||
queue_smooth_neighbors(src)
|
||||
return ..()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user