Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into station_traits
This commit is contained in:
@@ -25,7 +25,9 @@
|
||||
to_chat(usr, "<span class='warning'>You seem to be selecting a mob that doesn't exist anymore.</span>", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/body = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Options for [M.key]</title></head>"
|
||||
//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>")
|
||||
//ambition end
|
||||
body += "<body>Options panel for <b>[M]</b>"
|
||||
if(M.client)
|
||||
body += " played by <b>[M.client]</b> "
|
||||
@@ -125,6 +127,10 @@
|
||||
body += "<A href='?_src_=holder;[HrefToken()];subtlemessage=[REF(M)]'>Subtle message</A> | "
|
||||
// body += "<A href='?_src_=holder;[HrefToken()];playsoundto=[REF(M)]'>Play sound to</A> | "
|
||||
body += "<A href='?_src_=holder;[HrefToken()];languagemenu=[REF(M)]'>Language Menu</A>"
|
||||
//ambition start
|
||||
if(M.mind)
|
||||
body += " | <A href='?_src_=holder;[HrefToken()];ObjectiveRequest=[REF(M.mind)]'>Objective-Ambition Menu</A>"
|
||||
//ambition end
|
||||
|
||||
if (M.client)
|
||||
if(!isnewplayer(M))
|
||||
@@ -206,7 +212,11 @@
|
||||
body += "<br>"
|
||||
body += "</body></html>"
|
||||
|
||||
usr << browse(body, "window=adminplayeropts-[REF(M)];size=550x515")
|
||||
//ambition start
|
||||
var/datum/browser/popup = new(usr, "adminplayeropts-[REF(M)]", "Player Panel", nwidth = 550, nheight = 515)
|
||||
popup.set_content(body.Join())
|
||||
popup.open()
|
||||
//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!
|
||||
|
||||
|
||||
|
||||
@@ -115,9 +115,9 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
//adv proc call this, ya nerds
|
||||
/world/proc/WrapAdminProcCall(datum/target, procname, list/arguments)
|
||||
if(target == GLOBAL_PROC)
|
||||
return call("/proc/[procname]")(arglist(arguments))
|
||||
else if(target != world)
|
||||
return call(target, procname)(arglist(arguments))
|
||||
return text2path("/proc/[procname]")? call("/proc/[procname]")(arglist(arguments)) : null
|
||||
else if(target != world && istype(target, /datum)) // isdatum check incase someone manages to call WrapAdminProcCall(global) which would otherwise crash the process entirely
|
||||
return hascall(target, procname)? call(target, procname)(arglist(arguments)) : null
|
||||
else
|
||||
log_admin("[key_name(usr)] attempted to call world/proc/[procname] with arguments: [english_list(arguments)]")
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
"name" = initial(item.name),
|
||||
"desc" = initial(item.desc),
|
||||
// at this point initializing the item is probably faster tbh
|
||||
"sprite" = icon2base64(icon(initial(item.icon), initial(item.icon_state))),
|
||||
"sprite" = icon2base64(icon(initial(item.icon), initial(item.icon_state), SOUTH, 1)),
|
||||
)
|
||||
|
||||
return data
|
||||
|
||||
68
code/modules/admin/playtimes.dm
Normal file
68
code/modules/admin/playtimes.dm
Normal file
@@ -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)
|
||||
@@ -53,15 +53,6 @@
|
||||
return
|
||||
cmd_show_exp_panel(M.client)
|
||||
|
||||
else if(href_list["toggleexempt"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/client/C = locate(href_list["toggleexempt"]) in GLOB.clients
|
||||
if(!C)
|
||||
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>")
|
||||
return
|
||||
toggle_exempt_status(C)
|
||||
|
||||
else if(href_list["makeAntag"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -920,10 +911,10 @@
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=alien;jobban4=[REF(M)]'>Alien</a></td>"
|
||||
//Gang
|
||||
if(jobban_isbanned(M, ROLE_GANG) || isbanned_dept)
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=gang;jobban4=[REF(M)]'><font color=red>Gang</font></a></td>"
|
||||
if(jobban_isbanned(M, ROLE_FAMILIES) || isbanned_dept)
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=gang;jobban4=[REF(M)]'><font color=red>Families</font></a></td>"
|
||||
else
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=gang;jobban4=[REF(M)]'>Gang</a></td>"
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=gang;jobban4=[REF(M)]'>Families</a></td>"
|
||||
//Bloodsucker
|
||||
if(jobban_isbanned(M, ROLE_BLOODSUCKER) || isbanned_dept)
|
||||
dat += "<td width='20%'><a href='?src=[REF(src)];[HrefToken()];jobban3=bloodsucker;jobban4=[REF(M)]'><font color=red>Bloodsucker</font></a></td>"
|
||||
@@ -1008,7 +999,7 @@
|
||||
if("ghostroles")
|
||||
joblist += list(ROLE_PAI, ROLE_POSIBRAIN, ROLE_DRONE , ROLE_DEATHSQUAD, ROLE_LAVALAND, ROLE_SENTIENCE)
|
||||
if("teamantags")
|
||||
joblist += list(ROLE_OPERATIVE, ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ABDUCTOR, ROLE_ALIEN, ROLE_GANG)
|
||||
joblist += list(ROLE_OPERATIVE, ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ABDUCTOR, ROLE_ALIEN, ROLE_FAMILIES)
|
||||
if("convertantags")
|
||||
joblist += list(ROLE_REV, ROLE_CULTIST, ROLE_SERVANT_OF_RATVAR, ROLE_ALIEN)
|
||||
if("otherroles")
|
||||
@@ -1695,8 +1686,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))
|
||||
@@ -2031,6 +2022,18 @@
|
||||
|
||||
var/mob/M = locate(href_list["HeadsetMessage"])
|
||||
usr.client.admin_headset_message(M)
|
||||
//ambition start
|
||||
else if(href_list["ObjectiveRequest"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/mind/requesting_mind = locate(href_list["ObjectiveRequest"])
|
||||
if(!istype(requesting_mind) || QDELETED(requesting_mind))
|
||||
to_chat(usr, "<span class='warning'>This mind reference is no longer valid. It has probably since been destroyed.</span>")
|
||||
return
|
||||
requesting_mind.do_edit_objectives_ambitions()
|
||||
return
|
||||
//ambition end
|
||||
|
||||
|
||||
else if(href_list["reject_custom_name"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -2038,6 +2041,12 @@
|
||||
var/obj/item/station_charter/charter = locate(href_list["reject_custom_name"])
|
||||
if(istype(charter))
|
||||
charter.reject_proposed(usr)
|
||||
else if(href_list["approve_custom_name"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/obj/item/station_charter/charter = locate(href_list["approve_custom_name"])
|
||||
if(istype(charter))
|
||||
charter.allow_pass(usr)
|
||||
else if(href_list["jumpto"])
|
||||
if(!isobserver(usr) && !check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
var/selectors_used = FALSE
|
||||
var/list/combined_refs = list()
|
||||
do
|
||||
CHECK_TICK
|
||||
stoplag(2)
|
||||
finished = TRUE
|
||||
for(var/i in running)
|
||||
var/datum/SDQL2_query/query = i
|
||||
|
||||
@@ -3,11 +3,19 @@
|
||||
/proc/_abs(A)
|
||||
return abs(A)
|
||||
|
||||
/proc/_animate(atom/A, set_vars, time = 10, loop = 1, easing = LINEAR_EASING, flags = null)
|
||||
var/mutable_appearance/MA = new()
|
||||
for(var/v in set_vars)
|
||||
MA.vars[v] = set_vars[v]
|
||||
animate(A, appearance = MA, time, loop, easing, flags)
|
||||
/proc/_animate(atom/A, list/data, time = 10, loop = 1, easing = LINEAR_EASING, flags = null)
|
||||
if(!istype(A))
|
||||
return
|
||||
animate(A, appearance = data, time = time, loop = loop, easing = easing, flags = flags)
|
||||
|
||||
/proc/_animate_adv(atom/A, list/data, loop = 1, easing = LINEAR_EASING, flags = NONE)
|
||||
if(!A || !islist(data) || data.len < 1)
|
||||
return
|
||||
animate(A, appearance = (data[1] - "time"), time = data[1]["time"], loop = loop, easing = easing, flags = flags)
|
||||
if(data.len < 2)
|
||||
return
|
||||
for(var/i in 2 to data.len)
|
||||
animate(appearance = (data[i] - "time"), time = data[i]["time"])
|
||||
|
||||
/proc/_acrccos(A)
|
||||
return arccos(A)
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
set category = "Object"
|
||||
|
||||
if((O.obj_flags & DANGEROUS_POSSESSION) && CONFIG_GET(flag/forbid_singulo_possession))
|
||||
to_chat(usr, "[O] is too powerful for you to possess.")
|
||||
to_chat(usr, "[O] is too powerful for you to possess.", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(O)
|
||||
@@ -18,19 +18,22 @@
|
||||
if(!usr.control_object) //If you're not already possessing something...
|
||||
usr.name_archive = usr.real_name
|
||||
|
||||
usr.loc = O
|
||||
usr.forceMove(O)
|
||||
usr.real_name = O.name
|
||||
usr.name = O.name
|
||||
usr.reset_perspective(O)
|
||||
usr.control_object = O
|
||||
O.AddElement(/datum/element/weather_listener, /datum/weather/ash_storm, ZTRAIT_ASHSTORM, GLOB.ash_storm_sounds)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/release()
|
||||
set name = "Release Obj"
|
||||
set category = "Object"
|
||||
//usr.loc = get_turf(usr)
|
||||
|
||||
if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object
|
||||
if(!usr.control_object) //lest we are banished to the nullspace realm.
|
||||
return
|
||||
|
||||
if(usr.name_archive) //if you have a name archived
|
||||
usr.real_name = usr.name_archive
|
||||
usr.name_archive = ""
|
||||
usr.name = usr.real_name
|
||||
@@ -38,8 +41,8 @@
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.name = H.get_visible_name()
|
||||
|
||||
|
||||
usr.loc = get_turf(usr.control_object)
|
||||
usr.control_object.RemoveElement(/datum/element/weather_listener, /datum/weather/ash_storm, ZTRAIT_ASHSTORM, GLOB.ash_storm_sounds)
|
||||
usr.forceMove(get_turf(usr.control_object))
|
||||
usr.reset_perspective()
|
||||
usr.control_object = null
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -1557,6 +1557,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
/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
|
||||
|
||||
@@ -1564,12 +1565,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
to_chat(usr, "<span class='warning'>Tracking is disabled in the server configuration file.</span>")
|
||||
return
|
||||
|
||||
var/list/msg = list()
|
||||
msg += "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>Playtime Report</title></head><body>Playtime:<BR><UL>"
|
||||
for(var/client/C in GLOB.clients)
|
||||
msg += "<LI> - [key_name_admin(C)]: <A href='?_src_=holder;[HrefToken()];getplaytimewindow=[REF(C.mob)]'>" + C.get_exp_living() + "</a></LI>"
|
||||
msg += "</UL></BODY></HTML>"
|
||||
src << browse(msg.Join(), "window=Player_playtime_check")
|
||||
new /datum/player_playtime(usr)
|
||||
|
||||
/obj/effect/temp_visual/fireball
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
. = TRUE
|
||||
if("mass_apply")
|
||||
if(!check_rights_for(usr.client, R_FUN))
|
||||
to_chat(usr, "<span class='userdanger>Stay in your lane, jannie.</span>'")
|
||||
to_chat(usr, span_userdanger("Stay in your lane, jannie."))
|
||||
return
|
||||
var/target_path = text2path(params["path"])
|
||||
if(!target_path)
|
||||
|
||||
Reference in New Issue
Block a user