mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-22 04:07:04 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -25,10 +25,9 @@
|
||||
to_chat(usr, "<span class='warning'>You seem to be selecting a mob that doesn't exist anymore.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
//SKYRAT CHANGES BEGIN
|
||||
//ambition start
|
||||
var/list/body = list("<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Options for [M.key]</title></head>")
|
||||
//SKYRAT CHANGES END
|
||||
|
||||
//ambition end
|
||||
body += "<body>Options panel for <b>[M]</b>"
|
||||
if(M.client)
|
||||
body += " played by <b>[M.client]</b> "
|
||||
@@ -218,12 +217,11 @@
|
||||
body += "<br>"
|
||||
body += "</body></html>"
|
||||
|
||||
//SKYRAT CHANGES BEGIN
|
||||
//ambition start
|
||||
var/datum/browser/popup = new(usr, "adminplayeropts-[REF(M)]", "Player Panel", nwidth = 550, nheight = 515)
|
||||
popup.set_content(body.Join())
|
||||
popup.open()
|
||||
//SKYRAT CHANGES END
|
||||
|
||||
//ambition end
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Player Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
/datum/player_playtime/New(mob/viewer)
|
||||
ui_interact(viewer)
|
||||
|
||||
/datum/player_playtime/ui_interact(mob/user, datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "PlayerPlaytimes", "Player Playtimes")
|
||||
ui.open()
|
||||
|
||||
/datum/player_playtime/ui_state(mob/user)
|
||||
return GLOB.admin_state
|
||||
|
||||
/datum/player_playtime/ui_data(mob/user)
|
||||
var/list/data = list()
|
||||
|
||||
var/list/clients = list()
|
||||
for(var/client/C in GLOB.clients)
|
||||
var/list/client = list()
|
||||
|
||||
client["ckey"] = C.ckey
|
||||
client["playtime"] = C.get_exp_living(TRUE)
|
||||
client["playtime_hours"] = C.get_exp_living()
|
||||
|
||||
var/mob/M = C.mob
|
||||
client["observer"] = isobserver(M)
|
||||
client["ingame"] = !isnewplayer(M)
|
||||
client["name"] = M.real_name
|
||||
var/nnpa = CONFIG_GET(number/notify_new_player_age)
|
||||
if(nnpa >= 0)
|
||||
if(C.account_age >= 0 && (C.account_age < CONFIG_GET(number/notify_new_player_age)))
|
||||
client["new_account"] = "New BYOND account [C.account_age] day[(C.account_age==1?"":"s")] old, created on [C.account_join_date]"
|
||||
|
||||
clients += list(client)
|
||||
|
||||
clients = sortList(clients, /proc/cmp_playtime)
|
||||
data["clients"] = clients
|
||||
return data
|
||||
|
||||
/datum/player_playtime/ui_act(action, params)
|
||||
if(..())
|
||||
return
|
||||
|
||||
switch(action)
|
||||
if("view_playtime")
|
||||
var/mob/target = get_mob_by_ckey(params["ckey"])
|
||||
usr.client.holder.cmd_show_exp_panel(target.client)
|
||||
if("admin_pm")
|
||||
usr.client.cmd_admin_pm(params["ckey"])
|
||||
if("player_panel")
|
||||
var/mob/target = get_mob_by_ckey(params["ckey"])
|
||||
usr.client.holder.show_player_panel(target)
|
||||
if("view_variables")
|
||||
var/mob/target = get_mob_by_ckey(params["ckey"])
|
||||
usr.client.debug_variables(target)
|
||||
if("observe")
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
var/mob/target = get_mob_by_key(params["ckey"])
|
||||
if(!target)
|
||||
to_chat(usr, "<span class='notice'>Player not found.</span>")
|
||||
return
|
||||
|
||||
var/client/C = usr.client
|
||||
if(!isobserver(usr) && !C.admin_ghost())
|
||||
return
|
||||
var/mob/dead/observer/A = C.mob
|
||||
A.ManualFollow(target)
|
||||
@@ -1704,8 +1704,8 @@
|
||||
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/observer = L
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit/black(observer), SLOT_W_UNIFORM)
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), SLOT_SHOES)
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/under/suit/black(observer), ITEM_SLOT_ICLOTHING)
|
||||
observer.equip_to_slot_or_del(new /obj/item/clothing/shoes/sneakers/black(observer), ITEM_SLOT_FEET)
|
||||
L.Unconscious(100)
|
||||
sleep(5)
|
||||
L.forceMove(pick(GLOB.tdomeobserve))
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
id.forceMove(W)
|
||||
W.update_icon()
|
||||
else
|
||||
H.equip_to_slot(id,SLOT_WEAR_ID)
|
||||
H.equip_to_slot(id,ITEM_SLOT_ID)
|
||||
|
||||
else
|
||||
alert("Invalid mob")
|
||||
|
||||
@@ -1633,6 +1633,19 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]")
|
||||
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)
|
||||
|
||||
/client/proc/cmd_admin_check_player_exp() //Allows admins to determine who the newer players are.
|
||||
set category = "Admin"
|
||||
set name = "Player Playtime"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
if(!CONFIG_GET(flag/use_exp_tracking))
|
||||
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>")
|
||||
return
|
||||
|
||||
new /datum/player_playtime(usr)
|
||||
|
||||
/obj/effect/temp_visual/fireball
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
icon_state = "fireball"
|
||||
|
||||
Reference in New Issue
Block a user