diff --git a/code/game/dna.dm b/code/game/dna.dm index 128b7aa1fc6..7645552a3b8 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -497,8 +497,8 @@ /obj/machinery/computer/scan_consolenew name = "\improper DNA scanner access console" desc = "Scan DNA." - icon = 'icons/obj/computer.dmi' - icon_state = "scanner" + icon_screen = "dna" + icon_keyboard = "med_key" density = 1 circuit = /obj/item/weapon/circuitboard/scan_consolenew var/radduration = 2 diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index 87eb95b4f42..be01887c3e3 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -87,11 +87,10 @@ ///////////////////////////////////////////////////////////// /obj/machinery/computer/general_air_control - icon = 'icons/obj/computer.dmi' - icon_state = "tank" + icon_screen = "tank" + icon_keyboard = "atmos_key" circuit = /obj/item/weapon/circuitboard/air_management - name = "computer" var/frequency = 1439 var/list/sensors = list() @@ -210,9 +209,6 @@ ///////////////////////////////////////////////////////////// /obj/machinery/computer/general_air_control/large_tank_control - icon = 'icons/obj/computer.dmi' - icon_state = "tank" - var/input_tag var/output_tag frequency = 1441 @@ -353,8 +349,7 @@ Rate: [volume_rate] L/sec
"} ///////////////////////////////////////////////////////////// /obj/machinery/computer/general_air_control/fuel_injection - icon = 'icons/obj/computer.dmi' - icon_state = "atmos" + icon_screen = "atmos" var/device_tag var/list/device_info diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm index cdee1763795..2063e4d72ae 100644 --- a/code/game/machinery/atmoalter/area_atmos_computer.dm +++ b/code/game/machinery/atmoalter/area_atmos_computer.dm @@ -1,7 +1,8 @@ /obj/machinery/computer/area_atmos name = "area air control computer" desc = "A computer used to control the stationary scrubbers and pumps in the area." - icon_state = "area_atmos" + icon_screen = "area_atmos" + icon_keyboard = "atmos_key" circuit = "/obj/item/weapon/circuitboard/area_atmos" var/list/connectedscrubbers = new() diff --git a/code/game/machinery/computer/HolodeckControl.dm b/code/game/machinery/computer/HolodeckControl.dm index bc10565b0b4..ba07b446a6a 100644 --- a/code/game/machinery/computer/HolodeckControl.dm +++ b/code/game/machinery/computer/HolodeckControl.dm @@ -1,7 +1,8 @@ /obj/machinery/computer/HolodeckControl name = "holodeck control console" desc = "A computer used to control a nearby holodeck." - icon_state = "holocontrol" + icon_screen = "holocontrol" + icon_keyboard = "tech_key" var/area/linkedholodeck = null var/area/target = null var/active = 0 diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index 5e000ff76d6..e446fe82255 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -1,9 +1,8 @@ /obj/machinery/computer/operating name = "operating computer" desc = "Used to monitor the vitals of a patient during surgery." - icon_state = "operating" - density = 1 - anchored = 1.0 + icon_screen = "crew" + icon_keyboard = "med_key" circuit = /obj/item/weapon/circuitboard/operating var/mob/living/carbon/human/patient = null var/obj/structure/optable/table = null diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 35d84985fbf..35d4c641cef 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -1,17 +1,12 @@ /obj/machinery/computer/aifixer name = "\improper AI system integrity restorer" desc = "Used with intelliCards containing nonfunctioning AIs to restore them to working order." - icon = 'icons/obj/computer.dmi' - icon_state = "ai-fixer" req_access = list(access_captain, access_robotics, access_heads) var/mob/living/silicon/ai/occupier = null var/active = 0 circuit = /obj/item/weapon/circuitboard/aifixer - -/obj/machinery/computer/aifixer/New() - src.overlays += image('icons/obj/computer.dmi', "ai-fixer-empty") - ..() - + icon_keyboard = "tech_key" + icon_screen = "ai-fixer" /obj/machinery/computer/aifixer/attackby(I as obj, user as mob, params) if(occupier && istype(I, /obj/item/weapon/screwdriver)) @@ -101,7 +96,6 @@ return if (href_list["fix"]) src.active = 1 - src.overlays += image('icons/obj/computer.dmi', "ai-fixer-on") while (src.occupier.health < 100) src.occupier.adjustOxyLoss(-1) src.occupier.adjustFireLoss(-1) @@ -113,32 +107,28 @@ src.occupier.lying = 0 dead_mob_list -= src.occupier living_mob_list += src.occupier - src.overlays -= image('icons/obj/computer.dmi', "ai-fixer-404") - src.overlays += image('icons/obj/computer.dmi', "ai-fixer-full") src.updateUsrDialog() + update_icon() sleep(10) src.active = 0 - src.overlays -= image('icons/obj/computer.dmi', "ai-fixer-on") - - src.add_fingerprint(usr) src.updateUsrDialog() + update_icon() return /obj/machinery/computer/aifixer/update_icon() ..() - // Broken / Unpowered if((stat & BROKEN) || (stat & NOPOWER)) - overlays.Cut() - - // Working / Powered + return else + if(active) + overlays += "ai-fixer-on" if (occupier) switch (occupier.stat) if (0) - overlays += image('icons/obj/computer.dmi', "ai-fixer-full") + overlays += "ai-fixer-full" if (2) - overlays += image('icons/obj/computer.dmi', "ai-fixer-404") + overlays += "ai-fixer-404" else - overlays += image('icons/obj/computer.dmi', "ai-fixer-empty") + overlays += "ai-fixer-empty" diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm index 23f042caebf..f5b84540167 100644 --- a/code/game/machinery/computer/arcade.dm +++ b/code/game/machinery/computer/arcade.dm @@ -1,8 +1,9 @@ /obj/machinery/computer/arcade/ name = "random arcade" desc = "random arcade machine" - icon = 'icons/obj/computer.dmi' icon_state = "arcade" + icon_keyboard = null + icon_screen = "invaders" var/list/prizes = list( /obj/item/weapon/storage/box/snappops = 2, /obj/item/toy/AI = 2, /obj/item/clothing/under/syndicate/tacticool = 2, @@ -82,7 +83,6 @@ /obj/machinery/computer/arcade/battle name = "arcade machine" desc = "Does not support Pinball." - icon = 'icons/obj/computer.dmi' icon_state = "arcade" circuit = /obj/item/weapon/circuitboard/arcade/battle var/enemy_name = "Space Villian" @@ -288,7 +288,6 @@ /obj/machinery/computer/arcade/orion_trail name = "The Orion Trail" desc = "Learn how our ancestors got to Orion, and have fun in the process!" - icon = 'icons/obj/computer.dmi' icon_state = "arcade" circuit = /obj/item/weapon/circuitboard/arcade/orion_trail var/engine = 0 diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 672624b5316..345b46e272c 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -5,7 +5,8 @@ name = "atmospheric alert console" desc = "Used to access the station's atmospheric sensors." circuit = /obj/item/weapon/circuitboard/atmos_alert - icon_state = "alert:0" + icon_screen = "alert:0" + icon_keyboard = "atmos_key" var/list/priority_alarms = list() var/list/minor_alarms = list() var/receive_frequency = 1437 @@ -61,23 +62,11 @@ src.updateDialog() /obj/machinery/computer/atmos_alert/update_icon() - SetLuminosity(brightness_on) - if(stat & BROKEN) - icon_state = "alert:b" - return - else if (stat & NOPOWER) - icon_state = "alert:O" - SetLuminosity(0) - return - else if(priority_alarms.len) - icon_state = "alert:2" - + ..() + if(priority_alarms.len) + overlays += "alert:2" else if(minor_alarms.len) - icon_state = "alert:1" - - else - icon_state = "alert:0" - return + overlays += "alert:1" /obj/machinery/computer/atmos_alert/proc/return_text() diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 4165bc0003a..10f396874eb 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -1,7 +1,8 @@ /obj/machinery/computer/security name = "security camera console" desc = "Used to access the various cameras on the station." - icon_state = "cameras" + icon_screen = "cameras" + icon_keyboard = "security_key" circuit = /obj/item/weapon/circuitboard/security var/obj/machinery/camera/current = null var/last_pic = 1.0 @@ -94,7 +95,6 @@ /obj/machinery/computer/security/telescreen/update_icon() icon_state = initial(icon_state) - SetLuminosity(brightness_on) if(stat & BROKEN) icon_state += "b" return @@ -108,16 +108,18 @@ density = 0 circuit = null - /obj/machinery/computer/security/wooden_tv name = "security camera monitor" desc = "An old TV hooked into the stations camera network." - icon_state = "security_det" + icon_state = "television" + icon_keyboard = null + icon_screen = "detective_tv" /obj/machinery/computer/security/mining name = "outpost camera console" desc = "Used to access the various cameras on the outpost." - icon_state = "miningcameras" + icon_screen = "mining" + icon_keyboard = "mining_key" network = list("MINE") circuit = "/obj/item/weapon/circuitboard/mining" diff --git a/code/game/machinery/computer/camera_advanced.dm b/code/game/machinery/computer/camera_advanced.dm index 169100a2ab8..6c32ddfbb11 100644 --- a/code/game/machinery/computer/camera_advanced.dm +++ b/code/game/machinery/computer/camera_advanced.dm @@ -1,157 +1,157 @@ -/obj/machinery/computer/camera_advanced - name = "advanced camera console" - desc = "Used to access the various cameras on the station." - icon_state = "cameras" - //circuit = /obj/item/weapon/circuitboard/security - var/mob/camera/aiEye/remote/eyeobj - var/mob/living/carbon/human/current_user = null - var/list/networks = list("SS13") - var/datum/action/camera_off/off_action = new - var/datum/action/camera_jump/jump_action = new - -/obj/machinery/computer/camera_advanced/proc/CreateEye() - eyeobj = new() - eyeobj.origin = src - -/obj/machinery/computer/camera_advanced/proc/GrantActions(var/mob/living/carbon/user) - off_action.target = user - off_action.Grant(user) - jump_action.target = user - jump_action.Grant(user) - -/obj/machinery/computer/camera_advanced/check_eye(var/mob/user as mob) - if (get_dist(user, src) > 1 || user.eye_blind) - off_action.Activate() - return 0 - return 1 - -/obj/machinery/computer/camera_advanced/attack_hand(var/mob/user as mob) - if(..()) - return - if(!iscarbon(user)) - return - var/mob/living/carbon/L = user - - if(!current_user) - if(!eyeobj) - CreateEye() - GrantActions(user) - current_user = user - eyeobj.user = user - eyeobj.name = "Camere Eye ([user.name])" - L.remote_view = 1 - L.remote_control = eyeobj - L.client.perspective = EYE_PERSPECTIVE - if(!eyeobj.initialized) - for(var/obj/machinery/camera/C in cameranet.cameras) - if(!C.can_use()) - continue - if(C.network&networks) - eyeobj.setLoc(get_turf(C)) - break - eyeobj.initialized = 1 - else - eyeobj.setLoc(eyeobj.loc) - else - user << "The console is already in use!" - -/mob/camera/aiEye/remote - name = "Inactive Camera Eye" - var/sprint = 10 - var/cooldown = 0 - var/acceleration = 1 - var/mob/living/carbon/human/user = null - var/obj/machinery/computer/camera_advanced/origin - var/initialized = 0 - var/visible_icon = 0 - var/image/user_image = null - -/mob/camera/aiEye/remote/GetViewerClient() - if(user) - return user.client - return null - -/mob/camera/aiEye/remote/setLoc(var/T) - if(user) - if(!isturf(user.loc)) - return - T = get_turf(T) - loc = T - cameranet.visibility(src) - if(user.client) - if(visible_icon) - user.client.images -= user_image - user_image = image(icon,loc,icon_state,FLY_LAYER) - user.client.images += user_image - user.client.eye = src - -/mob/camera/aiEye/remote/relaymove(mob/user,direct) - var/initial = initial(sprint) - var/max_sprint = 50 - - if(cooldown && cooldown < world.timeofday) // 3 seconds - sprint = initial - - for(var/i = 0; i < max(sprint, initial); i += 20) - var/turf/step = get_turf(get_step(src, direct)) - if(step) - src.setLoc(step) - - cooldown = world.timeofday + 5 - if(acceleration) - sprint = min(sprint + 0.5, max_sprint) - else - sprint = initial - -/datum/action/camera_off - name = "End Camera View" - action_type = AB_INNATE - button_icon_state = "camera_off" - -/datum/action/camera_off/Activate() - if(!target || !iscarbon(target)) - return - var/mob/living/carbon/C = target - var/mob/camera/aiEye/remote/remote_eye = C.remote_control - C.remote_view = 0 - remote_eye.origin.current_user = null - remote_eye.origin.jump_action.Remove(C) - if(C.client) - C.client.perspective = MOB_PERSPECTIVE - C.client.eye = src - C.client.images -= remote_eye.user_image - C.remote_control = null - C.unset_machine() - src.Remove(C) - -/datum/action/camera_jump - name = "Jump To Camera" - action_type = AB_INNATE - button_icon_state = "camera_jump" - -/datum/action/camera_jump/Activate() - if(!target || !iscarbon(target)) - return - var/mob/living/carbon/C = target - var/mob/camera/aiEye/remote/remote_eye = C.remote_control - var/obj/machinery/computer/camera_advanced/origin = remote_eye.origin - - var/list/L = list() - - for (var/obj/machinery/camera/cam in cameranet.cameras) - L.Add(cam) - - camera_sort(L) - - var/list/T = list() - - for (var/obj/machinery/camera/netcam in L) - var/list/tempnetwork = netcam.network&origin.networks - if (tempnetwork.len) - T[text("[][]", netcam.c_tag, (netcam.can_use() ? null : " (Deactivated)"))] = netcam - - - var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T - var/obj/machinery/camera/final = T[camera] - if(final) +/obj/machinery/computer/camera_advanced + name = "advanced camera console" + desc = "Used to access the various cameras on the station." + icon_screen = "cameras" + icon_keyboard = "security_key" + var/mob/camera/aiEye/remote/eyeobj + var/mob/living/carbon/human/current_user = null + var/list/networks = list("SS13") + var/datum/action/camera_off/off_action = new + var/datum/action/camera_jump/jump_action = new + +/obj/machinery/computer/camera_advanced/proc/CreateEye() + eyeobj = new() + eyeobj.origin = src + +/obj/machinery/computer/camera_advanced/proc/GrantActions(var/mob/living/carbon/user) + off_action.target = user + off_action.Grant(user) + jump_action.target = user + jump_action.Grant(user) + +/obj/machinery/computer/camera_advanced/check_eye(var/mob/user as mob) + if (get_dist(user, src) > 1 || user.eye_blind) + off_action.Activate() + return 0 + return 1 + +/obj/machinery/computer/camera_advanced/attack_hand(var/mob/user as mob) + if(..()) + return + if(!iscarbon(user)) + return + var/mob/living/carbon/L = user + + if(!current_user) + if(!eyeobj) + CreateEye() + GrantActions(user) + current_user = user + eyeobj.user = user + eyeobj.name = "Camere Eye ([user.name])" + L.remote_view = 1 + L.remote_control = eyeobj + L.client.perspective = EYE_PERSPECTIVE + if(!eyeobj.initialized) + for(var/obj/machinery/camera/C in cameranet.cameras) + if(!C.can_use()) + continue + if(C.network&networks) + eyeobj.setLoc(get_turf(C)) + break + eyeobj.initialized = 1 + else + eyeobj.setLoc(eyeobj.loc) + else + user << "The console is already in use!" + +/mob/camera/aiEye/remote + name = "Inactive Camera Eye" + var/sprint = 10 + var/cooldown = 0 + var/acceleration = 1 + var/mob/living/carbon/human/user = null + var/obj/machinery/computer/camera_advanced/origin + var/initialized = 0 + var/visible_icon = 0 + var/image/user_image = null + +/mob/camera/aiEye/remote/GetViewerClient() + if(user) + return user.client + return null + +/mob/camera/aiEye/remote/setLoc(var/T) + if(user) + if(!isturf(user.loc)) + return + T = get_turf(T) + loc = T + cameranet.visibility(src) + if(user.client) + if(visible_icon) + user.client.images -= user_image + user_image = image(icon,loc,icon_state,FLY_LAYER) + user.client.images += user_image + user.client.eye = src + +/mob/camera/aiEye/remote/relaymove(mob/user,direct) + var/initial = initial(sprint) + var/max_sprint = 50 + + if(cooldown && cooldown < world.timeofday) // 3 seconds + sprint = initial + + for(var/i = 0; i < max(sprint, initial); i += 20) + var/turf/step = get_turf(get_step(src, direct)) + if(step) + src.setLoc(step) + + cooldown = world.timeofday + 5 + if(acceleration) + sprint = min(sprint + 0.5, max_sprint) + else + sprint = initial + +/datum/action/camera_off + name = "End Camera View" + action_type = AB_INNATE + button_icon_state = "camera_off" + +/datum/action/camera_off/Activate() + if(!target || !iscarbon(target)) + return + var/mob/living/carbon/C = target + var/mob/camera/aiEye/remote/remote_eye = C.remote_control + C.remote_view = 0 + remote_eye.origin.current_user = null + remote_eye.origin.jump_action.Remove(C) + if(C.client) + C.client.perspective = MOB_PERSPECTIVE + C.client.eye = src + C.client.images -= remote_eye.user_image + C.remote_control = null + C.unset_machine() + src.Remove(C) + +/datum/action/camera_jump + name = "Jump To Camera" + action_type = AB_INNATE + button_icon_state = "camera_jump" + +/datum/action/camera_jump/Activate() + if(!target || !iscarbon(target)) + return + var/mob/living/carbon/C = target + var/mob/camera/aiEye/remote/remote_eye = C.remote_control + var/obj/machinery/computer/camera_advanced/origin = remote_eye.origin + + var/list/L = list() + + for (var/obj/machinery/camera/cam in cameranet.cameras) + L.Add(cam) + + camera_sort(L) + + var/list/T = list() + + for (var/obj/machinery/camera/netcam in L) + var/list/tempnetwork = netcam.network&origin.networks + if (tempnetwork.len) + T[text("[][]", netcam.c_tag, (netcam.can_use() ? null : " (Deactivated)"))] = netcam + + + var/camera = input("Choose which camera you want to view", "Cameras") as null|anything in T + var/obj/machinery/camera/final = T[camera] + if(final) remote_eye.setLoc(get_turf(final)) \ No newline at end of file diff --git a/code/game/machinery/computer/card.dm b/code/game/machinery/computer/card.dm index 180f3dc2fd5..7c682ce9607 100644 --- a/code/game/machinery/computer/card.dm +++ b/code/game/machinery/computer/card.dm @@ -7,7 +7,8 @@ var/time_last_changed_position = 0 /obj/machinery/computer/card name = "identification console" desc = "You can use this to change ID's." - icon_state = "id" + icon_screen = "id" + icon_keyboard = "id_key" req_one_access = list(access_heads, access_change_ids) circuit = /obj/item/weapon/circuitboard/card var/obj/item/weapon/card/id/scan = null diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index 38489cb1497..68e5b03f423 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -2,8 +2,8 @@ /obj/machinery/computer/cloning name = "cloning console" desc = "Used to clone people and manage DNA." - icon = 'icons/obj/computer.dmi' - icon_state = "dna" + icon_screen = "dna" + icon_keyboard = "med_key" circuit = /obj/item/weapon/circuitboard/cloning req_access = list(access_heads) //Only used for record deletion right now. var/obj/machinery/dna_scannernew/scanner = null //Linked scanner. For scanning. @@ -396,17 +396,4 @@ R.fields["mind"] = "\ref[subject.mind]" src.records += R - scantemp = "Subject successfully scanned." - -/obj/machinery/computer/cloning/update_icon() - SetLuminosity(brightness_on) - if(stat & BROKEN) - icon_state = "commb" - else - if(stat & NOPOWER) - src.icon_state = "c_unpowered" - stat |= NOPOWER - SetLuminosity(0) - else - icon_state = initial(icon_state) - stat &= ~NOPOWER \ No newline at end of file + scantemp = "Subject successfully scanned." \ No newline at end of file diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index c335d4ad6f6..6e94c641b33 100644 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -6,7 +6,8 @@ var/const/CALL_SHUTTLE_REASON_LENGTH = 12 /obj/machinery/computer/communications name = "communications console" desc = "This can be used for various important functions. Still under developement." - icon_state = "comm" + icon_screen = "comm" + icon_keyboard = "tech_key" req_access = list(access_heads) circuit = /obj/item/weapon/circuitboard/communications var/authenticated = 0 diff --git a/code/game/machinery/computer/computer.dm b/code/game/machinery/computer/computer.dm index 18f8925050f..d10f991fd81 100644 --- a/code/game/machinery/computer/computer.dm +++ b/code/game/machinery/computer/computer.dm @@ -1,6 +1,7 @@ /obj/machinery/computer name = "computer" icon = 'icons/obj/computer.dmi' + icon_state = "computer" density = 1 anchored = 1.0 use_power = 1 @@ -9,6 +10,8 @@ var/obj/item/weapon/circuitboard/circuit = null //if circuit==null, computer can't disassembly var/processing = 0 var/brightness_on = 2 + var/icon_keyboard = "generic_key" + var/icon_screen = "generic" /obj/machinery/computer/New(location, obj/item/weapon/circuitboard/C) ..(location) @@ -18,6 +21,7 @@ if(circuit) circuit = new circuit(null) power_change() + update_icon() /obj/machinery/computer/initialize() power_change() @@ -68,23 +72,22 @@ density = 0 /obj/machinery/computer/update_icon() - ..() - icon_state = initial(icon_state) - SetLuminosity(brightness_on) - // Broken + overlays.Cut() + if(stat & NOPOWER) + overlays += "[icon_keyboard]_off" + return + overlays += icon_keyboard if(stat & BROKEN) - icon_state += "b" - - // Unpowered - else if(stat & NOPOWER) - icon_state = initial(icon_state) - icon_state += "0" - SetLuminosity(0) - - + overlays += "[icon_state]_broken" + else + overlays += icon_screen /obj/machinery/computer/power_change() ..() + if(stat & NOPOWER) + SetLuminosity(0) + else + SetLuminosity(brightness_on) update_icon() return diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 1f5862fc01c..32b7eab5df5 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -1,7 +1,8 @@ /obj/machinery/computer/crew name = "crew monitoring console" desc = "Used to monitor active health sensors built into most of the crew's uniforms." - icon_state = "crew" + icon_screen = "crew" + icon_keyboard = "med_key" use_power = 1 idle_power_usage = 250 active_power_usage = 500 diff --git a/code/game/machinery/computer/law.dm b/code/game/machinery/computer/law.dm index 0ab00973dd5..875cb4403ae 100644 --- a/code/game/machinery/computer/law.dm +++ b/code/game/machinery/computer/law.dm @@ -2,7 +2,7 @@ /obj/machinery/computer/upload var/mob/living/silicon/current = null //The target of future law uploads - icon_state = null //To make sure mappers understand THIS ISN'T A VALID TYPE + icon_screen = "command" /obj/machinery/computer/upload/attackby(obj/item/O as obj, mob/user as mob, params) if(istype(O, /obj/item/weapon/aiModule)) @@ -33,7 +33,6 @@ /obj/machinery/computer/upload/ai name = "\improper AI upload console" desc = "Used to upload laws to the AI." - icon_state = "command" circuit = /obj/item/weapon/circuitboard/aiupload /obj/machinery/computer/upload/ai/attack_hand(var/mob/user as mob) @@ -58,7 +57,6 @@ /obj/machinery/computer/upload/borg name = "cyborg upload console" desc = "Used to upload laws to Cyborgs." - icon_state = "command" circuit = /obj/item/weapon/circuitboard/borgupload /obj/machinery/computer/upload/borg/attack_hand(var/mob/user as mob) diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index 8a52e787827..ef0345be0e5 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -3,7 +3,8 @@ /obj/machinery/computer/med_data//TODO:SANITY name = "medical records console" desc = "This can be used to check medical records." - icon_state = "medcomp" + icon_screen = "medcomp" + icon_keyboard = "med_key" req_one_access = list(access_medical, access_forensics_lockers) circuit = /obj/item/weapon/circuitboard/med_data var/obj/item/weapon/card/id/scan = null @@ -590,4 +591,6 @@ /obj/machinery/computer/med_data/laptop name = "medical laptop" desc = "A cheap Nanotrasen medical laptop, it functions as a medical records computer. It's bolted to the table." - icon_state = "medlaptop" + icon_state = "laptop" + icon_screen = "medlaptop" + icon_keyboard = "laptop_key" diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index 19b4fdd5169..5a0cab959e6 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -7,9 +7,7 @@ /obj/machinery/computer/message_monitor name = "message monitor console" desc = "Used to Monitor the crew's messages, that are sent via PDA. Can also be used to view Request Console messages." - icon_state = "comm_logs" - var/hack_icon = "comm_logsc" - var/normal_icon = "comm_logs" + icon_screen = "comm_logs" circuit = /obj/item/weapon/circuitboard/message_monitor //Server linked to. var/obj/machinery/message_server/linkedServer = null @@ -42,7 +40,6 @@ /obj/machinery/computer/message_monitor/emag_act(user as mob) if(!emagged) if(!isnull(src.linkedServer)) - icon_state = hack_icon // An error screen I made in the computers.dmi emagged = 1 screen = 2 spark_system.set_up(5, 0, src) @@ -56,15 +53,6 @@ else user << "A no server error appears on the screen." -/obj/machinery/computer/message_monitor/update_icon() - ..() - if(stat & (NOPOWER|BROKEN)) - return - if(emagged || hacking) - icon_state = hack_icon - else - icon_state = normal_icon - /obj/machinery/computer/message_monitor/initialize() //Is the server isn't linked to a server, and there's a server available, default it to the first one in the list. if(!linkedServer) @@ -263,11 +251,9 @@ var/currentKey = src.linkedServer.decryptkey user << "Brute-force completed! The key is '[currentKey]'." src.hacking = 0 - src.icon_state = normal_icon src.screen = 0 // Return the screen back to normal /obj/machinery/computer/message_monitor/proc/UnmagConsole() - src.icon_state = normal_icon src.emagged = 0 /obj/machinery/computer/message_monitor/proc/ResetMessage() @@ -365,7 +351,6 @@ if(issilicon(usr) && is_special_character(usr)) src.hacking = 1 src.screen = 2 - src.icon_state = hack_icon //Time it takes to bruteforce is dependant on the password length. spawn(100*length(src.linkedServer.decryptkey)) if(src && src.linkedServer && usr) diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm index 5b93f9e6d53..fa29854b612 100644 --- a/code/game/machinery/computer/pod.dm +++ b/code/game/machinery/computer/pod.dm @@ -1,7 +1,6 @@ /obj/machinery/computer/pod name = "mass driver launch control" desc = "A combined blastdoor and mass driver control unit." - icon_state = "computer_generic" var/obj/machinery/mass_driver/connected = null var/title = "Mass Driver Controls" var/id = 1 diff --git a/code/game/machinery/computer/power.dm b/code/game/machinery/computer/power.dm index 9671df6d94f..1911b1067b3 100644 --- a/code/game/machinery/computer/power.dm +++ b/code/game/machinery/computer/power.dm @@ -3,10 +3,8 @@ /obj/machinery/computer/monitor name = "power monitoring console" desc = "It monitors power levels across the station." - icon = 'icons/obj/computer.dmi' - icon_state = "power" - density = 1 - anchored = 1 + icon_screen = "power" + icon_keyboard = "power_key" use_power = 2 idle_power_usage = 20 active_power_usage = 80 diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index c021d2e158a..48e12d07b80 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -1,8 +1,8 @@ /obj/machinery/computer/prisoner name = "prisoner management console" desc = "Used to manage tracking implants placed inside criminals." - icon = 'icons/obj/computer.dmi' - icon_state = "explosive" + icon_screen = "explosive" + icon_keyboard = "security_key" req_access = list(access_brig) circuit = "/obj/item/weapon/circuitboard/prisoner" var/id = 0.0 diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm index 305e8d9ea58..8cb27943cf8 100644 --- a/code/game/machinery/computer/robot.dm +++ b/code/game/machinery/computer/robot.dm @@ -4,8 +4,8 @@ /obj/machinery/computer/robotics name = "robotics control console" desc = "Used to remotely lockdown or detonate linked Cyborgs." - icon = 'icons/obj/computer.dmi' - icon_state = "robot" + icon_screen = "robot" + icon_keyboard = "rd_key" req_access = list(access_robotics) circuit = /obj/item/weapon/circuitboard/robotics var/temp = null diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 3ac9f1abf03..ef936af78b5 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -3,7 +3,8 @@ /obj/machinery/computer/secure_data//TODO:SANITY name = "security records console" desc = "Used to view and edit personnel's security records" - icon_state = "security" + icon_screen = "security" + icon_keyboard = "security_key" req_one_access = list(access_security, access_forensics_lockers) circuit = /obj/item/weapon/circuitboard/secure_data var/obj/item/weapon/card/id/scan = null @@ -743,7 +744,3 @@ What a mess.*/ if(!record2 || record2 == active2) return 1 return 0 - -/obj/machinery/computer/secure_data/detective_computer - icon = 'icons/obj/computer.dmi' - icon_state = "messyfiles" diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm index 87e1389167d..b1460042e8a 100644 --- a/code/game/machinery/computer/shuttle.dm +++ b/code/game/machinery/computer/shuttle.dm @@ -1,7 +1,8 @@ /obj/machinery/computer/emergency_shuttle name = "emergency shuttle console" desc = "For shuttle control." - icon_state = "shuttle" + icon_screen = "shuttle" + icon_keyboard = "tech_key" var/auth_need = 3.0 var/list/authorized = list() @@ -128,8 +129,7 @@ /obj/machinery/computer/supplycomp name = "supply shuttle console" desc = "Used to order supplies." - icon = 'icons/obj/computer.dmi' - icon_state = "supply" + icon_screen = "supply" req_access = list(access_cargo) circuit = /obj/item/weapon/circuitboard/supplycomp verb_say = "flashes" @@ -150,8 +150,7 @@ /obj/machinery/computer/ordercomp name = "supply ordering console" desc = "Used to order supplies from cargo staff." - icon = 'icons/obj/computer.dmi' - icon_state = "request" + icon_screen = "request" circuit = /obj/item/weapon/circuitboard/ordercomp verb_say = "flashes" verb_ask = "flashes" diff --git a/code/game/machinery/computer/station_alert.dm b/code/game/machinery/computer/station_alert.dm index 113ab773c84..1d2b1e5c7ce 100644 --- a/code/game/machinery/computer/station_alert.dm +++ b/code/game/machinery/computer/station_alert.dm @@ -2,13 +2,11 @@ /obj/machinery/computer/station_alert name = "station alert console" desc = "Used to access the station's automated alert system." - icon_state = "alert:0" + icon_screen = "alert:0" + icon_keyboard = "atmos_key" circuit = /obj/item/weapon/circuitboard/stationalert var/alarms = list("Fire"=list(), "Atmosphere"=list(), "Power"=list()) - - - /obj/machinery/computer/station_alert/attack_hand(mob/user) if(..()) return @@ -99,20 +97,12 @@ return /obj/machinery/computer/station_alert/update_icon() - SetLuminosity(brightness_on) - if(stat & BROKEN) - icon_state = "alert:b" - return - else if (stat & NOPOWER) - icon_state = "alert:O" - SetLuminosity(0) - return + ..() var/active_alarms = 0 for (var/cat in src.alarms) var/list/L = src.alarms[cat] if(L.len) active_alarms = 1 if(active_alarms) - icon_state = "alert:2" + overlays += "alert:2" else - icon_state = "alert:0" - return \ No newline at end of file + overlays += "alert:0" \ No newline at end of file diff --git a/code/game/machinery/computer/syndicate_shuttle.dm b/code/game/machinery/computer/syndicate_shuttle.dm index d13bef052f8..8a0ee76c872 100644 --- a/code/game/machinery/computer/syndicate_shuttle.dm +++ b/code/game/machinery/computer/syndicate_shuttle.dm @@ -1,8 +1,8 @@ /obj/machinery/computer/shuttle/syndicate name = "syndicate shuttle terminal" - icon_state = "syndishuttle" + icon_screen = "syndishuttle" + icon_keyboard = "syndie_key" req_access = list(access_syndicate) - shuttleId = "syndicate" possible_destinations = "syndicate_away;syndicate_z5;syndicate_z3;syndicate_z4;syndicate_ne;syndicate_nw;syndicate_n;syndicate_se;syndicate_sw;syndicate_s" @@ -12,7 +12,8 @@ /obj/machinery/computer/shuttle/syndicate/whiteship name = "ship control terminal" - icon_state = "shuttle" + icon_screen = "shuttle" + icon_keyboard = "tech_key" shuttleId = "whiteship" req_access = list( ) possible_destinations = "whiteship_ss13;whiteship_home;whiteship_z4" \ No newline at end of file diff --git a/code/game/machinery/computer/telecrystalconsoles.dm b/code/game/machinery/computer/telecrystalconsoles.dm index 79032b6f001..d20776f350c 100644 --- a/code/game/machinery/computer/telecrystalconsoles.dm +++ b/code/game/machinery/computer/telecrystalconsoles.dm @@ -7,13 +7,14 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F name = "\improper Telecrystal assignment station" desc = "A device used to manage telecrystals during group operations. You shouldn't be looking at this particular one..." icon_state = "tcstation" + icon_keyboard = "tcstation_key" + icon_screen = "syndie" ///////////////////////////////////////////// /obj/machinery/computer/telecrystals/uplinker name = "\improper Telecrystal upload/receive station" desc = "A device used to manage telecrystals during group operations. To use, simply insert your uplink. With your uplink installed \ you can upload your telecrystals to the group's pool using the console, or be assigned additional telecrystals by your lieutenant." - icon_state = "tcstation" var/obj/item/uplinkholder = null var/obj/machinery/computer/telecrystals/boss/linkedboss = null @@ -50,7 +51,7 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F /obj/machinery/computer/telecrystals/uplinker/update_icon() - overlays.Cut() + ..() if(uplinkholder) overlays += "[initial(icon_state)]-closed" @@ -126,7 +127,9 @@ var/list/possible_uplinker_IDs = list("Alfa","Bravo","Charlie","Delta","Echo","F desc = "A device used to manage telecrystals during group operations. To use, simply initialize the machine by scanning for nearby uplink stations. \ Once the consoles are linked up, you can assign any telecrystals amongst your operatives; be they donated by your agents or rationed to the squad \ based on the danger rating of the mission." - icon_state = "tcboss" + icon_state = "computer" + icon_screen = "tcboss" + icon_keyboard = "syndie_key" var/virgin = 1 var/scanrange = 10 var/storedcrystals = 0 diff --git a/code/game/machinery/telecomms/computers/logbrowser.dm b/code/game/machinery/telecomms/computers/logbrowser.dm index 8798f07c20c..2bb79fbc82d 100644 --- a/code/game/machinery/telecomms/computers/logbrowser.dm +++ b/code/game/machinery/telecomms/computers/logbrowser.dm @@ -1,232 +1,232 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/obj/machinery/computer/telecomms/server - name = "telecommunications server monitoring console" - icon_state = "comm_logs" - - var/screen = 0 // the screen number: - var/list/servers = list() // the servers located by the computer - var/obj/machinery/telecomms/server/SelectedServer - - var/network = "NULL" // the network to probe - var/temp = "" // temporary feedback messages - - var/universal_translate = 0 // set to 1 if it can translate nonhuman speech - - req_access = list(access_tcomsat) - circuit = "/obj/item/weapon/circuitboard/comm_server" - -/obj/machinery/computer/telecomms/server/attack_hand(mob/user as mob) - if(..()) - return - user.set_machine(src) - var/dat = "Telecommunication Server Monitor
Telecommunications Server Monitor
" - - switch(screen) - - - // --- Main Menu --- - - if(0) - dat += "
[temp]
" - dat += "
Current Network: [network]
" - if(servers.len) - dat += "
Detected Telecommunication Servers:" - dat += "
\[Flush Buffer\]" - - else - dat += "
No servers detected. Scan for servers: \[Scan\]" - - - // --- Viewing Server --- - - if(1) - dat += "
[temp]
" - dat += "
\[Main Menu\] \[Refresh\]
" - dat += "
Current Network: [network]" - dat += "
Selected Server: [SelectedServer.id]" - - if(SelectedServer.totaltraffic >= 1024) - dat += "
Total recorded traffic: [round(SelectedServer.totaltraffic / 1024)] Terrabytes

