mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 02:34:00 +00:00
VANTAG Hud stuff
This commit is contained in:
@@ -4,6 +4,12 @@
|
||||
#define BACKUP_HUD 11 // HUD for showing whether or not they have a backup implant.
|
||||
#define STATUS_R_HUD 12 // HUD for showing the same STATUS_HUD info on the right side, but not for 'boring' statuses (transparent icons)
|
||||
#define HEALTH_VR_HUD 13 // HUD with blank 100% bar so it's hidden most of the time.
|
||||
#define VANTAG_HUD 14 // HUD for showing being-an-antag-target prefs
|
||||
|
||||
#undef TOTAL_HUDS //Undo theirs.
|
||||
#define TOTAL_HUDS 13 // Total number of HUDs.
|
||||
#define TOTAL_HUDS 14 // Total number of HUDs.
|
||||
|
||||
#define VANTAG_NONE "hudblank"
|
||||
#define VANTAG_VORE "vantag_vore"
|
||||
#define VANTAG_KIDNAP "vantag_kidnap"
|
||||
#define VANTAG_KILL "vantag_kill"
|
||||
|
||||
@@ -13,6 +13,13 @@ var/global/list/player_sizes_list = list(
|
||||
"Small" = RESIZE_SMALL,
|
||||
"Tiny" = RESIZE_TINY)
|
||||
|
||||
//stores vantag settings indexed by name
|
||||
var/global/list/vantag_choices_list = list(
|
||||
VANTAG_NONE = "No Involvement",
|
||||
VANTAG_VORE = "Be Prey",
|
||||
VANTAG_KIDNAP = "Be Kidnapped",
|
||||
VANTAG_KILL = "Be Killed")
|
||||
|
||||
//Important items that are preserved when people are digested, etc.
|
||||
//On Polaris, different from Cryo list as MMIs need to be removed for FBPs to be logged out.
|
||||
var/global/list/important_items = list(
|
||||
|
||||
@@ -75,6 +75,7 @@ mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use
|
||||
eng_hud_users -= src
|
||||
sci_hud_users -= src
|
||||
gen_hud_users -= src
|
||||
if(vantag_hud) process_vantag_hud(src) //VOREStation Add - So any mob can have the vantag hud, observer or not.
|
||||
//VOREStation Add End
|
||||
mob/proc/in_view(var/turf/T)
|
||||
return view(T)
|
||||
|
||||
@@ -2,6 +2,8 @@ var/global/list/gen_hud_users = list() // List of all entities using
|
||||
var/global/list/eng_hud_users = list() // List of all entities using a engineer HUD.
|
||||
var/global/list/sci_hud_users = list() // List of all entities using a science HUD.
|
||||
|
||||
var/global/list/vantag_hud_users = list() // List of all mobs with the VANTAG hud on.
|
||||
|
||||
/proc/broadcast_engineering_hud_message(var/message, var/broadcast_source)
|
||||
broadcast_hud_message(message, broadcast_source, eng_hud_users, /obj/item/clothing/glasses/omnihud/eng)
|
||||
|
||||
@@ -43,3 +45,16 @@ proc/process_omni_hud(var/mob/M, var/mode, var/mob/Alt)
|
||||
P.Client.images += guy.hud_list[WANTED_HUD]
|
||||
P.Client.images += guy.hud_list[STATUS_R_HUD]
|
||||
P.Client.images += guy.hud_list[BACKUP_HUD]
|
||||
|
||||
|
||||
proc/process_vantag_hud(var/mob/M)
|
||||
if(!M.vantag_hud || !can_process_hud(M))
|
||||
return
|
||||
|
||||
var/datum/arranged_hud_process/P = arrange_hud_process(M, null, vantag_hud_users)
|
||||
|
||||
for(var/mob/living/carbon/human/guy in P.Mob.in_view(P.Turf))
|
||||
if(P.Mob.see_invisible < guy.invisibility)
|
||||
continue
|
||||
|
||||
P.Client.images += guy.hud_list[VANTAG_HUD]
|
||||
|
||||
48
code/modules/client/preference_setup/vore/06_vantag.dm
Normal file
48
code/modules/client/preference_setup/vore/06_vantag.dm
Normal file
@@ -0,0 +1,48 @@
|
||||
// Define a place to save in character setup
|
||||
/datum/preferences
|
||||
var/vantag_volunteer = 0 // What state I want to be in, in terms of being affected by antags.
|
||||
var/vantag_preference = VANTAG_NONE // Whether I'd like to volunteer to be an antag at some point.
|
||||
|
||||
// Definition of the stuff for Sizing
|
||||
/datum/category_item/player_setup_item/vore/vantag
|
||||
name = "VS Antag"
|
||||
sort_order = 6
|
||||
|
||||
/datum/category_item/player_setup_item/vore/vantag/load_character(var/savefile/S)
|
||||
S["vantag_volunteer"] >> pref.vantag_volunteer
|
||||
S["vantag_preference"] >> pref.vantag_preference
|
||||
|
||||
/datum/category_item/player_setup_item/vore/vantag/save_character(var/savefile/S)
|
||||
S["vantag_volunteer"] << pref.vantag_volunteer
|
||||
S["vantag_preference"] << pref.vantag_preference
|
||||
|
||||
/datum/category_item/player_setup_item/vore/vantag/sanitize_character()
|
||||
pref.vantag_volunteer = sanitize_integer(pref.vantag_volunteer, 0, 1, initial(pref.vantag_volunteer))
|
||||
pref.vantag_preference = sanitize_inlist(pref.vantag_preference, vantag_choices_list, initial(pref.vantag_preference))
|
||||
|
||||
/datum/category_item/player_setup_item/vore/vantag/copy_to_mob(var/mob/living/carbon/human/character)
|
||||
if(character && !istype(character,/mob/living/carbon/human/dummy))
|
||||
character.vantag_pref = pref.vantag_preference
|
||||
BITSET(character.hud_updateflag, VANTAG_HUD)
|
||||
|
||||
/datum/category_item/player_setup_item/vore/vantag/content(var/mob/user)
|
||||
. += "<br>"
|
||||
. += "<b>V-Antag Volunteer:</b> <a href='?src=\ref[src];toggle_vantag_volunteer=1'><b>[pref.vantag_volunteer ? "Yes" : "No"]</b></a><br>"
|
||||
. += "<b>V-Antag Pref:</b> <a href='?src=\ref[src];change_vantag=1'><b>[vantag_choices_list[pref.vantag_preference]]</b></a><br>"
|
||||
|
||||
/datum/category_item/player_setup_item/vore/vantag/OnTopic(var/href, var/list/href_list, var/mob/user)
|
||||
if(href_list["toggle_vantag_volunteer"])
|
||||
pref.vantag_volunteer = pref.vantag_volunteer ? 0 : 1
|
||||
return TOPIC_REFRESH
|
||||
|
||||
else if(href_list["change_vantag"])
|
||||
var/list/names_list = list()
|
||||
for(var/C in vantag_choices_list)
|
||||
names_list[vantag_choices_list[C]] = C
|
||||
|
||||
var/selection = input(user, "How do you want to be involved with VS antags? They will see this choice on you in a HUD. VS antags are admin-selected and spawned players who are obligated to respect ERP prefs and RP their actions like any other player, though it may be a slightly shorter RP if they are pressed for time or being caught.", "V-Antag Preference") as null|anything in names_list
|
||||
if(selection && selection != "Normal")
|
||||
pref.vantag_preference = names_list[selection]
|
||||
|
||||
return TOPIC_REFRESH
|
||||
return ..()
|
||||
@@ -36,6 +36,7 @@
|
||||
hud_list[HEALTH_VR_HUD] = new /image/hud_overlay('icons/mob/hud_med_vr.dmi', src, "100")
|
||||
hud_list[STATUS_R_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudhealthy")
|
||||
hud_list[BACKUP_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudblank")
|
||||
hud_list[VANTAG_HUD] = new /image/hud_overlay('icons/mob/hud_vr.dmi', src, "hudblank")
|
||||
//VOREStation Add End
|
||||
hud_list[LIFE_HUD] = new /image/hud_overlay('icons/mob/hud.dmi', src, "hudhealthy")
|
||||
hud_list[ID_HUD] = new /image/hud_overlay(using_map.id_hud_icons, src, "hudunknown")
|
||||
|
||||
@@ -4,3 +4,4 @@
|
||||
b_skin = 179
|
||||
|
||||
var/wagging = 0 //UGH.
|
||||
var/vantag_pref = VANTAG_NONE //What's my status?
|
||||
|
||||
@@ -1651,8 +1651,6 @@
|
||||
holder1.icon_state = "hud_imp_tracking"
|
||||
if(istype(I,/obj/item/weapon/implant/loyalty))
|
||||
holder2.icon_state = "hud_imp_loyal"
|
||||
if(istype(I,/obj/item/weapon/implant/backup))//VOREStation Edit - Commandeering this for backup implants
|
||||
holder2.icon_state = "hud_imp_loyal" //VOREStation Edit
|
||||
if(istype(I,/obj/item/weapon/implant/chem))
|
||||
holder3.icon_state = "hud_imp_chem"
|
||||
|
||||
|
||||
@@ -34,4 +34,12 @@
|
||||
else if(!(mind.name in transcore.body_scans))
|
||||
holder.icon_state = "hud_backup_nobody"
|
||||
else
|
||||
holder.icon_state = "hud_backup_norm"
|
||||
holder.icon_state = "hud_backup_norm"
|
||||
|
||||
//VOREStation Antag Hud
|
||||
if (BITTEST(hud_updateflag, VANTAG_HUD))
|
||||
var/image/vantag = hud_list[VANTAG_HUD]
|
||||
if(vantag_pref)
|
||||
vantag.icon_state = vantag_pref
|
||||
else
|
||||
vantag.icon_state = "hudblank"
|
||||
|
||||
2
code/modules/mob/mob_defines_vr.dm
Normal file
2
code/modules/mob/mob_defines_vr.dm
Normal file
@@ -0,0 +1,2 @@
|
||||
/mob
|
||||
var/vantag_hud = 0 // Do I have the HUD enabled?
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 995 B After Width: | Height: | Size: 1.2 KiB |
@@ -1273,6 +1273,7 @@
|
||||
#include "code\modules\client\preference_setup\vore\02_size.dm"
|
||||
#include "code\modules\client\preference_setup\vore\03_egg.dm"
|
||||
#include "code\modules\client\preference_setup\vore\04_resleeving.dm"
|
||||
#include "code\modules\client\preference_setup\vore\06_vantag.dm"
|
||||
#include "code\modules\clothing\chameleon.dm"
|
||||
#include "code\modules\clothing\clothing.dm"
|
||||
#include "code\modules\clothing\clothing_accessories.dm"
|
||||
@@ -1593,6 +1594,7 @@
|
||||
#include "code\modules\mob\logout.dm"
|
||||
#include "code\modules\mob\mob.dm"
|
||||
#include "code\modules\mob\mob_defines.dm"
|
||||
#include "code\modules\mob\mob_defines_vr.dm"
|
||||
#include "code\modules\mob\mob_grab.dm"
|
||||
#include "code\modules\mob\mob_grab_specials.dm"
|
||||
#include "code\modules\mob\mob_helpers.dm"
|
||||
|
||||
Reference in New Issue
Block a user