mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
2521 lines
88 KiB
Plaintext
2521 lines
88 KiB
Plaintext
<<<<<<< HEAD
|
|
/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list)
|
|
set category = null
|
|
set name = "Drop Everything"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/obj/item/W in M)
|
|
if(!M.dropItemToGround(W))
|
|
qdel(W)
|
|
M.regenerate_icons()
|
|
|
|
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
|
var/msg = "[key_name_admin(usr)] made [key_name_admin(M)] drop everything!"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Subtle Message"
|
|
|
|
if(!ismob(M))
|
|
return
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
message_admins("[key_name_admin(src)] has started answering [key_name(M.key, 0, 0)]'s prayer.")
|
|
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
|
|
|
|
if (!msg)
|
|
message_admins("[key_name_admin(src)] decided not to answer [key_name(M.key, 0, 0)]'s prayer")
|
|
return
|
|
if(usr)
|
|
if (usr.client)
|
|
if(usr.client.holder)
|
|
to_chat(M, "<i>You hear a voice in your head... <b>[msg]</i></b>")
|
|
|
|
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
|
msg = "<span class='adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_world_narrate()
|
|
set category = "Special Verbs"
|
|
set name = "Global Narrate"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
|
|
|
|
if (!msg)
|
|
return
|
|
to_chat(world, "[msg]")
|
|
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] Sent a global narrate</span>")
|
|
SSblackbox.add_details("admin_verb","Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_direct_narrate(mob/M)
|
|
set category = "Special Verbs"
|
|
set name = "Direct Narrate"
|
|
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
if(!M)
|
|
M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
|
|
|
|
if(!M)
|
|
return
|
|
|
|
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
|
|
|
|
if( !msg )
|
|
return
|
|
|
|
to_chat(M, msg)
|
|
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
|
|
msg = "<span class='adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_local_narrate(atom/A)
|
|
set category = "Special Verbs"
|
|
set name = "Local Narrate"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
if(!A)
|
|
return
|
|
var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num
|
|
if(!range)
|
|
return
|
|
var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text
|
|
if (!msg)
|
|
return
|
|
for(var/mob/M in view(range,A))
|
|
to_chat(M, msg)
|
|
|
|
log_admin("LocalNarrate: [key_name(usr)] at [get_area(A)][COORD(A)]: [msg]")
|
|
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at [get_area(A)][ADMIN_JMP(A)]:</b> [msg]<BR></span>")
|
|
SSblackbox.add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Godmode"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
M.status_flags ^= GODMODE
|
|
to_chat(usr, "<span class='adminnotice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>")
|
|
|
|
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
|
var/msg = "[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_toggle","Godmode|[M.status_flags & GODMODE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/proc/cmd_admin_mute(whom, mute_type, automute = 0)
|
|
if(!whom)
|
|
return
|
|
|
|
var/muteunmute
|
|
var/mute_string
|
|
var/feedback_string
|
|
switch(mute_type)
|
|
if(MUTE_IC)
|
|
mute_string = "IC (say and emote)"
|
|
feedback_string = "IC"
|
|
if(MUTE_OOC)
|
|
mute_string = "OOC"
|
|
feedback_string = "OOC"
|
|
if(MUTE_PRAY)
|
|
mute_string = "pray"
|
|
feedback_string = "Pray"
|
|
if(MUTE_ADMINHELP)
|
|
mute_string = "adminhelp, admin PM and ASAY"
|
|
feedback_string = "Adminhelp"
|
|
if(MUTE_DEADCHAT)
|
|
mute_string = "deadchat and DSAY"
|
|
feedback_string = "Deadchat"
|
|
if(MUTE_ALL)
|
|
mute_string = "everything"
|
|
feedback_string = "Everything"
|
|
else
|
|
return
|
|
|
|
var/client/C
|
|
if(istype(whom, /client))
|
|
C = whom
|
|
else if(istext(whom))
|
|
C = GLOB.directory[whom]
|
|
else
|
|
return
|
|
|
|
var/datum/preferences/P
|
|
if(C)
|
|
P = C.prefs
|
|
else
|
|
P = GLOB.preferences_datums[whom]
|
|
if(!P)
|
|
return
|
|
|
|
if(automute)
|
|
if(!config.automute_on)
|
|
return
|
|
else
|
|
if(!check_rights())
|
|
return
|
|
|
|
if(automute)
|
|
muteunmute = "auto-muted"
|
|
P.muted |= mute_type
|
|
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]")
|
|
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].")
|
|
if(C)
|
|
to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
|
|
SSblackbox.add_details("admin_toggle","Auto Mute [feedback_string]|1") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
if(P.muted & mute_type)
|
|
muteunmute = "unmuted"
|
|
P.muted &= ~mute_type
|
|
else
|
|
muteunmute = "muted"
|
|
P.muted |= mute_type
|
|
|
|
log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]")
|
|
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].")
|
|
if(C)
|
|
to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].")
|
|
SSblackbox.add_details("admin_toggle","Mute [feedback_string]|[P.muted & mute_type]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
//I use this proc for respawn character too. /N
|
|
/proc/create_xeno(ckey)
|
|
if(!ckey)
|
|
var/list/candidates = list()
|
|
for(var/mob/M in GLOB.player_list)
|
|
if(M.stat != DEAD)
|
|
continue //we are not dead!
|
|
if(!(ROLE_ALIEN in M.client.prefs.be_special))
|
|
continue //we don't want to be an alium
|
|
if(M.client.is_afk())
|
|
continue //we are afk
|
|
if(M.mind && M.mind.current && M.mind.current.stat != DEAD)
|
|
continue //we have a live body we are tied to
|
|
candidates += M.ckey
|
|
if(candidates.len)
|
|
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
|
|
else
|
|
to_chat(usr, "<font color='red'>Error: create_xeno(): no suitable candidates.</font>")
|
|
if(!istext(ckey))
|
|
return 0
|
|
|
|
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
|
|
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
|
|
var/mob/living/carbon/alien/new_xeno
|
|
switch(alien_caste)
|
|
if("Queen")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here)
|
|
if("Praetorian")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here)
|
|
if("Hunter")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
|
|
if("Sentinel")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
|
|
if("Drone")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
|
|
if("Larva")
|
|
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
|
|
else
|
|
return 0
|
|
if(!spawn_here)
|
|
SSjob.SendToLateJoin(new_xeno, FALSE)
|
|
|
|
new_xeno.ckey = ckey
|
|
var/msg = "<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_xeno, msg)
|
|
return 1
|
|
|
|
/*
|
|
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
|
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
|
|
Traitors and the like can also be revived with the previous role mostly intact.
|
|
/N */
|
|
/client/proc/respawn_character()
|
|
set category = "Special Verbs"
|
|
set name = "Respawn Character"
|
|
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
|
|
if(!input)
|
|
return
|
|
|
|
var/mob/dead/observer/G_found
|
|
for(var/mob/dead/observer/G in GLOB.player_list)
|
|
if(G.ckey == input)
|
|
G_found = G
|
|
break
|
|
|
|
if(!G_found)//If a ghost was not found.
|
|
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>")
|
|
return
|
|
|
|
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
|
//Check if they were an alien
|
|
if(G_found.mind.assigned_role=="Alien")
|
|
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
|
var/turf/T
|
|
if(GLOB.xeno_spawn.len)
|
|
T = pick(GLOB.xeno_spawn)
|
|
|
|
var/mob/living/carbon/alien/new_xeno
|
|
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
|
|
if("Hunter")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T)
|
|
if("Sentinel")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T)
|
|
if("Drone")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
|
|
if("Praetorian")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T)
|
|
if("Queen")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T)
|
|
else//If we don't know what special role they have, for whatever reason, or they're a larva.
|
|
create_xeno(G_found.ckey)
|
|
return
|
|
|
|
if(!T)
|
|
SSjob.SendToLateJoin(new_xeno, FALSE)
|
|
|
|
//Now to give them their mind back.
|
|
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
new_xeno.key = G_found.key
|
|
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.")
|
|
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_xeno, msg)
|
|
return //all done. The ghost is auto-deleted
|
|
|
|
//check if they were a monkey
|
|
else if(findtext(G_found.real_name,"monkey"))
|
|
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
|
var/mob/living/carbon/monkey/new_monkey = new
|
|
SSjob.SendToLateJoin(new_monkey)
|
|
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
new_monkey.key = G_found.key
|
|
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
|
|
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_monkey, msg)
|
|
return //all done. The ghost is auto-deleted
|
|
|
|
|
|
//Ok, it's not a xeno or a monkey. So, spawn a human.
|
|
var/mob/living/carbon/human/new_character = new//The mob being spawned.
|
|
SSjob.SendToLateJoin(new_character)
|
|
|
|
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
|
|
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
|
/*Try and locate a record for the person being respawned through GLOB.data_core.
|
|
This isn't an exact science but it does the trick more often than not.*/
|
|
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
|
|
|
|
record_found = find_record("id", id, GLOB.data_core.locked)
|
|
|
|
if(record_found)//If they have a record we can determine a few things.
|
|
new_character.real_name = record_found.fields["name"]
|
|
new_character.gender = record_found.fields["sex"]
|
|
new_character.age = record_found.fields["age"]
|
|
new_character.hardset_dna(record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], record_found.fields["blood_type"], record_found.fields["species"], record_found.fields["features"])
|
|
else
|
|
var/datum/preferences/A = new()
|
|
A.copy_to(new_character)
|
|
A.real_name = G_found.real_name
|
|
new_character.dna.update_dna_identity()
|
|
|
|
new_character.name = new_character.real_name
|
|
|
|
if(G_found.mind && !G_found.mind.active)
|
|
G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
else
|
|
new_character.mind_initialize()
|
|
if(!new_character.mind.assigned_role)
|
|
new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role.
|
|
|
|
new_character.key = G_found.key
|
|
|
|
/*
|
|
The code below functions with the assumption that the mob is already a traitor if they have a special role.
|
|
So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role.
|
|
If they don't have a mind, they obviously don't have a special role.
|
|
*/
|
|
|
|
//Two variables to properly announce later on.
|
|
var/admin = key_name_admin(src)
|
|
var/player_key = G_found.key
|
|
|
|
//Now for special roles and equipment.
|
|
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(ANTAG_DATUM_TRAITOR)
|
|
if(traitordatum)
|
|
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
|
traitordatum.equip()
|
|
|
|
|
|
switch(new_character.mind.special_role)
|
|
if("Wizard")
|
|
new_character.loc = pick(GLOB.wizardstart)
|
|
//SSticker.mode.learn_basic_spells(new_character)
|
|
SSticker.mode.equip_wizard(new_character)
|
|
if("Syndicate")
|
|
var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
|
|
if(synd_spawn)
|
|
new_character.loc = get_turf(synd_spawn)
|
|
call(/datum/game_mode/proc/equip_syndicate)(new_character)
|
|
if("Space Ninja")
|
|
var/list/ninja_spawn = list()
|
|
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
|
if(L.name=="carpspawn")
|
|
ninja_spawn += L
|
|
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA)
|
|
ninjadatum.equip_space_ninja()
|
|
if(ninja_spawn.len)
|
|
var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn)
|
|
new_character.loc = ninja_spawn_here.loc
|
|
|
|
else//They may also be a cyborg or AI.
|
|
switch(new_character.mind.assigned_role)
|
|
if("Cyborg")//More rigging to make em' work and check if they're traitor.
|
|
new_character = new_character.Robotize()
|
|
if("AI")
|
|
new_character = new_character.AIize()
|
|
else
|
|
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
|
|
|
|
//Announces the character on all the systems, based on the record.
|
|
if(!issilicon(new_character))//If they are not a cyborg/AI.
|
|
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
|
|
//Power to the user!
|
|
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
|
|
GLOB.data_core.manifest_inject(new_character)
|
|
|
|
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
|
|
AnnounceArrival(new_character, new_character.mind.assigned_role)
|
|
|
|
var/msg = "<span class='adminnotice'>[admin] has respawned [player_key] as [new_character.real_name].</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_character, msg)
|
|
|
|
to_chat(new_character, "You have been fully respawned. Enjoy the game.")
|
|
|
|
SSblackbox.add_details("admin_verb","Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return new_character
|
|
|
|
/client/proc/cmd_admin_add_freeform_ai_law()
|
|
set category = "Fun"
|
|
set name = "Add Custom AI law"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
|
if(!input)
|
|
return
|
|
|
|
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
|
|
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
|
|
|
|
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
|
|
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
|
|
|
|
var/datum/round_event/ion_storm/add_law_only/ion = new()
|
|
ion.announceEvent = announce_ion_laws
|
|
ion.ionMessage = input
|
|
|
|
SSblackbox.add_details("admin_verb","Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Rejuvenate"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
if(!mob)
|
|
return
|
|
if(!istype(M))
|
|
alert("Cannot revive a ghost")
|
|
return
|
|
M.revive(full_heal = 1, admin_revive = 1)
|
|
|
|
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
|
|
var/msg = "<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_create_centcom_report()
|
|
set category = "Special Verbs"
|
|
set name = "Create Command Report"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
|
if(!input)
|
|
return
|
|
|
|
var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel")
|
|
var/announce_command_report = TRUE
|
|
switch(confirm)
|
|
if("Yes")
|
|
priority_announce(input, null, 'sound/ai/commandreport.ogg')
|
|
announce_command_report = FALSE
|
|
if("Cancel")
|
|
return
|
|
|
|
print_command_report(input, "[announce_command_report ? "Classified " : ""][command_name()] Update", announce_command_report)
|
|
|
|
log_admin("[key_name(src)] has created a command report: [input]")
|
|
message_admins("[key_name_admin(src)] has created a command report")
|
|
SSblackbox.add_details("admin_verb","Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_change_command_name()
|
|
set category = "Special Verbs"
|
|
set name = "Change Command Name"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null
|
|
if(!input)
|
|
return
|
|
change_command_name(input)
|
|
message_admins("[key_name_admin(src)] has changed Central Command's name to [input]")
|
|
log_admin("[key_name(src)] has changed the Central Command name to: [input]")
|
|
|
|
/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in world)
|
|
set category = "Admin"
|
|
set name = "Delete"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
admin_delete(A)
|
|
|
|
/client/proc/admin_delete(datum/D)
|
|
var/atom/A = D
|
|
var/coords = istype(A) ? " at ([A.x], [A.y], [A.z])" : ""
|
|
if (alert(src, "Are you sure you want to delete:\n[D]\nat[coords]?", "Confirmation", "Yes", "No") == "Yes")
|
|
log_admin("[key_name(usr)] deleted [D][coords]")
|
|
message_admins("[key_name_admin(usr)] deleted [D][coords]")
|
|
SSblackbox.add_details("admin_verb","Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
if(isturf(D))
|
|
var/turf/T = D
|
|
T.ChangeTurf(T.baseturf)
|
|
else
|
|
qdel(D)
|
|
|
|
/client/proc/cmd_admin_list_open_jobs()
|
|
set category = "Admin"
|
|
set name = "Manage Job Slots"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
holder.manage_free_slots()
|
|
SSblackbox.add_details("admin_verb","Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
|
|
set category = "Special Verbs"
|
|
set name = "Explosion"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
|
if(devastation == null) return
|
|
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
|
if(heavy == null) return
|
|
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
|
if(light == null) return
|
|
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
|
if(flash == null) return
|
|
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
|
if(flames == null) return
|
|
|
|
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
|
|
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
|
|
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
|
return
|
|
|
|
explosion(O, devastation, heavy, light, flash, null, null,flames)
|
|
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
|
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
|
SSblackbox.add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
else
|
|
return
|
|
|
|
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
|
|
set category = "Special Verbs"
|
|
set name = "EM Pulse"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
|
|
if(heavy == null) return
|
|
var/light = input("Range of light pulse.", text("Input")) as num|null
|
|
if(light == null) return
|
|
|
|
if (heavy || light)
|
|
|
|
empulse(O, heavy, light)
|
|
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
|
|
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
|
|
SSblackbox.add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
return
|
|
else
|
|
return
|
|
|
|
/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Gib"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel")
|
|
if(confirm == "Cancel")
|
|
return
|
|
//Due to the delay here its easy for something to have happened to the mob
|
|
if(!M)
|
|
return
|
|
|
|
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
|
|
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
|
|
|
|
if(isobserver(M))
|
|
new /obj/effect/gibspawner/generic(get_turf(M))
|
|
return
|
|
if(confirm == "Yes")
|
|
M.gib()
|
|
else
|
|
M.gib(1)
|
|
SSblackbox.add_details("admin_verb","Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_gib_self()
|
|
set name = "Gibself"
|
|
set category = "Fun"
|
|
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm == "Yes")
|
|
log_admin("[key_name(usr)] used gibself.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
|
|
SSblackbox.add_details("admin_verb","Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
mob.gib(1, 1, 1)
|
|
|
|
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Check Contents"
|
|
|
|
var/list/L = M.get_contents()
|
|
for(var/t in L)
|
|
to_chat(usr, "[t]")
|
|
SSblackbox.add_details("admin_verb","Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_view_range()
|
|
set category = "Special Verbs"
|
|
set name = "Change View Range"
|
|
set desc = "switches between 1x and custom views"
|
|
|
|
if(view == world.view)
|
|
change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
|
|
else
|
|
change_view(world.view)
|
|
|
|
log_admin("[key_name(usr)] changed their view range to [view].")
|
|
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
|
|
|
|
SSblackbox.add_details("admin_toggle","Change View Range|[view]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/admin_call_shuttle()
|
|
|
|
set category = "Admin"
|
|
set name = "Call Shuttle"
|
|
|
|
if(EMERGENCY_AT_LEAST_DOCKED)
|
|
return
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
SSshuttle.emergency.request()
|
|
SSblackbox.add_details("admin_verb","Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
|
|
return
|
|
|
|
/client/proc/admin_cancel_shuttle()
|
|
set category = "Admin"
|
|
set name = "Cancel Shuttle"
|
|
if(!check_rights(0))
|
|
return
|
|
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
if(EMERGENCY_AT_LEAST_DOCKED)
|
|
return
|
|
|
|
SSshuttle.emergency.cancel()
|
|
SSblackbox.add_details("admin_verb","Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
|
|
|
|
return
|
|
|
|
/client/proc/everyone_random()
|
|
set category = "Fun"
|
|
set name = "Make Everyone Random"
|
|
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
|
|
|
|
if(SSticker.HasRoundStarted())
|
|
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
|
|
return
|
|
|
|
if(config.force_random_names)
|
|
config.force_random_names = 0
|
|
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.")
|
|
to_chat(usr, "Disabled.")
|
|
return
|
|
|
|
|
|
var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
|
|
if(notifyplayers == "Cancel")
|
|
return
|
|
|
|
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
|
|
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
|
|
|
|
if(notifyplayers == "Yes")
|
|
to_chat(world, "<span class='adminnotice'>Admin [usr.key] has forced the players to have completely random identities!</span>")
|
|
|
|
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
|
|
|
|
config.force_random_names = 1
|
|
SSblackbox.add_details("admin_verb","Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/toggle_random_events()
|
|
set category = "Server"
|
|
set name = "Toggle random events on/off"
|
|
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
|
|
if(!config.allow_random_events)
|
|
config.allow_random_events = 1
|
|
to_chat(usr, "Random events enabled")
|
|
message_admins("Admin [key_name_admin(usr)] has enabled random events.")
|
|
else
|
|
config.allow_random_events = 0
|
|
to_chat(usr, "Random events disabled")
|
|
message_admins("Admin [key_name_admin(usr)] has disabled random events.")
|
|
SSblackbox.add_details("admin_toggle","Toggle Random Events|[config.allow_random_events]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/admin_change_sec_level()
|
|
set category = "Special Verbs"
|
|
set name = "Set Security Level"
|
|
set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","red","delta")
|
|
if(level)
|
|
set_security_level(level)
|
|
|
|
log_admin("[key_name(usr)] changed the security level to [level]")
|
|
message_admins("[key_name_admin(usr)] changed the security level to [level]")
|
|
SSblackbox.add_details("admin_verb","Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
|
|
set name = "Toggle Nuke"
|
|
set category = "Fun"
|
|
set popup_menu = 0
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
if(!N.timing)
|
|
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num
|
|
if(!newtime)
|
|
return
|
|
N.timer_set = newtime
|
|
N.set_safety()
|
|
N.set_active()
|
|
|
|
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).")
|
|
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
|
|
SSblackbox.add_details("admin_toggle","Toggle Nuke|[N.timing]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
|
|
|
/client/proc/create_outfits()
|
|
set category = "Debug"
|
|
set name = "Create Custom Outfit"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
holder.create_outfit()
|
|
|
|
/datum/admins/proc/create_outfit()
|
|
var/list/uniforms = typesof(/obj/item/clothing/under)
|
|
var/list/suits = typesof(/obj/item/clothing/suit)
|
|
var/list/gloves = typesof(/obj/item/clothing/gloves)
|
|
var/list/shoes = typesof(/obj/item/clothing/shoes)
|
|
var/list/headwear = typesof(/obj/item/clothing/head)
|
|
var/list/glasses = typesof(/obj/item/clothing/glasses)
|
|
var/list/masks = typesof(/obj/item/clothing/mask)
|
|
var/list/ids = typesof(/obj/item/card/id)
|
|
|
|
var/uniform_select = "<select name=\"outfit_uniform\"><option value=\"\">None</option>"
|
|
for(var/path in uniforms)
|
|
uniform_select += "<option value=\"[path]\">[path]</option>"
|
|
uniform_select += "</select>"
|
|
|
|
var/suit_select = "<select name=\"outfit_suit\"><option value=\"\">None</option>"
|
|
for(var/path in suits)
|
|
suit_select += "<option value=\"[path]\">[path]</option>"
|
|
suit_select += "</select>"
|
|
|
|
var/gloves_select = "<select name=\"outfit_gloves\"><option value=\"\">None</option>"
|
|
for(var/path in gloves)
|
|
gloves_select += "<option value=\"[path]\">[path]</option>"
|
|
gloves_select += "</select>"
|
|
|
|
var/shoes_select = "<select name=\"outfit_shoes\"><option value=\"\">None</option>"
|
|
for(var/path in shoes)
|
|
shoes_select += "<option value=\"[path]\">[path]</option>"
|
|
shoes_select += "</select>"
|
|
|
|
var/head_select = "<select name=\"outfit_head\"><option value=\"\">None</option>"
|
|
for(var/path in headwear)
|
|
head_select += "<option value=\"[path]\">[path]</option>"
|
|
head_select += "</select>"
|
|
|
|
var/glasses_select = "<select name=\"outfit_glasses\"><option value=\"\">None</option>"
|
|
for(var/path in glasses)
|
|
glasses_select += "<option value=\"[path]\">[path]</option>"
|
|
glasses_select += "</select>"
|
|
|
|
var/mask_select = "<select name=\"outfit_mask\"><option value=\"\">None</option>"
|
|
for(var/path in masks)
|
|
mask_select += "<option value=\"[path]\">[path]</option>"
|
|
mask_select += "</select>"
|
|
|
|
var/id_select = "<select name=\"outfit_id\"><option value=\"\">None</option>"
|
|
for(var/path in ids)
|
|
id_select += "<option value=\"[path]\">[path]</option>"
|
|
id_select += "</select>"
|
|
|
|
var/dat = {"
|
|
<html><head><title>Create Outfit</title></head><body>
|
|
<form name="outfit" action="byond://?src=\ref[src];[HrefToken()]" method="get">
|
|
<input type="hidden" name="src" value="\ref[src]">
|
|
[HrefTokenFormField()]
|
|
<input type="hidden" name="create_outfit" value="1">
|
|
<table>
|
|
<tr>
|
|
<th>Name:</th>
|
|
<td>
|
|
<input type="text" name="outfit_name" value="Custom Outfit">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Uniform:</th>
|
|
<td>
|
|
[uniform_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Suit:</th>
|
|
<td>
|
|
[suit_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Back:</th>
|
|
<td>
|
|
<input type="text" name="outfit_back" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Belt:</th>
|
|
<td>
|
|
<input type="text" name="outfit_belt" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Gloves:</th>
|
|
<td>
|
|
[gloves_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Shoes:</th>
|
|
<td>
|
|
[shoes_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Head:</th>
|
|
<td>
|
|
[head_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Mask:</th>
|
|
<td>
|
|
[mask_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Ears:</th>
|
|
<td>
|
|
<input type="text" name="outfit_ears" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Glasses:</th>
|
|
<td>
|
|
[glasses_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>ID:</th>
|
|
<td>
|
|
[id_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Left Pocket:</th>
|
|
<td>
|
|
<input type="text" name="outfit_l_pocket" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Right Pocket:</th>
|
|
<td>
|
|
<input type="text" name="outfit_r_pocket" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Suit Store:</th>
|
|
<td>
|
|
<input type="text" name="outfit_s_store" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Right Hand:</th>
|
|
<td>
|
|
<input type="text" name="outfit_r_hand" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Left Hand:</th>
|
|
<td>
|
|
<input type="text" name="outfit_l_hand" value="">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<input type="submit" value="Save">
|
|
</form></body></html>
|
|
"}
|
|
usr << browse(dat, "window=dressup;size=550x600")
|
|
|
|
/client/proc/toggle_antag_hud()
|
|
set category = "Admin"
|
|
set name = "Toggle AntagHUD"
|
|
set desc = "Toggles the Admin AntagHUD"
|
|
|
|
if(!holder) return
|
|
|
|
var/adding_hud = !has_antag_hud()
|
|
|
|
for(var/datum/atom_hud/H in GLOB.huds)
|
|
if(istype(H, /datum/atom_hud/antag))
|
|
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
|
|
|
|
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
|
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
|
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
|
SSblackbox.add_details("admin_toggle","Toggle Antag HUD|[adding_hud]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/has_antag_hud()
|
|
var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR]
|
|
return A.hudusers[mob]
|
|
|
|
/client/proc/open_shuttle_manipulator()
|
|
set category = "Admin"
|
|
set name = "Shuttle Manipulator"
|
|
set desc = "Opens the shuttle manipulator UI."
|
|
|
|
for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines)
|
|
M.ui_interact(usr)
|
|
|
|
/client/proc/mass_zombie_infection()
|
|
set category = "Fun"
|
|
set name = "Mass Zombie Infection"
|
|
set desc = "Infects all humans with a latent organ that will zombify \
|
|
them on death."
|
|
|
|
if(!holder)
|
|
return
|
|
|
|
var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
|
new /obj/item/organ/zombie_infection(H)
|
|
|
|
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
|
|
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
|
|
SSblackbox.add_details("admin_verb","Mass Zombie Infection")
|
|
|
|
/client/proc/mass_zombie_cure()
|
|
set category = "Fun"
|
|
set name = "Mass Zombie Cure"
|
|
set desc = "Removes the zombie infection from all humans, returning them to normal."
|
|
if(!holder)
|
|
return
|
|
|
|
var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/obj/item/organ/zombie_infection/I in GLOB.zombie_infection_list)
|
|
qdel(I)
|
|
|
|
message_admins("[key_name_admin(usr)] cured all zombies.")
|
|
log_admin("[key_name(usr)] cured all zombies.")
|
|
SSblackbox.add_details("admin_verb","Mass Zombie Cure")
|
|
|
|
/client/proc/polymorph_all()
|
|
set category = "Fun"
|
|
set name = "Polymorph All"
|
|
set desc = "Applies the effects of the bolt of change to every single mob."
|
|
|
|
if(!holder)
|
|
return
|
|
|
|
var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating
|
|
var/who_did_it = key_name_admin(usr)
|
|
|
|
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
|
|
log_admin("[key_name(usr)] polymorphed all living mobs.")
|
|
SSblackbox.add_details("admin_verb","Polymorph All")
|
|
|
|
for(var/mob/living/M in mobs)
|
|
CHECK_TICK
|
|
|
|
if(!M)
|
|
continue
|
|
|
|
M.audible_message("<span class='italics'>...wabbajack...wabbajack...</span>")
|
|
playsound(M.loc, 'sound/magic/staff_change.ogg', 50, 1, -1)
|
|
|
|
wabbajack(M)
|
|
|
|
message_admins("Mass polymorph started by [who_did_it] is complete.")
|
|
|
|
|
|
/client/proc/show_tip()
|
|
set category = "Admin"
|
|
set name = "Show Tip"
|
|
set desc = "Sends a tip (that you specify) to all players. After all \
|
|
you're the experienced player here."
|
|
|
|
if(!holder)
|
|
return
|
|
|
|
var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
|
|
if(!input)
|
|
return
|
|
|
|
if(!SSticker)
|
|
return
|
|
|
|
SSticker.selected_tip = input
|
|
|
|
// If we've already tipped, then send it straight away.
|
|
if(SSticker.tipped)
|
|
SSticker.send_tip_of_the_round()
|
|
|
|
|
|
message_admins("[key_name_admin(usr)] sent a tip of the round.")
|
|
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
|
|
SSblackbox.add_details("admin_verb","Show Tip")
|
|
|
|
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
|
|
|
|
/proc/mass_purrbation()
|
|
for(var/M in GLOB.mob_list)
|
|
if(ishumanbasic(M))
|
|
purrbation_apply(M)
|
|
CHECK_TICK
|
|
|
|
/proc/mass_remove_purrbation()
|
|
for(var/M in GLOB.mob_list)
|
|
if(ishumanbasic(M))
|
|
purrbation_remove(M)
|
|
CHECK_TICK
|
|
|
|
/proc/purrbation_toggle(mob/living/carbon/human/H)
|
|
if(!ishumanbasic(H))
|
|
return
|
|
if(!ON_PURRBATION(H))
|
|
purrbation_apply(H)
|
|
. = TRUE
|
|
else
|
|
purrbation_remove(H)
|
|
. = FALSE
|
|
|
|
/proc/purrbation_apply(mob/living/carbon/human/H)
|
|
if(!ishuman(H))
|
|
return
|
|
if(ON_PURRBATION(H))
|
|
return
|
|
to_chat(H, "Something is nya~t right.")
|
|
H.dna.features["tail_human"] = "Cat"
|
|
H.dna.features["ears"] = "Cat"
|
|
H.regenerate_icons()
|
|
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
|
|
|
|
/proc/purrbation_remove(mob/living/carbon/human/H)
|
|
if(!ishuman(H))
|
|
return
|
|
if(!ON_PURRBATION(H))
|
|
return
|
|
to_chat(H, "You are no longer a cat.")
|
|
H.dna.features["tail_human"] = "None"
|
|
H.dna.features["ears"] = "None"
|
|
H.regenerate_icons()
|
|
|
|
#undef ON_PURRBATION
|
|
|
|
/client/proc/modify_goals()
|
|
set category = "Debug"
|
|
set name = "Modify goals"
|
|
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
|
|
holder.modify_goals()
|
|
|
|
/datum/admins/proc/modify_goals()
|
|
var/dat = ""
|
|
for(var/datum/station_goal/S in SSticker.mode.station_goals)
|
|
dat += "[S.name] - <a href='?src=\ref[S];[HrefToken()];announce=1'>Announce</a> | <a href='?src=\ref[S];[HrefToken()];remove=1'>Remove</a><br>"
|
|
dat += "<br><a href='?src=\ref[src];[HrefToken()];add_station_goal=1'>Add New Goal</a>"
|
|
usr << browse(dat, "window=goals;size=400x400")
|
|
|
|
|
|
/client/proc/toggle_hub()
|
|
set category = "Server"
|
|
set name = "Toggle Hub"
|
|
|
|
world.update_hub_visibility(!GLOB.hub_visibility)
|
|
|
|
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
|
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
|
if (GLOB.hub_visibility && !world.reachable)
|
|
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
|
|
|
SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/smite(mob/living/carbon/human/target as mob)
|
|
set name = "Smite"
|
|
set category = "Fun"
|
|
if(!holder)
|
|
return
|
|
|
|
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA)
|
|
|
|
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
|
|
|
|
if(QDELETED(target) || !punishment)
|
|
return
|
|
|
|
switch(punishment)
|
|
if(ADMIN_PUNISHMENT_LIGHTNING)
|
|
var/turf/T = get_step(get_step(target, NORTH), NORTH)
|
|
T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5)
|
|
target.adjustFireLoss(75)
|
|
target.electrocution_animation(40)
|
|
to_chat(target, "<span class='userdanger'>The gods have punished you for your sins!</span>")
|
|
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
|
|
target.adjustBrainLoss(75)
|
|
if(ADMIN_PUNISHMENT_GIB)
|
|
target.gib(FALSE)
|
|
if(ADMIN_PUNISHMENT_BSA)
|
|
bluespace_artillery(target)
|
|
|
|
var/msg = "[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment]."
|
|
message_admins(msg)
|
|
admin_ticket_log(target, msg)
|
|
log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].")
|
|
|
|
|
|
/client/proc/trigger_centcom_recall()
|
|
if(!holder)
|
|
return
|
|
var/message = pick(GLOB.admiral_messages)
|
|
message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null
|
|
|
|
if(!message)
|
|
return
|
|
|
|
message_admins("[key_name_admin(usr)] triggered a CentCom recall, with the admiral message of: [message]")
|
|
log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]")
|
|
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)
|
|
|
|
/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
|
|
|
|
var/list/msg = list()
|
|
msg += "<html><head><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")
|
|
|
|
/datum/admins/proc/cmd_show_exp_panel(client/C)
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
if(!C)
|
|
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>")
|
|
return
|
|
|
|
var/list/body = list()
|
|
body += "<html><head><title>Playtime for [C.key]</title></head><BODY><BR>Playtime:"
|
|
body += C.get_exp_report()
|
|
body += "<A href='?_src_=holder;[HrefToken()];toggleexempt=\ref[C]'>Toggle Exempt status</a>"
|
|
body += "</BODY></HTML>"
|
|
usr << browse(body.Join(), "window=playerplaytime[C.ckey];size=550x615")
|
|
|
|
/datum/admins/proc/toggle_exempt_status(client/C)
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
if(!C)
|
|
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>")
|
|
return
|
|
|
|
if(!C.set_db_player_flags())
|
|
to_chat(usr, "<span class='danger'>ERROR: Unable read player flags from database. Please check logs.</span>")
|
|
var/dbflags = C.prefs.db_flags
|
|
var/newstate = FALSE
|
|
if(dbflags & DB_FLAG_EXEMPT)
|
|
newstate = FALSE
|
|
else
|
|
newstate = TRUE
|
|
|
|
if(C.update_flag_db(DB_FLAG_EXEMPT, newstate))
|
|
to_chat(usr, "<span class='danger'>ERROR: Unable to update player flags. Please check logs.</span>")
|
|
else
|
|
message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]")
|
|
=======
|
|
/client/proc/cmd_admin_drop_everything(mob/M in GLOB.mob_list)
|
|
set category = null
|
|
set name = "Drop Everything"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/obj/item/W in M)
|
|
if(!M.dropItemToGround(W))
|
|
qdel(W)
|
|
M.regenerate_icons()
|
|
|
|
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
|
var/msg = "[key_name_admin(usr)] made [key_name_admin(M)] drop everything!"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Drop Everything") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_subtle_message(mob/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Subtle Message"
|
|
|
|
if(!ismob(M))
|
|
return
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
message_admins("[key_name_admin(src)] has started answering [key_name(M.key, 0, 0)]'s prayer.")
|
|
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
|
|
|
|
if (!msg)
|
|
message_admins("[key_name_admin(src)] decided not to answer [key_name(M.key, 0, 0)]'s prayer")
|
|
return
|
|
if(usr)
|
|
if (usr.client)
|
|
if(usr.client.holder)
|
|
to_chat(M, "<i>You hear a voice in your head... <b>[msg]</i></b>")
|
|
|
|
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
|
msg = "<span class='adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Subtle Message") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_world_narrate()
|
|
set category = "Special Verbs"
|
|
set name = "Global Narrate"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/msg = input("Message:", text("Enter the text you wish to appear to everyone:")) as text
|
|
|
|
if (!msg)
|
|
return
|
|
to_chat(world, "[msg]")
|
|
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] Sent a global narrate</span>")
|
|
SSblackbox.add_details("admin_verb","Global Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_direct_narrate(mob/M)
|
|
set category = "Special Verbs"
|
|
set name = "Direct Narrate"
|
|
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
if(!M)
|
|
M = input("Direct narrate to whom?", "Active Players") as null|anything in GLOB.player_list
|
|
|
|
if(!M)
|
|
return
|
|
|
|
var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text
|
|
|
|
if( !msg )
|
|
return
|
|
|
|
to_chat(M, msg)
|
|
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
|
|
msg = "<span class='adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Direct Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_local_narrate(atom/A)
|
|
set category = "Special Verbs"
|
|
set name = "Local Narrate"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
if(!A)
|
|
return
|
|
var/range = input("Range:", "Narrate to mobs within how many tiles:", 7) as num
|
|
if(!range)
|
|
return
|
|
var/msg = input("Message:", text("Enter the text you wish to appear to everyone within view:")) as text
|
|
if (!msg)
|
|
return
|
|
for(var/mob/M in view(range,A))
|
|
to_chat(M, msg)
|
|
|
|
log_admin("LocalNarrate: [key_name(usr)] at [get_area(A)][COORD(A)]: [msg]")
|
|
message_admins("<span class='adminnotice'><b> LocalNarrate: [key_name_admin(usr)] at [get_area(A)][ADMIN_JMP(A)]:</b> [msg]<BR></span>")
|
|
SSblackbox.add_details("admin_verb","Local Narrate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_godmode(mob/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Godmode"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
M.status_flags ^= GODMODE
|
|
to_chat(usr, "<span class='adminnotice'>Toggled [(M.status_flags & GODMODE) ? "ON" : "OFF"]</span>")
|
|
|
|
log_admin("[key_name(usr)] has toggled [key_name(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
|
var/msg = "[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_toggle","Godmode|[M.status_flags & GODMODE]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/proc/cmd_admin_mute(whom, mute_type, automute = 0)
|
|
if(!whom)
|
|
return
|
|
|
|
var/muteunmute
|
|
var/mute_string
|
|
var/feedback_string
|
|
switch(mute_type)
|
|
if(MUTE_IC)
|
|
mute_string = "IC (say and emote)"
|
|
feedback_string = "IC"
|
|
if(MUTE_OOC)
|
|
mute_string = "OOC"
|
|
feedback_string = "OOC"
|
|
if(MUTE_PRAY)
|
|
mute_string = "pray"
|
|
feedback_string = "Pray"
|
|
if(MUTE_ADMINHELP)
|
|
mute_string = "adminhelp, admin PM and ASAY"
|
|
feedback_string = "Adminhelp"
|
|
if(MUTE_DEADCHAT)
|
|
mute_string = "deadchat and DSAY"
|
|
feedback_string = "Deadchat"
|
|
if(MUTE_ALL)
|
|
mute_string = "everything"
|
|
feedback_string = "Everything"
|
|
else
|
|
return
|
|
|
|
var/client/C
|
|
if(istype(whom, /client))
|
|
C = whom
|
|
else if(istext(whom))
|
|
C = GLOB.directory[whom]
|
|
else
|
|
return
|
|
|
|
var/datum/preferences/P
|
|
if(C)
|
|
P = C.prefs
|
|
else
|
|
P = GLOB.preferences_datums[whom]
|
|
if(!P)
|
|
return
|
|
|
|
if(automute)
|
|
if(!CONFIG_GET(flag/automute_on))
|
|
return
|
|
else
|
|
if(!check_rights())
|
|
return
|
|
|
|
if(automute)
|
|
muteunmute = "auto-muted"
|
|
P.muted |= mute_type
|
|
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(whom)] from [mute_string]")
|
|
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(whom)] from [mute_string].")
|
|
if(C)
|
|
to_chat(C, "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin.")
|
|
SSblackbox.add_details("admin_toggle","Auto Mute [feedback_string]|1") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
|
|
if(P.muted & mute_type)
|
|
muteunmute = "unmuted"
|
|
P.muted &= ~mute_type
|
|
else
|
|
muteunmute = "muted"
|
|
P.muted |= mute_type
|
|
|
|
log_admin("[key_name(usr)] has [muteunmute] [key_name(whom)] from [mute_string]")
|
|
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(whom)] from [mute_string].")
|
|
if(C)
|
|
to_chat(C, "You have been [muteunmute] from [mute_string] by [key_name(usr, include_name = FALSE)].")
|
|
SSblackbox.add_details("admin_toggle","Mute [feedback_string]|[P.muted & mute_type]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
//I use this proc for respawn character too. /N
|
|
/proc/create_xeno(ckey)
|
|
if(!ckey)
|
|
var/list/candidates = list()
|
|
for(var/mob/M in GLOB.player_list)
|
|
if(M.stat != DEAD)
|
|
continue //we are not dead!
|
|
if(!(ROLE_ALIEN in M.client.prefs.be_special))
|
|
continue //we don't want to be an alium
|
|
if(M.client.is_afk())
|
|
continue //we are afk
|
|
if(M.mind && M.mind.current && M.mind.current.stat != DEAD)
|
|
continue //we have a live body we are tied to
|
|
candidates += M.ckey
|
|
if(candidates.len)
|
|
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
|
|
else
|
|
to_chat(usr, "<font color='red'>Error: create_xeno(): no suitable candidates.</font>")
|
|
if(!istext(ckey))
|
|
return 0
|
|
|
|
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
|
|
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
|
|
var/mob/living/carbon/alien/new_xeno
|
|
switch(alien_caste)
|
|
if("Queen")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(spawn_here)
|
|
if("Praetorian")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(spawn_here)
|
|
if("Hunter")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(spawn_here)
|
|
if("Sentinel")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(spawn_here)
|
|
if("Drone")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/drone(spawn_here)
|
|
if("Larva")
|
|
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
|
|
else
|
|
return 0
|
|
if(!spawn_here)
|
|
SSjob.SendToLateJoin(new_xeno, FALSE)
|
|
|
|
new_xeno.ckey = ckey
|
|
var/msg = "<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_xeno, msg)
|
|
return 1
|
|
|
|
/*
|
|
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
|
Works kind of like entering the game with a new character. Character receives a new mind if they didn't have one.
|
|
Traitors and the like can also be revived with the previous role mostly intact.
|
|
/N */
|
|
/client/proc/respawn_character()
|
|
set category = "Special Verbs"
|
|
set name = "Respawn Character"
|
|
set desc = "Respawn a person that has been gibbed/dusted/killed. They must be a ghost for this to work and preferably should not have a body to go back into."
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = ckey(input(src, "Please specify which key will be respawned.", "Key", ""))
|
|
if(!input)
|
|
return
|
|
|
|
var/mob/dead/observer/G_found
|
|
for(var/mob/dead/observer/G in GLOB.player_list)
|
|
if(G.ckey == input)
|
|
G_found = G
|
|
break
|
|
|
|
if(!G_found)//If a ghost was not found.
|
|
to_chat(usr, "<font color='red'>There is no active key like that in the game or the person is not currently a ghost.</font>")
|
|
return
|
|
|
|
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
|
//Check if they were an alien
|
|
if(G_found.mind.assigned_role=="Alien")
|
|
if(alert("This character appears to have been an alien. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
|
var/turf/T
|
|
if(GLOB.xeno_spawn.len)
|
|
T = pick(GLOB.xeno_spawn)
|
|
|
|
var/mob/living/carbon/alien/new_xeno
|
|
switch(G_found.mind.special_role)//If they have a mind, we can determine which caste they were.
|
|
if("Hunter")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/hunter(T)
|
|
if("Sentinel")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/sentinel(T)
|
|
if("Drone")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/drone(T)
|
|
if("Praetorian")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/praetorian(T)
|
|
if("Queen")
|
|
new_xeno = new /mob/living/carbon/alien/humanoid/royal/queen(T)
|
|
else//If we don't know what special role they have, for whatever reason, or they're a larva.
|
|
create_xeno(G_found.ckey)
|
|
return
|
|
|
|
if(!T)
|
|
SSjob.SendToLateJoin(new_xeno, FALSE)
|
|
|
|
//Now to give them their mind back.
|
|
G_found.mind.transfer_to(new_xeno) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
new_xeno.key = G_found.key
|
|
to_chat(new_xeno, "You have been fully respawned. Enjoy the game.")
|
|
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_xeno, msg)
|
|
return //all done. The ghost is auto-deleted
|
|
|
|
//check if they were a monkey
|
|
else if(findtext(G_found.real_name,"monkey"))
|
|
if(alert("This character appears to have been a monkey. Would you like to respawn them as such?",,"Yes","No")=="Yes")
|
|
var/mob/living/carbon/monkey/new_monkey = new
|
|
SSjob.SendToLateJoin(new_monkey)
|
|
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
new_monkey.key = G_found.key
|
|
to_chat(new_monkey, "You have been fully respawned. Enjoy the game.")
|
|
var/msg = "<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_monkey, msg)
|
|
return //all done. The ghost is auto-deleted
|
|
|
|
|
|
//Ok, it's not a xeno or a monkey. So, spawn a human.
|
|
var/mob/living/carbon/human/new_character = new//The mob being spawned.
|
|
SSjob.SendToLateJoin(new_character)
|
|
|
|
var/datum/data/record/record_found //Referenced to later to either randomize or not randomize the character.
|
|
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
|
|
/*Try and locate a record for the person being respawned through GLOB.data_core.
|
|
This isn't an exact science but it does the trick more often than not.*/
|
|
var/id = md5("[G_found.real_name][G_found.mind.assigned_role]")
|
|
|
|
record_found = find_record("id", id, GLOB.data_core.locked)
|
|
|
|
if(record_found)//If they have a record we can determine a few things.
|
|
new_character.real_name = record_found.fields["name"]
|
|
new_character.gender = record_found.fields["sex"]
|
|
new_character.age = record_found.fields["age"]
|
|
new_character.hardset_dna(record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], record_found.fields["blood_type"], record_found.fields["species"], record_found.fields["features"])
|
|
else
|
|
var/datum/preferences/A = new()
|
|
A.copy_to(new_character)
|
|
A.real_name = G_found.real_name
|
|
new_character.dna.update_dna_identity()
|
|
|
|
new_character.name = new_character.real_name
|
|
|
|
if(G_found.mind && !G_found.mind.active)
|
|
G_found.mind.transfer_to(new_character) //be careful when doing stuff like this! I've already checked the mind isn't in use
|
|
else
|
|
new_character.mind_initialize()
|
|
if(!new_character.mind.assigned_role)
|
|
new_character.mind.assigned_role = "Assistant"//If they somehow got a null assigned role.
|
|
|
|
new_character.key = G_found.key
|
|
|
|
/*
|
|
The code below functions with the assumption that the mob is already a traitor if they have a special role.
|
|
So all it does is re-equip the mob with powers and/or items. Or not, if they have no special role.
|
|
If they don't have a mind, they obviously don't have a special role.
|
|
*/
|
|
|
|
//Two variables to properly announce later on.
|
|
var/admin = key_name_admin(src)
|
|
var/player_key = G_found.key
|
|
|
|
//Now for special roles and equipment.
|
|
var/datum/antagonist/traitor/traitordatum = new_character.mind.has_antag_datum(ANTAG_DATUM_TRAITOR)
|
|
if(traitordatum)
|
|
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
|
traitordatum.equip()
|
|
|
|
|
|
switch(new_character.mind.special_role)
|
|
if("Wizard")
|
|
new_character.loc = pick(GLOB.wizardstart)
|
|
//SSticker.mode.learn_basic_spells(new_character)
|
|
SSticker.mode.equip_wizard(new_character)
|
|
if("Syndicate")
|
|
var/obj/effect/landmark/synd_spawn = locate("landmark*Syndicate-Spawn")
|
|
if(synd_spawn)
|
|
new_character.loc = get_turf(synd_spawn)
|
|
call(/datum/game_mode/proc/equip_syndicate)(new_character)
|
|
if("Space Ninja")
|
|
var/list/ninja_spawn = list()
|
|
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
|
|
if(L.name=="carpspawn")
|
|
ninja_spawn += L
|
|
var/datum/antagonist/ninja/ninjadatum = new_character.mind.has_antag_datum(ANTAG_DATUM_NINJA)
|
|
ninjadatum.equip_space_ninja()
|
|
if(ninja_spawn.len)
|
|
var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn)
|
|
new_character.loc = ninja_spawn_here.loc
|
|
|
|
else//They may also be a cyborg or AI.
|
|
switch(new_character.mind.assigned_role)
|
|
if("Cyborg")//More rigging to make em' work and check if they're traitor.
|
|
new_character = new_character.Robotize()
|
|
if("AI")
|
|
new_character = new_character.AIize()
|
|
else
|
|
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)//Or we simply equip them.
|
|
|
|
//Announces the character on all the systems, based on the record.
|
|
if(!issilicon(new_character))//If they are not a cyborg/AI.
|
|
if(!record_found&&new_character.mind.assigned_role!=new_character.mind.special_role)//If there are no records for them. If they have a record, this info is already in there. MODE people are not announced anyway.
|
|
//Power to the user!
|
|
if(alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,"No","Yes")=="Yes")
|
|
GLOB.data_core.manifest_inject(new_character)
|
|
|
|
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
|
|
AnnounceArrival(new_character, new_character.mind.assigned_role)
|
|
|
|
var/msg = "<span class='adminnotice'>[admin] has respawned [player_key] as [new_character.real_name].</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(new_character, msg)
|
|
|
|
to_chat(new_character, "You have been fully respawned. Enjoy the game.")
|
|
|
|
SSblackbox.add_details("admin_verb","Respawn Character") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return new_character
|
|
|
|
/client/proc/cmd_admin_add_freeform_ai_law()
|
|
set category = "Fun"
|
|
set name = "Add Custom AI law"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = input(usr, "Please enter anything you want the AI to do. Anything. Serious.", "What?", "") as text|null
|
|
if(!input)
|
|
return
|
|
|
|
log_admin("Admin [key_name(usr)] has added a new AI law - [input]")
|
|
message_admins("Admin [key_name_admin(usr)] has added a new AI law - [input]")
|
|
|
|
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
|
|
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
|
|
|
|
var/datum/round_event/ion_storm/add_law_only/ion = new()
|
|
ion.announceEvent = announce_ion_laws
|
|
ion.ionMessage = input
|
|
|
|
SSblackbox.add_details("admin_verb","Add Custom AI Law") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_rejuvenate(mob/living/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Rejuvenate"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
if(!mob)
|
|
return
|
|
if(!istype(M))
|
|
alert("Cannot revive a ghost")
|
|
return
|
|
M.revive(full_heal = 1, admin_revive = 1)
|
|
|
|
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
|
|
var/msg = "<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!</span>"
|
|
message_admins(msg)
|
|
admin_ticket_log(M, msg)
|
|
SSblackbox.add_details("admin_verb","Rejuvinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_create_centcom_report()
|
|
set category = "Special Verbs"
|
|
set name = "Create Command Report"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null
|
|
if(!input)
|
|
return
|
|
|
|
var/confirm = alert(src, "Do you want to announce the contents of the report to the crew?", "Announce", "Yes", "No", "Cancel")
|
|
var/announce_command_report = TRUE
|
|
switch(confirm)
|
|
if("Yes")
|
|
priority_announce(input, null, 'sound/ai/commandreport.ogg')
|
|
announce_command_report = FALSE
|
|
if("Cancel")
|
|
return
|
|
|
|
print_command_report(input, "[announce_command_report ? "Classified " : ""][command_name()] Update", announce_command_report)
|
|
|
|
log_admin("[key_name(src)] has created a command report: [input]")
|
|
message_admins("[key_name_admin(src)] has created a command report")
|
|
SSblackbox.add_details("admin_verb","Create Command Report") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_change_command_name()
|
|
set category = "Special Verbs"
|
|
set name = "Change Command Name"
|
|
if(!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
var/input = input(usr, "Please input a new name for Central Command.", "What?", "") as text|null
|
|
if(!input)
|
|
return
|
|
change_command_name(input)
|
|
message_admins("[key_name_admin(src)] has changed Central Command's name to [input]")
|
|
log_admin("[key_name(src)] has changed the Central Command name to: [input]")
|
|
|
|
/client/proc/cmd_admin_delete(atom/A as obj|mob|turf in world)
|
|
set category = "Admin"
|
|
set name = "Delete"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
admin_delete(A)
|
|
|
|
/client/proc/admin_delete(datum/D)
|
|
var/atom/A = D
|
|
var/coords = istype(A) ? " at ([A.x], [A.y], [A.z])" : ""
|
|
if (alert(src, "Are you sure you want to delete:\n[D]\nat[coords]?", "Confirmation", "Yes", "No") == "Yes")
|
|
log_admin("[key_name(usr)] deleted [D][coords]")
|
|
message_admins("[key_name_admin(usr)] deleted [D][coords]")
|
|
SSblackbox.add_details("admin_verb","Delete") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
if(isturf(D))
|
|
var/turf/T = D
|
|
T.ChangeTurf(T.baseturf)
|
|
else
|
|
qdel(D)
|
|
|
|
/client/proc/cmd_admin_list_open_jobs()
|
|
set category = "Admin"
|
|
set name = "Manage Job Slots"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
holder.manage_free_slots()
|
|
SSblackbox.add_details("admin_verb","Manage Job Slots") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_explosion(atom/O as obj|mob|turf in world)
|
|
set category = "Special Verbs"
|
|
set name = "Explosion"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/devastation = input("Range of total devastation. -1 to none", text("Input")) as num|null
|
|
if(devastation == null) return
|
|
var/heavy = input("Range of heavy impact. -1 to none", text("Input")) as num|null
|
|
if(heavy == null) return
|
|
var/light = input("Range of light impact. -1 to none", text("Input")) as num|null
|
|
if(light == null) return
|
|
var/flash = input("Range of flash. -1 to none", text("Input")) as num|null
|
|
if(flash == null) return
|
|
var/flames = input("Range of flames. -1 to none", text("Input")) as num|null
|
|
if(flames == null) return
|
|
|
|
if ((devastation != -1) || (heavy != -1) || (light != -1) || (flash != -1) || (flames != -1))
|
|
if ((devastation > 20) || (heavy > 20) || (light > 20) || (flames > 20))
|
|
if (alert(src, "Are you sure you want to do this? It will laaag.", "Confirmation", "Yes", "No") == "No")
|
|
return
|
|
|
|
explosion(O, devastation, heavy, light, flash, null, null,flames)
|
|
log_admin("[key_name(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
|
message_admins("[key_name_admin(usr)] created an explosion ([devastation],[heavy],[light],[flames]) at ([O.x],[O.y],[O.z])")
|
|
SSblackbox.add_details("admin_verb","Explosion") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
return
|
|
else
|
|
return
|
|
|
|
/client/proc/cmd_admin_emp(atom/O as obj|mob|turf in world)
|
|
set category = "Special Verbs"
|
|
set name = "EM Pulse"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/heavy = input("Range of heavy pulse.", text("Input")) as num|null
|
|
if(heavy == null) return
|
|
var/light = input("Range of light pulse.", text("Input")) as num|null
|
|
if(light == null) return
|
|
|
|
if (heavy || light)
|
|
|
|
empulse(O, heavy, light)
|
|
log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
|
|
message_admins("[key_name_admin(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])")
|
|
SSblackbox.add_details("admin_verb","EM Pulse") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
return
|
|
else
|
|
return
|
|
|
|
/client/proc/cmd_admin_gib(mob/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Gib"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/confirm = alert(src, "Drop a brain?", "Confirm", "Yes", "No","Cancel")
|
|
if(confirm == "Cancel")
|
|
return
|
|
//Due to the delay here its easy for something to have happened to the mob
|
|
if(!M)
|
|
return
|
|
|
|
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
|
|
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
|
|
|
|
if(isobserver(M))
|
|
new /obj/effect/gibspawner/generic(get_turf(M))
|
|
return
|
|
if(confirm == "Yes")
|
|
M.gib()
|
|
else
|
|
M.gib(1)
|
|
SSblackbox.add_details("admin_verb","Gib") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_gib_self()
|
|
set name = "Gibself"
|
|
set category = "Fun"
|
|
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm == "Yes")
|
|
log_admin("[key_name(usr)] used gibself.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
|
|
SSblackbox.add_details("admin_verb","Gib Self") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
mob.gib(1, 1, 1)
|
|
|
|
/client/proc/cmd_admin_check_contents(mob/living/M in GLOB.mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Check Contents"
|
|
|
|
var/list/L = M.get_contents()
|
|
for(var/t in L)
|
|
to_chat(usr, "[t]")
|
|
SSblackbox.add_details("admin_verb","Check Contents") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_view_range()
|
|
set category = "Special Verbs"
|
|
set name = "Change View Range"
|
|
set desc = "switches between 1x and custom views"
|
|
|
|
if(view == world.view)
|
|
change_view(input("Select view range:", "FUCK YE", 7) in list(1,2,3,4,5,6,7,8,9,10,11,12,13,14,128))
|
|
else
|
|
change_view(world.view)
|
|
|
|
log_admin("[key_name(usr)] changed their view range to [view].")
|
|
//message_admins("\blue [key_name_admin(usr)] changed their view range to [view].") //why? removed by order of XSI
|
|
|
|
SSblackbox.add_details("admin_toggle","Change View Range|[view]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/admin_call_shuttle()
|
|
|
|
set category = "Admin"
|
|
set name = "Call Shuttle"
|
|
|
|
if(EMERGENCY_AT_LEAST_DOCKED)
|
|
return
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
SSshuttle.emergency.request()
|
|
SSblackbox.add_details("admin_verb","Call Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] admin-called the emergency shuttle.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-called the emergency shuttle.</span>")
|
|
return
|
|
|
|
/client/proc/admin_cancel_shuttle()
|
|
set category = "Admin"
|
|
set name = "Cancel Shuttle"
|
|
if(!check_rights(0))
|
|
return
|
|
if(alert(src, "You sure?", "Confirm", "Yes", "No") != "Yes")
|
|
return
|
|
|
|
if(EMERGENCY_AT_LEAST_DOCKED)
|
|
return
|
|
|
|
SSshuttle.emergency.cancel()
|
|
SSblackbox.add_details("admin_verb","Cancel Shuttle") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] admin-recalled the emergency shuttle.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] admin-recalled the emergency shuttle.</span>")
|
|
|
|
return
|
|
|
|
/client/proc/everyone_random()
|
|
set category = "Fun"
|
|
set name = "Make Everyone Random"
|
|
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
|
|
|
|
if(SSticker.HasRoundStarted())
|
|
to_chat(usr, "Nope you can't do this, the game's already started. This only works before rounds!")
|
|
return
|
|
|
|
var/frn = CONFIG_GET(flag/force_random_names)
|
|
if(frn)
|
|
CONFIG_SET(flag/force_random_names, FALSE)
|
|
message_admins("Admin [key_name_admin(usr)] has disabled \"Everyone is Special\" mode.")
|
|
to_chat(usr, "Disabled.")
|
|
return
|
|
|
|
|
|
var/notifyplayers = alert(src, "Do you want to notify the players?", "Options", "Yes", "No", "Cancel")
|
|
if(notifyplayers == "Cancel")
|
|
return
|
|
|
|
log_admin("Admin [key_name(src)] has forced the players to have random appearances.")
|
|
message_admins("Admin [key_name_admin(usr)] has forced the players to have random appearances.")
|
|
|
|
if(notifyplayers == "Yes")
|
|
to_chat(world, "<span class='adminnotice'>Admin [usr.key] has forced the players to have completely random identities!</span>")
|
|
|
|
to_chat(usr, "<i>Remember: you can always disable the randomness by using the verb again, assuming the round hasn't started yet</i>.")
|
|
|
|
CONFIG_SET(flag/force_random_names, TRUE)
|
|
SSblackbox.add_details("admin_verb","Make Everyone Random") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/toggle_random_events()
|
|
set category = "Server"
|
|
set name = "Toggle random events on/off"
|
|
set desc = "Toggles random events such as meteors, black holes, blob (but not space dust) on/off"
|
|
var/new_are = !CONFIG_GET(flag/allow_random_events)
|
|
CONFIG_SET(flag/allow_random_events, new_are)
|
|
if(new_are)
|
|
to_chat(usr, "Random events enabled")
|
|
message_admins("Admin [key_name_admin(usr)] has enabled random events.")
|
|
else
|
|
to_chat(usr, "Random events disabled")
|
|
message_admins("Admin [key_name_admin(usr)] has disabled random events.")
|
|
SSblackbox.add_details("admin_toggle","Toggle Random Events|[new_are]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/admin_change_sec_level()
|
|
set category = "Special Verbs"
|
|
set name = "Set Security Level"
|
|
set desc = "Changes the security level. Announcement only, i.e. setting to Delta won't activate nuke"
|
|
|
|
if (!holder)
|
|
to_chat(src, "Only administrators may use this command.")
|
|
return
|
|
|
|
var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","red","delta")
|
|
if(level)
|
|
set_security_level(level)
|
|
|
|
log_admin("[key_name(usr)] changed the security level to [level]")
|
|
message_admins("[key_name_admin(usr)] changed the security level to [level]")
|
|
SSblackbox.add_details("admin_verb","Set Security Level [capitalize(level)]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in GLOB.nuke_list)
|
|
set name = "Toggle Nuke"
|
|
set category = "Fun"
|
|
set popup_menu = 0
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
if(!N.timing)
|
|
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num
|
|
if(!newtime)
|
|
return
|
|
N.timer_set = newtime
|
|
N.set_safety()
|
|
N.set_active()
|
|
|
|
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).")
|
|
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
|
|
SSblackbox.add_details("admin_toggle","Toggle Nuke|[N.timing]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
|
|
|
/client/proc/create_outfits()
|
|
set category = "Debug"
|
|
set name = "Create Custom Outfit"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
holder.create_outfit()
|
|
|
|
/datum/admins/proc/create_outfit()
|
|
var/list/uniforms = typesof(/obj/item/clothing/under)
|
|
var/list/suits = typesof(/obj/item/clothing/suit)
|
|
var/list/gloves = typesof(/obj/item/clothing/gloves)
|
|
var/list/shoes = typesof(/obj/item/clothing/shoes)
|
|
var/list/headwear = typesof(/obj/item/clothing/head)
|
|
var/list/glasses = typesof(/obj/item/clothing/glasses)
|
|
var/list/masks = typesof(/obj/item/clothing/mask)
|
|
var/list/ids = typesof(/obj/item/card/id)
|
|
|
|
var/uniform_select = "<select name=\"outfit_uniform\"><option value=\"\">None</option>"
|
|
for(var/path in uniforms)
|
|
uniform_select += "<option value=\"[path]\">[path]</option>"
|
|
uniform_select += "</select>"
|
|
|
|
var/suit_select = "<select name=\"outfit_suit\"><option value=\"\">None</option>"
|
|
for(var/path in suits)
|
|
suit_select += "<option value=\"[path]\">[path]</option>"
|
|
suit_select += "</select>"
|
|
|
|
var/gloves_select = "<select name=\"outfit_gloves\"><option value=\"\">None</option>"
|
|
for(var/path in gloves)
|
|
gloves_select += "<option value=\"[path]\">[path]</option>"
|
|
gloves_select += "</select>"
|
|
|
|
var/shoes_select = "<select name=\"outfit_shoes\"><option value=\"\">None</option>"
|
|
for(var/path in shoes)
|
|
shoes_select += "<option value=\"[path]\">[path]</option>"
|
|
shoes_select += "</select>"
|
|
|
|
var/head_select = "<select name=\"outfit_head\"><option value=\"\">None</option>"
|
|
for(var/path in headwear)
|
|
head_select += "<option value=\"[path]\">[path]</option>"
|
|
head_select += "</select>"
|
|
|
|
var/glasses_select = "<select name=\"outfit_glasses\"><option value=\"\">None</option>"
|
|
for(var/path in glasses)
|
|
glasses_select += "<option value=\"[path]\">[path]</option>"
|
|
glasses_select += "</select>"
|
|
|
|
var/mask_select = "<select name=\"outfit_mask\"><option value=\"\">None</option>"
|
|
for(var/path in masks)
|
|
mask_select += "<option value=\"[path]\">[path]</option>"
|
|
mask_select += "</select>"
|
|
|
|
var/id_select = "<select name=\"outfit_id\"><option value=\"\">None</option>"
|
|
for(var/path in ids)
|
|
id_select += "<option value=\"[path]\">[path]</option>"
|
|
id_select += "</select>"
|
|
|
|
var/dat = {"
|
|
<html><head><title>Create Outfit</title></head><body>
|
|
<form name="outfit" action="byond://?src=\ref[src];[HrefToken()]" method="get">
|
|
<input type="hidden" name="src" value="\ref[src]">
|
|
[HrefTokenFormField()]
|
|
<input type="hidden" name="create_outfit" value="1">
|
|
<table>
|
|
<tr>
|
|
<th>Name:</th>
|
|
<td>
|
|
<input type="text" name="outfit_name" value="Custom Outfit">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Uniform:</th>
|
|
<td>
|
|
[uniform_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Suit:</th>
|
|
<td>
|
|
[suit_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Back:</th>
|
|
<td>
|
|
<input type="text" name="outfit_back" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Belt:</th>
|
|
<td>
|
|
<input type="text" name="outfit_belt" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Gloves:</th>
|
|
<td>
|
|
[gloves_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Shoes:</th>
|
|
<td>
|
|
[shoes_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Head:</th>
|
|
<td>
|
|
[head_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Mask:</th>
|
|
<td>
|
|
[mask_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Ears:</th>
|
|
<td>
|
|
<input type="text" name="outfit_ears" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Glasses:</th>
|
|
<td>
|
|
[glasses_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>ID:</th>
|
|
<td>
|
|
[id_select]
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Left Pocket:</th>
|
|
<td>
|
|
<input type="text" name="outfit_l_pocket" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Right Pocket:</th>
|
|
<td>
|
|
<input type="text" name="outfit_r_pocket" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Suit Store:</th>
|
|
<td>
|
|
<input type="text" name="outfit_s_store" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Right Hand:</th>
|
|
<td>
|
|
<input type="text" name="outfit_r_hand" value="">
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<th>Left Hand:</th>
|
|
<td>
|
|
<input type="text" name="outfit_l_hand" value="">
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<br>
|
|
<input type="submit" value="Save">
|
|
</form></body></html>
|
|
"}
|
|
usr << browse(dat, "window=dressup;size=550x600")
|
|
|
|
/client/proc/toggle_antag_hud()
|
|
set category = "Admin"
|
|
set name = "Toggle AntagHUD"
|
|
set desc = "Toggles the Admin AntagHUD"
|
|
|
|
if(!holder) return
|
|
|
|
var/adding_hud = !has_antag_hud()
|
|
|
|
for(var/datum/atom_hud/H in GLOB.huds)
|
|
if(istype(H, /datum/atom_hud/antag))
|
|
(adding_hud) ? H.add_hud_to(usr) : H.remove_hud_from(usr)
|
|
|
|
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
|
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
|
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
|
SSblackbox.add_details("admin_toggle","Toggle Antag HUD|[adding_hud]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/has_antag_hud()
|
|
var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR]
|
|
return A.hudusers[mob]
|
|
|
|
/client/proc/open_shuttle_manipulator()
|
|
set category = "Admin"
|
|
set name = "Shuttle Manipulator"
|
|
set desc = "Opens the shuttle manipulator UI."
|
|
|
|
for(var/obj/machinery/shuttle_manipulator/M in GLOB.machines)
|
|
M.ui_interact(usr)
|
|
|
|
/client/proc/mass_zombie_infection()
|
|
set category = "Fun"
|
|
set name = "Mass Zombie Infection"
|
|
set desc = "Infects all humans with a latent organ that will zombify \
|
|
them on death."
|
|
|
|
if(!holder)
|
|
return
|
|
|
|
var/confirm = alert(src, "Please confirm you want to add latent zombie organs in all humans?", "Confirm Zombies", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/mob/living/carbon/human/H in GLOB.mob_list)
|
|
new /obj/item/organ/zombie_infection(H)
|
|
|
|
message_admins("[key_name_admin(usr)] added a latent zombie infection to all humans.")
|
|
log_admin("[key_name(usr)] added a latent zombie infection to all humans.")
|
|
SSblackbox.add_details("admin_verb","Mass Zombie Infection")
|
|
|
|
/client/proc/mass_zombie_cure()
|
|
set category = "Fun"
|
|
set name = "Mass Zombie Cure"
|
|
set desc = "Removes the zombie infection from all humans, returning them to normal."
|
|
if(!holder)
|
|
return
|
|
|
|
var/confirm = alert(src, "Please confirm you want to cure all zombies?", "Confirm Zombie Cure", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/obj/item/organ/zombie_infection/I in GLOB.zombie_infection_list)
|
|
qdel(I)
|
|
|
|
message_admins("[key_name_admin(usr)] cured all zombies.")
|
|
log_admin("[key_name(usr)] cured all zombies.")
|
|
SSblackbox.add_details("admin_verb","Mass Zombie Cure")
|
|
|
|
/client/proc/polymorph_all()
|
|
set category = "Fun"
|
|
set name = "Polymorph All"
|
|
set desc = "Applies the effects of the bolt of change to every single mob."
|
|
|
|
if(!holder)
|
|
return
|
|
|
|
var/confirm = alert(src, "Please confirm you want polymorph all mobs?", "Confirm Polymorph", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
var/list/mobs = shuffle(GLOB.living_mob_list.Copy()) // might change while iterating
|
|
var/who_did_it = key_name_admin(usr)
|
|
|
|
message_admins("[key_name_admin(usr)] started polymorphed all living mobs.")
|
|
log_admin("[key_name(usr)] polymorphed all living mobs.")
|
|
SSblackbox.add_details("admin_verb","Polymorph All")
|
|
|
|
for(var/mob/living/M in mobs)
|
|
CHECK_TICK
|
|
|
|
if(!M)
|
|
continue
|
|
|
|
M.audible_message("<span class='italics'>...wabbajack...wabbajack...</span>")
|
|
playsound(M.loc, 'sound/magic/staff_change.ogg', 50, 1, -1)
|
|
|
|
wabbajack(M)
|
|
|
|
message_admins("Mass polymorph started by [who_did_it] is complete.")
|
|
|
|
|
|
/client/proc/show_tip()
|
|
set category = "Admin"
|
|
set name = "Show Tip"
|
|
set desc = "Sends a tip (that you specify) to all players. After all \
|
|
you're the experienced player here."
|
|
|
|
if(!holder)
|
|
return
|
|
|
|
var/input = input(usr, "Please specify your tip that you want to send to the players.", "Tip", "") as message|null
|
|
if(!input)
|
|
return
|
|
|
|
if(!SSticker)
|
|
return
|
|
|
|
SSticker.selected_tip = input
|
|
|
|
// If we've already tipped, then send it straight away.
|
|
if(SSticker.tipped)
|
|
SSticker.send_tip_of_the_round()
|
|
|
|
|
|
message_admins("[key_name_admin(usr)] sent a tip of the round.")
|
|
log_admin("[key_name(usr)] sent \"[input]\" as the Tip of the Round.")
|
|
SSblackbox.add_details("admin_verb","Show Tip")
|
|
|
|
#define ON_PURRBATION(H) (!(H.dna.features["tail_human"] == "None" && H.dna.features["ears"] == "None"))
|
|
|
|
/proc/mass_purrbation()
|
|
for(var/M in GLOB.mob_list)
|
|
if(ishumanbasic(M))
|
|
purrbation_apply(M)
|
|
CHECK_TICK
|
|
|
|
/proc/mass_remove_purrbation()
|
|
for(var/M in GLOB.mob_list)
|
|
if(ishumanbasic(M))
|
|
purrbation_remove(M)
|
|
CHECK_TICK
|
|
|
|
/proc/purrbation_toggle(mob/living/carbon/human/H)
|
|
if(!ishumanbasic(H))
|
|
return
|
|
if(!ON_PURRBATION(H))
|
|
purrbation_apply(H)
|
|
. = TRUE
|
|
else
|
|
purrbation_remove(H)
|
|
. = FALSE
|
|
|
|
/proc/purrbation_apply(mob/living/carbon/human/H)
|
|
if(!ishuman(H))
|
|
return
|
|
if(ON_PURRBATION(H))
|
|
return
|
|
to_chat(H, "Something is nya~t right.")
|
|
H.dna.features["tail_human"] = "Cat"
|
|
H.dna.features["ears"] = "Cat"
|
|
H.regenerate_icons()
|
|
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, 1, -1)
|
|
|
|
/proc/purrbation_remove(mob/living/carbon/human/H)
|
|
if(!ishuman(H))
|
|
return
|
|
if(!ON_PURRBATION(H))
|
|
return
|
|
to_chat(H, "You are no longer a cat.")
|
|
H.dna.features["tail_human"] = "None"
|
|
H.dna.features["ears"] = "None"
|
|
H.regenerate_icons()
|
|
|
|
#undef ON_PURRBATION
|
|
|
|
/client/proc/modify_goals()
|
|
set category = "Debug"
|
|
set name = "Modify goals"
|
|
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
|
|
holder.modify_goals()
|
|
|
|
/datum/admins/proc/modify_goals()
|
|
var/dat = ""
|
|
for(var/datum/station_goal/S in SSticker.mode.station_goals)
|
|
dat += "[S.name] - <a href='?src=\ref[S];[HrefToken()];announce=1'>Announce</a> | <a href='?src=\ref[S];[HrefToken()];remove=1'>Remove</a><br>"
|
|
dat += "<br><a href='?src=\ref[src];[HrefToken()];add_station_goal=1'>Add New Goal</a>"
|
|
usr << browse(dat, "window=goals;size=400x400")
|
|
|
|
|
|
/client/proc/toggle_hub()
|
|
set category = "Server"
|
|
set name = "Toggle Hub"
|
|
|
|
world.update_hub_visibility(!GLOB.hub_visibility)
|
|
|
|
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
|
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(GLOB.hub_visibility?"on":"off")] the hub.")
|
|
if (GLOB.hub_visibility && !world.reachable)
|
|
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
|
|
|
SSblackbox.add_details("admin_toggle","Toggled Hub Visibility|[GLOB.hub_visibility]") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/smite(mob/living/carbon/human/target as mob)
|
|
set name = "Smite"
|
|
set category = "Fun"
|
|
if(!holder)
|
|
return
|
|
|
|
var/list/punishment_list = list(ADMIN_PUNISHMENT_LIGHTNING, ADMIN_PUNISHMENT_BRAINDAMAGE, ADMIN_PUNISHMENT_GIB, ADMIN_PUNISHMENT_BSA)
|
|
|
|
var/punishment = input("Choose a punishment", "DIVINE SMITING") as null|anything in punishment_list
|
|
|
|
if(QDELETED(target) || !punishment)
|
|
return
|
|
|
|
switch(punishment)
|
|
if(ADMIN_PUNISHMENT_LIGHTNING)
|
|
var/turf/T = get_step(get_step(target, NORTH), NORTH)
|
|
T.Beam(target, icon_state="lightning[rand(1,12)]", time = 5)
|
|
target.adjustFireLoss(75)
|
|
target.electrocution_animation(40)
|
|
to_chat(target, "<span class='userdanger'>The gods have punished you for your sins!</span>")
|
|
if(ADMIN_PUNISHMENT_BRAINDAMAGE)
|
|
target.adjustBrainLoss(75)
|
|
if(ADMIN_PUNISHMENT_GIB)
|
|
target.gib(FALSE)
|
|
if(ADMIN_PUNISHMENT_BSA)
|
|
bluespace_artillery(target)
|
|
|
|
var/msg = "[key_name_admin(usr)] punished [key_name_admin(target)] with [punishment]."
|
|
message_admins(msg)
|
|
admin_ticket_log(target, msg)
|
|
log_admin("[key_name(usr)] punished [key_name(target)] with [punishment].")
|
|
|
|
|
|
/client/proc/trigger_centcom_recall()
|
|
if(!holder)
|
|
return
|
|
var/message = pick(GLOB.admiral_messages)
|
|
message = input("Enter message from the on-call admiral to be put in the recall report.", "Admiral Message", message) as text|null
|
|
|
|
if(!message)
|
|
return
|
|
|
|
message_admins("[key_name_admin(usr)] triggered a CentCom recall, with the admiral message of: [message]")
|
|
log_game("[key_name(usr)] triggered a CentCom recall, with the message of: [message]")
|
|
SSshuttle.centcom_recall(SSshuttle.emergency.timer, message)
|
|
|
|
/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
|
|
|
|
var/list/msg = list()
|
|
msg += "<html><head><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")
|
|
|
|
/datum/admins/proc/cmd_show_exp_panel(client/C)
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
if(!C)
|
|
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>")
|
|
return
|
|
|
|
var/list/body = list()
|
|
body += "<html><head><title>Playtime for [C.key]</title></head><BODY><BR>Playtime:"
|
|
body += C.get_exp_report()
|
|
body += "<A href='?_src_=holder;[HrefToken()];toggleexempt=\ref[C]'>Toggle Exempt status</a>"
|
|
body += "</BODY></HTML>"
|
|
usr << browse(body.Join(), "window=playerplaytime[C.ckey];size=550x615")
|
|
|
|
/datum/admins/proc/toggle_exempt_status(client/C)
|
|
if(!check_rights(R_ADMIN))
|
|
return
|
|
if(!C)
|
|
to_chat(usr, "<span class='danger'>ERROR: Client not found.</span>")
|
|
return
|
|
|
|
if(!C.set_db_player_flags())
|
|
to_chat(usr, "<span class='danger'>ERROR: Unable read player flags from database. Please check logs.</span>")
|
|
var/dbflags = C.prefs.db_flags
|
|
var/newstate = FALSE
|
|
if(dbflags & DB_FLAG_EXEMPT)
|
|
newstate = FALSE
|
|
else
|
|
newstate = TRUE
|
|
|
|
if(C.update_flag_db(DB_FLAG_EXEMPT, newstate))
|
|
to_chat(usr, "<span class='danger'>ERROR: Unable to update player flags. Please check logs.</span>")
|
|
else
|
|
message_admins("[key_name_admin(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name_admin(C)]")
|
|
>>>>>>> 4178c20... Configuration datum refactor (#30763)
|
|
log_admin("[key_name(usr)] has [newstate ? "activated" : "deactivated"] job exp exempt status on [key_name(C)]") |