From ffcb4eba9315fe7fc6887d9918dc0e4f6ab7eac0 Mon Sep 17 00:00:00 2001 From: DreamySkrell <107256943+DreamySkrell@users.noreply.github.com> Date: Fri, 18 Nov 2022 12:04:04 +0100 Subject: [PATCH] Crew manifest follow button for ghosts (#15089) --- code/controllers/subsystems/records.dm | 11 +++++++++++ .../changelogs/DreamySkrell-ghost-manifest-follow.yml | 7 +++++++ vueui/src/components/view/manifest.vue | 5 ++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/DreamySkrell-ghost-manifest-follow.yml diff --git a/code/controllers/subsystems/records.dm b/code/controllers/subsystems/records.dm index d3560d4dfdc..e680c8987a4 100644 --- a/code/controllers/subsystems/records.dm +++ b/code/controllers/subsystems/records.dm @@ -188,11 +188,22 @@ return STATUS_INTERACTIVE return ..() +/datum/controller/subsystem/records/Topic(href, href_list) + if(href_list["action"] == "follow") // from manifest.vue + var/mob/abstract/observer/O = usr + if(istype(O)) + for(var/mob/living/carbon/human/H in human_mob_list) + if(istype(H) && H.real_name == href_list["name"]) + O.ManualFollow(H) + break + . = ..() + /datum/controller/subsystem/records/vueui_data_change(var/list/data, var/mob/user, var/datum/vueui/ui) . = ..() data = . || data || list() VUEUI_SET_CHECK_LIST(data["manifest"], SSrecords.get_manifest_list(), ., data) + VUEUI_SET_CHECK(data["allow_follow"], isobserver(usr), ., data) /datum/controller/subsystem/records/proc/open_manifest_vueui(mob/user) var/datum/vueui/ui = SSvueui.get_open_ui(user, src) diff --git a/html/changelogs/DreamySkrell-ghost-manifest-follow.yml b/html/changelogs/DreamySkrell-ghost-manifest-follow.yml new file mode 100644 index 00000000000..eaae94d6ab0 --- /dev/null +++ b/html/changelogs/DreamySkrell-ghost-manifest-follow.yml @@ -0,0 +1,7 @@ + +author: DreamySkrell + +delete-after: True + +changes: + - rscadd: "Ghosts can now follow crew on the crew manifest." diff --git a/vueui/src/components/view/manifest.vue b/vueui/src/components/view/manifest.vue index f8b1cbebcf1..0d176191d3a 100644 --- a/vueui/src/components/view/manifest.vue +++ b/vueui/src/components/view/manifest.vue @@ -3,12 +3,15 @@
- + +
{{ dept }}{{ dept }}
{{ entry.name }} {{ entry.rank }} {{ entry.active }} + Follow +