mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 13:10:02 +01:00
[MIRROR] Refactors most spans into span procs (#6315)
* Refactors most spans into span procs * AA * a * AAAAAAAAAAAAAAAAAAAAAA * Update species.dm Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Gandalf <jzo123@hotmail.com>
This commit is contained in:
co-authored by
Watermelon914
Gandalf
parent
cd5dba4fbd
commit
7d1d0e1fad
+35
-35
@@ -44,7 +44,7 @@
|
||||
return
|
||||
var/mob/M = locate(href_list["getplaytimewindow"]) in GLOB.mob_list
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='danger'>ERROR: Mob not found.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_danger("ERROR: Mob not found."), confidential = TRUE)
|
||||
return
|
||||
cmd_show_exp_panel(M.client)
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
return
|
||||
SSshuttle.emergency.request()
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] called the Emergency Shuttle to the station."))
|
||||
|
||||
if("2")
|
||||
if(EMERGENCY_AT_LEAST_DOCKED)
|
||||
@@ -155,11 +155,11 @@
|
||||
if(SHUTTLE_CALL)
|
||||
SSshuttle.emergency.cancel()
|
||||
log_admin("[key_name(usr)] sent the Emergency Shuttle back.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] sent the Emergency Shuttle back.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] sent the Emergency Shuttle back."))
|
||||
else
|
||||
SSshuttle.emergency.cancel()
|
||||
log_admin("[key_name(usr)] called the Emergency Shuttle.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] called the Emergency Shuttle to the station.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] called the Emergency Shuttle to the station."))
|
||||
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@
|
||||
SSshuttle.emergency.setTimer(timer SECONDS)
|
||||
log_admin("[key_name(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds.")
|
||||
minor_announce("The emergency shuttle will reach its destination in [DisplayTimeText(timer SECONDS)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] edited the Emergency Shuttle's timeleft to [timer] seconds."))
|
||||
else if(href_list["trigger_centcom_recall"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
@@ -244,16 +244,16 @@
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] is considering ending the round.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] is considering ending the round."))
|
||||
if(tgui_alert(usr, "This will end the round, are you SURE you want to do this?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
if(tgui_alert(usr, "Final Confirmation: End the round NOW?", "Confirmation", list("Yes", "No")) == "Yes")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has ended the round.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has ended the round."))
|
||||
SSticker.force_ending = 1 //Yeah there we go APC destroyed mission accomplished
|
||||
return
|
||||
else
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] decided against ending the round."))
|
||||
else
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] decided against ending the round.</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] decided against ending the round."))
|
||||
|
||||
else if(href_list["simplemake"])
|
||||
if(!check_rights(R_SPAWN))
|
||||
@@ -273,7 +273,7 @@
|
||||
delmob = FALSE
|
||||
|
||||
log_admin("[key_name(usr)] has used rudimentary transformation on [key_name(M)]. Transforming to [href_list["simplemake"]].; deletemob=[delmob]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]].; deletemob=[delmob]</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]].; deletemob=[delmob]"))
|
||||
switch(href_list["simplemake"])
|
||||
if("observer")
|
||||
M.change_mob_type( /mob/dead/observer , null, null, delmob )
|
||||
@@ -339,19 +339,19 @@
|
||||
var/mob/M = locate(href_list["boot2"])
|
||||
if(ismob(M))
|
||||
if(!check_if_greater_rights_than(M.client))
|
||||
to_chat(usr, "<span class='danger'>Error: They have more rights than you do.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_danger("Error: They have more rights than you do."), confidential = TRUE)
|
||||
return
|
||||
if(tgui_alert(usr, "Kick [key_name(M)]?", "Confirm", list("Yes", "No")) != "Yes")
|
||||
return
|
||||
if(!M)
|
||||
to_chat(usr, "<span class='danger'>Error: [M] no longer exists!</span>", confidential = TRUE)
|
||||
to_chat(usr, span_danger("Error: [M] no longer exists!"), confidential = TRUE)
|
||||
return
|
||||
if(!M.client)
|
||||
to_chat(usr, "<span class='danger'>Error: [M] no longer has a client!</span>", confidential = TRUE)
|
||||
to_chat(usr, span_danger("Error: [M] no longer has a client!"), confidential = TRUE)
|
||||
return
|
||||
to_chat(M, "<span class='danger'>You have been kicked from the server by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].</span>", confidential = TRUE)
|
||||
to_chat(M, span_danger("You have been kicked from the server by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"]."), confidential = TRUE)
|
||||
log_admin("[key_name(usr)] kicked [key_name(M)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] kicked [key_name_admin(M)].</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] kicked [key_name_admin(M)]."))
|
||||
qdel(M.client)
|
||||
|
||||
else if(href_list["addmessage"])
|
||||
@@ -607,7 +607,7 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to monkeyize [key_name(H)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)].</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] attempting to monkeyize [key_name_admin(H)]."))
|
||||
H.monkeyize()
|
||||
|
||||
else if(href_list["humanone"])
|
||||
@@ -620,7 +620,7 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to humanize [key_name(Mo)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to humanize [key_name_admin(Mo)].</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] attempting to humanize [key_name_admin(Mo)]."))
|
||||
Mo.humanize()
|
||||
|
||||
else if(href_list["corgione"])
|
||||
@@ -633,7 +633,7 @@
|
||||
return
|
||||
|
||||
log_admin("[key_name(usr)] attempting to corgize [key_name(H)].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] attempting to corgize [key_name_admin(H)].</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] attempting to corgize [key_name_admin(H)]."))
|
||||
H.corgize()
|
||||
|
||||
|
||||
@@ -651,7 +651,7 @@
|
||||
M.say(speech, forced = "admin speech")
|
||||
speech = sanitize(speech) // Nah, we don't trust them
|
||||
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]</span>")
|
||||
message_admins(span_adminnotice("[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]"))
|
||||
|
||||
else if(href_list["sendtoprison"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -669,7 +669,7 @@
|
||||
return
|
||||
|
||||
M.forceMove(pick(GLOB.prisonwarp))
|
||||
to_chat(M, "<span class='adminnotice'>You have been sent to Prison!</span>", confidential = TRUE)
|
||||
to_chat(M, span_adminnotice("You have been sent to Prison!"), confidential = TRUE)
|
||||
|
||||
log_admin("[key_name(usr)] has sent [key_name(M)] to Prison!")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to Prison!")
|
||||
@@ -681,11 +681,11 @@
|
||||
var/mob/M = locate(href_list["sendbacktolobby"])
|
||||
|
||||
if(!isobserver(M))
|
||||
to_chat(usr, "<span class='notice'>You can only send ghost players back to the Lobby.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_notice("You can only send ghost players back to the Lobby."), confidential = TRUE)
|
||||
return
|
||||
|
||||
if(!M.client)
|
||||
to_chat(usr, "<span class='warning'>[M] doesn't seem to have an active client.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_warning("[M] doesn't seem to have an active client."), confidential = TRUE)
|
||||
return
|
||||
|
||||
if(tgui_alert(usr, "Send [key_name(M)] back to Lobby?", "Message", list("Yes", "No")) != "Yes")
|
||||
@@ -720,7 +720,7 @@
|
||||
L.Unconscious(100)
|
||||
sleep(5)
|
||||
L.forceMove(pick(GLOB.tdome1))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, span_adminnotice("You have been sent to the Thunderdome.")), 5 SECONDS)
|
||||
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Team 1)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Team 1)")
|
||||
|
||||
@@ -746,7 +746,7 @@
|
||||
L.Unconscious(100)
|
||||
sleep(5)
|
||||
L.forceMove(pick(GLOB.tdome2))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, span_adminnotice("You have been sent to the Thunderdome.")), 5 SECONDS)
|
||||
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Team 2)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Team 2)")
|
||||
|
||||
@@ -769,7 +769,7 @@
|
||||
L.Unconscious(100)
|
||||
sleep(5)
|
||||
L.forceMove(pick(GLOB.tdomeadmin))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, span_adminnotice("You have been sent to the Thunderdome.")), 5 SECONDS)
|
||||
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Admin.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Admin.)")
|
||||
|
||||
@@ -799,7 +799,7 @@
|
||||
L.Unconscious(100)
|
||||
sleep(5)
|
||||
L.forceMove(pick(GLOB.tdomeobserve))
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, "<span class='adminnotice'>You have been sent to the Thunderdome.</span>"), 5 SECONDS)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, /proc/to_chat, L, span_adminnotice("You have been sent to the Thunderdome.")), 5 SECONDS)
|
||||
log_admin("[key_name(usr)] has sent [key_name(L)] to the thunderdome. (Observer.)")
|
||||
message_admins("[key_name_admin(usr)] has sent [key_name_admin(L)] to the thunderdome. (Observer.)")
|
||||
|
||||
@@ -813,7 +813,7 @@
|
||||
return
|
||||
|
||||
L.revive(full_heal = TRUE, admin_revive = TRUE)
|
||||
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!</span>")
|
||||
message_admins(span_danger("Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!"))
|
||||
log_admin("[key_name(usr)] healed / Revived [key_name(L)].")
|
||||
|
||||
else if(href_list["makeai"])
|
||||
@@ -832,9 +832,9 @@
|
||||
if("No")
|
||||
move = FALSE
|
||||
if(QDELETED(H))
|
||||
to_chat(usr, "<span class='danger'>Subject was deleted already. Transform canceled.</span>")
|
||||
to_chat(usr, span_danger("Subject was deleted already. Transform canceled."))
|
||||
return
|
||||
message_admins("<span class='danger'>Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!</span>")
|
||||
message_admins(span_danger("Admin [key_name_admin(usr)] AIized [key_name_admin(H)]!"))
|
||||
log_admin("[key_name(usr)] AIized [key_name(H)].")
|
||||
H.AIize(TRUE, H.client, move)
|
||||
|
||||
@@ -1110,7 +1110,7 @@
|
||||
log_admin("[key_name(H)] got their [new_item], spawned by [key_name(src.owner)].")
|
||||
message_admins("[key_name(H)] got their [new_item], spawned by [key_name(src.owner)].")
|
||||
SSblackbox.record_feedback("amount", "admin_cookies_spawned", 1)
|
||||
to_chat(H, "<span class='adminnotice'>Your prayers have been answered!! You received the <b>best [new_item.name]!</b></span>", confidential = TRUE)
|
||||
to_chat(H, span_adminnotice("Your prayers have been answered!! You received the <b>best [new_item.name]!</b>"), confidential = TRUE)
|
||||
SEND_SOUND(H, sound('sound/effects/pray_chaplain.ogg'))
|
||||
|
||||
else if(href_list["adminsmite"])
|
||||
@@ -1681,7 +1681,7 @@
|
||||
if(tgui_alert(usr,"Are you sure you want to kick all [afkonly ? "AFK" : ""] clients from the lobby??","Message",list("Yes","Cancel")) != "Yes")
|
||||
to_chat(usr, "Kick clients from lobby aborted", confidential = TRUE)
|
||||
return
|
||||
var/list/listkicked = kick_clients_in_lobby("<span class='danger'>You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"].</span>", afkonly)
|
||||
var/list/listkicked = kick_clients_in_lobby(span_danger("You were kicked from the lobby by [usr.client.holder.fakekey ? "an Administrator" : "[usr.client.key]"]."), afkonly)
|
||||
|
||||
var/strkicked = ""
|
||||
for(var/name in listkicked)
|
||||
@@ -1724,7 +1724,7 @@
|
||||
else if(href_list["viewruntime"])
|
||||
var/datum/error_viewer/error_viewer = locate(href_list["viewruntime"])
|
||||
if(!istype(error_viewer))
|
||||
to_chat(usr, "<span class='warning'>That runtime viewer no longer exists.</span>", confidential = TRUE)
|
||||
to_chat(usr, span_warning("That runtime viewer no longer exists."), confidential = TRUE)
|
||||
return
|
||||
|
||||
if(href_list["viewruntime_backto"])
|
||||
@@ -1754,7 +1754,7 @@
|
||||
return
|
||||
|
||||
if(!CONFIG_GET(string/centcom_ban_db))
|
||||
to_chat(usr, "<span class='warning'>Centcom Galactic Ban DB is disabled!</span>")
|
||||
to_chat(usr, span_warning("Centcom Galactic Ban DB is disabled!"))
|
||||
return
|
||||
|
||||
var/ckey = href_list["centcomlookup"]
|
||||
@@ -1996,11 +1996,11 @@
|
||||
|
||||
else if(href_list["admincommend"])
|
||||
if(!SSticker.IsRoundInProgress())
|
||||
to_chat(usr, "<span class='warning'>The round must be in progress to use this!</span>")
|
||||
to_chat(usr, span_warning("The round must be in progress to use this!"))
|
||||
return
|
||||
var/mob/heart_recepient = locate(href_list["admincommend"])
|
||||
if(!heart_recepient?.ckey)
|
||||
to_chat(usr, "<span class='warning'>This mob either no longer exists or no longer is being controlled by someone!</span>")
|
||||
to_chat(usr, span_warning("This mob either no longer exists or no longer is being controlled by someone!"))
|
||||
return
|
||||
|
||||
switch(tgui_alert(usr, "Would you like the effects to apply immediately or at the end of the round? Applying them now will make it clear it was an admin commendation.", "<3?", list("Apply now", "Apply at round end", "Cancel")))
|
||||
|
||||
Reference in New Issue
Block a user