From 6bf9d8b00242e34fef611adfdaeb777e5fbe7994 Mon Sep 17 00:00:00 2001 From: Meghan-Rossi <56671765+Meghan-Rossi@users.noreply.github.com> Date: Thu, 4 Mar 2021 15:24:13 +0000 Subject: [PATCH 1/3] Makes the event HUD work *Finishes up the partially-implemented event HUD (The one the event pref in the VORE character setup tab is for) and adds a verb to let event managers give it to people (can be used by right-clicking them, or from the "Fun" verb tab. Tested. --- code/modules/admin/admin_verb_lists_vr.dm | 1 + code/modules/admin/verbs/randomverbs_vr.dm | 17 +++++++++++++++++ .../mob/living/carbon/human/human_helpers.dm | 4 ++++ code/modules/mob/mob_helpers_vr.dm | 14 ++++++++++++++ vorestation.dme | 1 + 5 files changed, 37 insertions(+) create mode 100644 code/modules/mob/mob_helpers_vr.dm diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index b024211d2c..a731751fd7 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -393,6 +393,7 @@ var/list/admin_verbs_mod = list( ) var/list/admin_verbs_event_manager = list( + /client/proc/toggle_vantag_hud, /client/proc/cmd_event_say, /client/proc/cmd_admin_pm_context, /client/proc/cmd_admin_pm_panel, diff --git a/code/modules/admin/verbs/randomverbs_vr.dm b/code/modules/admin/verbs/randomverbs_vr.dm index d4fa30c824..997556e3a4 100644 --- a/code/modules/admin/verbs/randomverbs_vr.dm +++ b/code/modules/admin/verbs/randomverbs_vr.dm @@ -97,3 +97,20 @@ log_admin("ZNarrate: [key_name(usr)] : [msg]") message_admins(" ZNarrate: [key_name_admin(usr)] : [msg]
", 1) feedback_add_details("admin_verb","GLNA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! + +/client/proc/toggle_vantag_hud(var/mob/target as mob) + set category = "Fun" + set name = "Give/Remove Event HUD" + set desc = "Give a mob the event hud, which shows them other people's event preferences, or remove it from them" + + if(target.vantag_hud) + target.vantag_hud = FALSE + target.recalculate_vis() + to_chat(src, "You removed the event HUD from [key_name(target)].") + to_chat(target, "You no longer have the event HUD.") + else + target.vantag_hud = TRUE + target.recalculate_vis() + to_chat(src, "You gave the event HUD to [key_name(target)].") + to_chat(target, "You now have the event HUD. Icons will appear next to characters indicating if they prefer to be killed(red crosshairs), devoured(belly), or kidnapped(blue crosshairs) by event characters.") + feedback_add_details("admin_verb","GREHud") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 435ca99354..7b5e9bb3ef 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -190,6 +190,10 @@ if(nif) compiled_vis |= nif.planes_visible() //VOREStation Add End + //VOREStation Add - event hud + if(vantag_hud) + compiled_vis |= VIS_CH_VANTAG + //VOREStation Add End if(!compiled_vis.len && !vis_enabled.len) return //Nothin' doin'. diff --git a/code/modules/mob/mob_helpers_vr.dm b/code/modules/mob/mob_helpers_vr.dm new file mode 100644 index 0000000000..f16a204153 --- /dev/null +++ b/code/modules/mob/mob_helpers_vr.dm @@ -0,0 +1,14 @@ +/mob/recalculate_vis() + . = ..() + if(!plane_holder || !vis_enabled) + return + + if(vantag_hud) + if(!(VIS_CH_VANTAG in vis_enabled)) + plane_holder.set_vis(VIS_CH_VANTAG,TRUE) + vis_enabled += VIS_CH_VANTAG + else + if(VIS_CH_VANTAG in vis_enabled) + plane_holder.set_vis(VIS_CH_VANTAG,FALSE) + vis_enabled -= VIS_CH_VANTAG + return diff --git a/vorestation.dme b/vorestation.dme index d12feb70ad..a8d523eb29 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -2468,6 +2468,7 @@ #include "code\modules\mob\mob_grab.dm" #include "code\modules\mob\mob_grab_specials.dm" #include "code\modules\mob\mob_helpers.dm" +#include "code\modules\mob\mob_helpers_vr.dm" #include "code\modules\mob\mob_movement.dm" #include "code\modules\mob\mob_planes.dm" #include "code\modules\mob\mob_planes_vr.dm" From fb150ae5aa396178028ad6172b9598e0ad7805ee Mon Sep 17 00:00:00 2001 From: Meghan-Rossi <56671765+Meghan-Rossi@users.noreply.github.com> Date: Sat, 27 Mar 2021 15:57:59 +0000 Subject: [PATCH 2/3] Update code/modules/mob/living/carbon/human/human_helpers.dm Co-authored-by: TheFurryFeline <38586851+TheFurryFeline@users.noreply.github.com> --- code/modules/mob/living/carbon/human/human_helpers.dm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_helpers.dm b/code/modules/mob/living/carbon/human/human_helpers.dm index 7b5e9bb3ef..6795d67064 100644 --- a/code/modules/mob/living/carbon/human/human_helpers.dm +++ b/code/modules/mob/living/carbon/human/human_helpers.dm @@ -189,8 +189,7 @@ //VOREStation Add - NIF Support if(nif) compiled_vis |= nif.planes_visible() - //VOREStation Add End - //VOREStation Add - event hud + //event hud if(vantag_hud) compiled_vis |= VIS_CH_VANTAG //VOREStation Add End From a2ad82c627deaacbbb1348074f7814a892838e62 Mon Sep 17 00:00:00 2001 From: Meghan-Rossi <56671765+Meghan-Rossi@users.noreply.github.com> Date: Sat, 27 Mar 2021 16:01:14 +0000 Subject: [PATCH 3/3] Adds event hud to admin_verbs_admin --- code/modules/admin/admin_verb_lists_vr.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/code/modules/admin/admin_verb_lists_vr.dm b/code/modules/admin/admin_verb_lists_vr.dm index a731751fd7..bc6e620b7a 100644 --- a/code/modules/admin/admin_verb_lists_vr.dm +++ b/code/modules/admin/admin_verb_lists_vr.dm @@ -19,6 +19,7 @@ var/list/admin_verbs_default = list( ) var/list/admin_verbs_admin = list( + /client/proc/toggle_vantag_hud, /datum/admins/proc/set_tcrystals, /datum/admins/proc/add_tcrystals, /client/proc/invisimin, //allows our mob to go invisible/visible,