/client/proc/Debug2() set category = "Debug" set name = "Debug-Game" if(!holder) src << "Only administrators may use this command." return if(holder.rank == "Game Admin") Debug2 = !Debug2 world << "Debugging [Debug2 ? "On" : "Off"]" log_admin("[key_name(src)] toggled debugging to [Debug2]") else if(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 // 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/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 (TG Version)" if(!holder) src << "Only administrators may use this command." return spawn(0) var/target = null var/targetselected = 0 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") targetselected = 1 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 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 var/argnum = input("Number of arguments","Number:",0) as num|null if(!argnum && (argnum!=0)) return lst.len = argnum // Expand to right length //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 var/i for(i=1, iError: callproc(): owner of proc no longer exists." return if(!hascall(target,procname)) usr << "Error: callproc(): target has no such call [procname]." return 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. 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 << "[procname] returned: [returnval ? returnval : "null"]" //feedback_add_details("admin_verb","APC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/callprocgen() set category = "Debug" set name = "ProcCall (BS12 Version)" if(!src.holder) src << "Only administrators may use this command." return var/class = null var/returnval = null var/procname = input("Procpath (in full)","path", null) var/argNum = input("Number of arguments:","Number",null) as num //input("Arguments","Arguments:", null) var/list/argL = new/list() var/i for(i=0; i0, i--) sec_briefcase.contents += new /obj/item/weapon/spacecash/c1000 sec_briefcase.contents += new /obj/item/weapon/gun/energy/crossbow sec_briefcase.contents += new /obj/item/weapon/gun/projectile/mateba sec_briefcase.contents += new /obj/item/ammo_magazine/a357 sec_briefcase.contents += new /obj/item/weapon/plastique M.equip_if_possible(sec_briefcase, M.slot_l_hand) var/obj/item/device/pda/heads/pda = new(M) pda.owner = M.real_name pda.ownjob = "Reaper" pda.name = "PDA-[M.real_name] ([pda.ownjob])" M.equip_if_possible(pda, M.slot_belt) var/obj/item/weapon/card/id/syndicate/W = new(M) W.name = "[M.real_name]'s ID Card" W.access = get_all_accesses() W.assignment = "Reaper" W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) if("death commando")//Was looking to add this for a while. M.equip_death_commando() if("syndicate commando") M.equip_syndicate_commando() if("response team") M.equip_strike_team() if("centcom official") M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_officer(M), M.slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/shoes/black(M), M.slot_shoes) M.equip_if_possible(new /obj/item/clothing/gloves/white(M), M.slot_gloves) M.equip_if_possible(new /obj/item/device/radio/headset/heads/hop(M), M.slot_ears) var/obj/item/clothing/suit/storage/armoredundersuit/K = new(M) var/obj/item/clothing/glasses/sunglasses/V = new(M) V.loc = K M.equip_if_possible(K, M.slot_wear_suit) M.equip_if_possible(new /obj/item/weapon/gun/energy/gun(M), M.slot_s_store) var/obj/item/device/pda/heads/pda = new(M) pda.owner = M.real_name pda.ownjob = "CentCom Review Official" pda.name = "PDA-[M.real_name] ([pda.ownjob])" M.equip_if_possible(pda, M.slot_r_store) M.equip_if_possible(new /obj/item/weapon/clipboard(M), M.slot_l_store) var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card" W.icon_state = "centcom" W.item_state = "id_inv" W.access = get_all_accesses() W.access += list("VIP Guest","Custodian","Thunderdome Overseer","Intel Officer","Medical Officer","Death Commando","Research Officer") W.assignment = "CentCom Review Official" W.registered_name = M.real_name W.over_jumpsuit = 0 M.equip_if_possible(W, M.slot_wear_id) if("centcom commander") M.equip_if_possible(new /obj/item/clothing/under/rank/centcom_commander(M), M.slot_w_uniform) var/obj/item/clothing/suit/storage/armoredundersuit/K = new(M) var/obj/item/clothing/glasses/eyepatch/G = new(M) G.loc = K M.equip_if_possible(K, M.slot_wear_suit) M.equip_if_possible(new /obj/item/clothing/shoes/swat(M), M.slot_shoes) M.equip_if_possible(new /obj/item/clothing/gloves/white(M), M.slot_gloves) M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/mask/cigarette/cigar/cohiba(M), M.slot_wear_mask) M.equip_if_possible(new /obj/item/clothing/head/centhat(M), M.slot_head) M.equip_if_possible(new /obj/item/weapon/gun/projectile/mateba(M), M.slot_s_store) M.equip_if_possible(new /obj/item/weapon/lighter/zippo(M), M.slot_r_store) M.equip_if_possible(new /obj/item/ammo_magazine/a357(M), M.slot_l_store) var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card" W.icon_state = "centcom" W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "CentCom Commanding Officer" W.registered_name = M.real_name W.over_jumpsuit = 0 M.equip_if_possible(W, M.slot_wear_id) if("special ops officer") M.equip_if_possible(new /obj/item/clothing/under/syndicate/combat(M), M.slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/suit/storage/officer(M), M.slot_wear_suit) M.equip_if_possible(new /obj/item/clothing/shoes/combat(M), M.slot_shoes) M.equip_if_possible(new /obj/item/clothing/gloves/combat(M), M.slot_gloves) M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/glasses/thermal/eyepatch(M), M.slot_glasses) M.equip_if_possible(new /obj/item/clothing/mask/cigarette/cigar/havana(M), M.slot_wear_mask) M.equip_if_possible(new /obj/item/clothing/head/deathsquad/beret(M), M.slot_head) M.equip_if_possible(new /obj/item/weapon/gun/energy/pulse_rifle/M1911(M), M.slot_belt) M.equip_if_possible(new /obj/item/weapon/lighter/zippo(M), M.slot_r_store) M.equip_if_possible(new /obj/item/weapon/storage/backpack/satchel(M), M.slot_back) var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card" W.icon_state = "centcom" W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Special Operations Officer" W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) if("blue wizard") M.equip_if_possible(new /obj/item/clothing/under/lightpurple(M), M.slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/suit/wizrobe(M), M.slot_wear_suit) M.equip_if_possible(new /obj/item/clothing/shoes/sandal(M), M.slot_shoes) M.equip_if_possible(new /obj/item/device/radio/headset(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/head/wizard(M), M.slot_head) M.equip_if_possible(new /obj/item/weapon/teleportation_scroll(M), M.slot_r_store) M.equip_if_possible(new /obj/item/weapon/spellbook(M), M.slot_r_hand) M.equip_if_possible(new /obj/item/weapon/staff(M), M.slot_l_hand) M.equip_if_possible(new /obj/item/weapon/storage/backpack(M), M.slot_back) M.equip_if_possible(new /obj/item/weapon/storage/box(M), M.slot_in_backpack) if("red wizard") M.equip_if_possible(new /obj/item/clothing/under/lightpurple(M), M.slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/suit/wizrobe/red(M), M.slot_wear_suit) M.equip_if_possible(new /obj/item/clothing/shoes/sandal(M), M.slot_shoes) M.equip_if_possible(new /obj/item/device/radio/headset(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/head/wizard/red(M), M.slot_head) M.equip_if_possible(new /obj/item/weapon/teleportation_scroll(M), M.slot_r_store) M.equip_if_possible(new /obj/item/weapon/spellbook(M), M.slot_r_hand) M.equip_if_possible(new /obj/item/weapon/staff(M), M.slot_l_hand) M.equip_if_possible(new /obj/item/weapon/storage/backpack(M), M.slot_back) M.equip_if_possible(new /obj/item/weapon/storage/box(M), M.slot_in_backpack) if("marisa wizard") M.equip_if_possible(new /obj/item/clothing/under/lightpurple(M), M.slot_w_uniform) M.equip_if_possible(new /obj/item/clothing/suit/wizrobe/marisa(M), M.slot_wear_suit) M.equip_if_possible(new /obj/item/clothing/shoes/sandal/marisa(M), M.slot_shoes) M.equip_if_possible(new /obj/item/device/radio/headset(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/head/wizard/marisa(M), M.slot_head) M.equip_if_possible(new /obj/item/weapon/teleportation_scroll(M), M.slot_r_store) M.equip_if_possible(new /obj/item/weapon/spellbook(M), M.slot_r_hand) M.equip_if_possible(new /obj/item/weapon/staff(M), M.slot_l_hand) M.equip_if_possible(new /obj/item/weapon/storage/backpack(M), M.slot_back) M.equip_if_possible(new /obj/item/weapon/storage/box(M), M.slot_in_backpack) if("soviet admiral") M.equip_if_possible(new /obj/item/clothing/head/hgpiratecap(M), M.slot_head) M.equip_if_possible(new /obj/item/clothing/shoes/combat(M), M.slot_shoes) M.equip_if_possible(new /obj/item/clothing/gloves/combat(M), M.slot_gloves) M.equip_if_possible(new /obj/item/device/radio/headset/heads/captain(M), M.slot_ears) M.equip_if_possible(new /obj/item/clothing/glasses/thermal/eyepatch(M), M.slot_glasses) M.equip_if_possible(new /obj/item/clothing/suit/hgpirate(M), M.slot_wear_suit) M.equip_if_possible(new /obj/item/weapon/storage/backpack/bandolier(M), M.slot_back) M.equip_if_possible(new /obj/item/weapon/gun/projectile/mateba(M), M.slot_belt) M.equip_if_possible(new /obj/item/clothing/under/soviet(M), M.slot_w_uniform) var/obj/item/weapon/card/id/W = new(M) W.name = "[M.real_name]'s ID Card" W.icon_state = "centcom" W.access = get_all_accesses() W.access += get_all_centcom_access() W.assignment = "Admiral" W.registered_name = M.real_name M.equip_if_possible(W, M.slot_wear_id) M.update_clothing() log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].") message_admins("\blue [key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode].", 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(alert("Are you sure? This will start up the engine. Should only be used during debug!",,"Yes","No") != "Yes") return for(var/obj/machinery/emitter/E in world) if(E.anchored) E.active = 1 for(var/obj/machinery/field_generator/F in world) if(F.anchored) F.Varedit_start = 1 spawn(30) for(var/obj/machinery/the_singularitygen/G in world) if(G.anchored) var/obj/machinery/singularity/S = new /obj/machinery/singularity(get_turf(G), 50) spawn(0) del(G) S.energy = 1750 S.current_size = 7 S.icon = '224x224.dmi' S.icon_state = "singularity_s7" S.pixel_x = -96 S.pixel_y = -96 S.grav_pull = 0 //S.consume_range = 3 S.dissipate = 0 //S.dissipate_delay = 10 //S.dissipate_track = 0 //S.dissipate_strength = 10 for(var/obj/machinery/power/rad_collector/Rad in world) if(Rad.anchored) if(!Rad.P) var/obj/item/weapon/tank/plasma/Plasma = new/obj/item/weapon/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 world) if(SMES.anchored) SMES.chargemode = 1