diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 7236cfe337a..2b7f41fe618 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -110,8 +110,8 @@ Possible to do for anyone motivated enough: take_call() return else if(connected_pad) - if(forced) - audible_message("Access denied. Terminating a command-level transmission locally is not permitted.") + if(forced && !has_command_auth(user)) + audible_message("Access denied. Termination of a command-level transmission requires command-level authorization.") return end_call() audible_message("Severing connection to distant holopad.") @@ -171,7 +171,7 @@ Possible to do for anyone motivated enough: to_chat(usr, SPAN_DANGER("Could not locate that holopad, this is a bug!")) return connected_pad = HP - INVOKE_ASYNC(src, PROC_REF(make_call), connected_pad, usr, forcing_call) + INVOKE_ASYNC(src, PROC_REF(make_call), connected_pad, usr) . = TRUE if("toggle_command") @@ -209,7 +209,7 @@ Possible to do for anyone motivated enough: return TRUE -/obj/machinery/hologram/holopad/proc/make_call(var/obj/machinery/hologram/holopad/connected_pad, var/mob/user, forced_call) +/obj/machinery/hologram/holopad/proc/make_call(var/obj/machinery/hologram/holopad/connected_pad, var/mob/user) connected_pad.last_request = world.time connected_pad.connected_pad = src //This marks the holopad you are making the call from connected_pad.incoming_connection = TRUE @@ -217,10 +217,11 @@ Possible to do for anyone motivated enough: connected_pad.update_icon() update_icon() - if(forced_call) + if(forcing_call) connected_pad.audible_message("[src] announces, \"Incoming call with command authorization from [connected_pad.holopad_id].\"") connected_pad.notify_pdas(connected_pad.holopad_id) to_chat(user, SPAN_NOTICE("Establishing forced connection to the holopad in [connected_pad.holopad_id].")) + forcing_call = FALSE // Holopad needs to have forced call turned back on connected_pad.forced = TRUE sleep(80) connected_pad.take_call() diff --git a/html/changelogs/Ben10083 - Holopad_force.yml b/html/changelogs/Ben10083 - Holopad_force.yml new file mode 100644 index 00000000000..a511d3874b5 --- /dev/null +++ b/html/changelogs/Ben10083 - Holopad_force.yml @@ -0,0 +1,60 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# - (fixes bugs) +# wip +# - (work in progress) +# qol +# - (quality of life) +# soundadd +# - (adds a sound) +# sounddel +# - (removes a sound) +# rscadd +# - (adds a feature) +# rscdel +# - (removes a feature) +# imageadd +# - (adds an image or sprite) +# imagedel +# - (removes an image or sprite) +# spellcheck +# - (fixes spelling or grammar) +# experiment +# - (experimental change) +# balance +# - (balance changes) +# code_imp +# - (misc internal code change) +# refactor +# - (refactors code) +# config +# - (makes a change to the config files) +# admin +# - (makes changes to administrator tools) +# server +# - (miscellaneous changes to server) +################################# + +# Your name. +author: Ben10083 + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit. +# Please surround your changes in double quotes ("). It works without them, but if you use certain characters it screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Holopad forced calls now work again." + - qol: "Holopad forced calls option toggles off after a call." + - qol: "Force calls can be terminated by recieving holopad by command members." diff --git a/tgui/packages/tgui/interfaces/Holopad.tsx b/tgui/packages/tgui/interfaces/Holopad.tsx index 832ba379eed..7e8bf600e9a 100644 --- a/tgui/packages/tgui/interfaces/Holopad.tsx +++ b/tgui/packages/tgui/interfaces/Holopad.tsx @@ -43,7 +43,7 @@ export const Holopad = (props, context) => { tooltip="This is only available due to your command authorisation." selected={data.forcing_call} icon="microphone" - onClick={() => act('microphone')} + onClick={() => act('toggle_command')} /> ) : ( ''