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..f267334e622d 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) @@ -667,6 +671,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 +844,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 aa87f157173c..c45e3e656ca0 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -315,6 +315,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 @@ -329,8 +336,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..ff6743e2da66 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)) diff --git a/code/modules/admin/verbs/mentorhud.dm b/code/modules/admin/verbs/mentorhud.dm new file mode 100644 index 000000000000..7115b9b7189f --- /dev/null +++ b/code/modules/admin/verbs/mentorhud.dm @@ -0,0 +1,58 @@ +/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 + + var/hud_choice = "New Player Markers" + prefs.observer_huds[hud_choice] = !prefs.observer_huds[hud_choice] + prefs.save_preferences() + + to_chat(src, SPAN_BOLDNOTICE("You toggled [hud_choice] to be [prefs.observer_huds[hud_choice] ? "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_choice] = prefs.observer_huds[hud_choice] + if(observer_user.HUD_toggled[hud_choice]) + 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) + to_chat(src, SPAN_WARNING("You are not in a mentor role! (Overhead LOOC is disabled!)")) + return FALSE + + var/datum/mob_hud/the_hud + var/chosen_HUD = 3 + the_hud = GLOB.huds[MOB_HUD_NEW_PLAYER] + + if(mentor.inherent_huds_toggled[chosen_HUD]) + mentor.inherent_huds_toggled[chosen_HUD] = FALSE + the_hud.remove_hud_from(mentor, mentor) + to_chat(mentor, SPAN_INFO("New Player Markers Disabled")) + else + mentor.inherent_huds_toggled[chosen_HUD] = 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 dd0d406560ab..00fec6452dc8 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -75,7 +75,8 @@ GLOBAL_LIST_INIT(bgstate_options, list( "Medical HUD" = FALSE, "Security HUD" = FALSE, "Squad HUD" = FALSE, - "Xeno Status HUD" = FALSE + "Xeno Status HUD" = FALSE, + "New Player Markers" = FALSE ) var/ghost_vision_pref = GHOST_VISION_LEVEL_MID_NVG var/ghost_orbit = GHOST_ORBIT_CIRCLE diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index f383aade5932..5811c774ca6d 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -365,7 +365,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, "New Player Markers" = FALSE) return 1 diff --git a/code/modules/gear_presets/_select_equipment.dm b/code/modules/gear_presets/_select_equipment.dm index 1a61aa39efe8..13f4fb429451 100644 --- a/code/modules/gear_presets/_select_equipment.dm +++ b/code/modules/gear_presets/_select_equipment.dm @@ -121,6 +121,8 @@ . = "???" CRASH("[key_name(new_human)] spawned with no valid paygrade.") + new_human.hud_set_new_player() + return final_paygrade /datum/equipment_preset/proc/load_gear(mob/living/carbon/human/new_human, client/mob_client) diff --git a/code/modules/gear_presets/uscm_ship.dm b/code/modules/gear_presets/uscm_ship.dm index ba4a8a684321..9d79af073de1 100644 --- a/code/modules/gear_presets/uscm_ship.dm +++ b/code/modules/gear_presets/uscm_ship.dm @@ -593,6 +593,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 d4db6bccde83..7f22b52133f5 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("New Player Markers") + 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 e44106d90abb..4baf7943d984 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -137,7 +137,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 @@ -147,7 +147,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(FALSE,FALSE, 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 fef87c2f3263..e9d98dbee6b7 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/datum/mob_hud/the_hud var/chosen_HUD = 1 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] + the_hud = GLOB.huds[MOB_HUD_SECURITY_ADVANCED] chosen_HUD = 2 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 764aca5f33aa..9d057f460eb0 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -1467,6 +1467,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 8d89fb781264..27ebc9b9915c 100644 Binary files a/icons/mob/hud/hud.dmi and b/icons/mob/hud/hud.dmi differ