mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-17 12:35:26 +00:00
Misc: +Fixes unreported issue with initializing lighting on a specific zlevel +Fixes two similar issues with moveElement and moveRange. Where fromIndex or toIndex could be adjusted incorrectly in certain conditions. Potentially causing bad-sorts, or out of bound errors. +Rewrites listclearnulls(list/L) to no longer iterate through L.len elements for every null in the list (plus 1). i.e. went from L.len*(number_of_nulls+1) list-element reads (best-case), to L.len list-element reads (worst-case) +New proc/getElementByVar(list/L, varname, value) which finds the first datum in a list, with a variable named varname, which equals value. You can also feed it atoms instead of lists due to the way the in operator functions. +Fixes an unreported issue with Yota's list2text rewrite. Under certain conditions, the first element would not be converted into a string. Causing type-mismatch runtimes. +New global map_ready variable. This is not fully implemented yet, but will be used to avoid duplicate calls to initialize() for map objects. +All turfs now maintain references to all lights currently illuminating them. This will mean higher memory use unfortunately, due to the huge number of turfs. However, it will speed up updateAffectingLights significantly. I've used list husbandry to reduce baseline memory usage, so it shouldn't be any worse than some past atmos modifications memory-wise. -Removed 'quadratic lighting', can add this back at some point. Sorry. +modified the way lum() works slightly, to allow turfs to have overridden delta-lumen. i.e. space cannot be illuminated more than its default ambiance. This allowed removal of some iffy special-snowflake lighting areas implemented by somebody else. +Lighting images in the dmi can now use arbitrary naming schemes. It is reliant on order now. This allows the dmi to be replaced by simply dropping in a new dmi. -Removed all subtypes of /area/shuttle. Shuttles now create duplicate 'rooms' of /area/shuttle. (More on this later). This will conflict with most maps. Guide on how to fix to follow. +All verbs/tools relating to world.tick_lag were refactored to use world.fps. However old config text for setting tick_lag will still work (it converts the value to fps for you) +MC stats improved using smoothing. They now have their own tab so they dont get in the way when you're playing as an admin. -removed the push_mob_back stuff due to conflicting changes. Sorry Giacom. _OK, NOW THE ACTUAL INTERESTING STUFF_ Following systems moved over to subsystem datums: air_master garbage_manager lighting_controller process_mobs (aka Life()) nanomanager power sun pipenets AFK kick loops shuttle_controller (aka emergency shuttle/pods), supply_shuttle and other shuttles voting bots radio diseases events jobs objects ticker Subsystems hooks and variables should be commented fairly in-depth. If anything isn't particularly clear, please make an issue. Many system-specific global variables have been refactored into All tickers which previously used world.timeofday now use world.time some subsystems can iterate before round start. this resolves the issue with votes not working pregame
786 lines
32 KiB
Plaintext
786 lines
32 KiB
Plaintext
/client/proc/cmd_admin_drop_everything(mob/M as mob in mob_list)
|
|
set category = null
|
|
set name = "Drop Everything"
|
|
if(!holder)
|
|
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)
|
|
M.unEquip(W)
|
|
|
|
log_admin("[key_name(usr)] made [key_name(M)] drop everything!")
|
|
message_admins("[key_name_admin(usr)] made [key_name_admin(M)] drop everything!")
|
|
feedback_add_details("admin_verb","DEVR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/cmd_admin_subtle_message(mob/M as mob in mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Subtle Message"
|
|
|
|
if(!ismob(M)) return
|
|
if (!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
|
|
var/msg = input("Message:", text("Subtle PM to [M.key]")) as text
|
|
|
|
if (!msg)
|
|
return
|
|
if(usr)
|
|
if (usr.client)
|
|
if(usr.client.holder)
|
|
M << "\bold You hear a voice in your head... \italic [msg]"
|
|
|
|
log_admin("SubtlePM: [key_name(usr)] -> [key_name(M)] : [msg]")
|
|
message_admins("<span class='adminnotice'><b> SubtleMessage: [key_name_admin(usr)] -> [key_name_admin(M)] :</b> [msg]</span>")
|
|
feedback_add_details("admin_verb","SMS") //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)
|
|
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
|
|
world << "[msg]"
|
|
log_admin("GlobalNarrate: [key_name(usr)] : [msg]")
|
|
message_admins("<span class='adminnotice'><b> GlobalNarrate: [key_name_admin(usr)] :</b> [msg]<BR></span>")
|
|
feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_direct_narrate(var/mob/M)
|
|
set category = "Special Verbs"
|
|
set name = "Direct Narrate"
|
|
|
|
if(!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
|
|
if(!M)
|
|
M = input("Direct narrate to who?", "Active Players") as null|anything in 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
|
|
|
|
M << msg
|
|
log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]")
|
|
message_admins("<span class='adminnotice'><b> DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]):</b> [msg]<BR></span>")
|
|
feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_godmode(mob/M as mob in mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Godmode"
|
|
if(!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
M.status_flags ^= GODMODE
|
|
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"]")
|
|
message_admins("[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]")
|
|
feedback_add_details("admin_verb","GOD") //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
|
|
switch(mute_type)
|
|
if(MUTE_IC) mute_string = "IC (say and emote)"
|
|
if(MUTE_OOC) mute_string = "OOC"
|
|
if(MUTE_PRAY) mute_string = "pray"
|
|
if(MUTE_ADMINHELP) mute_string = "adminhelp, admin PM and ASAY"
|
|
if(MUTE_DEADCHAT) mute_string = "deadchat and DSAY"
|
|
if(MUTE_ALL) mute_string = "everything"
|
|
else return
|
|
|
|
var/client/C
|
|
if(istype(whom, /client))
|
|
C = whom
|
|
else if(istext(whom))
|
|
C = directory[whom]
|
|
else
|
|
return
|
|
|
|
var/datum/preferences/P
|
|
if(C) P = C.prefs
|
|
else P = 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) C << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
|
|
feedback_add_details("admin_verb","AUTOMUTE") //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) C << "You have been [muteunmute] from [mute_string]."
|
|
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/cmd_admin_add_random_ai_law()
|
|
set category = "Fun"
|
|
set name = "Add Random AI Law"
|
|
if(!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm != "Yes") return
|
|
log_admin("[key_name(src)] has added a random AI law.")
|
|
message_admins("[key_name_admin(src)] has added a random AI law.")
|
|
|
|
var/show_log = alert(src, "Show ion message?", "Message", "Yes", "No")
|
|
var/announce_ion_laws = (show_log == "Yes" ? 1 : -1)
|
|
|
|
new /datum/round_event/ion_storm(0, announce_ion_laws)
|
|
feedback_add_details("admin_verb","ION") //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 player_list)
|
|
if(M.stat != DEAD) continue //we are not dead!
|
|
if(!M.client.prefs.be_special & BE_ALIEN) 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
|
|
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","Hunter","Sentinel","Drone","Larva")
|
|
var/obj/effect/landmark/spawn_here = xeno_spawn.len ? pick(xeno_spawn) : pick(latejoin)
|
|
var/mob/living/carbon/alien/new_xeno
|
|
switch(alien_caste)
|
|
if("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/queen(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
|
|
|
|
new_xeno.ckey = ckey
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>")
|
|
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)
|
|
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 player_list)
|
|
if(G.ckey == input)
|
|
G_found = G
|
|
break
|
|
|
|
if(!G_found)//If a ghost was not found.
|
|
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(xeno_spawn.len) T = pick(xeno_spawn)
|
|
else T = pick(latejoin)
|
|
|
|
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("Queen") new_xeno = new /mob/living/carbon/alien/humanoid/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
|
|
|
|
//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
|
|
new_xeno << "You have been fully respawned. Enjoy the game."
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_xeno.key] as a filthy xeno.</span>")
|
|
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(pick(latejoin))
|
|
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
|
|
new_monkey << "You have been fully respawned. Enjoy the game."
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has respawned [new_monkey.key] as a filthy xeno.</span>")
|
|
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(pick(latejoin))//The mob being spawned.
|
|
|
|
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 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, 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.blood_type = record_found.fields["blood_type"]
|
|
else
|
|
new_character.gender = pick(MALE,FEMALE)
|
|
var/datum/preferences/A = new()
|
|
A.real_name = G_found.real_name
|
|
A.copy_to(new_character)
|
|
|
|
if(!new_character.real_name)
|
|
new_character.real_name = random_name(new_character.gender)
|
|
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
|
|
new_character.mind.special_verbs = list()
|
|
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.
|
|
|
|
//DNA
|
|
if(record_found)//Pull up their name from database records if they did have a mind.
|
|
hardset_dna(new_character, record_found.fields["identity"], record_found.fields["enzymes"], record_found.fields["name"], null, record_found.fields["blood_type"])
|
|
else//If they have no records, we just do a random DNA for them, based on their random appearance/savefile.
|
|
ready_dna(new_character)
|
|
|
|
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.
|
|
switch(new_character.mind.special_role)
|
|
if("traitor")
|
|
SSjob.EquipRank(new_character, new_character.mind.assigned_role, 1)
|
|
ticker.mode.equip_traitor(new_character)
|
|
if("Wizard")
|
|
new_character.loc = pick(wizardstart)
|
|
//ticker.mode.learn_basic_spells(new_character)
|
|
ticker.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/ninja_spawn[] = list()
|
|
for(var/obj/effect/landmark/L in landmarks_list)
|
|
if(L.name=="carpspawn")
|
|
ninja_spawn += L
|
|
new_character.equip_space_ninja()
|
|
new_character.internal = new_character.s_store
|
|
new_character.internals.icon_state = "internal1"
|
|
if(ninja_spawn.len)
|
|
var/obj/effect/landmark/ninja_spawn_here = pick(ninja_spawn)
|
|
new_character.loc = ninja_spawn_here.loc
|
|
/* DEATH SQUADS
|
|
if("Death Commando")//Leaves them at late-join spawn.
|
|
new_character.equip_death_commando()
|
|
new_character.internal = new_character.s_store
|
|
new_character.internals.icon_state = "internal1"*/
|
|
|
|
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(new_character.mind.special_role=="traitor")
|
|
ticker.mode.add_law_zero(new_character)
|
|
if("AI")
|
|
new_character = new_character.AIize()
|
|
if(new_character.mind.special_role=="traitor")
|
|
ticker.mode.add_law_zero(new_character)
|
|
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!="MODE")//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")
|
|
data_core.manifest_inject(new_character)
|
|
|
|
if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes")
|
|
call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role)
|
|
|
|
message_admins("<span class='adminnotice'>[admin] has respawned [player_key] as [new_character.real_name].</span>")
|
|
|
|
new_character << "You have been fully respawned. Enjoy the game."
|
|
|
|
feedback_add_details("admin_verb","RSPCH") //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)
|
|
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)
|
|
|
|
new /datum/round_event/ion_storm(0, announce_ion_laws, input)
|
|
|
|
feedback_add_details("admin_verb","IONC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_rejuvenate(mob/living/M as mob in mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Rejuvenate"
|
|
if(!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
if(!mob)
|
|
return
|
|
if(!istype(M))
|
|
alert("Cannot revive a ghost")
|
|
return
|
|
M.revive()
|
|
|
|
log_admin("[key_name(usr)] healed / revived [key_name(M)]")
|
|
message_admins("<span class='danger'>Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!</span>")
|
|
feedback_add_details("admin_verb","REJU") //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)
|
|
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")
|
|
if(confirm == "Yes")
|
|
priority_announce(input, null, 'sound/AI/commandreport.ogg')
|
|
else
|
|
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/AI/commandreport.ogg')
|
|
|
|
print_command_report(input,"[confirm=="Yes" ? "" : "Classified "][command_name()] Update")
|
|
|
|
log_admin("[key_name(src)] has created a command report: [input]")
|
|
message_admins("[key_name_admin(src)] has created a command report")
|
|
feedback_add_details("admin_verb","CCR") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_delete(atom/O as obj|mob|turf in world)
|
|
set category = "Admin"
|
|
set name = "Delete"
|
|
|
|
if (!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
|
|
if (alert(src, "Are you sure you want to delete:\n[O]\nat ([O.x], [O.y], [O.z])?", "Confirmation", "Yes", "No") == "Yes")
|
|
log_admin("[key_name(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
|
|
message_admins("[key_name_admin(usr)] deleted [O] at ([O.x],[O.y],[O.z])")
|
|
feedback_add_details("admin_verb","DEL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
qdel(O)
|
|
|
|
/client/proc/cmd_admin_list_open_jobs()
|
|
set category = "Admin"
|
|
set name = "Manage Job Slots"
|
|
|
|
if (!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
holder.manage_free_slots()
|
|
feedback_add_details("admin_verb","MFS") //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)
|
|
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])")
|
|
feedback_add_details("admin_verb","EXPL") //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)
|
|
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])")
|
|
feedback_add_details("admin_verb","EMP") //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 as mob in mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Gib"
|
|
|
|
if (!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm != "Yes") 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(istype(M, /mob/dead/observer))
|
|
gibs(M.loc, M.viruses)
|
|
return
|
|
|
|
M.gib()
|
|
feedback_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")
|
|
if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
|
|
return
|
|
else
|
|
mob.gib()
|
|
|
|
log_admin("[key_name(usr)] used gibself.")
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used gibself.</span>")
|
|
feedback_add_details("admin_verb","GIBS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
/*
|
|
/client/proc/cmd_manual_ban()
|
|
set name = "Manual Ban"
|
|
set category = "Special Verbs"
|
|
if(!authenticated || !holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
var/mob/M = null
|
|
switch(alert("How would you like to ban someone today?", "Manual Ban", "Key List", "Enter Manually", "Cancel"))
|
|
if("Key List")
|
|
var/list/keys = list()
|
|
for(var/mob/M in world)
|
|
keys += M.client
|
|
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in keys
|
|
if(!selection)
|
|
return
|
|
M = selection:mob
|
|
if ((M.client && M.client.holder && (M.client.holder.level >= holder.level)))
|
|
alert("You cannot perform this action. You must be of a higher administrative rank!")
|
|
return
|
|
|
|
switch(alert("Temporary Ban?",,"Yes","No"))
|
|
if("Yes")
|
|
var/mins = input(usr,"How long (in minutes)?","Ban time",1440) as num
|
|
if(!mins)
|
|
return
|
|
if(mins >= 525600) mins = 525599
|
|
var/reason = input(usr,"Reason?","reason","Griefer") as text
|
|
if(!reason)
|
|
return
|
|
if(M)
|
|
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
|
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason]</B></BIG>"
|
|
M << "\red This is a temporary ban, it will be removed in [mins] minutes."
|
|
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
|
|
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
|
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.")
|
|
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=[mins]&server=[replacetext(config.server_name, "#", "")]")
|
|
del(M.client)
|
|
qdel(M)
|
|
else
|
|
|
|
if("No")
|
|
var/reason = input(usr,"Reason?","reason","Griefer") as text
|
|
if(!reason)
|
|
return
|
|
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 0, 0)
|
|
M << "\red<BIG><B>You have been banned by [usr.client.ckey].\nReason: [reason]</B></BIG>"
|
|
M << "\red This is a permanent ban."
|
|
M << "\red To try to resolve this matter head to http://ss13.donglabs.com/forum/"
|
|
log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
|
message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.")
|
|
world.Export("http://216.38.134.132/adminlog.php?type=ban&key=[usr.client.key]&key2=[M.key]&msg=[html_decode(reason)]&time=perma&server=[replacetext(config.server_name, "#", "")]")
|
|
del(M.client)
|
|
qdel(M)
|
|
*/
|
|
|
|
/client/proc/update_world()
|
|
// If I see anyone granting powers to specific keys like the code that was here,
|
|
// I will both remove their SVN access and permanently ban them from my servers.
|
|
return
|
|
|
|
/client/proc/cmd_admin_check_contents(mob/living/M as mob in mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Check Contents"
|
|
|
|
var/list/L = M.get_contents()
|
|
for(var/t in L)
|
|
usr << "[t]"
|
|
feedback_add_details("admin_verb","CC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/* This proc is DEFERRED. Does not do anything.
|
|
/client/proc/cmd_admin_remove_plasma()
|
|
set category = "Debug"
|
|
set name = "Stabilize Atmos."
|
|
if(!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
feedback_add_details("admin_verb","STATM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
// DEFERRED
|
|
spawn(0)
|
|
for(var/turf/T in view())
|
|
T.poison = 0
|
|
T.oldpoison = 0
|
|
T.tmppoison = 0
|
|
T.oxygen = 755985
|
|
T.oldoxy = 755985
|
|
T.tmpoxy = 755985
|
|
T.co2 = 14.8176
|
|
T.oldco2 = 14.8176
|
|
T.tmpco2 = 14.8176
|
|
T.n2 = 2.844e+006
|
|
T.on2 = 2.844e+006
|
|
T.tn2 = 2.844e+006
|
|
T.tsl_gas = 0
|
|
T.osl_gas = 0
|
|
T.sl_gas = 0
|
|
T.temp = 293.15
|
|
T.otemp = 293.15
|
|
T.ttemp = 293.15
|
|
*/
|
|
|
|
/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)
|
|
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
|
|
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
|
|
|
|
feedback_add_details("admin_verb","CVRA") //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(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
|
|
return
|
|
|
|
if (!holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
|
|
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
|
|
if(confirm != "Yes") return
|
|
|
|
if(ticker.mode.name == "revolution" || ticker.mode.name == "AI malfunction" || ticker.mode.name == "confliction")
|
|
var/choice = input("The shuttle will just return if you call it. Call anyway?") in list("Confirm", "Cancel")
|
|
if(choice == "Confirm")
|
|
SSshuttle.emergencyFakeRecall = rand(0.5,0.9)
|
|
else
|
|
return
|
|
|
|
SSshuttle.emergency.request()
|
|
feedback_add_details("admin_verb","CSHUT") //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(SSshuttle.emergency.mode >= SHUTTLE_DOCKED)
|
|
return
|
|
|
|
SSshuttle.emergency.cancel()
|
|
feedback_add_details("admin_verb","CCSHUT") //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/cmd_admin_attack_log(mob/M as mob in mob_list)
|
|
set category = "Special Verbs"
|
|
set name = "Attack Log"
|
|
|
|
usr << text("<span class='userdanger'>Attack Log for []</span>", mob)
|
|
for(var/t in M.attack_log)
|
|
usr << t
|
|
feedback_add_details("admin_verb","ATTL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/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(ticker && ticker.mode)
|
|
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.")
|
|
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")
|
|
world << "<span class='adminnotice'>Admin [usr.key] has forced the players to have completely random identities!</span>"
|
|
|
|
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
|
|
feedback_add_details("admin_verb","MER") //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
|
|
usr << "Random events enabled"
|
|
message_admins("Admin [key_name_admin(usr)] has enabled random events.")
|
|
else
|
|
config.allow_random_events = 0
|
|
usr << "Random events disabled"
|
|
message_admins("Admin [key_name_admin(usr)] has disabled random events.")
|
|
feedback_add_details("admin_verb","TRE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/reset_all_tcs()
|
|
set category = "Admin"
|
|
set name = "Reset Telecomms Scripts"
|
|
set desc = "Blanks all telecomms scripts from all telecomms servers"
|
|
if(!holder)
|
|
usr << "Admin only."
|
|
return
|
|
for(var/obj/machinery/telecomms/server/S in telecomms_list)
|
|
var/datum/TCS_Compiler/C = S.Compiler
|
|
S.rawcode = ""
|
|
C.Compile("")
|
|
for(var/obj/machinery/computer/telecomms/traffic/T in machines)
|
|
T.storedcode = ""
|
|
log_admin("[key_name(usr)] blanked all telecomms scripts.")
|
|
message_admins("[key_name_admin(usr)] blanked all telecomms scripts.")
|
|
feedback_add_details("admin_verb","RAT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|