From 47b3d08f04f56ba8e848efc3640a49a61a0998d8 Mon Sep 17 00:00:00 2001 From: Henri215 <77684085+Henri215@users.noreply.github.com> Date: Fri, 28 Oct 2022 14:00:03 -0300 Subject: [PATCH] Newscasters/camera monitors/displays tweaks (#19305) * frames and autolathe * final adjustment * engine monitor * circuit board selection and newscaster tweaks * names adjustments * entertainment frame icon adjustment * moving to another PR * forgot to move those * added the other monitors circuit boards * Update code/game/machinery/computer/camera.dm Co-authored-by: Farie82 * removed unnecessary flow * display * entertainment frame uses correct icon now * merge conflcit part 2, do_build for newscasters * moving var * Sirryan suggestion and reverting piece of code removed by mistake * Update code/game/machinery/computer/buildandrepair.dm Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> * added description * Apply suggestions from code review Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> Co-authored-by: Farie82 * Sirryan suggestion and removed 1 * moved to on_deconstruction * Removing unused arguments Co-authored-by: Farie82 Co-authored-by: SteelSlayer <42044220+SteelSlayer@users.noreply.github.com> Co-authored-by: Sirryan2002 <80364400+Sirryan2002@users.noreply.github.com> --- code/game/machinery/ai_display.dm | 9 ++-- .../game/machinery/computer/buildandrepair.dm | 31 +++++++++++-- code/game/machinery/computer/camera.dm | 16 ++++++- code/game/machinery/status_display.dm | 9 ++-- .../mountable_frames/newscaster_frame.dm | 46 +++++++++++++++---- .../living/silicon/robot/drone/drone_items.dm | 2 +- code/modules/newscaster/obj/newscaster.dm | 4 +- .../research/designs/autolathe_designs.dm | 28 ++++++++++- 8 files changed, 119 insertions(+), 26 deletions(-) diff --git a/code/game/machinery/ai_display.dm b/code/game/machinery/ai_display.dm index 56b79e0907a..13f00383b2c 100644 --- a/code/game/machinery/ai_display.dm +++ b/code/game/machinery/ai_display.dm @@ -113,10 +113,13 @@ GLOBAL_LIST_EMPTY(ai_displays) /obj/machinery/ai_status_display/wrench_act(mob/living/user, obj/item/I) . = TRUE - if(!I.use_tool(src, user, 0)) + if(!I.use_tool(src, user, 0 SECONDS)) return TOOL_ATTEMPT_DISMANTLE_MESSAGE - if(I.use_tool(src, user, 20, volume = I.tool_volume)) + if(I.use_tool(src, user, 2 SECONDS, volume = I.tool_volume)) TOOL_DISMANTLE_SUCCESS_MESSAGE - new /obj/item/stack/sheet/metal(drop_location(), 1) deconstruct() + +/obj/machinery/ai_status_display/on_deconstruction() + . = ..() + new /obj/item/mounted/frame/display/ai_display_frame(drop_location()) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 38f92f013cb..9540bb61793 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -48,17 +48,40 @@ /obj/item/circuitboard/camera board_name = "Camera Monitor" + desc = "A monitor board whose type can be changed when screwed." build_path = /obj/machinery/computer/security origin_tech = "programming=2;combat=2" + var/static/list/monitor_names_paths = list( + "Camera Monitor" = /obj/machinery/computer/security, + "Wooden TV" = /obj/machinery/computer/security/wooden_tv, + "Outpost Camera Monitor" = /obj/machinery/computer/security/mining, + "Engineering Camera Monitor" = /obj/machinery/computer/security/engineering, + "Research Monitor" = /obj/machinery/computer/security/telescreen/research, + "Research Director Monitor" = /obj/machinery/computer/security/telescreen/rd, + "Prison Monitor" = /obj/machinery/computer/security/telescreen/prison, + "Interrogation Monitor" = /obj/machinery/computer/security/telescreen/interrogation, + "MiniSat Monitor" = /obj/machinery/computer/security/telescreen/minisat, + "AI Upload Monitor" = /obj/machinery/computer/security/telescreen/upload, + "Vault Monitor" = /obj/machinery/computer/security/telescreen/vault, + "Turbine Vent Monitor" = /obj/machinery/computer/security/telescreen/turbine, + "Engine Camera Monitor" = /obj/machinery/computer/security/telescreen/engine) + +/obj/item/circuitboard/camera/screwdriver_act(mob/living/user, obj/item/I) + . = TRUE + if(!I.use_tool(src, user, 0, volume = I.tool_volume)) + return + var/choice = input(user, "Circuit Setting", "What would you change the board setting to?") as null|anything in monitor_names_paths + if(!choice) + return + board_name = choice + build_path = monitor_names_paths[choice] + format_board_name() + to_chat(user, "You set the board to [board_name].") /obj/item/circuitboard/camera/telescreen board_name = "Telescreen" build_path = /obj/machinery/computer/security/telescreen -/obj/item/circuitboard/camera/telescreen/entertainment - board_name = "Entertainment Monitor" - build_path = /obj/machinery/computer/security/telescreen/entertainment - /obj/item/circuitboard/camera/engine board_name = "Engine Camera Monitor" build_path = /obj/machinery/computer/security/telescreen/engine diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index bd9c9e137fb..b1c40102901 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -1,7 +1,6 @@ /obj/machinery/computer/security name = "security camera console" desc = "Used to access the various cameras networks on the station." - icon_keyboard = "security_key" icon_screen = "cameras" light_color = LIGHT_COLOR_RED @@ -220,7 +219,7 @@ light_range_on = 0 network = list("news") luminosity = 0 - circuit = /obj/item/circuitboard/camera/telescreen/entertainment + circuit = null /obj/machinery/computer/security/telescreen/entertainment/Initialize() . = ..() @@ -233,6 +232,19 @@ else set_light(1, LIGHTING_MINIMUM_POWER) +/obj/machinery/computer/security/telescreen/entertainment/wrench_act(mob/living/user, obj/item/I) + . = TRUE + if(!I.use_tool(src, user, 0 SECONDS)) + return + TOOL_ATTEMPT_DISMANTLE_MESSAGE + if(I.use_tool(src, user, 2 SECONDS, volume = I.tool_volume)) + TOOL_DISMANTLE_SUCCESS_MESSAGE + deconstruct() + +/obj/machinery/computer/security/telescreen/entertainment/on_deconstruction() + . = ..() + new /obj/item/mounted/frame/display/entertainment_frame(drop_location()) + /obj/machinery/computer/security/wooden_tv name = "security camera monitor" desc = "An old TV hooked into the station's camera network." diff --git a/code/game/machinery/status_display.dm b/code/game/machinery/status_display.dm index c19c50c8e99..e58e6173ce4 100644 --- a/code/game/machinery/status_display.dm +++ b/code/game/machinery/status_display.dm @@ -217,10 +217,13 @@ GLOBAL_LIST_EMPTY(status_displays) /obj/machinery/status_display/wrench_act(mob/living/user, obj/item/I) . = TRUE - if(!I.use_tool(src, user, 0)) + if(!I.use_tool(src, user, 0 SECONDS)) return TOOL_ATTEMPT_DISMANTLE_MESSAGE - if(I.use_tool(src, user, 20, volume = I.tool_volume)) + if(I.use_tool(src, user, 2 SECONDS, volume = I.tool_volume)) TOOL_DISMANTLE_SUCCESS_MESSAGE - new /obj/item/stack/sheet/metal(drop_location(), 1) deconstruct() + +/obj/machinery/status_display/on_deconstruction() + . = ..() + new /obj/item/mounted/frame/display/display_frame(drop_location()) diff --git a/code/game/objects/items/mountable_frames/newscaster_frame.dm b/code/game/objects/items/mountable_frames/newscaster_frame.dm index 624ea815aee..ade1eb9cc99 100644 --- a/code/game/objects/items/mountable_frames/newscaster_frame.dm +++ b/code/game/objects/items/mountable_frames/newscaster_frame.dm @@ -1,19 +1,47 @@ -/obj/item/mounted/frame/newscaster_frame +/obj/item/mounted/frame/display + icon = 'icons/obj/status_display.dmi' + icon_state = "frame" + item_state = "syringe_kit" + materials = list(MAT_METAL=6000, MAT_GLASS=2000) + mount_requirements = MOUNTED_FRAME_SIMFLOOR | MOUNTED_FRAME_NOSPACE + metal_sheets_refunded = 3 + glass_sheets_refunded = 1 + var/build_path + +/obj/item/mounted/frame/display/do_build(turf/on_wall, mob/user) + var/obj/machinery/status_display/N = new build_path(get_turf(src)) + N.pixel_y -= (loc.y - on_wall.y) * 32 + N.pixel_x -= (loc.x - on_wall.x) * 32 + qdel(src) + +/obj/item/mounted/frame/display/newscaster_frame name = "newscaster frame" desc = "Used to build newscasters, just secure to the wall." icon = 'icons/obj/terminals.dmi' icon_state = "newscaster" - item_state = "syringe_kit" //no, I have no idea either + build_path = /obj/machinery/newscaster - materials = list(MAT_METAL=14000, MAT_GLASS=8000) - mount_requirements = MOUNTED_FRAME_SIMFLOOR | MOUNTED_FRAME_NOSPACE - metal_sheets_refunded = 7 - glass_sheets_refunded = 4 - -/obj/item/mounted/frame/newscaster_frame/do_build(turf/on_wall, mob/user) - var/obj/machinery/newscaster/N = new /obj/machinery/newscaster(get_turf(src), get_dir(on_wall, user), 1) +/obj/item/mounted/frame/display/newscaster_frame/do_build(turf/on_wall, mob/user) + var/obj/machinery/newscaster/N = new build_path(get_turf(src)) N.pixel_y -= (loc.y - on_wall.y) * 28 N.pixel_x -= (loc.x - on_wall.x) * 28 var/constrdir = user.dir N.dir = turn(constrdir, 180) qdel(src) + +/obj/item/mounted/frame/display/display_frame + name = "status display frame" + desc = "Used to build status displays, just secure to the wall." + build_path = /obj/machinery/status_display + +/obj/item/mounted/frame/display/ai_display_frame + name = "ai status display frame" + desc = "Used to build ai status displays, just secure to the wall." + build_path = /obj/machinery/ai_status_display + +/obj/item/mounted/frame/display/entertainment_frame + name = "entertainment monitor frame" + desc = "Used to build entertainment monitors, just secure to the wall." + icon = 'icons/obj/computer.dmi' + icon_state = "entertainment_console" + build_path = /obj/machinery/computer/security/telescreen/entertainment diff --git a/code/modules/mob/living/silicon/robot/drone/drone_items.dm b/code/modules/mob/living/silicon/robot/drone/drone_items.dm index e9175fc991e..e27f2b1cb54 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_items.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_items.dm @@ -21,7 +21,7 @@ /obj/item/mounted/frame/apc_frame, /obj/item/mounted/frame/alarm_frame, /obj/item/mounted/frame/firealarm, - /obj/item/mounted/frame/newscaster_frame, + /obj/item/mounted/frame/display/newscaster_frame, /obj/item/mounted/frame/intercom, /obj/item/mounted/frame/extinguisher, /obj/item/mounted/frame/light_switch, diff --git a/code/modules/newscaster/obj/newscaster.dm b/code/modules/newscaster/obj/newscaster.dm index 6c859f90ca3..15aefc09d53 100644 --- a/code/modules/newscaster/obj/newscaster.dm +++ b/code/modules/newscaster/obj/newscaster.dm @@ -137,7 +137,7 @@ if(!I.tool_use_check(user, 0)) return to_chat(user, "Now [anchored ? "un" : ""]securing [name]") - if(!I.use_tool(src, user, 60, volume = I.tool_volume)) + if(!I.use_tool(src, user, 2 SECONDS, volume = I.tool_volume)) return playsound(loc, 'sound/items/deconstruct.ogg', 50, TRUE) if(stat & BROKEN) @@ -147,7 +147,7 @@ new /obj/item/shard(loc) else to_chat(user, "You [anchored ? "un" : ""]secure [name].") - new /obj/item/mounted/frame/newscaster_frame(loc) + new /obj/item/mounted/frame/display/newscaster_frame(loc) qdel(src) /obj/machinery/newscaster/welder_act(mob/user, obj/item/I) diff --git a/code/modules/research/designs/autolathe_designs.dm b/code/modules/research/designs/autolathe_designs.dm index 1e0b01ecbcb..c776e382113 100644 --- a/code/modules/research/designs/autolathe_designs.dm +++ b/code/modules/research/designs/autolathe_designs.dm @@ -587,8 +587,32 @@ name = "Newscaster Frame" id = "newscaster_frame" build_type = AUTOLATHE - materials = list(MAT_METAL = 14000, MAT_GLASS = 8000) - build_path = /obj/item/mounted/frame/newscaster_frame + materials = list(MAT_METAL = 6000, MAT_GLASS = 2000) + build_path = /obj/item/mounted/frame/display/newscaster_frame + category = list("initial", "Construction") + +/datum/design/display_frame + name = "Status Display Frame" + id = "display_frame" + build_type = AUTOLATHE + materials = list(MAT_METAL = 6000, MAT_GLASS = 2000) + build_path = /obj/item/mounted/frame/display/display_frame + category = list("initial", "Construction") + +/datum/design/ai_display_frame + name = "AI Status Display Frame" + id = "ai_display_frame" + build_type = AUTOLATHE + materials = list(MAT_METAL = 6000, MAT_GLASS = 2000) + build_path = /obj/item/mounted/frame/display/ai_display_frame + category = list("initial", "Construction") + +/datum/design/entertainment_frame + name = "Entertainment Monitor Frame" + id = "entertainment_frame" + build_type = AUTOLATHE + materials = list(MAT_METAL = 6000, MAT_GLASS = 2000) + build_path = /obj/item/mounted/frame/display/entertainment_frame category = list("initial", "Construction") /datum/design/syringe