" - else - dat += "
Total recorded traffic: [SelectedServer.totaltraffic] Gigabytes

" - - dat += "Stored Logs:
    " - - var/i = 0 - for(var/datum/comm_log_entry/C in SelectedServer.log_entries) - i++ - - - // If the log is a speech file - if(C.input_type == "Speech File") - - dat += "
  1. [C.name] \[X\]
    " - - // -- Determine race of orator -- - - var/race // The actual race of the mob - var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human - var/mobtype = C.parameters["mobtype"] - - var/list/humans = typesof(/mob/living/carbon/human, /mob/living/carbon/brain) - var/list/monkeys = typesof(/mob/living/carbon/monkey) - var/list/silicons = typesof(/mob/living/silicon) - var/list/slimes = typesof(/mob/living/simple_animal/slime) - var/list/animals = typesof(/mob/living/simple_animal) - - if(mobtype in humans) - race = "Human" - language = race - - else if(mobtype in slimes) // NT knows a lot about slimes, but not aliens. Can identify slimes - race = "Slime" - language = race - - else if(mobtype in monkeys) - race = "Monkey" - language = race - - else if(mobtype in silicons || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job - race = "Artificial Life" - language = race - - else if(istype(mobtype, /obj)) - race = "Machinery" - language = race - - else if(mobtype in animals) - race = "Domestic Animal" - language = race - - else - race = "Unidentifiable" - language = race - - // -- If the orator is a human, or universal translate is active, OR mob has universal speech on -- - - if(language == "Human" || universal_translate || C.parameters["uspeech"]) - dat += "Data type: [C.input_type]
    " - dat += "Source: [C.parameters["name"]] (Job: [C.parameters["job"]])
    " - dat += "Class: [race]
    " - dat += "Contents: \"[C.parameters["message"]]\"
    " - - - // -- Orator is not human and universal translate not active -- - - else - dat += "Data type: Audio File
    " - dat += "Source: Unidentifiable
    " - dat += "Class: [race]
    " - dat += "Contents: Unintelligble
    " - - dat += "

  2. " - - else if(C.input_type == "Execution Error") - - dat += "
  3. [C.name] \[X\]
    " - dat += "Output: \"[C.parameters["message"]]\"
    " - dat += "

  4. " - - - dat += "
