From 734ec10f981ae92b3ad2bdce26d310baebb2afc0 Mon Sep 17 00:00:00 2001
From: Contrabang <91113370+Contrabang@users.noreply.github.com>
Date: Mon, 13 Jan 2025 16:15:53 -0500
Subject: [PATCH] Updates "Check New Players" verb (#27963)
* updates "Check New Players" verb
* bam
---
code/modules/admin/verbs/randomverbs.dm | 27 +++++++++++++++++--------
1 file changed, 19 insertions(+), 8 deletions(-)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index ac2d156b834..b4953dd3107 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -78,28 +78,39 @@
if(!check_rights(R_MENTOR|R_MOD|R_ADMIN))
return
- var/age = alert(src, "Age check", "Show accounts yonger then _____ days","7", "30" , "All")
-
- if(age == "All")
- age = 9999999
- else
- age = text2num(age)
+ var/age = input(src, "Show accounts younger then ____ days", "Age check") as num|null
+ var/playtime_hours = input(src, "Show accounts with less than ____ hours", "Playtime check") as num|null
+ if(isnull(age))
+ age = -1
+ if(isnull(playtime_hours))
+ playtime_hours = -1
+ if(age <= 0 && playtime_hours <= 0)
+ return
var/missing_ages = 0
var/msg = ""
+ var/is_admin = check_rights(R_ADMIN, 0)
for(var/client/C in GLOB.clients)
if(C?.holder?.fakekey && !check_rights(R_ADMIN, FALSE))
continue // Skip those in stealth mode if an admin isnt viewing the panel
- if(C.player_age == "Requires database")
+ if(!isnum(C.player_age))
missing_ages = 1
continue
if(C.player_age < age)
- if(check_rights(R_ADMIN, 0))
+ if(is_admin)
msg += "[key_name_admin(C.mob)]: [C.player_age] days old
"
else
msg += "[key_name_mentor(C.mob)]: [C.player_age] days old
"
+ var/client_hours = C.get_exp_type_num(EXP_TYPE_LIVING) + C.get_exp_type_num(EXP_TYPE_GHOST)
+ client_hours /= 60 // minutes to hours
+ if(client_hours < playtime_hours)
+ if(is_admin)
+ msg += "[key_name_admin(C.mob)]: [client_hours] living + ghost hours
"
+ else
+ msg += "[key_name_mentor(C.mob)]: [client_hours] living + ghost hours
"
+
if(missing_ages)
to_chat(src, "Some accounts did not have proper ages set in their clients. This function requires database to be present")