mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-19 11:05:50 +01:00
playertips overtime (#19150)
* playertips overtime * . * . * . * . * . * . * . * . * . * . * wtf * . * . * . * snark * that too * ok... why * . * hmm * . * . * . * . * . * ugh * . * .
This commit is contained in:
@@ -420,6 +420,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
|
||||
if(holder)
|
||||
holder.owner = null
|
||||
GLOB.admins -= src
|
||||
if(skybox)
|
||||
QDEL_NULL(skybox)
|
||||
|
||||
QDEL_NULL(loot_panel)
|
||||
..()
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
|
||||
// Spawn a single carp at given location.
|
||||
/datum/event/carp_migration/proc/spawn_one_carp(var/loc)
|
||||
var/mob/living/simple_mob/animal/M = new /mob/living/simple_mob/animal/space/carp/event(loc)
|
||||
RegisterSignal(M, COMSIG_OBSERVER_DESTROYED, PROC_REF(on_carp_destruction))
|
||||
spawned_carp.Add(M)
|
||||
return M
|
||||
var/mob/living/simple_mob/animal/carp_to_spawn = new /mob/living/simple_mob/animal/space/carp/event(loc)
|
||||
RegisterSignal(carp_to_spawn, COMSIG_OBSERVER_DESTROYED, PROC_REF(on_carp_destruction))
|
||||
spawned_carp.Add(carp_to_spawn)
|
||||
return carp_to_spawn
|
||||
|
||||
// Counts living carp spawned by this event.
|
||||
/datum/event/carp_migration/proc/count_spawned_carps()
|
||||
@@ -83,10 +83,10 @@
|
||||
. += 1
|
||||
|
||||
// If carp is bomphed, remove it from the list.
|
||||
/datum/event/carp_migration/proc/on_carp_destruction(var/mob/M)
|
||||
/datum/event/carp_migration/proc/on_carp_destruction(datum/source, mob/carp_to_remove)
|
||||
SIGNAL_HANDLER
|
||||
spawned_carp -= M
|
||||
UnregisterSignal(M, COMSIG_OBSERVER_DESTROYED)
|
||||
spawned_carp -= carp_to_remove
|
||||
UnregisterSignal(carp_to_remove, COMSIG_OBSERVER_DESTROYED)
|
||||
|
||||
/datum/event/carp_migration/end()
|
||||
. = ..()
|
||||
|
||||
@@ -1469,6 +1469,8 @@
|
||||
if(screen_icon)
|
||||
owner?.client?.screen -= screen_icon
|
||||
UnregisterSignal(screen_icon, COMSIG_CLICK)
|
||||
var/datum/hud/HUD = owner?.hud_used
|
||||
LAZYREMOVE(HUD?.other_important, screen_icon)
|
||||
QDEL_NULL(screen_icon)
|
||||
|
||||
/datum/component/character_setup/proc/create_mob_button(mob/user)
|
||||
|
||||
@@ -41,6 +41,10 @@
|
||||
ion_trail.start()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/mechanical/mecha/hoverpod/Destroy()
|
||||
QDEL_NULL(ion_trail)
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/mechanical/mecha/hoverpod/Process_Spacemove(var/check_drift = 0)
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
ready = 0
|
||||
|
||||
GLOB.new_player_list -= src
|
||||
QDEL_NULL(lobby_window)
|
||||
disable_lobby_browser()
|
||||
|
||||
..()
|
||||
@@ -17,6 +16,10 @@
|
||||
return
|
||||
|
||||
/mob/new_player/proc/disable_lobby_browser()
|
||||
if(lobby_window)
|
||||
lobby_window.unsubscribe(src)
|
||||
lobby_window.close()
|
||||
lobby_window = null
|
||||
var/client/exiting_client = persistent_client.client
|
||||
if(exiting_client)
|
||||
winset(exiting_client, "lobby_browser", "is-disabled=true;is-visible=false")
|
||||
|
||||
@@ -14,29 +14,31 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player
|
||||
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()
|
||||
if(world.time > last_tip_time + tip_delay)
|
||||
last_tip_time = world.time
|
||||
tip_delay = rand(min_tip_delay, max_tip_delay)
|
||||
var/tip = pick_tip("none") //"none" picks a random topic of advice.
|
||||
var/stopWhile = 0
|
||||
while(tip == last_tip) //Prevent posting the same tip twice in a row if possible, but don't force it.
|
||||
tip = pick_tip("none")
|
||||
stopWhile = stopWhile + 1
|
||||
if(stopWhile >= 10)
|
||||
break
|
||||
last_tip = tip
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.client?.prefs?.read_preference(/datum/preference/toggle/player_tips))
|
||||
if(!M.key && !(M.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.key)
|
||||
tip = GLOB.is_valid_url.Replace(tip,span_linkify("$1"))
|
||||
to_chat(M, span_notice("[tip]"))
|
||||
|
||||
/datum/player_tips/proc/check_next_tip()
|
||||
if(world.time <= last_tip_time + tip_delay)
|
||||
return FALSE
|
||||
|
||||
last_tip_time = world.time
|
||||
tip_delay = rand(min_tip_delay, max_tip_delay)
|
||||
return TRUE
|
||||
|
||||
/datum/player_tips/proc/set_current_tip()
|
||||
var/tip = pick_tip("none") //"none" picks a random topic of advice.
|
||||
var/stopWhile = 0
|
||||
while(tip == last_tip) //Prevent posting the same tip twice in a row if possible, but don't force it.
|
||||
tip = pick_tip("none")
|
||||
stopWhile = stopWhile + 1
|
||||
if(stopWhile >= 10)
|
||||
break
|
||||
last_tip = tip
|
||||
|
||||
/datum/player_tips/proc/send_tip(mob/target_mob)
|
||||
if(!(target_mob.client?.prefs?.read_preference(/datum/preference/toggle/player_tips)))
|
||||
return
|
||||
if(target_mob.key && !(target_mob.key in HasReceived))
|
||||
to_chat(target_mob, 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(target_mob.key)
|
||||
to_chat(target_mob, span_notice("[GLOB.is_valid_url.Replace(last_tip, span_linkify("$1"))]"))
|
||||
|
||||
/mob/living/verb/request_automated_advice()
|
||||
set name = "Request Automated Advice"
|
||||
@@ -47,4 +49,4 @@ Controlled by the player_tips subsystem under code/controllers/subsystems/player
|
||||
if(choice == "cancel")
|
||||
return
|
||||
var/static/datum/player_tips/player_tips = new
|
||||
to_chat(src, span_notice("[GLOB.is_valid_url.Replace(player_tips.pick_tip(choice),span_linkify("$1"))]"))
|
||||
to_chat(src, span_notice("[GLOB.is_valid_url.Replace(player_tips.pick_tip(choice), span_linkify("$1"))]"))
|
||||
|
||||
@@ -102,9 +102,9 @@
|
||||
cut_data()
|
||||
|
||||
/datum/tgui_module/appearance_changer/Destroy()
|
||||
qdel(cam_screen)
|
||||
QDEL_NULL(cam_screen)
|
||||
QDEL_LIST(cam_plane_masters)
|
||||
qdel(cam_background)
|
||||
QDEL_NULL(cam_background)
|
||||
return ..()
|
||||
|
||||
/datum/tgui_module/appearance_changer/tgui_act(action, list/params, datum/tgui/ui, datum/tgui_state/state)
|
||||
|
||||
@@ -221,6 +221,9 @@
|
||||
*/
|
||||
/datum/tgui_window/proc/close(can_be_suspended = TRUE)
|
||||
if(!client)
|
||||
release_lock()
|
||||
status = TGUI_WINDOW_CLOSED
|
||||
message_queue = null
|
||||
return
|
||||
if(can_be_suspended && can_be_suspended())
|
||||
#ifdef TGUI_DEBUGGING
|
||||
|
||||
@@ -1307,6 +1307,8 @@
|
||||
if(screen_icon)
|
||||
owner?.client?.screen -= screen_icon
|
||||
UnregisterSignal(screen_icon, COMSIG_CLICK)
|
||||
var/datum/hud/HUD = owner?.hud_used
|
||||
LAZYREMOVE(HUD?.other_important, screen_icon)
|
||||
QDEL_NULL(screen_icon)
|
||||
remove_verb(owner, /mob/proc/insidePanel)
|
||||
QDEL_NULL(owner.vorePanel)
|
||||
|
||||
Reference in New Issue
Block a user