" - - - - user << browse(dat, "window=comm_monitor;size=575x400") - onclose(user, "server_control") - - temp = "" - return - - -/obj/machinery/computer/telecomms/server/Topic(href, href_list) - if(..()) - return - - - add_fingerprint(usr) - usr.set_machine(src) - - if(href_list["viewserver"]) - screen = 1 - for(var/obj/machinery/telecomms/T in servers) - if(T.id == href_list["viewserver"]) - SelectedServer = T - break - - if(href_list["operation"]) - switch(href_list["operation"]) - - if("release") - servers = list() - screen = 0 - - if("mainmenu") - screen = 0 - - if("scan") - if(servers.len > 0) - temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" - - else - for(var/obj/machinery/telecomms/server/T in range(25, src)) - if(T.network == network) - servers.Add(T) - - if(!servers.len) - temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" - else - temp = "- [servers.len] SERVERS PROBED & BUFFERED -" - - screen = 0 - - if(href_list["delete"]) - - if(!src.allowed(usr) && !emagged) - usr << "ACCESS DENIED." - return - - if(SelectedServer) - - var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(href_list["delete"])] - - temp = "- DELETED ENTRY: [D.name] -" - - SelectedServer.log_entries.Remove(D) - del(D) - - else - temp = "- FAILED: NO SELECTED MACHINE -" - - if(href_list["network"]) - - var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network) - - if(newnet && ((usr in range(1, src) || issilicon(usr)))) - if(length(newnet) > 15) - temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" - - else - - network = newnet - screen = 0 - servers = list() - temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" - - updateUsrDialog() - return - -/obj/machinery/computer/telecomms/server/attackby() - ..() - src.updateUsrDialog() - return - -/obj/machinery/computer/telecomms/server/emag_act(mob/user as mob) - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + +/obj/machinery/computer/telecomms/server + name = "telecommunications server monitoring console" + icon_screen = "comm_logs" + + var/screen = 0 // the screen number: + var/list/servers = list() // the servers located by the computer + var/obj/machinery/telecomms/server/SelectedServer + + var/network = "NULL" // the network to probe + var/temp = "" // temporary feedback messages + + var/universal_translate = 0 // set to 1 if it can translate nonhuman speech + + req_access = list(access_tcomsat) + circuit = "/obj/item/weapon/circuitboard/comm_server" + +/obj/machinery/computer/telecomms/server/attack_hand(mob/user as mob) + if(..()) + return + user.set_machine(src) + var/dat = "Telecommunication Server Monitor
Telecommunications Server Monitor
" + + switch(screen) + + + // --- Main Menu --- + + if(0) + dat += "
[temp]
" + dat += "
Current Network: [network]
" + if(servers.len) + dat += "
Detected Telecommunication Servers:" + dat += "
\[Flush Buffer\]" + + else + dat += "
No servers detected. Scan for servers: \[Scan\]" + + + // --- Viewing Server --- + + if(1) + dat += "
[temp]
" + dat += "
\[Main Menu\] \[Refresh\]
" + dat += "
Current Network: [network]" + dat += "
Selected Server: [SelectedServer.id]" + + if(SelectedServer.totaltraffic >= 1024) + dat += "
Total recorded traffic: [round(SelectedServer.totaltraffic / 1024)] Terrabytes

