Holopad Force Call Fix (#20216)

Fixes https://github.com/Aurorastation/Aurora.3/issues/20182

Also adds minor QoL (command can shut down forced calls from receiving
holopad)

Co-authored-by: Ben10083 <Ben10083@users.noreply.github.com>
This commit is contained in:
Ben
2024-12-09 14:34:23 +00:00
committed by GitHub
co-authored by Ben10083
parent 022c0616cf
commit 1ee9d1057e
3 changed files with 67 additions and 6 deletions
+6 -5
View File
@@ -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("<b>[src]</b> 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()
@@ -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."
+1 -1
View File
@@ -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')}
/>
) : (
''