Ambitioncheck

This commit is contained in:
keronshb
2021-12-23 21:15:31 -05:00
16 changed files with 1064 additions and 48 deletions

View File

@@ -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!

View File

@@ -2031,6 +2031,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))