" + else + dat += "
Total recorded traffic: [SelectedServer.totaltraffic] Gigabytes

" + + dat += "Stored Logs:
    " + + var/i = 0 + for(var/datum/comm_log_entry/C in SelectedServer.log_entries) + i++ + + + // If the log is a speech file + if(C.input_type == "Speech File") + + dat += "
  1. [C.name] \[X\]
    " + + // -- Determine race of orator -- + + var/race // The actual race of the mob + var/language = "Human" // MMIs, pAIs, Cyborgs and humans all speak Human + var/mobtype = C.parameters["mobtype"] + + var/list/humans = typesof(/mob/living/carbon/human, /mob/living/carbon/brain) + var/list/monkeys = typesof(/mob/living/carbon/monkey) + var/list/silicons = typesof(/mob/living/silicon) + var/list/slimes = typesof(/mob/living/simple_animal/slime) + var/list/animals = typesof(/mob/living/simple_animal) + + if(mobtype in humans) + race = "Human" + language = race + + else if(mobtype in slimes) // NT knows a lot about slimes, but not aliens. Can identify slimes + race = "Slime" + language = race + + else if(mobtype in monkeys) + race = "Monkey" + language = race + + else if(mobtype in silicons || C.parameters["job"] == "AI") // sometimes M gets deleted prematurely for AIs... just check the job + race = "Artificial Life" + language = race + + else if(istype(mobtype, /obj)) + race = "Machinery" + language = race + + else if(mobtype in animals) + race = "Domestic Animal" + language = race + + else + race = "Unidentifiable" + language = race + + // -- If the orator is a human, or universal translate is active, OR mob has universal speech on -- + + if(language == "Human" || universal_translate || C.parameters["uspeech"]) + dat += "Data type: [C.input_type]
    " + dat += "Source: [C.parameters["name"]] (Job: [C.parameters["job"]])
    " + dat += "Class: [race]
    " + dat += "Contents: \"[C.parameters["message"]]\"
    " + + + // -- Orator is not human and universal translate not active -- + + else + dat += "Data type: Audio File
    " + dat += "Source: Unidentifiable
    " + dat += "Class: [race]
    " + dat += "Contents: Unintelligble
    " + + dat += "

  2. " + + else if(C.input_type == "Execution Error") + + dat += "
  3. [C.name] \[X\]
    " + dat += "Output: \"[C.parameters["message"]]\"
    " + dat += "

  4. " + + + dat += "
