diff --git a/code/__DEFINES/hud.dm b/code/__DEFINES/hud.dm index deee80c7a91d..a6a844254a02 100644 --- a/code/__DEFINES/hud.dm +++ b/code/__DEFINES/hud.dm @@ -25,3 +25,9 @@ #define NOTIFY_JOIN_XENO "join_xeno" #define NOTIFY_XENO_TACMAP "xeno_tacmap" #define NOTIFY_USCM_TACMAP "uscm_tacmap" + +#define INHERENT_HUD_MEDICAL "med" +#define INHERENT_HUD_SECURITY "sec" +#define INHERENT_HUD_NEW_PLAYER "new" + +#define HUD_MENTOR_SIGHT "New Player Markers" diff --git a/code/__DEFINES/mob_hud.dm b/code/__DEFINES/mob_hud.dm index 97cbe0281924..a39160cc2247 100644 --- a/code/__DEFINES/mob_hud.dm +++ b/code/__DEFINES/mob_hud.dm @@ -27,6 +27,7 @@ #define HUNTER_CLAN "25" //Displays a colored icon to represent ingame Hunter Clans #define HUNTER_HUD "26" //Displays various statuses on mobs for Hunters to identify targets #define HOLOCARD_HUD "27" //Displays the holocards set by medical personnel +#define NEW_PLAYER_HUD "29" //Makes it easy to see new players. //data HUD (medhud, sechud) defines #define MOB_HUD_SECURITY_BASIC 1 @@ -47,6 +48,7 @@ #define MOB_HUD_HUNTER 16 #define MOB_HUD_HUNTER_CLAN 17 #define MOB_HUD_EXECUTE 18 +#define MOB_HUD_NEW_PLAYER 19 //for SL/FTL/LZ targeting on locator huds #define TRACKER_SL "track_sl" diff --git a/code/datums/mob_hud.dm b/code/datums/mob_hud.dm index 011dc8e25dba..06f16eac44cd 100644 --- a/code/datums/mob_hud.dm +++ b/code/datums/mob_hud.dm @@ -20,6 +20,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( MOB_HUD_HUNTER = new /datum/mob_hud/hunter_hud(), MOB_HUD_HUNTER_CLAN = new /datum/mob_hud/hunter_clan(), MOB_HUD_EXECUTE = new /datum/mob_hud/execute_hud(), + MOB_HUD_NEW_PLAYER = new /datum/mob_hud/new_player(), )) /datum/mob_hud @@ -161,6 +162,9 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( +/datum/mob_hud/new_player + hud_icons = list(NEW_PLAYER_HUD) + //Xeno status hud, for xenos /datum/mob_hud/xeno hud_icons = list(HEALTH_HUD_XENO, PLASMA_HUD, PHEROMONE_HUD, QUEEN_OVERWATCH_HUD, ARMOR_HUD_XENO, XENO_STATUS_HUD, XENO_BANISHED_HUD, HUNTER_HUD) @@ -230,6 +234,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( if(istype(hud, /datum/mob_hud/xeno)) //this one is xeno only continue hud.add_to_hud(src) + hud_set_new_player() /mob/living/carbon/xenomorph/add_to_all_mob_huds() for(var/datum/mob_hud/hud in GLOB.huds) @@ -667,6 +672,7 @@ GLOBAL_LIST_INIT_TYPED(huds, /datum/mob_hud, list( holder.overlays += image('icons/mob/hud/marine_hud.dmi', src, "hudmutineer") return + hud_set_new_player() F.modify_hud_holder(holder, src) /mob/living/carbon/human/yautja/hud_set_squad() @@ -839,3 +845,45 @@ GLOBAL_DATUM(hud_icon_hudfocus, /image) var/freeze_found = HAS_TRAIT(src, TRAIT_IMMOBILIZED) && body_position == STANDING_UP && !buckled // Eligible targets are unable to move but can stand and aren't buckled (eg nested) - This is to convey that they are temporarily unable to move if (freeze_found) freeze_holder.overlays += image('icons/mob/hud/hud.dmi', src, "xeno_freeze") + + + +/mob/proc/hud_set_new_player() + return + +GLOBAL_DATUM(hud_icon_new_player_1, /image) +GLOBAL_DATUM(hud_icon_new_player_2, /image) +GLOBAL_DATUM(hud_icon_new_player_3, /image) + + +/mob/living/carbon/human/hud_set_new_player() + if(!GLOB.hud_icon_new_player_1) + GLOB.hud_icon_new_player_1 = image('icons/mob/hud/hud.dmi', src, "new_player_marker_1") + if(!GLOB.hud_icon_new_player_2) + GLOB.hud_icon_new_player_2 = image('icons/mob/hud/hud.dmi', src, "new_player_marker_2") + if(!GLOB.hud_icon_new_player_3) + GLOB.hud_icon_new_player_3 = image('icons/mob/hud/hud.dmi', src, "new_player_marker_3") + if(!client || !job) + return FALSE + var/image/holder = hud_list[NEW_PLAYER_HUD] + holder.icon_state = "hudblank" + holder.overlays.Cut() + holder.pixel_y = 8 + var/total_time = client.get_total_human_playtime() + var/playtime = get_job_playtime(client, job) + var/marker = GLOB.hud_icon_new_player_3 + + var/low_time = FALSE + if(total_time < JOB_PLAYTIME_TIER_2) + marker = GLOB.hud_icon_new_player_2 + low_time = TRUE + + if(playtime <= JOB_PLAYTIME_TIER_1) + if(low_time) + marker = GLOB.hud_icon_new_player_1 + else if(!low_time) + return FALSE + + holder.overlays += marker + hud_list[NEW_PLAYER_HUD] = holder + return TRUE diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 48f80d814127..76fa3b1bac00 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -319,6 +319,13 @@ GLOBAL_LIST_INIT(roundstart_mod_verbs, list( /client/proc/toggle_ob_spawn )) +GLOBAL_LIST_INIT(mentor_verbs, list( + /client/proc/cmd_mentor_say, + /datum/admins/proc/imaginary_friend, + /client/proc/toggle_newplayer_ghost_hud, + /client/proc/toggle_newplayer_ic_hud +)) + /client/proc/add_admin_verbs() if(!admin_holder) return @@ -333,8 +340,7 @@ GLOBAL_LIST_INIT(roundstart_mod_verbs, list( add_verb(src, GLOB.admin_verbs_admin) add_verb(src, GLOB.admin_verbs_major_event) if(CLIENT_HAS_RIGHTS(src, R_MENTOR)) - add_verb(src, /client/proc/cmd_mentor_say) - add_verb(src, /datum/admins/proc/imaginary_friend) + add_verb(src, GLOB.mentor_verbs) if(CLIENT_HAS_RIGHTS(src, R_BUILDMODE)) add_verb(src, /client/proc/togglebuildmodeself) if(CLIENT_HAS_RIGHTS(src, R_SERVER)) diff --git a/code/modules/admin/tabs/admin_tab.dm b/code/modules/admin/tabs/admin_tab.dm index 5f3bc220876c..cf8fe41b66d7 100644 --- a/code/modules/admin/tabs/admin_tab.dm +++ b/code/modules/admin/tabs/admin_tab.dm @@ -372,7 +372,7 @@ /client/proc/cmd_mentor_say(msg as text) set name = "MentorSay" - set category = "OOC" + set category = "Admin.Mentor" set hidden = 0 if(!check_rights(R_MENTOR|R_MOD|R_ADMIN)) @@ -608,7 +608,7 @@ return /datum/admins/proc/imaginary_friend() - set category = "OOC.Mentor" + set category = "Admin.Mentor" set name = "Imaginary Friend" var/mob/user = usr diff --git a/code/modules/admin/verbs/mentorhud.dm b/code/modules/admin/verbs/mentorhud.dm new file mode 100644 index 000000000000..f03c4edecedd --- /dev/null +++ b/code/modules/admin/verbs/mentorhud.dm @@ -0,0 +1,57 @@ +/client/proc/toggle_newplayer_ghost_hud() + set name = "Toggle Markers (Ghost)" + set category = "Admin.Mentor" + set desc = "Toggles observer pref for mentor markers." + + if(!admin_holder || !(admin_holder.rights & R_MENTOR)) + to_chat(src, "Only mentors may use this HUD!") + return FALSE + + prefs.observer_huds[HUD_MENTOR_SIGHT] = !prefs.observer_huds[HUD_MENTOR_SIGHT] + prefs.save_preferences() + + to_chat(src, SPAN_BOLDNOTICE("You toggled [HUD_MENTOR_SIGHT] to be [prefs.observer_huds[HUD_MENTOR_SIGHT] ? "ON" : "OFF"] by default when you are observer.")) + + if(!isobserver(usr)) + return + var/mob/dead/observer/observer_user = usr + var/datum/mob_hud/the_hud + the_hud = GLOB.huds[MOB_HUD_NEW_PLAYER] + + observer_user.HUD_toggled[HUD_MENTOR_SIGHT] = prefs.observer_huds[HUD_MENTOR_SIGHT] + if(observer_user.HUD_toggled[HUD_MENTOR_SIGHT]) + the_hud.add_hud_to(observer_user, observer_user) + else + the_hud.remove_hud_from(observer_user, observer_user) + +/client/proc/toggle_newplayer_ic_hud(sea_forced = FALSE) + set category = "Admin.Mentor" + set name = "Toggle Markers (IC)" + set desc = "Toggles new player HUD while IC." + + if(!admin_holder || !(admin_holder.rights & R_MENTOR)) + if(!sea_forced) + to_chat(src, "Only mentors may use this HUD!") + return FALSE + + var/mob/living/carbon/human/mentor = mob + if(!ishuman(mentor)) + to_chat(src, SPAN_WARNING("You cannot use this power as a non-human!")) + return FALSE + + if(!mentor.looc_overhead && !(mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER])) + to_chat(src, SPAN_WARNING("You are not in a mentor role! (Overhead LOOC is disabled!)")) + return FALSE + + var/datum/mob_hud/the_hud + the_hud = GLOB.huds[MOB_HUD_NEW_PLAYER] + + if(mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER]) + mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER] = FALSE + the_hud.remove_hud_from(mentor, mentor) + to_chat(mentor, SPAN_INFO("New Player Markers Disabled")) + else + mentor.inherent_huds_toggled[INHERENT_HUD_NEW_PLAYER] = TRUE + the_hud.add_hud_to(mentor, mentor) + to_chat(mentor, SPAN_INFO("New Player Markers Enabled")) + return TRUE diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 34135945d8fe..420740534ffe 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -76,7 +76,8 @@ GLOBAL_LIST_INIT(bgstate_options, list( "Medical HUD" = FALSE, "Security HUD" = FALSE, "Squad HUD" = FALSE, - "Xeno Status HUD" = FALSE + "Xeno Status HUD" = FALSE, + HUD_MENTOR_SIGHT = FALSE ) var/ghost_vision_pref = GHOST_VISION_LEVEL_MID_NVG var/ghost_orbit = GHOST_ORBIT_CIRCLE @@ -549,7 +550,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( dat += "You do not have the whitelist for this role." if(MENU_MENTOR) if(owner.check_whitelist_status(WHITELIST_MENTOR)) - dat += "Nothing here. For now." + dat += "New Player Ghost HUD: [observer_huds[HUD_MENTOR_SIGHT] ? "Enabled" : "Disabled"]
" else dat += "You do not have the whitelist for this role." if(MENU_SETTINGS) @@ -1940,6 +1941,9 @@ GLOBAL_LIST_INIT(bgstate_options, list( return plane_master.backdrop(user?.client.mob) + if("newplayer_ghost_hud") + observer_huds[HUD_MENTOR_SIGHT] = !observer_huds[HUD_MENTOR_SIGHT] + if("auto_fit_viewport") auto_fit_viewport = !auto_fit_viewport if(auto_fit_viewport && owner) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 17fde8ebe8b4..2983b89cfc4f 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -376,7 +376,7 @@ owner.typing_indicators = TRUE if(!observer_huds) - observer_huds = list("Medical HUD" = FALSE, "Security HUD" = FALSE, "Squad HUD" = FALSE, "Xeno Status HUD" = FALSE) + observer_huds = list("Medical HUD" = FALSE, "Security HUD" = FALSE, "Squad HUD" = FALSE, "Xeno Status HUD" = FALSE, HUD_MENTOR_SIGHT = FALSE) return 1 diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index 38a07f8ee874..07124c92e456 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -644,6 +644,7 @@ new_human.equip_to_slot_or_del(new /obj/item/device/whistle(new_human), WEAR_R_HAND) /datum/equipment_preset/uscm_ship/sea/load_rank(mob/living/carbon/human/rankee, client/mob_client) + mob_client.toggle_newplayer_ic_hud(TRUE) if(rankee?.client?.prefs?.pref_special_job_options[rank]) var/paygrade_choice = get_paygrade_id_by_name(rankee.client.prefs.pref_special_job_options[rank]) return paygrade_choice diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 7f52beac6073..51737c692663 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -376,35 +376,38 @@ if(!client || !client.prefs) return - var/datum/mob_hud/H + var/datum/mob_hud/the_hud HUD_toggled = client.prefs.observer_huds for(var/i in HUD_toggled) if(HUD_toggled[i]) switch(i) if("Medical HUD") - H = GLOB.huds[MOB_HUD_MEDICAL_OBSERVER] - H.add_hud_to(src, src) + the_hud = GLOB.huds[MOB_HUD_MEDICAL_OBSERVER] + the_hud.add_hud_to(src, src) if("Security HUD") - H = GLOB.huds[MOB_HUD_SECURITY_ADVANCED] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_SECURITY_ADVANCED] + the_hud.add_hud_to(src, src) if("Squad HUD") - H = GLOB.huds[MOB_HUD_FACTION_OBSERVER] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_FACTION_OBSERVER] + the_hud.add_hud_to(src, src) if("Xeno Status HUD") - H = GLOB.huds[MOB_HUD_XENO_STATUS] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_XENO_STATUS] + the_hud.add_hud_to(src, src) if("Faction UPP HUD") - H = GLOB.huds[MOB_HUD_FACTION_UPP] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_FACTION_UPP] + the_hud.add_hud_to(src, src) if("Faction Wey-Yu HUD") - H = GLOB.huds[MOB_HUD_FACTION_WY] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_FACTION_WY] + the_hud.add_hud_to(src, src) if("Faction TWE HUD") - H = GLOB.huds[MOB_HUD_FACTION_TWE] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_FACTION_TWE] + the_hud.add_hud_to(src, src) if("Faction CLF HUD") - H = GLOB.huds[MOB_HUD_FACTION_CLF] - H.add_hud_to(src, src) + the_hud= GLOB.huds[MOB_HUD_FACTION_CLF] + the_hud.add_hud_to(src, src) + if(HUD_MENTOR_SIGHT) + the_hud= GLOB.huds[MOB_HUD_NEW_PLAYER] + the_hud.add_hud_to(src, src) see_invisible = INVISIBILITY_OBSERVER diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 7ab1c132257e..c796a3984422 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -144,7 +144,7 @@ var/last_chew = 0 //taken from human.dm - hud_possible = list(HEALTH_HUD, STATUS_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_INFECTION, STATUS_HUD_XENO_CULTIST, ID_HUD, WANTED_HUD, ORDER_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, XENO_EXECUTE, HUNTER_CLAN, HUNTER_HUD, FACTION_HUD, HOLOCARD_HUD) + hud_possible = list(HEALTH_HUD, STATUS_HUD, STATUS_HUD_OOC, STATUS_HUD_XENO_INFECTION, STATUS_HUD_XENO_CULTIST, ID_HUD, WANTED_HUD, ORDER_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, XENO_EXECUTE, HUNTER_CLAN, HUNTER_HUD, FACTION_HUD, HOLOCARD_HUD, NEW_PLAYER_HUD) var/embedded_flag //To check if we've need to roll for damage on movement while an item is imbedded in us. var/allow_gun_usage = TRUE var/melee_allowed = TRUE @@ -154,7 +154,7 @@ /// A list of all the shrapnel currently embedded in the human var/list/atom/movable/embedded_items = list() - var/list/synthetic_HUD_toggled = list(FALSE,FALSE) + var/list/inherent_huds_toggled = list(INHERENT_HUD_MEDICAL = FALSE, INHERENT_HUD_SECURITY = FALSE, INHERENT_HUD_NEW_PLAYER = FALSE) var/default_lighting_alpha = LIGHTING_PLANE_ALPHA_VISIBLE diff --git a/code/modules/mob/living/carbon/human/powers/human_powers.dm b/code/modules/mob/living/carbon/human/powers/human_powers.dm index 8daf9a7488d7..4cb29534d038 100644 --- a/code/modules/mob/living/carbon/human/powers/human_powers.dm +++ b/code/modules/mob/living/carbon/human/powers/human_powers.dm @@ -269,22 +269,22 @@ if(usr.is_mob_incapacitated()) return - var/datum/mob_hud/H - var/chosen_HUD = 1 + var/datum/mob_hud/the_hud + var/chosen_HUD = INHERENT_HUD_MEDICAL switch(hud_choice) if("Medical HUD") - H = GLOB.huds[MOB_HUD_MEDICAL_ADVANCED] + the_hud = GLOB.huds[MOB_HUD_MEDICAL_ADVANCED] if("Security HUD") - H = GLOB.huds[MOB_HUD_SECURITY_ADVANCED] - chosen_HUD = 2 + the_hud = GLOB.huds[MOB_HUD_SECURITY_ADVANCED] + chosen_HUD = INHERENT_HUD_SECURITY else return - if(synthetic_HUD_toggled[chosen_HUD]) - synthetic_HUD_toggled[chosen_HUD] = FALSE - H.remove_hud_from(src, src) + if(inherent_huds_toggled[chosen_HUD]) + inherent_huds_toggled[chosen_HUD] = FALSE + the_hud.remove_hud_from(src, src) to_chat(src, SPAN_INFO("[hud_choice] Disabled")) else - synthetic_HUD_toggled[chosen_HUD] = TRUE - H.add_hud_to(src, src) + inherent_huds_toggled[chosen_HUD] = TRUE + the_hud.add_hud_to(src, src) to_chat(src, SPAN_INFO("[hud_choice] Enabled")) diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index eed2dce5f7a8..c4a0d4a9e720 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -45,7 +45,7 @@ see_in_dark = 12 recovery_constant = 1.5 see_invisible = SEE_INVISIBLE_LIVING - hud_possible = list(HEALTH_HUD_XENO, PLASMA_HUD, PHEROMONE_HUD, QUEEN_OVERWATCH_HUD, ARMOR_HUD_XENO, XENO_STATUS_HUD, XENO_BANISHED_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, HUNTER_HUD) + hud_possible = list(HEALTH_HUD_XENO, PLASMA_HUD, PHEROMONE_HUD, QUEEN_OVERWATCH_HUD, ARMOR_HUD_XENO, XENO_STATUS_HUD, XENO_BANISHED_HUD, XENO_HOSTILE_ACID, XENO_HOSTILE_SLOW, XENO_HOSTILE_TAG, XENO_HOSTILE_FREEZE, HUNTER_HUD, NEW_PLAYER_HUD) unacidable = TRUE rebounds = TRUE faction = FACTION_XENOMORPH diff --git a/colonialmarines.dme b/colonialmarines.dme index 1c80a6738d15..0bbc6c90c087 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1465,6 +1465,7 @@ #include "code\modules\admin\verbs\getlogs.dm" #include "code\modules\admin\verbs\load_event_level.dm" #include "code\modules\admin\verbs\map_template_loadverb.dm" +#include "code\modules\admin\verbs\mentorhud.dm" #include "code\modules\admin\verbs\mob_verbs.dm" #include "code\modules\admin\verbs\mooc.dm" #include "code\modules\admin\verbs\noclip.dm" diff --git a/icons/mob/hud/hud.dmi b/icons/mob/hud/hud.dmi index 999afedb037b..1c943375216a 100644 Binary files a/icons/mob/hud/hud.dmi and b/icons/mob/hud/hud.dmi differ