From 79449ab4042bac3ffc97d87a656d09dfa37db0dd Mon Sep 17 00:00:00 2001 From: Runa Dacino Date: Sun, 19 Feb 2023 13:58:41 +0100 Subject: [PATCH] Makes player tips track CKeys for informing how to turn off. --- code/modules/player_tips_vr/player_tips_controller_vr.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/player_tips_vr/player_tips_controller_vr.dm b/code/modules/player_tips_vr/player_tips_controller_vr.dm index 72e756b886..71e7be1584 100644 --- a/code/modules/player_tips_vr/player_tips_controller_vr.dm +++ b/code/modules/player_tips_vr/player_tips_controller_vr.dm @@ -11,6 +11,7 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player var/tip_delay = 5 MINUTES //10 minute initial delay for first tip of the day. Timer starts 5 minutes after game starts, plus 5 minutes here. Gets overwritten afterwards var/last_tip_time = 0 var/last_tip = null + var/list/HasReceived = list() //Tracking who received tips. We let them know how to turn them off if they're not on this list. Stores CKeys until round-end. //Called every 5 minutes as defined in the subsystem. /datum/player_tips/proc/send_tips() @@ -25,8 +26,9 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player for(var/mob/M in player_list) if(M.is_preference_enabled(/datum/client_preference/player_tips)) - if(!last_tip) //Notifying players how to turn tips off, or call them on-demand in a personalized manner. + if(!(M.mind.key in HasReceived)) to_chat(M, SPAN_WARNING("You have periodic player tips enabled. You may turn them off at any time with the Toggle Receiving Player Tips verb in Preferences, or in character set up under the OOC tab!\n Player tips appear every 45-75 minutes.")) + HasReceived.Add(M.mind.key) to_chat(M, SPAN_NOTICE("[tip]")) last_tip = tip