Merge pull request #10028 from Meghan-Rossi/eventhud

Makes the event HUD work
This commit is contained in:
Novacat
2021-03-27 12:18:54 -04:00
committed by GitHub
5 changed files with 37 additions and 0 deletions
@@ -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,
@@ -393,6 +394,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,
@@ -97,3 +97,20 @@
log_admin("ZNarrate: [key_name(usr)] : [msg]")
message_admins("<font color='blue'><B> ZNarrate: [key_name_admin(usr)] : [msg]<BR></B></font>", 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!
@@ -189,6 +189,9 @@
//VOREStation Add - NIF Support
if(nif)
compiled_vis |= nif.planes_visible()
//event hud
if(vantag_hud)
compiled_vis |= VIS_CH_VANTAG
//VOREStation Add End
if(!compiled_vis.len && !vis_enabled.len)
+14
View File
@@ -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