mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-25 17:51:17 +00:00
Fixes more compile errors. Down to 65 now. updates << into to_chat Down to 60 errors, also starts to port the codex gigas and law 666 for cyborg devils. Fixes more compile errors. Down to 41 now. Replaces timers with spawns, and <<s with to_chats 40 compile errors. Down to 34 compile errors. whoops, actually down to 34 now. Down to 25 compile errors. Down to 15 compile errors, I'llprobably need some help at this point. Woo! Down to 7 compile errors. Ported over devil hud. Number of errors up to 19. WOO! It compiles. It's completely untested, but it compiles. Adds devils to traitor panel Implements iron, silver and salt banes. implements flashing lights bane Selling your soul prevents cloning, and some other methods of revival. Implements harvest bane Merged and sorted icons/obj/bureaucracy.dmi Adds toy codex gigas Fixes compile errors, adds codex gigas sprite. Lots of bug fixes. Contracts work, devil revival is more consistant, etc Adds missing icons for flaming contracts, summon pitchfork, summon wealth, employment cabinet, and sintouch. Converts DEEP LORE explanations from hell to inferno incorporated. Banishes the compile errors. Devils come from hell again. replaces offer drink obligation with a much more lore appropriate devil's fiddle reference Also fixes contract bashing brain damage chance. Undoes some changes I accidentally did to example config files. Fixes up a few remaining bugs. Puts in the codex gigas and employment contract cabinets. -- Lemon - I kinda skipped this one, I'll patch it back in later because map conflicts are suffering incarnate Solves the devil law problem in a REALLY hacky snowflake way. Fixes a few methods in which a hellbound can be revived. Devils respawn with a limited number of appropriate items, instead of COMPLETELY naked upon corpse destruction. Also adds lines to example config. Updates devil laws to be less hacky. Objective to sintouch x mortals now greentexts correctly. Contracts no longer cause brain damage. I didn't realize it was lethal on this codebase. Oops. Splits dust(visual_only) into dust() and dust_animation() procs Fixes some defines. Adds undef statements to improve compile times. Fixes race changes from demonic form changes. Fixes small runtime error. (Which somehow didn't break anything?) Implements lots of small changes/corrections suggested by CrazyLemon64 I still need to test these changes, along with other potential issues he brought up. Fixes harvest bane and power contracts. Also adds a few </span> tag enders. Corrects some edge cases with revival contracts. Fixes compile error. Reverts unneccecary change to item/weapon/reagent_containers Cleans up the code for readability. Prevents cloning of hellbound individuals. Latejoins now properly have employment contracts added to employment cabinets (provided they still exist) Infernal contracts are no longer rendered unreadable by fire and alcohol. All fireproof paper remains readable after being fireballed, not just infernal contracts. (Though infernal contracts are the only fireproof paper atm) Fixes an edge case problem with cloning. Adds is_revivable proc to mind. Removes snowflake code involving preventing soulseller resurrection. Indulges in the sin of sloth, and copies tg's lazy list macros Proc calls that transform the user no longer go to a null target Fixes devil UI, human regression will keep appearance, and adds danceoff Devil's base forms no longer suffocate inside the devil Fixes runtimes, gets stuff working The arch devil can now blast down walls with their pitchfork EXTERMINATE ALL SPIRITS Activates devil clause in voice of god Fawks Mcclood Feature P A R I T Y Fixes devil bugs from testing - Does a death refactor to make sure that diabolical resurrection works - Walls no longer leave girders when blasted by the devil - Getting a new body gives you a rudimentary amount of equipment to work with to get out of maintenance or whereever Does all the icons in a single commit on their own because icon conflicts suck Starting point of extra devil rebalance/fixes Ports devil friends Also oops tramples all over Fethas' corpse PR that's still up I need to take care of that one Styling fixes
913 lines
30 KiB
Plaintext
913 lines
30 KiB
Plaintext
/client/proc/Debug2()
|
|
set category = "Debug"
|
|
set name = "Debug-Game"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
if(Debug2)
|
|
Debug2 = 0
|
|
message_admins("[key_name_admin(src)] toggled debugging off.")
|
|
log_admin("[key_name(src)] toggled debugging off.")
|
|
else
|
|
Debug2 = 1
|
|
message_admins("[key_name_admin(src)] toggled debugging on.")
|
|
log_admin("[key_name(src)] toggled debugging on.")
|
|
|
|
feedback_add_details("admin_verb","DG2") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/* 21st Sept 2010
|
|
Updated by Skie -- Still not perfect but better!
|
|
Stuff you can't do:
|
|
Call proc /mob/proc/Dizzy() for some player
|
|
Because if you select a player mob as owner it tries to do the proc for
|
|
/mob/living/carbon/human/ instead. And that gives a run-time error.
|
|
But you can call procs that are of type /mob/living/carbon/human/proc/ for that player.
|
|
*/
|
|
|
|
/client/proc/callproc()
|
|
set category = "Debug"
|
|
set name = "Advanced ProcCall"
|
|
|
|
if(!check_rights(R_PROCCALL))
|
|
return
|
|
|
|
spawn(0)
|
|
var/target = null
|
|
var/targetselected = 0
|
|
var/returnval = null
|
|
var/class = null
|
|
|
|
switch(alert("Proc owned by something?",,"Yes","No"))
|
|
if("Yes")
|
|
targetselected = 1
|
|
if(src.holder && src.holder.marked_datum)
|
|
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client","Marked datum ([holder.marked_datum.type])")
|
|
if(class == "Marked datum ([holder.marked_datum.type])")
|
|
class = "Marked datum"
|
|
else
|
|
class = input("Proc owned by...","Owner",null) as null|anything in list("Obj","Mob","Area or Turf","Client")
|
|
switch(class)
|
|
if("Obj")
|
|
target = input("Enter target:","Target",usr) as obj in world
|
|
if("Mob")
|
|
target = input("Enter target:","Target",usr) as mob in world
|
|
if("Area or Turf")
|
|
target = input("Enter target:","Target",usr.loc) as area|turf in world
|
|
if("Client")
|
|
var/list/keys = list()
|
|
for(var/client/C)
|
|
keys += C
|
|
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
|
|
if("Marked datum")
|
|
target = holder.marked_datum
|
|
else
|
|
return
|
|
if("No")
|
|
target = null
|
|
targetselected = 0
|
|
|
|
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
|
|
if(!procname) return
|
|
|
|
if(targetselected && !hascall(target,procname))
|
|
to_chat(usr, "<font color='red'>Error: callproc(): target has no such call [procname].</font>")
|
|
return
|
|
|
|
var/list/lst = get_callproc_args()
|
|
if(!lst)
|
|
return
|
|
|
|
if(targetselected)
|
|
if(!target)
|
|
to_chat(usr, "<font color='red'>Error: callproc(): owner of proc no longer exists.</font>")
|
|
return
|
|
message_admins("[key_name_admin(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
|
log_admin("[key_name(src)] called [target]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"].")
|
|
returnval = call(target,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
|
|
else
|
|
//this currently has no hascall protection. wasn't able to get it working.
|
|
message_admins("[key_name_admin(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
|
|
log_admin("[key_name(src)] called [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
|
|
returnval = call(procname)(arglist(lst)) // Pass the lst as an argument list to the proc
|
|
|
|
to_chat(usr, "<font color='blue'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</font>")
|
|
feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/callproc_datum(var/A as null|area|mob|obj|turf)
|
|
set category = "Debug"
|
|
set name = "Atom ProcCall"
|
|
|
|
if(!check_rights(R_PROCCALL))
|
|
return
|
|
|
|
var/procname = input("Proc name, eg: fake_blood","Proc:", null) as text|null
|
|
if(!procname)
|
|
return
|
|
|
|
if(!hascall(A,procname))
|
|
to_chat(usr, "<span class='warning'>Error: callproc_datum(): target has no such call [procname].</span>")
|
|
return
|
|
|
|
var/list/lst = get_callproc_args()
|
|
if(!lst)
|
|
return
|
|
|
|
if(!A || !IsValidSrc(A))
|
|
to_chat(src, "<span class='warning'>Error: callproc_datum(): owner of proc no longer exists.</span>")
|
|
return
|
|
message_admins("[key_name_admin(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
|
|
log_admin("[key_name(src)] called [A]'s [procname]() with [lst.len ? "the arguments [list2params(lst)]":"no arguments"]")
|
|
|
|
spawn()
|
|
var/returnval = call(A,procname)(arglist(lst)) // Pass the lst as an argument list to the proc
|
|
to_chat(src, "<span class='notice'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</span>")
|
|
|
|
feedback_add_details("admin_verb","DPC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/get_callproc_args()
|
|
var/argnum = input("Number of arguments","Number:",0) as num|null
|
|
if(!argnum && (argnum!=0)) return
|
|
|
|
var/list/lst = list()
|
|
//TODO: make a list to store whether each argument was initialised as null.
|
|
//Reason: So we can abort the proccall if say, one of our arguments was a mob which no longer exists
|
|
//this will protect us from a fair few errors ~Carn
|
|
|
|
while(argnum--)
|
|
var/class = null
|
|
// Make a list with each index containing one variable, to be given to the proc
|
|
if(src.holder && src.holder.marked_datum)
|
|
class = input("What kind of variable?","Variable Type") in list("text","num","type","reference","mob reference","icon","file","client","mob's area","Marked datum ([holder.marked_datum.type])","CANCEL")
|
|
if(holder.marked_datum && class == "Marked datum ([holder.marked_datum.type])")
|
|
class = "Marked datum"
|
|
else
|
|
class = input("What kind of variable?","Variable Type") in list("text","num","type","reference","mob reference","icon","file","client","mob's area","CANCEL")
|
|
switch(class)
|
|
if("CANCEL")
|
|
return null
|
|
|
|
if("text")
|
|
lst += input("Enter new text:","Text",null) as text
|
|
|
|
if("num")
|
|
lst += input("Enter new number:","Num",0) as num
|
|
|
|
if("type")
|
|
lst += input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
|
|
|
|
if("reference")
|
|
lst += input("Select reference:","Reference",src) as mob|obj|turf|area in world
|
|
|
|
if("mob reference")
|
|
lst += input("Select reference:","Reference",usr) as mob in world
|
|
|
|
if("file")
|
|
lst += input("Pick file:","File") as file
|
|
|
|
if("icon")
|
|
lst += input("Pick icon:","Icon") as icon
|
|
|
|
if("client")
|
|
var/list/keys = list()
|
|
for(var/mob/M in world)
|
|
keys += M.client
|
|
lst += input("Please, select a player!", "Selection", null, null) as null|anything in keys
|
|
|
|
if("mob's area")
|
|
var/mob/temp = input("Select mob", "Selection", usr) as mob in world
|
|
lst += temp.loc
|
|
|
|
if("Marked datum")
|
|
lst += holder.marked_datum
|
|
return lst
|
|
|
|
/client/proc/Cell()
|
|
set category = "Debug"
|
|
set name = "Air Status in Location"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
if(!mob)
|
|
return
|
|
var/turf/T = mob.loc
|
|
|
|
if(!( istype(T, /turf) ))
|
|
return
|
|
|
|
var/datum/gas_mixture/env = T.return_air()
|
|
|
|
var/t = ""
|
|
t+= "Nitrogen : [env.nitrogen]\n"
|
|
t+= "Oxygen : [env.oxygen]\n"
|
|
t+= "Plasma : [env.toxins]\n"
|
|
t+= "CO2: [env.carbon_dioxide]\n"
|
|
|
|
usr.show_message(t, 1)
|
|
feedback_add_details("admin_verb","ASL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_robotize(var/mob/M in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Make Robot"
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(istype(M, /mob/living/carbon/human))
|
|
log_admin("[key_name(src)] has robotized [M.key].")
|
|
spawn(10)
|
|
M:Robotize()
|
|
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/client/proc/cmd_admin_animalize(var/mob/M in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Make Simple Animal"
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
|
|
if(!M)
|
|
alert("That mob doesn't seem to exist, close the panel and try again.")
|
|
return
|
|
|
|
if(istype(M, /mob/new_player))
|
|
alert("The mob must not be a new_player.")
|
|
return
|
|
|
|
log_admin("[key_name(src)] has animalized [M.key].")
|
|
spawn(10)
|
|
M.Animalize()
|
|
|
|
|
|
/client/proc/makepAI(var/turf/T in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Make pAI"
|
|
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
var/list/available = list()
|
|
for(var/mob/C in GLOB.mob_list)
|
|
if(C.key)
|
|
available.Add(C)
|
|
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
|
if(!choice)
|
|
return 0
|
|
if(!istype(choice, /mob/dead/observer))
|
|
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank [choice.p_them()] out of [choice.p_their()] body and place [choice.p_them()] in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
|
if(confirm != "Yes")
|
|
return 0
|
|
var/obj/item/paicard/card = new(T)
|
|
var/mob/living/silicon/pai/pai = new(card)
|
|
var/raw_name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
|
|
var/new_name = reject_bad_name(raw_name, 1)
|
|
if(new_name)
|
|
pai.name = new_name
|
|
pai.real_name = new_name
|
|
else
|
|
to_chat(usr, "<font color='red'>Invalid name. Your name should be at least 2 and at most [MAX_NAME_LEN] characters long. It may only contain the characters A-Z, a-z, -, ' and .</font>")
|
|
pai.real_name = pai.name
|
|
pai.key = choice.key
|
|
card.setPersonality(pai)
|
|
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
|
|
if(candidate.key == choice.key)
|
|
paiController.pai_candidates.Remove(candidate)
|
|
feedback_add_details("admin_verb","MPAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_alienize(var/mob/M in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Make Alien"
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(ishuman(M))
|
|
log_admin("[key_name(src)] has alienized [M.key].")
|
|
spawn(10)
|
|
M:Alienize()
|
|
feedback_add_details("admin_verb","MKAL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] made [key_name(M)] into an alien.")
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into an alien.</span>", 1)
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/client/proc/cmd_admin_slimeize(var/mob/M in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Make slime"
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(ishuman(M))
|
|
log_admin("[key_name(src)] has slimeized [M.key].")
|
|
spawn(10)
|
|
M:slimeize()
|
|
feedback_add_details("admin_verb","MKMET") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(usr)] made [key_name(M)] into a slime.")
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into a slime.</span>", 1)
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/client/proc/cmd_admin_super(var/mob/M in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Make Superhero"
|
|
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(ishuman(M))
|
|
var/type = input("Pick the Superhero","Superhero") as null|anything in GLOB.all_superheroes
|
|
var/datum/superheroes/S = GLOB.all_superheroes[type]
|
|
if(S)
|
|
S.create(M)
|
|
log_admin("[key_name(src)] has turned [M.key] into a Superhero.")
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] made [key_name(M)] into a Superhero.</span>", 1)
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
//TODO: merge the vievars version into this or something maybe mayhaps
|
|
/client/proc/cmd_debug_del_all()
|
|
set category = "Debug"
|
|
set name = "Del-All"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
// to prevent REALLY stupid deletions
|
|
var/blocked = list(/mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/dead, /mob/dead/observer, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
|
|
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in subtypesof(/obj) + subtypesof(/mob) - blocked
|
|
if(hsbitem)
|
|
for(var/atom/O in world)
|
|
if(istype(O, hsbitem))
|
|
qdel(O)
|
|
log_admin("[key_name(src)] has deleted all instances of [hsbitem].")
|
|
message_admins("[key_name_admin(src)] has deleted all instances of [hsbitem].", 0)
|
|
feedback_add_details("admin_verb","DELA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_debug_del_sing()
|
|
set category = "Debug"
|
|
set name = "Del Singulo / Tesla"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
//This gets a confirmation check because it's way easier to accidentally hit this and delete things than it is with del-all
|
|
var/confirm = alert("This will delete ALL Singularities and Tesla orbs except for any that are on away mission z-levels or the centcomm z-level. Are you sure you want to delete them?", "Confirm Panic Button", "Yes", "No")
|
|
if(confirm != "Yes")
|
|
return
|
|
|
|
for(var/I in GLOB.singularities)
|
|
var/obj/singularity/S = I
|
|
if(!is_level_reachable(S.z))
|
|
continue
|
|
qdel(S)
|
|
log_admin("[key_name(src)] has deleted all Singularities and Tesla orbs.")
|
|
message_admins("[key_name_admin(src)] has deleted all Singularities and Tesla orbs.", 0)
|
|
feedback_add_details("admin_verb","DELS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_debug_make_powernets()
|
|
set category = "Debug"
|
|
set name = "Make Powernets"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
SSmachines.makepowernets()
|
|
log_admin("[key_name(src)] has remade the powernet. makepowernets() called.")
|
|
message_admins("[key_name_admin(src)] has remade the powernets. makepowernets() called.", 0)
|
|
feedback_add_details("admin_verb","MPWN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/cmd_admin_grantfullaccess(var/mob/M in GLOB.mob_list)
|
|
set category = "Admin"
|
|
set name = "Grant Full Access"
|
|
|
|
if(!check_rights(R_EVENT))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(istype(M, /mob/living/carbon/human))
|
|
var/mob/living/carbon/human/H = M
|
|
if(H.wear_id)
|
|
var/obj/item/card/id/id = H.wear_id
|
|
if(istype(H.wear_id, /obj/item/pda))
|
|
var/obj/item/pda/pda = H.wear_id
|
|
id = pda.id
|
|
id.icon_state = "gold"
|
|
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
|
else
|
|
var/obj/item/card/id/id = new/obj/item/card/id(M);
|
|
id.icon_state = "gold"
|
|
id:access = get_all_accesses()+get_all_centcom_access()+get_all_syndicate_access()
|
|
id.registered_name = H.real_name
|
|
id.assignment = "Captain"
|
|
id.name = "[id.registered_name]'s ID Card ([id.assignment])"
|
|
H.equip_to_slot_or_del(id, slot_wear_id)
|
|
H.update_inv_wear_id()
|
|
else
|
|
alert("Invalid mob")
|
|
feedback_add_details("admin_verb","GFA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
log_admin("[key_name(src)] has granted [M.key] full access.")
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] has granted [M.key] full access.</span>", 1)
|
|
|
|
/client/proc/cmd_assume_direct_control(var/mob/M in GLOB.mob_list)
|
|
set category = "Admin"
|
|
set name = "Assume direct control"
|
|
set desc = "Direct intervention"
|
|
|
|
if(!check_rights(R_DEBUG|R_ADMIN))
|
|
return
|
|
|
|
if(M.ckey)
|
|
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
|
|
return
|
|
else
|
|
var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
|
|
ghost.ckey = M.ckey
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] assumed direct control of [M].</span>", 1)
|
|
log_admin("[key_name(usr)] assumed direct control of [M].")
|
|
var/mob/adminmob = src.mob
|
|
M.ckey = src.ckey
|
|
if( isobserver(adminmob) )
|
|
qdel(adminmob)
|
|
feedback_add_details("admin_verb","ADC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
|
|
/client/proc/cmd_admin_areatest()
|
|
set category = "Mapping"
|
|
set name = "Test areas"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
var/list/areas_all = list()
|
|
var/list/areas_with_APC = list()
|
|
var/list/areas_with_air_alarm = list()
|
|
var/list/areas_with_RC = list()
|
|
var/list/areas_with_light = list()
|
|
var/list/areas_with_LS = list()
|
|
var/list/areas_with_intercom = list()
|
|
var/list/areas_with_camera = list()
|
|
|
|
var/list/areas_with_multiple_APCs = list()
|
|
var/list/areas_with_multiple_air_alarms = list()
|
|
|
|
for(var/area/A in world)
|
|
areas_all |= A.type
|
|
|
|
for(var/obj/machinery/power/apc/APC in world)
|
|
var/area/A = get_area(APC)
|
|
if(!A)
|
|
continue
|
|
if(!(A.type in areas_with_APC))
|
|
areas_with_APC |= A.type
|
|
else
|
|
areas_with_multiple_APCs |= A.type
|
|
|
|
for(var/obj/machinery/alarm/alarm in world)
|
|
var/area/A = get_area(alarm)
|
|
if(!A)
|
|
continue
|
|
if(!(A.type in areas_with_air_alarm))
|
|
areas_with_air_alarm |= A.type
|
|
else
|
|
areas_with_multiple_air_alarms |= A.type
|
|
|
|
for(var/obj/machinery/requests_console/RC in world)
|
|
var/area/A = get_area(RC)
|
|
if(!A)
|
|
continue
|
|
areas_with_RC |= A.type
|
|
|
|
for(var/obj/machinery/light/L in world)
|
|
var/area/A = get_area(L)
|
|
if(!A)
|
|
continue
|
|
areas_with_light |= A.type
|
|
|
|
for(var/obj/machinery/light_switch/LS in world)
|
|
var/area/A = get_area(LS)
|
|
if(!A)
|
|
continue
|
|
areas_with_LS |= A.type
|
|
|
|
for(var/obj/item/radio/intercom/I in world)
|
|
var/area/A = get_area(I)
|
|
if(!A)
|
|
continue
|
|
areas_with_intercom |= A.type
|
|
|
|
for(var/obj/machinery/camera/C in world)
|
|
var/area/A = get_area(C)
|
|
if(!A)
|
|
continue
|
|
areas_with_camera |= A.type
|
|
|
|
var/list/areas_without_APC = areas_all - areas_with_APC
|
|
var/list/areas_without_air_alarm = areas_all - areas_with_air_alarm
|
|
var/list/areas_without_RC = areas_all - areas_with_RC
|
|
var/list/areas_without_light = areas_all - areas_with_light
|
|
var/list/areas_without_LS = areas_all - areas_with_LS
|
|
var/list/areas_without_intercom = areas_all - areas_with_intercom
|
|
var/list/areas_without_camera = areas_all - areas_with_camera
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT AN APC:</b>")
|
|
for(var/areatype in areas_without_APC)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT AN AIR ALARM:</b>")
|
|
for(var/areatype in areas_without_air_alarm)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITH TOO MANY APCS:</b>")
|
|
for(var/areatype in areas_with_multiple_APCs)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITH TOO MANY AIR ALARMS:</b>")
|
|
for(var/areatype in areas_with_multiple_air_alarms)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT A REQUEST CONSOLE:</b>")
|
|
for(var/areatype in areas_without_RC)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT ANY LIGHTS:</b>")
|
|
for(var/areatype in areas_without_light)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT A LIGHT SWITCH:</b>")
|
|
for(var/areatype in areas_without_LS)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT ANY INTERCOMS:</b>")
|
|
for(var/areatype in areas_without_intercom)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
to_chat(world, "<b>AREAS WITHOUT ANY CAMERAS:</b>")
|
|
for(var/areatype in areas_without_camera)
|
|
to_chat(world, "* [areatype]")
|
|
|
|
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in GLOB.mob_list)
|
|
set category = "Event"
|
|
set name = "Select equipment"
|
|
|
|
if(!check_rights(R_EVENT))
|
|
return
|
|
|
|
if(!ishuman(M))
|
|
alert("Invalid mob")
|
|
return
|
|
|
|
var/list/choices = list(
|
|
"strip",
|
|
"as job...",
|
|
"emergency response team member",
|
|
"emergency response team leader"
|
|
)
|
|
|
|
var/admin_outfits = subtypesof(/datum/outfit/admin)
|
|
for(var/type in admin_outfits)
|
|
var/datum/outfit/O = type
|
|
var/name = initial(O.name)
|
|
if(name != "Naked")
|
|
choices[initial(O.name)] = type
|
|
|
|
var/dostrip = 0
|
|
switch(alert("Strip [M] before dressing?", "Strip?", "Yes", "No", "Cancel"))
|
|
if("Yes")
|
|
dostrip = 1
|
|
if("Cancel")
|
|
return
|
|
|
|
var/dresscode = input("Select dress for [M]", "Robust quick dress shop") as null|anything in choices
|
|
if(isnull(dresscode))
|
|
return
|
|
|
|
var/datum/outfit/O
|
|
if(!(dresscode in list("strip", "as job...", "emergency response team member", "emergency response team leader")))
|
|
O = choices[dresscode]
|
|
|
|
var/datum/job/jobdatum
|
|
if(dresscode == "as job...")
|
|
var/jobname = input("Select job", "Robust quick dress shop") as null|anything in get_all_jobs()
|
|
jobdatum = job_master.GetJob(jobname)
|
|
|
|
feedback_add_details("admin_verb", "SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
if(dostrip)
|
|
for(var/obj/item/I in M)
|
|
if(istype(I, /obj/item/implant))
|
|
continue
|
|
if(istype(I, /obj/item/organ))
|
|
continue
|
|
qdel(I)
|
|
|
|
|
|
switch(dresscode)
|
|
if("strip")
|
|
//do nothing
|
|
|
|
// god is dead
|
|
if("as job...")
|
|
if(jobdatum)
|
|
dresscode = "[jobdatum.title]"
|
|
jobdatum.equip(M)
|
|
|
|
if("emergency response team member", "emergency response team leader")
|
|
var/datum/response_team/equip_team = null
|
|
switch(alert("Level", "Emergency Response Team", "Amber", "Red", "Gamma"))
|
|
if("Amber")
|
|
equip_team = new /datum/response_team/amber
|
|
if("Red")
|
|
equip_team = new /datum/response_team/red
|
|
if("Gamma")
|
|
equip_team = new /datum/response_team/gamma
|
|
if(!equip_team)
|
|
return
|
|
if(dresscode == "emergency response team leader")
|
|
equip_team.equip_officer("Commander", M)
|
|
else
|
|
var/list/ert_outfits = list("Security", "Engineer", "Medic", "Janitor", "Paranormal")
|
|
var/echoice = input("Loadout Type", "Emergency Response Team") as null|anything in ert_outfits
|
|
if(!echoice)
|
|
return
|
|
switch(echoice)
|
|
if("Commander")
|
|
equip_team.equip_officer("Commander", M)
|
|
if("Security")
|
|
equip_team.equip_officer("Security", M)
|
|
if("Engineer")
|
|
equip_team.equip_officer("Engineer", M)
|
|
if("Medic")
|
|
equip_team.equip_officer("Medic", M)
|
|
if("Janitor")
|
|
equip_team.equip_officer("Janitor", M)
|
|
if("Paranormal")
|
|
equip_team.equip_officer("Paranormal", M)
|
|
else
|
|
to_chat(src, "Invalid ERT Loadout selected")
|
|
|
|
|
|
else // outfit datum
|
|
if(O)
|
|
M.equipOutfit(O, FALSE)
|
|
|
|
M.regenerate_icons()
|
|
|
|
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
|
message_admins("<span class='notice'>[key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode].</span>", 1)
|
|
return
|
|
|
|
|
|
/client/proc/startSinglo()
|
|
set category = "Debug"
|
|
set name = "Start Singularity"
|
|
set desc = "Sets up the singularity and all machines to get power flowing through the station"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
if(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes")
|
|
return
|
|
|
|
for(var/obj/machinery/power/emitter/E in GLOB.machines)
|
|
if(E.anchored)
|
|
E.active = 1
|
|
|
|
for(var/obj/machinery/field/generator/F in GLOB.machines)
|
|
if(F.active == 0)
|
|
F.active = 1
|
|
F.state = 2
|
|
F.power = 250
|
|
F.anchored = 1
|
|
F.warming_up = 3
|
|
F.start_fields()
|
|
F.update_icon()
|
|
|
|
spawn(30)
|
|
for(var/obj/machinery/the_singularitygen/G in GLOB.machines)
|
|
if(G.anchored)
|
|
var/obj/singularity/S = new /obj/singularity(get_turf(G))
|
|
S.energy = 800
|
|
break
|
|
|
|
for(var/obj/machinery/power/rad_collector/Rad in GLOB.machines)
|
|
if(Rad.anchored)
|
|
if(!Rad.P)
|
|
var/obj/item/tank/plasma/Plasma = new/obj/item/tank/plasma(Rad)
|
|
Plasma.air_contents.toxins = 70
|
|
Rad.drainratio = 0
|
|
Rad.P = Plasma
|
|
Plasma.loc = Rad
|
|
|
|
if(!Rad.active)
|
|
Rad.toggle_power()
|
|
|
|
for(var/obj/machinery/power/smes/SMES in GLOB.machines)
|
|
if(SMES.anchored)
|
|
SMES.input_attempt = 1
|
|
|
|
/client/proc/cmd_debug_mob_lists()
|
|
set category = "Debug"
|
|
set name = "Debug Mob Lists"
|
|
set desc = "For when you just gotta know"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs","Silicons","Clients","Respawnable Mobs"))
|
|
if("Players")
|
|
to_chat(usr, jointext(GLOB.player_list,","))
|
|
if("Admins")
|
|
to_chat(usr, jointext(GLOB.admins,","))
|
|
if("Mobs")
|
|
to_chat(usr, jointext(GLOB.mob_list,","))
|
|
if("Living Mobs")
|
|
to_chat(usr, jointext(GLOB.living_mob_list,","))
|
|
if("Dead Mobs")
|
|
to_chat(usr, jointext(GLOB.dead_mob_list,","))
|
|
if("Silicons")
|
|
to_chat(usr, jointext(GLOB.silicon_mob_list,","))
|
|
if("Clients")
|
|
to_chat(usr, jointext(GLOB.clients,","))
|
|
if("Respawnable Mobs")
|
|
to_chat(usr, jointext(GLOB.respawnable_list,","))
|
|
|
|
/client/proc/cmd_display_del_log()
|
|
set category = "Debug"
|
|
set name = "Display del() Log"
|
|
set desc = "Display del's log of everything that's passed through it."
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
var/list/dellog = list("<B>List of things that have gone through qdel this round</B><BR><BR><ol>")
|
|
sortTim(SSgarbage.items, cmp=/proc/cmp_qdel_item_time, associative = TRUE)
|
|
for(var/path in SSgarbage.items)
|
|
var/datum/qdel_item/I = SSgarbage.items[path]
|
|
dellog += "<li><u>[path]</u><ul>"
|
|
if(I.failures)
|
|
dellog += "<li>Failures: [I.failures]</li>"
|
|
dellog += "<li>qdel() Count: [I.qdels]</li>"
|
|
dellog += "<li>Destroy() Cost: [I.destroy_time]ms</li>"
|
|
if(I.hard_deletes)
|
|
dellog += "<li>Total Hard Deletes [I.hard_deletes]</li>"
|
|
dellog += "<li>Time Spent Hard Deleting: [I.hard_delete_time]ms</li>"
|
|
if(I.slept_destroy)
|
|
dellog += "<li>Sleeps: [I.slept_destroy]</li>"
|
|
if(I.no_respect_force)
|
|
dellog += "<li>Ignored force: [I.no_respect_force]</li>"
|
|
if(I.no_hint)
|
|
dellog += "<li>No hint: [I.no_hint]</li>"
|
|
dellog += "</ul></li>"
|
|
|
|
dellog += "</ol>"
|
|
|
|
usr << browse(dellog.Join(), "window=dellog")
|
|
|
|
/client/proc/cmd_display_del_log_simple()
|
|
set category = "Debug"
|
|
set name = "Display Simple del() Log"
|
|
set desc = "Display a compacted del's log."
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
var/dat = "<B>List of things that failed to GC this round</B><BR><BR>"
|
|
for(var/path in SSgarbage.items)
|
|
var/datum/qdel_item/I = SSgarbage.items[path]
|
|
if(I.failures)
|
|
dat += "[I] - [I.failures] times<BR>"
|
|
|
|
dat += "<B>List of paths that did not return a qdel hint in Destroy()</B><BR><BR>"
|
|
for(var/path in SSgarbage.items)
|
|
var/datum/qdel_item/I = SSgarbage.items[path]
|
|
if(I.no_hint)
|
|
dat += "[I]<BR>"
|
|
|
|
dat += "<B>List of paths that slept in Destroy()</B><BR><BR>"
|
|
for(var/path in SSgarbage.items)
|
|
var/datum/qdel_item/I = SSgarbage.items[path]
|
|
if(I.slept_destroy)
|
|
dat += "[I]<BR>"
|
|
|
|
usr << browse(dat, "window=simpledellog")
|
|
|
|
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
|
|
if(!check_rights(R_SPAWN))
|
|
return
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(istype(M, /mob/living/carbon))
|
|
M.dna.SetSEState(block,!M.dna.GetSEState(block))
|
|
genemutcheck(M,block,null,MUTCHK_FORCED)
|
|
M.update_mutations()
|
|
var/state="[M.dna.GetSEState(block)?"on":"off"]"
|
|
var/blockname=assigned_blocks[block]
|
|
message_admins("[key_name_admin(src)] has toggled [M.key]'s [blockname] block [state]!")
|
|
log_admin("[key_name(src)] has toggled [M.key]'s [blockname] block [state]!")
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/client/proc/reload_nanoui_resources()
|
|
set category = "Debug"
|
|
set name = "Reload NanoUI Resources"
|
|
set desc = "Force the client to redownload NanoUI Resources"
|
|
|
|
// Close open NanoUIs.
|
|
SSnanoui.close_user_uis(usr)
|
|
|
|
// Re-load the assets.
|
|
var/datum/asset/assets = get_asset_datum(/datum/asset/nanoui)
|
|
assets.register()
|
|
|
|
// Clear the user's cache so they get resent.
|
|
usr.client.cache = list()
|
|
|
|
/client/proc/view_runtimes()
|
|
set category = "Debug"
|
|
set name = "View Runtimes"
|
|
set desc = "Open the Runtime Viewer"
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
error_cache.showTo(usr)
|
|
|
|
/client/proc/jump_to_ruin()
|
|
set category = "Debug"
|
|
set name = "Jump to Ruin"
|
|
set desc = "Displays a list of all placed ruins to teleport to."
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
var/list/names = list()
|
|
for(var/i in GLOB.ruin_landmarks)
|
|
var/obj/effect/landmark/ruin/ruin_landmark = i
|
|
var/datum/map_template/ruin/template = ruin_landmark.ruin_template
|
|
|
|
var/count = 1
|
|
var/name = template.name
|
|
var/original_name = name
|
|
|
|
while(name in names)
|
|
count++
|
|
name = "[original_name] ([count])"
|
|
|
|
names[name] = ruin_landmark
|
|
|
|
var/ruinname = input("Select ruin", "Jump to Ruin") as null|anything in names
|
|
|
|
var/obj/effect/landmark/ruin/landmark = names[ruinname]
|
|
|
|
if(istype(landmark))
|
|
var/datum/map_template/ruin/template = landmark.ruin_template
|
|
admin_forcemove(usr, get_turf(landmark))
|
|
|
|
to_chat(usr, "<span class='name'>[template.name]</span>")
|
|
to_chat(usr, "<span class='italics'>[template.description]</span>")
|
|
|
|
log_admin("[key_name(usr)] jumped to ruin [ruinname]")
|
|
if(!isobserver(usr))
|
|
message_admins("[key_name_admin(usr)] jumped to ruin [ruinname]", 1)
|
|
|
|
feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
|
|
|
/client/proc/toggle_medal_disable()
|
|
set category = "Debug"
|
|
set name = "Toggle Medal Disable"
|
|
set desc = "Toggles the safety lock on trying to contact the medal hub."
|
|
|
|
if(!check_rights(R_DEBUG))
|
|
return
|
|
|
|
global.medals_enabled = !global.medals_enabled
|
|
|
|
message_admins("<span class='adminnotice'>[key_name_admin(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.</span>")
|
|
feedback_add_details("admin_verb","TMH") // If...
|
|
log_admin("[key_name(src)] [global.medals_enabled ? "disabled" : "enabled"] the medal hub lockout.")
|