From a5edc9fea2d4328159dfc76e5ccc0d24a32f0345 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Wed, 29 Mar 2023 23:29:59 +0200 Subject: [PATCH] [MIRROR] Curators now have D-notice newscaster access, Officers can issue warrants [MDB IGNORE] (#20137) * Curators now have D-notice newscaster access, Officers can issue warrants (#74269) ## About The Pull Request Newscasters now have Library access for handing out D-Notices, and Security access for Wanted issues, instead of both being tied to Armory access. Also allows Ntos Newscaster to work if ran by someone without Library access, so Curator can download the app for others if they want. ## Why It's Good For The Game - Newscasters have turned into one of the Curator's largest gameplay aspects and it would be nice if they were able to moderate it as well, instead of being the Warden who has absolutely no interest in Newscasters. - Allowing Officers to send out Wanted issues is more just in hopes it will result in it being used more, though it seems like a very similar feature to the wanted posters, maybe we can merge these two together one day. - The Ntos Newscaster access change is more of an oversight, I like it when people can download apps for eachother as it gives a reason to seek others and lend them your PDA for an application you want, blocking the person from using the app after getting a Curator to download it for them kinda sucks in-game. ## Changelog :cl: balance: Curators/HoP can now manage Newscaster D-Notices (previously was Warden/HoS). balance: Security Officers/Detectives can now issue Wanted notices on Newscasters. balance: Ntos Newscaster now requires Library access only to download, not to run. /:cl: * Curators now have D-notice newscaster access, Officers can issue warrants --------- Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com> --- .../newscaster/newscaster_machine.dm | 15 +++++++++----- code/modules/admin/verbs/admin_newscaster.dm | 1 + .../file_system/programs/newscasterapp.dm | 2 +- tgui/packages/tgui/interfaces/Newscaster.js | 20 +++++++++---------- 4 files changed, 22 insertions(+), 16 deletions(-) diff --git a/code/game/machinery/newscaster/newscaster_machine.dm b/code/game/machinery/newscaster/newscaster_machine.dm index 1d26e5650ab..85368d013b0 100644 --- a/code/game/machinery/newscaster/newscaster_machine.dm +++ b/code/game/machinery/newscaster/newscaster_machine.dm @@ -19,6 +19,10 @@ var/newscaster_username ///How much paper is contained within the newscaster? var/paper_remaining = 0 + ///The access required to access D-notices. + var/admin_access = ACCESS_LIBRARY + ///The access required to submit & remove wanted issues. + var/security_access = ACCESS_SECURITY ///What newscaster channel is currently being viewed by the player? var/datum/feed_channel/current_channel @@ -158,7 +162,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) data["user"]["job"] = "N/A" data["user"]["department"] = "N/A" - data["security_mode"] = (ACCESS_ARMORY in card?.GetAccess()) + data["admin_mode"] = (admin_access in card?.GetAccess()) + data["security_mode"] = (security_access in card?.GetAccess()) data["photo_data"] = !isnull(current_image) data["creating_channel"] = creating_channel data["creating_comment"] = creating_comment @@ -329,7 +334,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) if(isliving(usr)) var/mob/living/living_user = usr id_card = living_user.get_idcard(hand_first = TRUE) - if(!(ACCESS_ARMORY in id_card?.GetAccess())) + if(!(admin_access in id_card?.GetAccess())) say("Clearance not found.") return TRUE var/questionable_message = params["messageID"] @@ -343,7 +348,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) if(isliving(usr)) var/mob/living/living_user = usr id_card = living_user.get_idcard(hand_first = TRUE) - if(!(ACCESS_ARMORY in id_card?.GetAccess())) + if(!(admin_access in id_card?.GetAccess())) say("Clearance not found.") return TRUE var/questionable_message = params["messageID"] @@ -357,7 +362,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) if(isliving(usr)) var/mob/living/living_user = usr id_card = living_user.get_idcard(hand_first = TRUE) - if(!(ACCESS_ARMORY in id_card?.GetAccess())) + if(!(admin_access in id_card?.GetAccess())) say("Clearance not found.") return TRUE var/prototype_channel = (params["channel"]) @@ -735,7 +740,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/newscaster, 30) if(isliving(usr)) var/mob/living/living_user = usr id_card = living_user.get_idcard(hand_first = TRUE) - if(!(ACCESS_ARMORY in id_card?.GetAccess())) + if(!(security_access in id_card?.GetAccess())) say("Clearance not found.") return TRUE GLOB.news_network.wanted_issue.active = FALSE diff --git a/code/modules/admin/verbs/admin_newscaster.dm b/code/modules/admin/verbs/admin_newscaster.dm index 5fe32960a7f..e6616e2539b 100644 --- a/code/modules/admin/verbs/admin_newscaster.dm +++ b/code/modules/admin/verbs/admin_newscaster.dm @@ -65,6 +65,7 @@ data["user"]["job"] = "Official" data["user"]["department"] = "Department of News" + data["admin_mode"] = TRUE data["security_mode"] = TRUE data["photo_data"] = !isnull(current_image) data["creating_channel"] = creating_channel diff --git a/code/modules/modular_computers/file_system/programs/newscasterapp.dm b/code/modules/modular_computers/file_system/programs/newscasterapp.dm index b5811636a80..0f0861ad9f1 100644 --- a/code/modules/modular_computers/file_system/programs/newscasterapp.dm +++ b/code/modules/modular_computers/file_system/programs/newscasterapp.dm @@ -1,7 +1,7 @@ /datum/computer_file/program/newscaster filename = "newscasterapp" filedesc = "Newscaster" - required_access = list(ACCESS_LIBRARY) + transfer_access = list(ACCESS_LIBRARY) category = PROGRAM_CATEGORY_CREW program_icon_state = "bountyboard" extended_desc = "This program allows any user to access the Newscaster network from anywhere." diff --git a/tgui/packages/tgui/interfaces/Newscaster.js b/tgui/packages/tgui/interfaces/Newscaster.js index b770adf6ac3..5450a8d8223 100644 --- a/tgui/packages/tgui/interfaces/Newscaster.js +++ b/tgui/packages/tgui/interfaces/Newscaster.js @@ -348,7 +348,7 @@ const NewscasterChannelBox = (props, context) => { channelAuthor, channelCensored, viewing_channel, - security_mode, + admin_mode, photo_data, paper, user, @@ -393,16 +393,16 @@ const NewscasterChannelBox = (props, context) => { } onClick={() => act('togglePhoto')} /> - {!!security_mode && ( + {!!admin_mode && (