" + + + + user << browse(dat, "window=comm_monitor;size=575x400") + onclose(user, "server_control") + + temp = "" + return + + +/obj/machinery/computer/telecomms/server/Topic(href, href_list) + if(..()) + return + + + add_fingerprint(usr) + usr.set_machine(src) + + if(href_list["viewserver"]) + screen = 1 + for(var/obj/machinery/telecomms/T in servers) + if(T.id == href_list["viewserver"]) + SelectedServer = T + break + + if(href_list["operation"]) + switch(href_list["operation"]) + + if("release") + servers = list() + screen = 0 + + if("mainmenu") + screen = 0 + + if("scan") + if(servers.len > 0) + temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" + + else + for(var/obj/machinery/telecomms/server/T in range(25, src)) + if(T.network == network) + servers.Add(T) + + if(!servers.len) + temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" + else + temp = "- [servers.len] SERVERS PROBED & BUFFERED -" + + screen = 0 + + if(href_list["delete"]) + + if(!src.allowed(usr) && !emagged) + usr << "ACCESS DENIED." + return + + if(SelectedServer) + + var/datum/comm_log_entry/D = SelectedServer.log_entries[text2num(href_list["delete"])] + + temp = "- DELETED ENTRY: [D.name] -" + + SelectedServer.log_entries.Remove(D) + del(D) + + else + temp = "- FAILED: NO SELECTED MACHINE -" + + if(href_list["network"]) + + var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network) + + if(newnet && ((usr in range(1, src) || issilicon(usr)))) + if(length(newnet) > 15) + temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" + + else + + network = newnet + screen = 0 + servers = list() + temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" + + updateUsrDialog() + return + +/obj/machinery/computer/telecomms/server/attackby() + ..() + src.updateUsrDialog() + return + +/obj/machinery/computer/telecomms/server/emag_act(mob/user as mob) + if(!emagged) + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + emagged = 1 user << "You you disable the security protocols." \ No newline at end of file diff --git a/code/game/machinery/telecomms/computers/telemonitor.dm b/code/game/machinery/telecomms/computers/telemonitor.dm index 432604dc15e..d877489ac19 100644 --- a/code/game/machinery/telecomms/computers/telemonitor.dm +++ b/code/game/machinery/telecomms/computers/telemonitor.dm @@ -1,134 +1,134 @@ - -/* - Telecomms monitor tracks the overall trafficing of a telecommunications network - and displays a heirarchy of linked machines. -*/ - - -/obj/machinery/computer/telecomms/monitor - name = "telecommunications monitoring console" - icon_state = "comm_monitor" - - var/screen = 0 // the screen number: - var/list/machinelist = list() // the machines located by the computer - var/obj/machinery/telecomms/SelectedMachine - - var/network = "NULL" // the network to probe - - var/temp = "" // temporary feedback messages - circuit = "/obj/item/weapon/circuitboard/comm_monitor" - -/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user as mob) - if(..()) - return - user.set_machine(src) - var/dat = "Telecommunications Monitor
Telecommunications Monitor
" - - switch(screen) - - - // --- Main Menu --- - - if(0) - dat += "
[temp]

" - dat += "
Current Network: [network]
" - if(machinelist.len) - dat += "
Detected Network Entities:" - dat += "
\[Flush Buffer\]" - else - dat += "\[Probe Network\]" - - - // --- Viewing Machine --- - - if(1) - dat += "
[temp]
" - dat += "
\[Main Menu\]
" - dat += "
Current Network: [network]
" - dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])
" - dat += "Linked Entities:
    " - for(var/obj/machinery/telecomms/T in SelectedMachine.links) - if(!T.hide) - dat += "
  1. \ref[T.id] [T.name] ([T.id])
  2. " - dat += "
