From 471bc24c1e51effbb8cad9f25a2fe7015fc10051 Mon Sep 17 00:00:00 2001 From: Rob Nelson Date: Sun, 20 Jul 2014 13:08:17 -0700 Subject: [PATCH] Standardize computer luminosity shit, deduplicate power stuff. --- code/game/machinery/computer/HolodeckControl.dm | 6 ------ code/game/machinery/computer/Operating.dm | 6 ------ code/game/machinery/computer/aifixer.dm | 6 ------ code/game/machinery/computer/atmos_alert.dm | 6 ------ code/game/machinery/computer/camera.dm | 6 ------ code/game/machinery/computer/card.dm | 6 ------ code/game/machinery/computer/cloning.dm | 6 ------ code/game/machinery/computer/communications.dm | 6 ------ code/game/machinery/computer/computer.dm | 5 ++++- code/game/machinery/computer/crew.dm | 6 ------ code/game/machinery/computer/law.dm | 6 ------ code/game/machinery/computer/medical.dm | 6 ------ code/game/machinery/computer/message.dm | 6 ------ code/game/machinery/computer/power.dm | 6 ------ code/game/machinery/computer/prisoner.dm | 6 ------ code/game/machinery/computer/robot.dm | 6 ------ code/game/machinery/computer/security.dm | 6 ------ code/game/machinery/computer/shuttle.dm | 6 ------ code/game/machinery/computer/station_alert.dm | 6 ------ code/game/machinery/computer/store.dm | 6 ------ code/game/machinery/telecomms/logbrowser.dm | 6 ------ code/game/machinery/telecomms/telemonitor.dm | 6 ------ code/game/machinery/telecomms/traffic_control.dm | 12 ------------ 23 files changed, 4 insertions(+), 139 deletions(-) diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index 9c883691ce8..094619a5a53 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -10,12 +10,6 @@ var/last_change = 0 l_color = "#7BF9FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) attack_ai(var/mob/user as mob) diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 2e454fd1c51..bfd979025be 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -10,12 +10,6 @@ var/obj/machinery/optable/table = null l_color = "#0000FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/operating/New() ..() diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 133bfb683c5..7a45f1a8114 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -8,12 +8,6 @@ var/active = 0 l_color = "#CD00CD" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/aifixer/New() src.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty") diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 30d78efe9b9..9a0ff286700 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -12,12 +12,6 @@ var/datum/radio_frequency/radio_connection l_color = "#7BF9FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/atmos_alert/initialize() diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index ce8bc8b4688..0f9998326cd 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -11,12 +11,6 @@ var/mapping = 0//For the overview file, interesting bit of code. l_color = "#B40000" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) attack_ai(var/mob/user as mob) diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 76d46a47818..8a920d8ac93 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -12,12 +12,6 @@ var/printing = null l_color = "#0000FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) proc/is_centcom() return istype(src, /obj/machinery/computer/card/centcom) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index da082bcc8fc..660c4d0ec74 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -15,12 +15,6 @@ var/loading = 0 // Nice loading text l_color = "#0000FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/cloning/New() ..() diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 9c5d7577afd..2aecbf727b0 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -57,12 +57,6 @@ var/shuttle_call/shuttle_calls[0] var/display_type="blank" l_color = "#0000FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/communications/Topic(href, href_list) if(..(href, href_list)) diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 15d630c8140..668a875d9b6 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -15,7 +15,6 @@ if(ticker) initialize() - /obj/machinery/computer/initialize() power_change() @@ -93,6 +92,10 @@ /obj/machinery/computer/power_change() ..() update_icon() + if(!(stat & (BROKEN|NOPOWER))) + SetLuminosity(2) + else + SetLuminosity(0) /obj/machinery/computer/proc/set_broken() diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 19e0e018024..8d9d1220683 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -9,12 +9,6 @@ var/list/tracked = list( ) l_color = "#0000FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/crew/New() diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 91fbb084615..47a0951b20e 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -9,12 +9,6 @@ var/opened = 0 l_color = "#FFFFFF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) verb/AccessInternals() diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index ff9758a5ad0..1d9cee6a55b 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -17,12 +17,6 @@ var/printing = null l_color = "#0000FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/med_data/attack_ai(user as mob) return src.attack_hand(user) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index ce11ebe0ab9..73c469d6db4 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -34,12 +34,6 @@ var/custommessage = "This is a test, please ignore." l_color = "#50AB00" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/message_monitor/attackby(obj/item/weapon/O as obj, mob/living/user as mob) diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm index 20c50419156..65eb7ce4bc3 100644 --- a/code/game/machinery/computer/power.dm +++ b/code/game/machinery/computer/power.dm @@ -12,12 +12,6 @@ active_power_usage = 80 l_color = "#FF9933" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) //fix for issue 521, by QualityVan. //someone should really look into why circuits have a powernet var, it's several kinds of retarded. diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 67a86a5fdf9..c715f085115 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -15,12 +15,6 @@ var/obj/item/weapon/card/id/prisoner/inserted_id l_color = "#B40000" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) attack_ai(var/mob/user as mob) diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 98b2f0fed0b..f5f5dcb0ae3 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -17,12 +17,6 @@ var/screen = 0 // 0 - Main Menu, 1 - Cyborg Status, 2 - Kill 'em All! -- In text l_color = "#CD00CD" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/robotics/attack_ai(var/mob/user as mob) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 2790dd4b8f8..ce9b239da49 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -23,12 +23,6 @@ var/order = 1 // -1 = Descending - 1 = Ascending l_color = "#B40000" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/secure_data/attackby(obj/item/O as obj, user as mob) diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index 2ab144691fd..0815cf7932a 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -6,12 +6,6 @@ var/list/authorized = list( ) l_color = "#7BF9FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) attackby(var/obj/item/weapon/card/W as obj, var/mob/user as mob) diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index d2cd356d3ff..3ed66a1dec2 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -7,12 +7,6 @@ var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list()) l_color = "#7BF9FF" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) attack_ai(mob/user) diff --git a/code/game/machinery/computer/store.dm b/code/game/machinery/computer/store.dm index da0776a3c18..31981544e62 100644 --- a/code/game/machinery/computer/store.dm +++ b/code/game/machinery/computer/store.dm @@ -5,12 +5,6 @@ circuit = "/obj/item/weapon/circuitboard/merch" l_color = "#50AB00" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/item/weapon/circuitboard/merch name = "\improper Merchandise Computer Circuitboard" diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index 9d06657e86d..959fbbfcf3f 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -2,12 +2,6 @@ /obj/machinery/computer/telecomms l_color = "#50AB00" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) /obj/machinery/computer/telecomms/server name = "Telecommunications Server Monitor" diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index cbf0bd2d82f..d247616ffd6 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -20,12 +20,6 @@ var/temp = "" // temporary feedback messages l_color = "#50AB00" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) attack_hand(mob/user as mob) if(stat & (BROKEN|NOPOWER)) diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index d86b4a89bae..00085886c2c 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -1,9 +1,3 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32 - - - - - /obj/machinery/computer/telecomms/traffic name = "Telecommunications Traffic Control" icon_state = "computer_generic" @@ -21,12 +15,6 @@ var/storedcode = "" // code stored l_color = "#50AB00" - power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - SetLuminosity(2) - else - SetLuminosity(0) req_access = list(access_tcomsat)