mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
[MIRROR] Hide and seek mode (#10251)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
b1c76b0c80
commit
3148cdaf8d
@@ -4,6 +4,7 @@ SUBSYSTEM_DEF(motiontracker)
|
|||||||
wait = 1 SECOND
|
wait = 1 SECOND
|
||||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||||
flags = SS_NO_INIT
|
flags = SS_NO_INIT
|
||||||
|
var/hide_all = FALSE // Hide and seek mode
|
||||||
var/min_range = 2
|
var/min_range = 2
|
||||||
var/max_range = 8
|
var/max_range = 8
|
||||||
var/all_echos_round = 0
|
var/all_echos_round = 0
|
||||||
@@ -20,7 +21,10 @@ SUBSYSTEM_DEF(motiontracker)
|
|||||||
count = track_list.len
|
count = track_list.len
|
||||||
else
|
else
|
||||||
count = 1 // listen_lookup optimizes single entries into just returning the only thing
|
count = 1 // listen_lookup optimizes single entries into just returning the only thing
|
||||||
msg = "L: [count] | Q: [queued_echo_turfs.len] | A: [all_echos_round]/[all_pings_round]"
|
if(hide_all)
|
||||||
|
msg = "HIDE AND SEEK"
|
||||||
|
else
|
||||||
|
msg = "L: [count] | Q: [queued_echo_turfs.len] | A: [all_echos_round]/[all_pings_round]"
|
||||||
return ..()
|
return ..()
|
||||||
|
|
||||||
/datum/controller/subsystem/motiontracker/fire(resumed = 0)
|
/datum/controller/subsystem/motiontracker/fire(resumed = 0)
|
||||||
@@ -53,6 +57,8 @@ SUBSYSTEM_DEF(motiontracker)
|
|||||||
// We get this from anything in the world that would cause a motion tracker ping
|
// We get this from anything in the world that would cause a motion tracker ping
|
||||||
// From sounds to motions, to mob attacks. This then sends a signal to anyone listening.
|
// From sounds to motions, to mob attacks. This then sends a signal to anyone listening.
|
||||||
/datum/controller/subsystem/motiontracker/proc/ping(var/atom/source, var/hear_chance = 30)
|
/datum/controller/subsystem/motiontracker/proc/ping(var/atom/source, var/hear_chance = 30)
|
||||||
|
if(hide_all) // No pings, admins turned us off
|
||||||
|
return
|
||||||
var/turf/T = get_turf(source)
|
var/turf/T = get_turf(source)
|
||||||
if(!isturf(T)) // ONLY call from turfs
|
if(!isturf(T)) // ONLY call from turfs
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -112,7 +112,8 @@ var/list/admin_verbs_admin = list(
|
|||||||
/datum/admins/proc/view_feedback,
|
/datum/admins/proc/view_feedback,
|
||||||
/client/proc/admin_teleport, //CHOMPEdit
|
/client/proc/admin_teleport, //CHOMPEdit
|
||||||
/client/proc/setckey, //YW add - readds SetCkey proc
|
/client/proc/setckey, //YW add - readds SetCkey proc
|
||||||
/client/proc/debug_global_variables
|
/client/proc/debug_global_variables,
|
||||||
|
/client/proc/hide_motion_tracker_feedback
|
||||||
)
|
)
|
||||||
|
|
||||||
var/list/admin_verbs_ban = list(
|
var/list/admin_verbs_ban = list(
|
||||||
@@ -517,7 +518,8 @@ var/list/admin_verbs_event_manager = list(
|
|||||||
/client/proc/cmd_debug_del_all,
|
/client/proc/cmd_debug_del_all,
|
||||||
/client/proc/toggle_random_events,
|
/client/proc/toggle_random_events,
|
||||||
/client/proc/modify_server_news,
|
/client/proc/modify_server_news,
|
||||||
/client/proc/debug_global_variables
|
/client/proc/debug_global_variables,
|
||||||
|
/client/proc/hide_motion_tracker_feedback
|
||||||
)
|
)
|
||||||
|
|
||||||
/client/proc/add_admin_verbs()
|
/client/proc/add_admin_verbs()
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ var/list/admin_verbs_admin = list(
|
|||||||
/client/proc/delbook,
|
/client/proc/delbook,
|
||||||
/client/proc/toggle_spawning_with_recolour,
|
/client/proc/toggle_spawning_with_recolour,
|
||||||
/client/proc/start_vote,
|
/client/proc/start_vote,
|
||||||
|
/client/proc/hide_motion_tracker_feedback,
|
||||||
/client/proc/reload_jobwhitelist, //ChompADD
|
/client/proc/reload_jobwhitelist, //ChompADD
|
||||||
/client/proc/reload_alienwhitelist //ChompADD
|
/client/proc/reload_alienwhitelist //ChompADD
|
||||||
)
|
)
|
||||||
@@ -586,6 +587,7 @@ var/list/admin_verbs_event_manager = list(
|
|||||||
/client/proc/ReleaseVirus,
|
/client/proc/ReleaseVirus,
|
||||||
/client/proc/add_hidden_area,
|
/client/proc/add_hidden_area,
|
||||||
/client/proc/remove_hidden_area,
|
/client/proc/remove_hidden_area,
|
||||||
|
/client/proc/hide_motion_tracker_feedback,
|
||||||
/datum/admins/proc/quick_nif, //CHOMPStation Add,
|
/datum/admins/proc/quick_nif, //CHOMPStation Add,
|
||||||
/datum/admins/proc/quick_authentic_nif, //CHOMPStation add
|
/datum/admins/proc/quick_authentic_nif, //CHOMPStation add
|
||||||
/client/proc/reload_jobwhitelist, //ChompADD
|
/client/proc/reload_jobwhitelist, //ChompADD
|
||||||
|
|||||||
@@ -574,3 +574,13 @@
|
|||||||
return
|
return
|
||||||
A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
|
A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
|
||||||
ghostnet.removeArea(A)
|
ghostnet.removeArea(A)
|
||||||
|
|
||||||
|
/client/proc/hide_motion_tracker_feedback()
|
||||||
|
set name = "Toggle Motion Echos"
|
||||||
|
set desc = "Hides or reveals motion tracker echos globally."
|
||||||
|
set category = "Admin.Events"
|
||||||
|
|
||||||
|
if(!check_rights(R_ADMIN|R_EVENT))
|
||||||
|
return
|
||||||
|
SSmotiontracker.hide_all = !SSmotiontracker.hide_all
|
||||||
|
log_admin("[key_name(usr)] changed the motion echo visibility to [SSmotiontracker.hide_all ? "hidden" : "visible"].")
|
||||||
|
|||||||
@@ -108,6 +108,9 @@
|
|||||||
H.dna.ready_dna(H)
|
H.dna.ready_dna(H)
|
||||||
handle_base_eyes(H, custom_base)
|
handle_base_eyes(H, custom_base)
|
||||||
|
|
||||||
|
if(H.species.has_vibration_sense)
|
||||||
|
H.motiontracker_subscribe()
|
||||||
|
|
||||||
return new_copy
|
return new_copy
|
||||||
|
|
||||||
//We REALLY don't need to go through every variable. Doing so makes this lag like hell on 515
|
//We REALLY don't need to go through every variable. Doing so makes this lag like hell on 515
|
||||||
|
|||||||
Reference in New Issue
Block a user