" - - - - user << browse(dat, "window=comm_monitor;size=575x400") - onclose(user, "server_control") - - temp = "" - return - - -/obj/machinery/computer/telecomms/monitor/Topic(href, href_list) - if(..()) - return - - - add_fingerprint(usr) - usr.set_machine(src) - - if(href_list["viewmachine"]) - screen = 1 - for(var/obj/machinery/telecomms/T in machinelist) - if(T.id == href_list["viewmachine"]) - SelectedMachine = T - break - - if(href_list["operation"]) - switch(href_list["operation"]) - - if("release") - machinelist = list() - screen = 0 - - if("mainmenu") - screen = 0 - - if("probe") - if(machinelist.len > 0) - temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" - - else - for(var/obj/machinery/telecomms/T in range(25, src)) - if(T.network == network) - machinelist.Add(T) - - if(!machinelist.len) - temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -" - else - temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -" - - screen = 0 - - - if(href_list["network"]) - - var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network) - if(newnet && ((usr in range(1, src) || issilicon(usr)))) - if(length(newnet) > 15) - temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" - - else - network = newnet - screen = 0 - machinelist = list() - temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" - - updateUsrDialog() - return - -/obj/machinery/computer/telecomms/monitor/attackby() - ..() - src.updateUsrDialog() - return - -/obj/machinery/computer/telecomms/monitor/emag_act(mob/user as mob) - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 + +/* + Telecomms monitor tracks the overall trafficing of a telecommunications network + and displays a heirarchy of linked machines. +*/ + + +/obj/machinery/computer/telecomms/monitor + name = "telecommunications monitoring console" + icon_screen = "comm_monitor" + + var/screen = 0 // the screen number: + var/list/machinelist = list() // the machines located by the computer + var/obj/machinery/telecomms/SelectedMachine + + var/network = "NULL" // the network to probe + + var/temp = "" // temporary feedback messages + circuit = "/obj/item/weapon/circuitboard/comm_monitor" + +/obj/machinery/computer/telecomms/monitor/attack_hand(mob/user as mob) + if(..()) + return + user.set_machine(src) + var/dat = "Telecommunications Monitor
Telecommunications Monitor
" + + switch(screen) + + + // --- Main Menu --- + + if(0) + dat += "
[temp]

" + dat += "
Current Network: [network]
" + if(machinelist.len) + dat += "
Detected Network Entities:" + dat += "
\[Flush Buffer\]" + else + dat += "\[Probe Network\]" + + + // --- Viewing Machine --- + + if(1) + dat += "
[temp]
" + dat += "
\[Main Menu\]
" + dat += "
Current Network: [network]
" + dat += "Selected Network Entity: [SelectedMachine.name] ([SelectedMachine.id])
" + dat += "Linked Entities:
    " + for(var/obj/machinery/telecomms/T in SelectedMachine.links) + if(!T.hide) + dat += "
  1. \ref[T.id] [T.name] ([T.id])
  2. " + dat += "
" + + + + user << browse(dat, "window=comm_monitor;size=575x400") + onclose(user, "server_control") + + temp = "" + return + + +/obj/machinery/computer/telecomms/monitor/Topic(href, href_list) + if(..()) + return + + + add_fingerprint(usr) + usr.set_machine(src) + + if(href_list["viewmachine"]) + screen = 1 + for(var/obj/machinery/telecomms/T in machinelist) + if(T.id == href_list["viewmachine"]) + SelectedMachine = T + break + + if(href_list["operation"]) + switch(href_list["operation"]) + + if("release") + machinelist = list() + screen = 0 + + if("mainmenu") + screen = 0 + + if("probe") + if(machinelist.len > 0) + temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" + + else + for(var/obj/machinery/telecomms/T in range(25, src)) + if(T.network == network) + machinelist.Add(T) + + if(!machinelist.len) + temp = "- FAILED: UNABLE TO LOCATE NETWORK ENTITIES IN \[[network]\] -" + else + temp = "- [machinelist.len] ENTITIES LOCATED & BUFFERED -" + + screen = 0 + + + if(href_list["network"]) + + var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network) + if(newnet && ((usr in range(1, src) || issilicon(usr)))) + if(length(newnet) > 15) + temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" + + else + network = newnet + screen = 0 + machinelist = list() + temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" + + updateUsrDialog() + return + +/obj/machinery/computer/telecomms/monitor/attackby() + ..() + src.updateUsrDialog() + return + +/obj/machinery/computer/telecomms/monitor/emag_act(mob/user as mob) + if(!emagged) + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + emagged = 1 user << "You you disable the security protocols." \ No newline at end of file diff --git a/code/game/machinery/telecomms/computers/traffic_control.dm b/code/game/machinery/telecomms/computers/traffic_control.dm index 3edb25ff551..68d72216c4a 100644 --- a/code/game/machinery/telecomms/computers/traffic_control.dm +++ b/code/game/machinery/telecomms/computers/traffic_control.dm @@ -1,286 +1,285 @@ - - -/obj/machinery/computer/telecomms/traffic - name = "telecommunications traffic control console" - icon_state = "computer_generic" - - var/screen = 0 // the screen number: - var/list/servers = list() // the servers located by the computer - var/mob/editingcode - var/mob/lasteditor - var/list/viewingcode = list() - var/obj/machinery/telecomms/server/SelectedServer - - var/network = "NULL" // the network to probe - var/temp = "" // temporary feedback messages - - var/storedcode = "" // code stored - var/obj/item/weapon/card/id/auth = null - var/list/access_log = list() - var/process = 0 - circuit = "/obj/item/weapon/circuitboard/comm_traffic" - - req_access = list(access_tcomsat) - -/obj/machinery/computer/telecomms/traffic/proc/stop_editing() - if(editingcode) - if(editingcode.client) - winshow(editingcode, "Telecomms IDE", 0) // hide the window! - editingcode.unset_machine() - editingcode = null - -/obj/machinery/computer/telecomms/traffic/process() - - if(stat & (NOPOWER|BROKEN)) - stop_editing() - return - - if(editingcode && editingcode.machine != src) - stop_editing() - return - - if(!editingcode) - if(length(viewingcode) > 0) - editingcode = pick(viewingcode) - viewingcode.Remove(editingcode) - return - - process = !process - if(!process) - return - - // loop if there's someone manning the keyboard - if(!editingcode.client) - stop_editing() - return - - // For the typer, the input is enabled. Buffer the typed text - storedcode = "[winget(editingcode, "tcscode", "text")]" - winset(editingcode, "tcscode", "is-disabled=false") - - // If the player's not manning the keyboard anymore, adjust everything - if(!in_range(editingcode, src) && !issilicon(editingcode) || editingcode.machine != src) - winshow(editingcode, "Telecomms IDE", 0) // hide the window! - editingcode = null - return - - // For other people viewing the typer type code, the input is disabled and they can only view the code - // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once) - - if(length(viewingcode)) - // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element - var/showcode = replacetext(storedcode, "\\\"", "\\\\\"") - showcode = replacetext(storedcode, "\"", "\\\"") - - for(var/mob/M in viewingcode) - - if( (M.machine == src && in_range(M, src) ) || issilicon(M)) - winset(M, "tcscode", "is-disabled=true") - winset(M, "tcscode", "text=\"[showcode]\"") - else - viewingcode.Remove(M) - winshow(M, "Telecomms IDE", 0) // hide the windows - - -/obj/machinery/computer/telecomms/traffic/attack_hand(mob/user as mob) - if(..()) - return - user.set_machine(src) - var/dat = "Telecommunication Traffic Control
Telecommunications Traffic Control
" - dat += "
[(auth ? "AUTHED" : "NOT AUTHED")]: [(!auth ? "Insert ID" : auth)]
" - dat += "View System Log
" - - if(issilicon(user) || auth) - - switch(screen) - - - // --- Main Menu --- - - if(0) - dat += "
[temp]
" - dat += "
Current Network: [network]
" - if(servers.len) - dat += "
Detected Telecommunication Servers:" - dat += "
\[Flush Buffer\]" - - else - dat += "
No servers detected. Scan for servers: \[Scan\]" - - - // --- Viewing Server --- - - if(1) - if(SelectedServer) - dat += "
[temp]
" - dat += "
\[Main Menu\] \[Refresh\]
" - dat += "
Current Network: [network]" - dat += "
Selected Server: [SelectedServer.id]

" - dat += "
\[Edit Code\]" - dat += "
Signal Execution: " - if(SelectedServer.autoruncode) - dat += "ALWAYS" - else - dat += "NEVER" - else - screen = 0 - return - - - user << browse(dat, "window=traffic_control;size=575x400") - onclose(user, "server_control") - - temp = "" - return - -/obj/machinery/computer/telecomms/traffic/proc/create_log(var/entry, var/mob/user) - var/id = null - if(issilicon(user)) - id = "System Administrator" - else - if(auth) - id = "[auth.registered_name] ([auth.assignment])" - else - ERROR("There is a null auth while the user isn't a silicon! ([user.name], [user.type])") - return - access_log += "\[[get_timestamp()]\] [id] [entry]" - -/obj/machinery/computer/telecomms/traffic/proc/print_logs() - . = "

Traffic Control Telecomms System Log


