Fix a bunch of issues and runtimes (#17951)

* selection target

* ugh

* fix deadmin

* larger

* fix paper icons

* those are inverted

* don't miss that

* fix all

* point transfer

* add nostrip flag to items

* un....  teppi

* .

* end life proc after qdel

* this could be null in very rare cases

* this has a lot of sleeps, someday should be refactored and check for qdeleted

* needs to be an object

* qdel check this

* use the rsc properly

* wtf?

* .

* fix narrate

* .

* push

* inform user, null it

* .

* can be null

* fix maint lurkers

* .

* spans

* .

* fix that too

* urg

* fix distillery

* don't wrap them

* needs usr

* Update cash_register.dm

* quick hook cleanup

* lots of fixes

* .

* clean that up for reasons
This commit is contained in:
Kashargul
2025-07-05 06:45:18 +02:00
committed by GitHub
parent 080a74c229
commit 3735a31e05
68 changed files with 193 additions and 217 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ GLOBAL_VAR_INIT(floorIsLava, 0)
to_chat(usr, "Error: you are not an admin!")
return
var/body = "Options panel for" + span_bold("[M]")
var/body = "Options panel for " + span_bold("[M]")
if(M.client)
body += " played by " + span_bold("[M.client]")
body += "\[<A href='byond://?src=\ref[src];[HrefToken()];editrights=show'>[M.client.holder ? M.client.holder.rank_names() : "Player"]</A>\]"
@@ -596,7 +596,7 @@ GLOBAL_VAR_INIT(floorIsLava, 0)
<A href='byond://?src=\ref[src];[HrefToken()];vsc=default'>Choose a default ZAS setting</A><br>
"}
var/datum/browser/popup = new(owner, "admin2", "Game Panel", 210, 280)
var/datum/browser/popup = new(owner, "admin2", "Game Panel", 220, 295)
popup.set_content(dat)
popup.open()
+4 -4
View File
@@ -374,15 +374,15 @@ ADMIN_VERB(game_panel, R_ADMIN|R_SERVER|R_FUN, "Game Panel", "Look at the state
ADMIN_VERB(deadmin, R_NONE, "DeAdmin", "Shed your admin powers.", ADMIN_CATEGORY_MAIN)
user.holder.deactivate()
to_chat(src, span_interface("You are now a normal player."))
log_admin("[key_name(src)] deadminned themselves.")
message_admins("[key_name_admin(src)] deadminned themselves.")
to_chat(user, span_interface("You are now a normal player."))
log_admin("[key_name(user)] deadminned themselves.")
message_admins("[key_name_admin(user)] deadminned themselves.")
//BLACKBOX_LOG_ADMIN_VERB("Deadmin")
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(isobserver(user.mob))
var/mob/observer/dead/our_mob = user.mob
our_mob.visualnet?.removeVisibility(our_mob, src)
our_mob.visualnet?.removeVisibility(our_mob, user)
/client/proc/toggle_log_hrefs()
set name = "Toggle href logging"
+4 -4
View File
@@ -77,8 +77,8 @@
text = replacetext(text, "\[/grid\]", "</td></tr></table>")
text = replacetext(text, "\[row\]", "</td><tr>")
text = replacetext(text, "\[cell\]", "<td>")
text = replacetext(text, "\[logo\]", "<img src = ntlogo.png>") // Not sure if these would get used but why not
text = replacetext(text, "\[sglogo\]", "<img src = sglogo.png>")
text = replacetext(text, "\[logo\]", "<img src=\ref['html/images/ntlogo.png']>") // Not sure if these would get used but why not
text = replacetext(text, "\[sglogo\]", "<img src=\ref['html/images/sglogo.png']>")
return text
// This is used when reading text that went through paper_markup2html(), to reverse it so that edits don't need to replace everything once more to avoid sanitization.
@@ -114,8 +114,8 @@
text = replacetext(text, "</td></tr></table>", "\[/grid\]")
text = replacetext(text, "</td><tr>", "\[row\]")
text = replacetext(text, "<td>", "\[cell\]")
text = replacetext(text, "<img src = ntlogo.png>", "\[logo\]") // Not sure if these would get used but why not
text = replacetext(text, "<img src = sglogo.png>", "\[sglogo\]")
text = replacetext(text, "<img src=\ref['html/images/ntlogo.png']>", "\[logo\]") // Not sure if these would get used but why not
text = replacetext(text, "<img src=\ref['html/images/sglogo.png']>", "\[sglogo\]")
return text
#undef NEWSFILE
+15 -14
View File
@@ -84,7 +84,7 @@
irc = 1
else
recipient = GLOB.directory[whom]
else if(istype(whom,/client))
else if(isclient(whom))
recipient = whom
@@ -105,7 +105,8 @@
if(!recipient)
if(holder)
to_chat(src, span_admin_pm_warning("Error: Admin-PM: Client not found."))
to_chat(src, msg)
if(msg)
to_chat(src, msg)
else
current_ticket.MessageNoRecipient(msg)
return
@@ -128,11 +129,11 @@
current_ticket.MessageNoRecipient(msg)
return
if (src.handle_spam_prevention(msg,MUTE_ADMINHELP))
if (src.handle_spam_prevention(MUTE_ADMINHELP))
return
//clean the message if it's not sent by a high-rank admin
if(!check_rights(R_SERVER|R_DEBUG,0)||irc)//no sending html to the poor bots
if(!check_rights(R_SERVER|R_DEBUG, FALSE)||irc)//no sending html to the poor bots
msg = trim(sanitize(copytext(msg,1,MAX_MESSAGE_LEN)))
if(!msg)
return
@@ -142,27 +143,27 @@
var/keywordparsedmsg = keywords_lookup(msg)
if(irc)
to_chat(src, span_admin_pm_notice("PM to-<b>Admins</b>: [rawmsg]"))
admin_ticket_log(src, span_admin_pm_warning("Reply PM from-<b>[key_name(src, TRUE, TRUE)]</b> to <i>IRC</i>: [keywordparsedmsg]"))
to_chat(src, span_admin_pm_notice("PM to-" + span_bold("Admins") + ": [rawmsg]"))
admin_ticket_log(src, span_admin_pm_warning("Reply PM from-" + span_bold("[key_name(src, TRUE, TRUE)]") + " to " + span_italics("IRC") + ": [keywordparsedmsg]"))
ircreplyamount--
send2irc("Reply: [ckey]",rawmsg)
else
if(recipient.holder)
if(holder) //both are admins
to_chat(recipient, span_admin_pm_warning("Admin PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]"))
to_chat(src, span_admin_pm_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]"))
to_chat(recipient, span_admin_pm_warning("Admin PM from-" + span_bold("[key_name(src, recipient, 1)]") + ": [keywordparsedmsg]"))
to_chat(src, span_admin_pm_notice("Admin PM to-" + span_bold("[key_name(recipient, src, 1)]") + ": [keywordparsedmsg]"))
//omg this is dumb, just fill in both their tickets
var/interaction_message = span_admin_pm_notice("PM from-<b>[key_name(src, recipient, 1)]</b> to-<b>[key_name(recipient, src, 1)]</b>: [keywordparsedmsg]")
var/interaction_message = span_admin_pm_notice("PM from-" + span_bold("[key_name(src, recipient, 1)]") + " to-" + span_bold("[key_name(recipient, src, 1)]") + ": [keywordparsedmsg]")
admin_ticket_log(src, interaction_message)
if(recipient != src) //reeee
admin_ticket_log(recipient, interaction_message)
else //recipient is an admin but sender is not
var/replymsg = span_admin_pm_warning("Reply PM from-<b>[key_name(src, recipient, 1)]</b>: [keywordparsedmsg]")
var/replymsg = span_admin_pm_warning("Reply PM from-" + span_bold("[key_name(src, recipient, 1)]") + ": [keywordparsedmsg]")
admin_ticket_log(src, replymsg)
to_chat(recipient, replymsg)
to_chat(src, span_admin_pm_notice("PM to-<b>Admins</b>: [msg]"))
to_chat(src, span_admin_pm_notice("PM to-" + span_bold("Admins") + ": [msg]"))
//play the recieving admin the adminhelp sound (if they have them enabled)
if(recipient.prefs?.read_preference(/datum/preference/toggle/holder/play_adminhelp_ping))
@@ -174,9 +175,9 @@
new /datum/ticket(msg, recipient, TRUE, 1)
to_chat(recipient, span_admin_pm_warning(span_huge(span_bold("-- Administrator private message --"))))
to_chat(recipient, span_admin_pm_warning("Admin PM from-<b>[key_name(src, recipient, 0)]</b>: [msg]"))
to_chat(recipient, span_admin_pm_warning("Admin PM from-" + span_bold("[key_name(src, recipient, 0)]") + ": [msg]"))
to_chat(recipient, span_admin_pm_warning(span_italics("Click on the administrator's name to reply.")))
to_chat(src, span_admin_pm_notice("Admin PM to-<b>[key_name(recipient, src, 1)]</b>: [msg]"))
to_chat(src, span_admin_pm_notice("Admin PM to-" + span_bold("[key_name(recipient, src, 1)]") + ": [msg]"))
admin_ticket_log(recipient, span_admin_pm_notice("PM From [key_name_admin(src)]: [keywordparsedmsg]"))
@@ -263,7 +264,7 @@
log_admin("IRC PM: [sender] -> [key_name(C)] : [msg]")
to_chat(C, span_admin_pm_warning(span_huge(span_bold("-- Administrator private message --"))))
to_chat(C, span_admin_pm_warning("Admin PM from-<b><a href='byond://?priv_msg=[stealthkey]'>[adminname]</A></b>: [msg]"))
to_chat(C, span_admin_pm_warning("Admin PM from-" + span_bold("<a href='byond://?priv_msg=[stealthkey]'>[adminname]</a>") + ": [msg]"))
to_chat(C, span_admin_pm_warning(span_italics("Click on the administrator's name to reply.")))
admin_ticket_log(C, span_admin_pm_notice("PM From [irc_tagged]: [msg]"))
+2 -2
View File
@@ -314,8 +314,8 @@ ADMIN_VERB(narrate_mob_args, R_FUN, "Narrate Entity", "Narrate entities using po
if(tgui_narrate_mode && tgui_narrate_privacy)
A.visible_message(span_italics(span_bold("\The [A.name]") + " [message]"), range = 1)
else if(tgui_narrate_mode && !tgui_narrate_privacy)
A.visible_message(span_bold("\The [A.name]") + "[message]",)
A.visible_message(span_bold("\The [A.name]") + " [message]",)
else if(!tgui_narrate_mode && tgui_narrate_privacy)
A.audible_message(span_italics(span_bold("\The [A.name]") + " [message]"), hearing_distance = 1)
else if(!tgui_narrate_mode && !tgui_narrate_privacy)
A.audible_message(span_bold("\The [A.name]") + "[message]")
A.audible_message(span_bold("\The [A.name]") + " [message]")
+2 -2
View File
@@ -1,7 +1,7 @@
ADMIN_VERB(get_server_logs, R_ADMIN, "Get Server Logs", "View or retrieve logfiles.", ADMIN_CATEGORY_MAIN)
ADMIN_VERB(get_server_logs, (R_ADMIN | R_SERVER), "Get Server Logs", "View or retrieve logfiles.", ADMIN_CATEGORY_MAIN)
user.browseserverlogs()
ADMIN_VERB(get_current_logs, R_ADMIN, "Get Current Logs", "View or retrieve logfiles for the current round.", ADMIN_CATEGORY_MAIN)
ADMIN_VERB(get_current_logs, (R_ADMIN | R_SERVER), "Get Current Logs", "View or retrieve logfiles for the current round.", ADMIN_CATEGORY_MAIN)
user.browseserverlogs(current=TRUE)
/client/proc/browseserverlogs(current=FALSE)