mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 23:53:47 +01:00
Merge remote-tracking branch 'ParadiseSS13/master' into multi-instance-support
This commit is contained in:
+78
-32
@@ -624,43 +624,89 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS
|
||||
|
||||
/proc/is_special_character(mob/M as mob) // returns 1 for specail characters and 2 for heroes of gamemode
|
||||
if(!SSticker || !SSticker.mode)
|
||||
return 0
|
||||
/**
|
||||
* A proc that return whether the mob is a "Special Character" aka Antagonist
|
||||
*
|
||||
* Arguments:
|
||||
* * M - the mob you're checking
|
||||
* *
|
||||
*/
|
||||
/proc/is_special_character(mob/M)
|
||||
if(!SSticker.mode)
|
||||
return FALSE
|
||||
if(!istype(M))
|
||||
return 0
|
||||
if((M.mind in SSticker.mode.head_revolutionaries) || (M.mind in SSticker.mode.revolutionaries))
|
||||
if(SSticker.mode.config_tag == "revolution")
|
||||
return 2
|
||||
return 1
|
||||
if(M.mind in SSticker.mode.cult)
|
||||
if(SSticker.mode.config_tag == "cult")
|
||||
return 2
|
||||
return 1
|
||||
if(M.mind in SSticker.mode.syndicates)
|
||||
if(SSticker.mode.config_tag == "nuclear")
|
||||
return 2
|
||||
return 1
|
||||
if(M.mind in SSticker.mode.wizards)
|
||||
if(SSticker.mode.config_tag == "wizard")
|
||||
return 2
|
||||
return 1
|
||||
if(M.mind in SSticker.mode.changelings)
|
||||
if(SSticker.mode.config_tag == "changeling")
|
||||
return 2
|
||||
return 1
|
||||
if(M.mind in SSticker.mode.abductors)
|
||||
if(SSticker.mode.config_tag == "abduction")
|
||||
return 2
|
||||
return 1
|
||||
return FALSE
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.emagged)
|
||||
return 1
|
||||
if(M.mind&&M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist.
|
||||
return 1
|
||||
return TRUE
|
||||
if(M.mind.special_role)//If they have a mind and special role, they are some type of traitor or antagonist.
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
return 0
|
||||
/**
|
||||
* A proc that return an array of capitalized strings containing name of the antag types they are
|
||||
*
|
||||
* Arguments:
|
||||
* * M - the mob you're checking
|
||||
*/
|
||||
/proc/get_antag_type_strings_list(mob/M) // return an array of all the antag types they are with name
|
||||
var/list/antag_list = list()
|
||||
|
||||
if(!SSticker.mode || !istype(M) || !M.mind)
|
||||
return FALSE
|
||||
|
||||
if(M.mind in SSticker.mode.head_revolutionaries)
|
||||
antag_list += "Head Rev"
|
||||
if(M.mind in SSticker.mode.revolutionaries)
|
||||
antag_list += "Revolutionary"
|
||||
if(M.mind in SSticker.mode.cult)
|
||||
antag_list += "Cultist"
|
||||
if(M.mind in SSticker.mode.syndicates)
|
||||
antag_list += "Nuclear Operative"
|
||||
if(M.mind in SSticker.mode.wizards)
|
||||
antag_list += "Wizard"
|
||||
if(M.mind in SSticker.mode.changelings)
|
||||
antag_list += "Changeling"
|
||||
if(M.mind in SSticker.mode.abductors)
|
||||
antag_list += "Abductor"
|
||||
if(M.mind in SSticker.mode.vampires)
|
||||
antag_list += "Vampire"
|
||||
if(M.mind in SSticker.mode.vampire_enthralled)
|
||||
antag_list += "Vampire Thrall"
|
||||
if(M.mind in SSticker.mode.shadows)
|
||||
antag_list += "Shadowling"
|
||||
if(M.mind in SSticker.mode.shadowling_thralls)
|
||||
antag_list += "Shadowling Thrall"
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/traitor))
|
||||
antag_list += "Traitor"
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/mindslave))
|
||||
antag_list += "Mindslave"
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.emagged)
|
||||
antag_list += "Emagged Borg"
|
||||
if(!length(antag_list) && M.mind.special_role) // Snowflake check. If none of the above but still special, then other antag. Technically not accurate.
|
||||
antag_list += "Other Antag(s)"
|
||||
return antag_list
|
||||
|
||||
/**
|
||||
* A proc that return a string containing all the singled out antags . Empty string if not antag
|
||||
*
|
||||
* Usually, you'd return a FALSE, but since this is consumed by javascript you're in
|
||||
* for a world of hurt if you pass a byond FALSE which get converted into a fucking string anyway and pass for TRUE in check. Fuck.
|
||||
* It always append "(May be other antag)"
|
||||
* Arguments:
|
||||
* * M - the mob you're checking
|
||||
* *
|
||||
*/
|
||||
/proc/get_antag_type_truncated_plaintext_string(mob/M as mob)
|
||||
var/list/antag_list = get_antag_type_strings_list(M)
|
||||
|
||||
if(length(antag_list))
|
||||
return antag_list.Join(" & ") + " " + "(May be other antag)"
|
||||
|
||||
return ""
|
||||
|
||||
/datum/admins/proc/spawn_atom(object as text)
|
||||
set category = "Debug"
|
||||
|
||||
@@ -363,17 +363,20 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
if(!isliving(mob))
|
||||
return
|
||||
|
||||
if(mob)
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
to_chat(mob, "<span class='danger'>Invisimin off. Invisibility reset.</span>")
|
||||
mob.add_to_all_human_data_huds()
|
||||
//TODO: Make some kind of indication for the badmin that they are currently invisible
|
||||
else
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
to_chat(mob, "<span class='notice'>Invisimin on. You are now as invisible as a ghost.</span>")
|
||||
mob.remove_from_all_data_huds()
|
||||
if(mob.invisibility == INVISIBILITY_OBSERVER)
|
||||
mob.invisibility = initial(mob.invisibility)
|
||||
mob.add_to_all_human_data_huds()
|
||||
to_chat(mob, "<span class='danger'>Invisimin off. Invisibility reset.</span>")
|
||||
log_admin("[key_name(mob)] has turned Invisimin OFF")
|
||||
else
|
||||
mob.invisibility = INVISIBILITY_OBSERVER
|
||||
mob.remove_from_all_data_huds()
|
||||
to_chat(mob, "<span class='notice'>Invisimin on. You are now as invisible as a ghost.</span>")
|
||||
log_admin("[key_name(mob)] has turned Invisimin ON")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Invisimin")
|
||||
|
||||
/client/proc/player_panel_new()
|
||||
set name = "Player Panel"
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
}
|
||||
|
||||
function expand(id,job,name,real_name,image,key,ip,antagonist,mobUID,client_ckey,eyeUID){
|
||||
function expand(id,job,name,real_name,image,key,ip,antagonists,mobUID,client_ckey,eyeUID){
|
||||
|
||||
clearAll();
|
||||
|
||||
@@ -89,8 +89,8 @@
|
||||
if(eyeUID)
|
||||
body += "|<a href='?src=[UID()];adminplayerobservefollow="+eyeUID+"'>EYE</a>"
|
||||
body += "<br>"
|
||||
if(antagonist > 0)
|
||||
body += "<font size='2'><a href='?src=[UID()];check_antagonist=1'><font color='red'><b>Antagonist</b></font></a></font>";
|
||||
if(antagonists)
|
||||
body += "<font size='2'><a href='?src=[UID()];check_antagonist=1'><font color='red'><b>"+antagonists+"</b></font></a></font>";
|
||||
|
||||
body += "</td></tr></table>";
|
||||
|
||||
@@ -227,7 +227,7 @@
|
||||
var/color = "#e6e6e6"
|
||||
if(i%2 == 0)
|
||||
color = "#f2f2f2"
|
||||
var/is_antagonist = is_special_character(M)
|
||||
var/antagonist_string = get_antag_type_truncated_plaintext_string(M)
|
||||
|
||||
var/M_job = ""
|
||||
|
||||
@@ -305,7 +305,7 @@
|
||||
<td align='center' bgcolor='[color]'>
|
||||
<span id='notice_span[i]'></span>
|
||||
<a id='link[i]'
|
||||
onmouseover='expand("item[i]","[M_job]","[M_name]","[M_rname]","--unused--","[M_key]","[M.lastKnownIP]",[is_antagonist],"[M.UID()]","[client_ckey]","[M_eyeUID]")'
|
||||
onmouseover='expand("item[i]","[M_job]","[M_name]","[M_rname]","--unused--","[M_key]","[M.lastKnownIP]","[antagonist_string]","[M.UID()]","[client_ckey]","[M_eyeUID]")'
|
||||
>
|
||||
<b id='search[i]'>[M_name] - [M_rname] - [M_key] ([M_job])</b>
|
||||
</a>
|
||||
|
||||
@@ -47,16 +47,8 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown", "the", "a", "an", "of"
|
||||
SSdiscord.send2discord_simple_noadmins("**\[Adminhelp]** [key_name(src)]: [msg]", check_send_always = TRUE)
|
||||
|
||||
if("Mentorhelp")
|
||||
var/alerttext
|
||||
var/list/mentorcount = staff_countup(R_MENTOR)
|
||||
var/active_mentors = mentorcount[1]
|
||||
var/inactive_mentors = mentorcount[3]
|
||||
|
||||
if(active_mentors <= 0)
|
||||
if(inactive_mentors)
|
||||
alerttext = " | **ALL MENTORS AFK**"
|
||||
else
|
||||
alerttext = " | **NO MENTORS ONLINE**"
|
||||
|
||||
log_admin("[selected_type]: [key_name(src)]: [msg] - heard by [active_mentors] non-AFK mentors.")
|
||||
SSdiscord.send2discord_simple(DISCORD_WEBHOOK_MENTOR, "[key_name(src)]: [msg][alerttext]")
|
||||
SSdiscord.send2discord_simple_mentor("[key_name(src)]: [msg]")
|
||||
|
||||
@@ -357,8 +357,8 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
pai.real_name = pai.name
|
||||
pai.key = choice.key
|
||||
card.setPersonality(pai)
|
||||
for(var/datum/paiCandidate/candidate in GLOB.paiController.pai_candidates)
|
||||
if(candidate.key == choice.key)
|
||||
for(var/datum/pai_save/candidate in GLOB.paiController.pai_candidates)
|
||||
if(candidate.owner.ckey == choice.ckey)
|
||||
GLOB.paiController.pai_candidates.Remove(candidate)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Make pAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
log_world("### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])")
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [html_encode("[O.vars[variable]]")] ([accepted] objects modified)")
|
||||
|
||||
/proc/get_all_of_type(T, subtypes = TRUE)
|
||||
var/list/typecache = list()
|
||||
|
||||
@@ -355,7 +355,7 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: ADDED=[var_value]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[var_value]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: ADDED=[html_encode("[var_value]")]")
|
||||
|
||||
/client/proc/mod_list(list/L, atom/O, original_name, objectvar, index, autodetect_class = FALSE)
|
||||
if(!check_rights(R_VAREDIT))
|
||||
@@ -495,7 +495,7 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [O.type] [objectvar]: REMOVED=[html_encode("[original_var]")]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[original_var]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s [objectvar]: REMOVED=[html_encode("[original_var]")]")
|
||||
return
|
||||
|
||||
if(VV_TEXT)
|
||||
@@ -514,7 +514,7 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h
|
||||
return
|
||||
log_world("### ListVarEdit by [src]: [(O ? O.type : "/list")] [objectvar]: [original_var]=[new_var]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [objectvar]: [original_var]=[new_var]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[new_var]")
|
||||
message_admins("[key_name_admin(src)] modified [original_name]'s varlist [objectvar]: [original_var]=[html_encode("[new_var]")]")
|
||||
|
||||
/proc/vv_varname_lockcheck(param_var_name)
|
||||
if(param_var_name in GLOB.VVlocked)
|
||||
@@ -630,5 +630,5 @@ GLOBAL_LIST_INIT(VVpixelmovement, list("step_x", "step_y", "step_size", "bound_h
|
||||
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_VAR_EDIT, args)
|
||||
log_world("### VarEdit by [src]: [O.type] [variable]=[html_encode("[var_new]")]")
|
||||
log_admin("[key_name(src)] modified [original_name]'s [variable] to [var_new]")
|
||||
var/msg = "[key_name_admin(src)] modified [original_name]'s [variable] to [var_new]"
|
||||
var/msg = "[key_name_admin(src)] modified [original_name]'s [variable] to [html_encode("[var_new]")]"
|
||||
message_admins(msg)
|
||||
|
||||
Reference in New Issue
Block a user