" - for(var/entry in access_log) - . += entry + "
" - return . - -/obj/machinery/computer/telecomms/traffic/Topic(href, href_list) - if(..()) - return - - - add_fingerprint(usr) - usr.set_machine(src) - - if(href_list["auth"]) - if(iscarbon(usr)) - var/mob/living/carbon/C = usr - if(!auth) - var/obj/item/weapon/card/id/I = C.get_active_hand() - if(istype(I)) - if(check_access(I)) - C.drop_item() - I.loc = src - auth = I - create_log("has logged in.", usr) - else - create_log("has logged out.", usr) - auth.loc = src.loc - C.put_in_hands(auth) - auth = null - updateUsrDialog() - return - - if(href_list["print"]) - usr << browse(print_logs(), "window=traffic_logs") - return - - if(!auth && !issilicon(usr) && !emagged) - usr << "ACCESS DENIED." - return - - if(href_list["viewserver"]) - screen = 1 - for(var/obj/machinery/telecomms/T in servers) - if(T.id == href_list["viewserver"]) - SelectedServer = T - create_log("selected server [T.name]", usr) - break - - - if(href_list["operation"]) - create_log("has performed action: [href_list["operation"]].", usr) - switch(href_list["operation"]) - - if("release") - servers = list() - screen = 0 - - if("mainmenu") - screen = 0 - - if("scan") - if(servers.len > 0) - temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" - - else - for(var/obj/machinery/telecomms/server/T in range(25, src)) - if(T.network == network) - servers.Add(T) - - if(!servers.len) - temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" - else - temp = "- [servers.len] SERVERS PROBED & BUFFERED -" - - screen = 0 - - if("editcode") - if(editingcode == usr) return - if(usr in viewingcode) return - - if(!editingcode) - lasteditor = usr - editingcode = usr - winshow(editingcode, "Telecomms IDE", 1) // show the IDE - winset(editingcode, "tcscode", "is-disabled=false") - winset(editingcode, "tcscode", "text=\"\"") - var/showcode = replacetext(storedcode, "\\\"", "\\\\\"") - showcode = replacetext(storedcode, "\"", "\\\"") - winset(editingcode, "tcscode", "text=\"[showcode]\"") - - else - viewingcode.Add(usr) - winshow(usr, "Telecomms IDE", 1) // show the IDE - winset(usr, "tcscode", "is-disabled=true") - winset(editingcode, "tcscode", "text=\"\"") - var/showcode = replacetext(storedcode, "\"", "\\\"") - winset(usr, "tcscode", "text=\"[showcode]\"") - - if("togglerun") - SelectedServer.autoruncode = !(SelectedServer.autoruncode) - - if(href_list["network"]) - - var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network) - - if(newnet && canAccess(usr)) - if(length(newnet) > 15) - temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" - - else - - network = newnet - screen = 0 - servers = list() - temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" - create_log("has set the network to [network].", usr) - - updateUsrDialog() - return - -/obj/machinery/computer/telecomms/traffic/attackby() - ..() - src.updateUsrDialog() - return - -/obj/machinery/computer/telecomms/traffic/emag_act(mob/user as mob) - if(!emagged) - playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 - user << "You you disable the security protocols." - -/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user) - if(issilicon(user) || in_range(user, src)) - return 1 + + +/obj/machinery/computer/telecomms/traffic + name = "telecommunications traffic control console" + + var/screen = 0 // the screen number: + var/list/servers = list() // the servers located by the computer + var/mob/editingcode + var/mob/lasteditor + var/list/viewingcode = list() + var/obj/machinery/telecomms/server/SelectedServer + + var/network = "NULL" // the network to probe + var/temp = "" // temporary feedback messages + + var/storedcode = "" // code stored + var/obj/item/weapon/card/id/auth = null + var/list/access_log = list() + var/process = 0 + circuit = "/obj/item/weapon/circuitboard/comm_traffic" + + req_access = list(access_tcomsat) + +/obj/machinery/computer/telecomms/traffic/proc/stop_editing() + if(editingcode) + if(editingcode.client) + winshow(editingcode, "Telecomms IDE", 0) // hide the window! + editingcode.unset_machine() + editingcode = null + +/obj/machinery/computer/telecomms/traffic/process() + + if(stat & (NOPOWER|BROKEN)) + stop_editing() + return + + if(editingcode && editingcode.machine != src) + stop_editing() + return + + if(!editingcode) + if(length(viewingcode) > 0) + editingcode = pick(viewingcode) + viewingcode.Remove(editingcode) + return + + process = !process + if(!process) + return + + // loop if there's someone manning the keyboard + if(!editingcode.client) + stop_editing() + return + + // For the typer, the input is enabled. Buffer the typed text + storedcode = "[winget(editingcode, "tcscode", "text")]" + winset(editingcode, "tcscode", "is-disabled=false") + + // If the player's not manning the keyboard anymore, adjust everything + if(!in_range(editingcode, src) && !issilicon(editingcode) || editingcode.machine != src) + winshow(editingcode, "Telecomms IDE", 0) // hide the window! + editingcode = null + return + + // For other people viewing the typer type code, the input is disabled and they can only view the code + // (this is put in place so that there's not any magical shenanigans with 50 people inputting different code all at once) + + if(length(viewingcode)) + // This piece of code is very important - it escapes quotation marks so string aren't cut off by the input element + var/showcode = replacetext(storedcode, "\\\"", "\\\\\"") + showcode = replacetext(storedcode, "\"", "\\\"") + + for(var/mob/M in viewingcode) + + if( (M.machine == src && in_range(M, src) ) || issilicon(M)) + winset(M, "tcscode", "is-disabled=true") + winset(M, "tcscode", "text=\"[showcode]\"") + else + viewingcode.Remove(M) + winshow(M, "Telecomms IDE", 0) // hide the windows + + +/obj/machinery/computer/telecomms/traffic/attack_hand(mob/user as mob) + if(..()) + return + user.set_machine(src) + var/dat = "Telecommunication Traffic Control
Telecommunications Traffic Control
" + dat += "
[(auth ? "AUTHED" : "NOT AUTHED")]: [(!auth ? "Insert ID" : auth)]
" + dat += "View System Log
" + + if(issilicon(user) || auth) + + switch(screen) + + + // --- Main Menu --- + + if(0) + dat += "
[temp]
" + dat += "
Current Network: [network]
" + if(servers.len) + dat += "
Detected Telecommunication Servers:" + dat += "
\[Flush Buffer\]" + + else + dat += "
No servers detected. Scan for servers: \[Scan\]" + + + // --- Viewing Server --- + + if(1) + if(SelectedServer) + dat += "
[temp]
" + dat += "
\[Main Menu\] \[Refresh\]
" + dat += "
Current Network: [network]" + dat += "
Selected Server: [SelectedServer.id]

" + dat += "
\[Edit Code\]" + dat += "
Signal Execution: " + if(SelectedServer.autoruncode) + dat += "ALWAYS" + else + dat += "NEVER" + else + screen = 0 + return + + + user << browse(dat, "window=traffic_control;size=575x400") + onclose(user, "server_control") + + temp = "" + return + +/obj/machinery/computer/telecomms/traffic/proc/create_log(var/entry, var/mob/user) + var/id = null + if(issilicon(user)) + id = "System Administrator" + else + if(auth) + id = "[auth.registered_name] ([auth.assignment])" + else + ERROR("There is a null auth while the user isn't a silicon! ([user.name], [user.type])") + return + access_log += "\[[get_timestamp()]\] [id] [entry]" + +/obj/machinery/computer/telecomms/traffic/proc/print_logs() + . = "

Traffic Control Telecomms System Log


