mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2025-12-27 02:32:20 +00:00
Revisions to CentCom. CentCom now has its own access levels set, and a unique ID changing computer. Added nasa void suit and captain armor to item steal list. Fixed some run time errors for hand-tele from my previous commit. Removed the remove poo and urine button from secrets. Decoy AIs can now say stuff like regular AIs. This is useful if you need a non-player announcer for something, while taking into account talk_understand and the like. I use it for deathsquad shuttle announcements. I've placed A.L.I.C.E. on CentCom for such reasons. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@1704 316c924e-a436-60f5-8080-3fe189b3f50e
326 lines
10 KiB
Plaintext
326 lines
10 KiB
Plaintext
/client/proc/Debug2()
|
|
set category = "Debug"
|
|
set name = "Debug-Game"
|
|
if(!src.authenticated || !src.holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
if(src.holder.rank == "Game Admin")
|
|
Debug2 = !Debug2
|
|
|
|
world << "Debugging [Debug2 ? "On" : "Off"]"
|
|
log_admin("[key_name(src)] toggled debugging to [Debug2]")
|
|
else if(src.holder.rank == "Game Master")
|
|
Debug2 = !Debug2
|
|
|
|
world << "Debugging [Debug2 ? "On" : "Off"]"
|
|
log_admin("[key_name(src)] toggled debugging to [Debug2]")
|
|
else
|
|
alert("Coders only baby")
|
|
return
|
|
|
|
|
|
|
|
/* 21st Sept 2010
|
|
Updated by Skie -- Still not perfect but better!
|
|
Stuff you can't do:
|
|
Call proc /mob/proc/make_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(!src.authenticated || !src.holder)
|
|
src << "Only administrators may use this command."
|
|
return
|
|
var/target = null
|
|
var/lst[] // List reference
|
|
lst = new/list() // Make the list
|
|
var/returnval = null
|
|
var/class = null
|
|
|
|
switch(alert("Proc owned by something?",,"Yes","No"))
|
|
if("Yes")
|
|
class = input("Proc owned by...","Owner") in list("Obj","Mob","Area or Turf","Client","CANCEL ABORT STOP")
|
|
switch(class)
|
|
if("CANCEL ABORT STOP")
|
|
return
|
|
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/mob/M in world)
|
|
keys += M.client
|
|
target = input("Please, select a player!", "Selection", null, null) as null|anything in keys
|
|
if("No")
|
|
target = null
|
|
|
|
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null)
|
|
|
|
var/argnum = input("Number of arguments","Number:",0) as num
|
|
|
|
lst.len = argnum // Expand to right length
|
|
|
|
var/i
|
|
for(i=1, i<argnum+1, i++) // Lists indexed from 1 forwards in byond
|
|
|
|
// Make a list with each index containing one variable, to be given to the proc
|
|
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
|
|
|
|
if("text")
|
|
lst[i] = input("Enter new text:","Text",null) as text
|
|
|
|
if("num")
|
|
lst[i] = input("Enter new number:","Num",0) as num
|
|
|
|
if("type")
|
|
lst[i] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
|
|
|
|
if("reference")
|
|
lst[i] = input("Select reference:","Reference",src) as mob|obj|turf|area in world
|
|
|
|
if("mob reference")
|
|
lst[i] = input("Select reference:","Reference",usr) as mob in world
|
|
|
|
if("file")
|
|
lst[i] = input("Pick file:","File") as file
|
|
|
|
if("icon")
|
|
lst[i] = input("Pick icon:","Icon") as icon
|
|
|
|
if("client")
|
|
var/list/keys = list()
|
|
for(var/mob/M in world)
|
|
keys += M.client
|
|
lst[i] = 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[i] = temp.loc
|
|
|
|
|
|
spawn(0)
|
|
if(target)
|
|
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
|
|
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
|
|
usr << "\blue Proc returned: [returnval ? returnval : "null"]"
|
|
|
|
/client/proc/Cell()
|
|
set category = "Debug"
|
|
set name = "Air Status in Location"
|
|
if(!src.mob)
|
|
return
|
|
var/turf/T = src.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)
|
|
|
|
/client/proc/cmd_admin_robotize(var/mob/M in world)
|
|
set category = "Fun"
|
|
set name = "Make Robot"
|
|
|
|
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/makepAI(var/turf/T in world)
|
|
set category = "Fun"
|
|
set name = "Make pAI"
|
|
set desc = "Specify a location to spawn a pAI device, then specify a key to play that pAI"
|
|
|
|
var/list/available = list()
|
|
for(var/mob/C in world)
|
|
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 him out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
|
|
if(confirm != "Yes")
|
|
return 0
|
|
var/obj/item/device/paicard/card = new(T)
|
|
var/mob/living/silicon/pai/pai = new(card)
|
|
pai.name = input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text
|
|
pai.real_name = pai.name
|
|
pai.key = choice.key
|
|
card.pai = pai
|
|
for(var/datum/paiCandidate/candidate in paiController.pai_candidates)
|
|
if(candidate.key == choice.key)
|
|
paiController.pai_candidates.Remove(candidate)
|
|
|
|
/client/proc/cmd_admin_alienize(var/mob/M in world)
|
|
set category = "Fun"
|
|
set name = "Make Alien"
|
|
|
|
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()
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/client/proc/cmd_admin_monkeyize(var/mob/M in world)
|
|
set category = "Fun"
|
|
set name = "Make Monkey"
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(istype(M, /mob/living/carbon/human))
|
|
var/mob/living/carbon/human/target = M
|
|
log_admin("[key_name(src)] is attempting to monkeyize [M.key].")
|
|
spawn(10)
|
|
target.monkeyize()
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/client/proc/cmd_admin_changelinginize(var/mob/M in world)
|
|
set category = "Fun"
|
|
set name = "Make Changeling"
|
|
|
|
if(!ticker)
|
|
alert("Wait until the game starts")
|
|
return
|
|
if(istype(M, /mob/living/carbon/human))
|
|
log_admin("[key_name(src)] has made [M.key] a changeling.")
|
|
spawn(10)
|
|
M.absorbed_dna[M.real_name] = M.dna
|
|
M.make_changeling()
|
|
if(M.mind)
|
|
M.mind.special_role = "Changeling"
|
|
else
|
|
alert("Invalid mob")
|
|
|
|
/*
|
|
/client/proc/cmd_admin_abominize(var/mob/M in world)
|
|
set category = null
|
|
set name = "Make Abomination"
|
|
|
|
usr << "Ruby Mode disabled. Command aborted."
|
|
return
|
|
if(!ticker)
|
|
alert("Wait until the game starts.")
|
|
return
|
|
if(istype(M, /mob/living/carbon/human))
|
|
log_admin("[key_name(src)] has made [M.key] an abomination.")
|
|
/*
|
|
spawn(10)
|
|
M.make_abomination()
|
|
*/
|
|
*/
|
|
/client/proc/make_cultist(var/mob/M in world) // -- TLE, modified by Urist
|
|
set category = "Fun"
|
|
set name = "Make Cultist"
|
|
set desc = "Makes target a cultist"
|
|
if(!wordtravel)
|
|
runerandom()
|
|
if(M)
|
|
if(M.mind in ticker.mode.cult)
|
|
return
|
|
else
|
|
if(alert("Spawn that person a tome?",,"Yes","No")=="Yes")
|
|
M << "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie. A tome, a message from your new master, appears on the ground."
|
|
new /obj/item/weapon/tome(M.loc)
|
|
else
|
|
M << "\red You catch a glimpse of the Realm of Nar-Sie, The Geometer of Blood. You now see how flimsy the world is, you see that it should be open to the knowledge of Nar-Sie."
|
|
var/glimpse=pick("1","2","3","4","5","6","7","8")
|
|
switch(glimpse)
|
|
if("1")
|
|
M << "\red You remembered one thing from the glimpse... [wordtravel] is travel..."
|
|
if("2")
|
|
M << "\red You remembered one thing from the glimpse... [wordblood] is blood..."
|
|
if("3")
|
|
M << "\red You remembered one thing from the glimpse... [wordjoin] is join..."
|
|
if("4")
|
|
M << "\red You remembered one thing from the glimpse... [wordhell] is Hell..."
|
|
if("5")
|
|
M << "\red You remembered one thing from the glimpse... [worddestr] is destroy..."
|
|
if("6")
|
|
M << "\red You remembered one thing from the glimpse... [wordtech] is technology..."
|
|
if("7")
|
|
M << "\red You remembered one thing from the glimpse... [wordself] is self..."
|
|
if("8")
|
|
M << "\red You remembered one thing from the glimpse... [wordsee] is see..."
|
|
|
|
if(M.mind)
|
|
M.mind.special_role = "Cultist"
|
|
ticker.mode.cult += M.mind
|
|
src << "Made [M] a cultist."
|
|
|
|
/client/proc/cmd_debug_del_all()
|
|
set category = "Debug"
|
|
set name = "Del-All"
|
|
|
|
// to prevent REALLY stupid deletions
|
|
var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human)
|
|
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
|
|
if(hsbitem)
|
|
for(var/atom/O in world)
|
|
if(istype(O, hsbitem))
|
|
del(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)
|
|
|
|
/client/proc/cmd_debug_tog_aliens()
|
|
set category = "Server"
|
|
set name = "Toggle Aliens"
|
|
|
|
aliens_allowed = !aliens_allowed
|
|
log_admin("[key_name(src)] has turned aliens [aliens_allowed ? "on" : "off"].")
|
|
message_admins("[key_name_admin(src)] has turned aliens [aliens_allowed ? "on" : "off"].", 0)
|
|
|
|
/client/proc/cmd_admin_grantfullaccess(var/mob/M in world)
|
|
set category = "Admin"
|
|
set name = "Grant Full Access"
|
|
|
|
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/weapon/card/id/id = H.wear_id
|
|
if(istype(H.wear_id, /obj/item/device/pda))
|
|
var/obj/item/device/pda/pda = H.wear_id
|
|
id = pda.id
|
|
log_admin("[key_name(src)] has granted [M.key] full access.")
|
|
id.icon_state = "gold"
|
|
id:access = get_all_accesses()+get_all_centcom_access()
|
|
else
|
|
alert("Invalid ID card")
|
|
else
|
|
alert("Invalid mob")
|