From 629b0ad4363f6d98b19e1ca655ea8165f3267d3c Mon Sep 17 00:00:00 2001 From: AlaunusLux <89751433+AlaunusLux@users.noreply.github.com> Date: Mon, 15 Jan 2024 07:51:28 -0600 Subject: [PATCH] Adds follow button to hivenet broadcasts, fixes follow button falling off observer manifest (#18200) * Adds follow button to hivenet broadcasts, fixes follow button falling off ghost manifest Fixes #18190 * Update code/modules/mob/language/station.dm Co-authored-by: Matt Atlas Signed-off-by: AlaunusLux <89751433+AlaunusLux@users.noreply.github.com> --------- Signed-off-by: AlaunusLux <89751433+AlaunusLux@users.noreply.github.com> Co-authored-by: Matt Atlas --- code/controllers/subsystems/records.dm | 2 +- code/modules/mob/language/station.dm | 4 +- .../AlaunusLux-ghost-follow-button-fixes.yml | 42 +++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 html/changelogs/AlaunusLux-ghost-follow-button-fixes.yml diff --git a/code/controllers/subsystems/records.dm b/code/controllers/subsystems/records.dm index f8b98d68b26..88a0d3f2b35 100644 --- a/code/controllers/subsystems/records.dm +++ b/code/controllers/subsystems/records.dm @@ -210,7 +210,7 @@ SUBSYSTEM_DEF(records) /datum/controller/subsystem/records/ui_static_data(mob/user) var/list/data = list() data["manifest"] = SSrecords.get_manifest_list() - data["allow_follow"] = isobserver(usr) + data["allow_follow"] = isobserver(user) return data /datum/controller/subsystem/records/proc/open_manifest_tgui(mob/user, datum/tgui/ui) diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index 215252ef948..eaaea1de122 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -255,8 +255,10 @@ speaker_encryption_key = speaker_socket.encryption_key for(var/mob/player in GLOB.player_list) - if(istype(player, /mob/abstract/observer) || player == speaker) + if(player == speaker) to_chat(player, msg) + else if(isobserver(player)) + to_chat(player, "[ghost_follow_link(speaker, player)] [msg]") else if(!within_jamming_range(player) && check_special_condition(player)) if(speaker_encryption_key) var/mob/living/carbon/human/listener_human = player diff --git a/html/changelogs/AlaunusLux-ghost-follow-button-fixes.yml b/html/changelogs/AlaunusLux-ghost-follow-button-fixes.yml new file mode 100644 index 00000000000..d96242793c5 --- /dev/null +++ b/html/changelogs/AlaunusLux-ghost-follow-button-fixes.yml @@ -0,0 +1,42 @@ +################################ +# 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 +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: AlaunusLux + +# 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, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - rscadd: "Added follow button on Vaurca broadcasts." + - bugfix: "Manifest ghost follow button doesn't fall off anymore."