" + for(var/entry in access_log) + . += entry + "
" + return . + +/obj/machinery/computer/telecomms/traffic/Topic(href, href_list) + if(..()) + return + + + add_fingerprint(usr) + usr.set_machine(src) + + if(href_list["auth"]) + if(iscarbon(usr)) + var/mob/living/carbon/C = usr + if(!auth) + var/obj/item/weapon/card/id/I = C.get_active_hand() + if(istype(I)) + if(check_access(I)) + C.drop_item() + I.loc = src + auth = I + create_log("has logged in.", usr) + else + create_log("has logged out.", usr) + auth.loc = src.loc + C.put_in_hands(auth) + auth = null + updateUsrDialog() + return + + if(href_list["print"]) + usr << browse(print_logs(), "window=traffic_logs") + return + + if(!auth && !issilicon(usr) && !emagged) + usr << "ACCESS DENIED." + return + + if(href_list["viewserver"]) + screen = 1 + for(var/obj/machinery/telecomms/T in servers) + if(T.id == href_list["viewserver"]) + SelectedServer = T + create_log("selected server [T.name]", usr) + break + + + if(href_list["operation"]) + create_log("has performed action: [href_list["operation"]].", usr) + switch(href_list["operation"]) + + if("release") + servers = list() + screen = 0 + + if("mainmenu") + screen = 0 + + if("scan") + if(servers.len > 0) + temp = "- FAILED: CANNOT PROBE WHEN BUFFER FULL -" + + else + for(var/obj/machinery/telecomms/server/T in range(25, src)) + if(T.network == network) + servers.Add(T) + + if(!servers.len) + temp = "- FAILED: UNABLE TO LOCATE SERVERS IN \[[network]\] -" + else + temp = "- [servers.len] SERVERS PROBED & BUFFERED -" + + screen = 0 + + if("editcode") + if(editingcode == usr) return + if(usr in viewingcode) return + + if(!editingcode) + lasteditor = usr + editingcode = usr + winshow(editingcode, "Telecomms IDE", 1) // show the IDE + winset(editingcode, "tcscode", "is-disabled=false") + winset(editingcode, "tcscode", "text=\"\"") + var/showcode = replacetext(storedcode, "\\\"", "\\\\\"") + showcode = replacetext(storedcode, "\"", "\\\"") + winset(editingcode, "tcscode", "text=\"[showcode]\"") + + else + viewingcode.Add(usr) + winshow(usr, "Telecomms IDE", 1) // show the IDE + winset(usr, "tcscode", "is-disabled=true") + winset(editingcode, "tcscode", "text=\"\"") + var/showcode = replacetext(storedcode, "\"", "\\\"") + winset(usr, "tcscode", "text=\"[showcode]\"") + + if("togglerun") + SelectedServer.autoruncode = !(SelectedServer.autoruncode) + + if(href_list["network"]) + + var/newnet = stripped_input(usr, "Which network do you want to view?", "Comm Monitor", network) + + if(newnet && canAccess(usr)) + if(length(newnet) > 15) + temp = "- FAILED: NETWORK TAG STRING TOO LENGHTLY -" + + else + + network = newnet + screen = 0 + servers = list() + temp = "- NEW NETWORK TAG SET IN ADDRESS \[[network]\] -" + create_log("has set the network to [network].", usr) + + updateUsrDialog() + return + +/obj/machinery/computer/telecomms/traffic/attackby() + ..() + src.updateUsrDialog() + return + +/obj/machinery/computer/telecomms/traffic/emag_act(mob/user as mob) + if(!emagged) + playsound(src.loc, 'sound/effects/sparks4.ogg', 75, 1) + emagged = 1 + user << "You you disable the security protocols." + +/obj/machinery/computer/telecomms/traffic/proc/canAccess(var/mob/user) + if(issilicon(user) || in_range(user, src)) + return 1 return 0 \ No newline at end of file diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 1ec4c229900..f84caabafdc 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -1,7 +1,8 @@ /obj/machinery/computer/teleporter name = "Teleporter Control Console" desc = "Used to control a linked teleportation Hub and Station." - icon_state = "teleport" + icon_screen = "teleport" + icon_keyboard = "teleport_key" circuit = "/obj/item/weapon/circuitboard/teleporter" var/obj/item/device/gps/locked = null var/regime_set = "Teleporter" diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 08f454d379a..d2c467765a4 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -81,10 +81,8 @@ /obj/machinery/computer/mech_bay_power_console name = "mech bay power control console" desc = "Used to control mechbay power ports." - density = 1 - anchored = 1 - icon = 'icons/obj/computer.dmi' - icon_state = "recharge_comp" + icon_screen = "recharge_comp" + icon_keyboard = "rd_key" circuit = /obj/item/weapon/circuitboard/mech_bay_power_console var/obj/machinery/mech_bay_recharge_port/recharge_port @@ -147,16 +145,10 @@ /obj/machinery/computer/mech_bay_power_console/update_icon() - if(stat & NOPOWER) - icon_state = "recharge_comp0" - return - if(stat & BROKEN) - icon_state = "recharge_compb" - return + ..() if(!recharge_port || !recharge_port.recharging_mech || !recharge_port.recharging_mech.cell || !(recharge_port.recharging_mech.cell.charge < recharge_port.recharging_mech.cell.maxcharge)) - icon_state = "recharge_comp" return - icon_state = "recharge_comp_on" + overlays += "recharge_comp_on" /obj/machinery/computer/mech_bay_power_console/initialize() reconnect() diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm index b8bbbc23481..adc83c8da0d 100644 --- a/code/game/mecha/mecha_control_console.dm +++ b/code/game/mecha/mecha_control_console.dm @@ -1,8 +1,8 @@ /obj/machinery/computer/mecha name = "exosuit control console" desc = "Used to remotely locate or lockdown exosuits." - icon = 'icons/obj/computer.dmi' - icon_state = "mecha" + icon_screen = "mecha" + icon_keyboard = "tech_key" req_access = list(access_robotics) circuit = "/obj/item/weapon/circuitboard/mecha_control" var/list/located = list() @@ -58,16 +58,6 @@ updateUsrDialog() return - -/obj/machinery/computer/mecha/update_icon() - if(stat & NOPOWER) - icon_state = "mecha0" - return - if(stat & BROKEN) - icon_state = "mechab" - return - icon_state = "mecha" - /obj/item/mecha_parts/mecha_tracking name = "exosuit tracking beacon" desc = "Device used to transmit exosuit data." diff --git a/code/game/machinery/computer/ai_core.dm b/code/game/objects/structures/ai_core.dm similarity index 100% rename from code/game/machinery/computer/ai_core.dm rename to code/game/objects/structures/ai_core.dm diff --git a/code/game/objects/structures/showcase.dm b/code/game/objects/structures/showcase.dm index 3a5be7f1b01..e32ef9952a4 100644 --- a/code/game/objects/structures/showcase.dm +++ b/code/game/objects/structures/showcase.dm @@ -1,20 +1,28 @@ -/*Completely generic structures for use by mappers to create fake objects, i.e. display rooms*/ -/obj/structure/showcase - name = "showcase" - icon = 'icons/obj/stationobjs.dmi' - icon_state = "showcase_1" - desc = "A stand with the empty body of a cyborg bolted to it." - density = 1 - anchored = 1 - -/obj/structure/showcase/fakeid - name = "\improper Centcom identification console" - desc = "You can use this to change ID's." - icon = 'icons/obj/computer.dmi' - icon_state = "id" - -/obj/structure/showcase/fakesec - name = "\improper Centcom security records" - desc = "Used to view and edit personnel's security records" - icon = 'icons/obj/computer.dmi' - icon_state = "security" \ No newline at end of file +/*Completely generic structures for use by mappers to create fake objects, i.e. display rooms*/ +/obj/structure/showcase + name = "showcase" + icon = 'icons/obj/stationobjs.dmi' + icon_state = "showcase_1" + desc = "A stand with the empty body of a cyborg bolted to it." + density = 1 + anchored = 1 + +/obj/structure/showcase/fakeid + name = "\improper Centcom identification console" + desc = "You can use this to change ID's." + icon = 'icons/obj/computer.dmi' + icon_state = "computer" + +/obj/structure/showcase/fakeid/New() + overlays += "id" + overlays += "id_key" + +/obj/structure/showcase/fakesec + name = "\improper Centcom security records" + desc = "Used to view and edit personnel's security records" + icon = 'icons/obj/computer.dmi' + icon_state = "computer" + +/obj/structure/showcase/fakesec/New() + overlays += "security" + overlays += "security_key" \ No newline at end of file diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 254b383c7a4..c9d885d8f29 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -16,8 +16,9 @@ */ /obj/machinery/computer/libraryconsole name = "library visitor console" - icon = 'icons/obj/computer.dmi' - icon_state = "library" + icon_state = "oldcomp" + icon_screen = "library" + icon_keyboard = null circuit = /obj/item/weapon/circuitboard/libraryconsole var/screenstate = 0 var/title diff --git a/code/modules/mining/laborcamp/laborshuttle.dm b/code/modules/mining/laborcamp/laborshuttle.dm index 7f0992a502f..079eaeab8dd 100644 --- a/code/modules/mining/laborcamp/laborshuttle.dm +++ b/code/modules/mining/laborcamp/laborshuttle.dm @@ -1,8 +1,6 @@ /obj/machinery/computer/shuttle/labor name = "labor shuttle console" desc = "Used to call and send the labor camp shuttle." - icon = 'icons/obj/computer.dmi' - icon_state = "shuttle" circuit = /obj/item/weapon/circuitboard/labor_shuttle shuttleId = "laborcamp" possible_destinations = "laborcamp_home;laborcamp_away" diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index 77c4aa75751..1c8838e4311 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -274,11 +274,13 @@ name = "solar panel control" desc = "A controller for solar panel arrays." icon = 'icons/obj/computer.dmi' - icon_state = "solar" + icon_state = "computer" anchored = 1 density = 1 use_power = 1 idle_power_usage = 250 + var/icon_screen = "solar" + var/icon_keyboard = "power_key" var/id = 0 var/cdir = 0 var/targetdir = 0 // target angle in manual tracking (since it updates every game minute) @@ -351,19 +353,17 @@ set_panels(cdir) /obj/machinery/power/solar_control/update_icon() - if(stat & BROKEN) - icon_state = "broken" - overlays.Cut() - return - if(stat & NOPOWER) - icon_state = "c_unpowered" - overlays.Cut() - return - icon_state = "solar" overlays.Cut() + if(stat & NOPOWER) + overlays += "[icon_keyboard]_off" + return + overlays += icon_keyboard + if(stat & BROKEN) + overlays += "[icon_state]_broken" + else + overlays += icon_screen if(cdir > -1) overlays += image('icons/obj/computer.dmi', "solcon-o", FLY_LAYER, angle2dir(cdir)) - return /obj/machinery/power/solar_control/attack_hand(mob/user) if(!..()) diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 86e3930b58a..405880f4249 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -56,10 +56,8 @@ /obj/machinery/computer/turbine_computer name = "gas turbine control computer" desc = "A computer to remotely control a gas turbine" - icon = 'icons/obj/computer.dmi' - icon_state = "turbinecomp" - anchored = 1 - density = 1 + icon_screen = "turbinecomp" + icon_keyboard = "tech_key" circuit = /obj/item/weapon/circuitboard/turbine_computer var/obj/machinery/power/compressor/compressor var/id = 0 diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index d076c813158..06ad949f29d 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -31,7 +31,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole name = "R&D Console" - icon_state = "rdcomp" + icon_screen = "rdcomp" + icon_keyboard = "rd_key" circuit = /obj/item/weapon/circuitboard/rdconsole var/datum/research/files //Stores all the collected research data. var/obj/item/weapon/disk/tech_disk/t_disk = null //Stores the technology disk. diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index b60a0d7bfe5..27dac665e03 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -482,8 +482,8 @@ /obj/machinery/computer/shuttle name = "Shuttle Console" - icon = 'icons/obj/computer.dmi' - icon_state = "shuttle" + icon_screen = "shuttle" + icon_keyboard = "tech_key" req_access = list( ) circuit = /obj/item/weapon/circuitboard/shuttle var/shuttleId diff --git a/icons/obj/computer.dmi b/icons/obj/computer.dmi index 4a7846286da..567fa80e5a7 100644 Binary files a/icons/obj/computer.dmi and b/icons/obj/computer.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 42c59cb7caa..5f44fac3287 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -431,7 +431,6 @@ #include "code\game\machinery\camera\motion.dm" #include "code\game\machinery\camera\presets.dm" #include "code\game\machinery\camera\tracking.dm" -#include "code\game\machinery\computer\ai_core.dm" #include "code\game\machinery\computer\aifixer.dm" #include "code\game\machinery\computer\arcade.dm" #include "code\game\machinery\computer\atmos_alert.dm" @@ -685,6 +684,7 @@ #include "code\game\objects\items\weapons\tanks\tank_types.dm" #include "code\game\objects\items\weapons\tanks\tanks.dm" #include "code\game\objects\items\weapons\tanks\watertank.dm" +#include "code\game\objects\structures\ai_core.dm" #include "code\game\objects\structures\artstuff.dm" #include "code\game\objects\structures\barsigns.dm" #include "code\game\objects\structures\bedsheet_bin.dm"