Revert "12/21 modernizations from TG live"
This commit is contained in:
@@ -134,7 +134,7 @@
|
||||
vals += v
|
||||
vals[v] = SDQL_expression(d, set_list[v])
|
||||
|
||||
if(isturf(d))
|
||||
if(istype(d, /turf))
|
||||
for(var/v in vals)
|
||||
if(v == "x" || v == "y" || v == "z")
|
||||
continue
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/proc/keywords_lookup(msg,irc)
|
||||
/proc/keywords_lookup(msg)
|
||||
|
||||
//This is a list of words which are ignored by the parser when comparing message contents for names. MUST BE IN LOWER CASE!
|
||||
var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","alien","as", "i")
|
||||
@@ -10,7 +10,6 @@
|
||||
var/list/surnames = list()
|
||||
var/list/forenames = list()
|
||||
var/list/ckeys = list()
|
||||
var/founds = ""
|
||||
for(var/mob/M in mob_list)
|
||||
var/list/indexing = list(M.real_name, M.name)
|
||||
if(M.mind)
|
||||
@@ -57,16 +56,9 @@
|
||||
var/is_antag = 0
|
||||
if(found.mind && found.mind.special_role)
|
||||
is_antag = 1
|
||||
founds += "Name: [found.name]([found.real_name]) Ckey: [found.ckey] [is_antag ? "(Antag)" : null] "
|
||||
msg += "[original_word]<font size='1' color='[is_antag ? "red" : "black"]'>(<A HREF='?_src_=holder;adminmoreinfo=\ref[found]'>?</A>|<A HREF='?_src_=holder;adminplayerobservefollow=\ref[found]'>F</A>)</font> "
|
||||
continue
|
||||
msg += "[original_word] "
|
||||
if(irc)
|
||||
if(founds == "")
|
||||
return "Search Failed"
|
||||
else
|
||||
return founds
|
||||
|
||||
return msg
|
||||
|
||||
|
||||
@@ -91,38 +83,62 @@
|
||||
if(src.handle_spam_prevention(msg,MUTE_ADMINHELP))
|
||||
return
|
||||
|
||||
var/ref_mob = "\ref[mob]"
|
||||
for(var/datum/adminticket/T in admintickets)
|
||||
if(T.permckey == src.ckey && T.resolved == "No")
|
||||
if(alert(usr,"You already have an adminhelp open, would you like to bump it?", "Bump Adminhelp", "Yes", "No") == "Yes")
|
||||
T.logs += "[src.ckey] has bumped this adminhelp!"
|
||||
if(T.admin == "N/A")
|
||||
usr << "<b>Due to the fact your Adminhelp had no assigned admin, admins have been pinged.</b>"
|
||||
message_admins("[src.ckey] has bumped their adminhelp #[T.ID], still no assigned admin!")
|
||||
msg = "<span class='adminnotice'><b><font color=red>ADMINHELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;traitor=[ref_mob]'>TP</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=[ref_mob]'>FLW</A>) (<a href='?src=\ref[T];resolve=\ref[T]'>R</a>):</b> [T.msg]</span>"
|
||||
for(var/client/X in admins)
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
X << msg
|
||||
else
|
||||
usr << "<b>Admins have been notified.</b>"
|
||||
message_admins("[src.ckey] has bumped their adminhelp #[T.ID].")
|
||||
src.verbs -= /client/verb/adminhelp
|
||||
adminhelptimerid = addtimer(src,"giveadminhelpverb",1200, FALSE)
|
||||
return
|
||||
usr << "<b>Thank you for your patience.</b>"
|
||||
return
|
||||
|
||||
src.verbs -= /client/verb/adminhelp
|
||||
adminhelptimerid = addtimer(src,"giveadminhelpverb",1200, FALSE)
|
||||
|
||||
//clean the input msg
|
||||
if(!msg)
|
||||
return
|
||||
if(!msg) return
|
||||
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
|
||||
if(!msg) return
|
||||
var/original_msg = msg
|
||||
|
||||
//remove our adminhelp verb temporarily to prevent spamming of admins.
|
||||
src.verbs -= /client/verb/adminhelp
|
||||
adminhelptimerid = addtimer(src, "giveadminhelpverb", 1200, TIMER_NORMAL) //2 minute cooldown of admin helps
|
||||
|
||||
msg = keywords_lookup(msg)
|
||||
|
||||
if(!mob)
|
||||
return //this doesn't happen
|
||||
if(!mob) return //this doesn't happen
|
||||
|
||||
var/ref_mob = "\ref[mob]"
|
||||
var/ref_client = "\ref[src]"
|
||||
msg = "<span class='adminnotice'><b><font color=red>HELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=[ref_mob]'>FLW</A>) (<A HREF='?_src_=holder;traitor=[ref_mob]'>TP</A>) (<A HREF='?_src_=holder;rejectadminhelp=[ref_client]'>REJT</A>):</b> [msg]</span>"
|
||||
createticket(src, msg, src.ckey, mob)
|
||||
var/datum/adminticket/ticket
|
||||
|
||||
for(var/datum/adminticket/T in admintickets)
|
||||
if(T.permckey == src.ckey)
|
||||
ticket = T
|
||||
|
||||
msg = "<span class='adminnotice'><b><font color=red>ADMINHELP: </font><A HREF='?priv_msg=[ckey];ahelp_reply=1'>[key_name(src)]</A> (<A HREF='?_src_=holder;adminmoreinfo=[ref_mob]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=[ref_mob]'>PP</A>) (<A HREF='?_src_=vars;Vars=[ref_mob]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=[ref_mob]'>SM</A>) (<A HREF='?_src_=holder;traitor=[ref_mob]'>TP</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=[ref_mob]'>FLW</A>) (<a href='?src=\ref[ticket];resolve=\ref[ticket]'>R</a>):</b> [msg]</span>"
|
||||
|
||||
//send this msg to all admins
|
||||
|
||||
for(var/client/X in admins)
|
||||
if(X.prefs.toggles & SOUND_ADMINHELP)
|
||||
X << 'sound/effects/adminhelp.ogg'
|
||||
window_flash(X)
|
||||
X << msg
|
||||
|
||||
|
||||
//show it to the person adminhelping too
|
||||
src << "<span class='adminnotice'>PM to-<b>Admins</b>: [original_msg]</span>"
|
||||
|
||||
|
||||
//send it to irc if nobody is on and tell us how many were on
|
||||
var/admin_number_present = send2irc_adminless_only(ckey,original_msg)
|
||||
log_admin("HELP: [key_name(src)]: [original_msg] - heard by [admin_number_present] non-AFK admins who have +BAN.")
|
||||
@@ -169,19 +185,4 @@
|
||||
message["key"] = global.comms_key
|
||||
message["crossmessage"] = type
|
||||
|
||||
world.Export("[global.cross_address]?[list2params(message)]")
|
||||
|
||||
|
||||
/proc/ircadminwho()
|
||||
var/msg = "Admins: "
|
||||
for(var/client/C in admins)
|
||||
msg += "[C] "
|
||||
|
||||
if(C.holder.fakekey)
|
||||
msg += "(Stealth)"
|
||||
|
||||
if(C.is_afk())
|
||||
msg += "(AFK)"
|
||||
msg += ", "
|
||||
|
||||
return msg
|
||||
world.Export("[global.cross_address]?[list2params(message)]")
|
||||
@@ -20,9 +20,9 @@
|
||||
var/list/client/targets[0]
|
||||
for(var/client/T)
|
||||
if(T.mob)
|
||||
if(isnewplayer(T.mob))
|
||||
if(istype(T.mob, /mob/new_player))
|
||||
targets["(New Player) - [T]"] = T
|
||||
else if(isobserver(T.mob))
|
||||
else if(istype(T.mob, /mob/dead/observer))
|
||||
targets["[T.mob.name](Ghost) - [T]"] = T
|
||||
else
|
||||
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
T.break_tile()
|
||||
|
||||
target << "<span class='userdanger'>You're hit by bluespace artillery!</span>"
|
||||
log_admin("[key_name(target)] has been hit by Bluespace Artillery fired by [key_name(usr)]")
|
||||
message_admins("[ADMIN_LOOKUPFLW(target)] has been hit by Bluespace Artillery fired by [ADMIN_LOOKUPFLW(usr)]")
|
||||
log_admin("[target.name] has been hit by Bluespace Artillery fired by [usr]")
|
||||
message_admins("[target.name] has been hit by Bluespace Artillery fired by [usr]")
|
||||
|
||||
if(target.health <= 1)
|
||||
target.gib(1, 1)
|
||||
|
||||
@@ -242,34 +242,34 @@
|
||||
. = 1
|
||||
switch(mode)
|
||||
if(BASIC_BUILDMODE)
|
||||
if(isturf(object) && left_click && !alt_click && !ctrl_click)
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
|
||||
var/turf/T = object
|
||||
if(isspaceturf(object))
|
||||
if(istype(object,/turf/open/space))
|
||||
T.ChangeTurf(/turf/open/floor/plasteel)
|
||||
else if(isfloorturf(object))
|
||||
else if(istype(object,/turf/open/floor))
|
||||
T.ChangeTurf(/turf/closed/wall)
|
||||
else if(iswallturf(object))
|
||||
else if(istype(object,/turf/closed/wall))
|
||||
T.ChangeTurf(/turf/closed/wall/r_wall)
|
||||
log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])")
|
||||
return
|
||||
else if(right_click)
|
||||
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])")
|
||||
if(iswallturf(object))
|
||||
if(istype(object,/turf/closed/wall))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/open/floor/plasteel)
|
||||
else if(isfloorturf(object))
|
||||
else if(istype(object,/turf/open/floor))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/open/space)
|
||||
else if(istype(object,/turf/closed/wall/r_wall))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/closed/wall)
|
||||
else if(isobj(object))
|
||||
else if(istype(object,/obj))
|
||||
qdel(object)
|
||||
return
|
||||
else if(isturf(object) && alt_click && left_click)
|
||||
else if(istype(object,/turf) && alt_click && left_click)
|
||||
log_admin("Build Mode: [key_name(user)] built an airlock at ([object.x],[object.y],[object.z])")
|
||||
new/obj/machinery/door/airlock(get_turf(object))
|
||||
else if(isturf(object) && ctrl_click && left_click)
|
||||
else if(istype(object,/turf) && ctrl_click && left_click)
|
||||
switch(build_dir)
|
||||
if(NORTH)
|
||||
var/obj/structure/window/reinforced/WIN = new/obj/structure/window/reinforced(get_turf(object))
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
var/rendered = "<span class='game deadsay'><span class='prefix'>DEAD:</span> <span class='name'>ADMIN([src.holder.fakekey ? pick(nicknames) : src.key])</span> says, <span class='message'>\"[msg]\"</span></span>"
|
||||
|
||||
for (var/mob/M in player_list)
|
||||
if(isnewplayer(M))
|
||||
if (istype(M, /mob/new_player))
|
||||
continue
|
||||
if (M.stat == DEAD || (M.client && M.client.holder && (M.client.prefs.chat_toggles & CHAT_DEAD))) //admins can toggle deadchat on and off. This is a proc in admin.dm and is only give to Administrators and above
|
||||
M.show_message(rendered, 2)
|
||||
|
||||
@@ -33,17 +33,36 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
if(!check_rights(R_DEBUG)) return
|
||||
|
||||
var/datum/target = null
|
||||
var/target = null
|
||||
var/targetselected = 0
|
||||
var/returnval = null
|
||||
var/class = null
|
||||
|
||||
switch(alert("Proc owned by something?",,"Yes","No"))
|
||||
if("Yes")
|
||||
targetselected = 1
|
||||
var/list/value = vv_get_value(default_class = VV_ATOM_REFERENCE, classes = list(VV_ATOM_REFERENCE, VV_DATUM_REFERENCE, VV_MOB_REFERENCE, VV_CLIENT))
|
||||
if (!value["class"] || !value["value"])
|
||||
return
|
||||
target = value["value"]
|
||||
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
|
||||
@@ -51,9 +70,8 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/procname = input("Proc path, eg: /proc/fake_blood","Path:", null) as text|null
|
||||
if(!procname)
|
||||
return
|
||||
|
||||
if(targetselected && !hascall(target,procname))
|
||||
usr << "<font color='red'>Error: callproc(): type [target.type] has no proc named [procname].</font>"
|
||||
usr << "<font color='red'>Error: callproc(): target has no such call [procname].</font>"
|
||||
return
|
||||
else
|
||||
var/procpath = text2path(procname)
|
||||
@@ -81,7 +99,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
usr << .
|
||||
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(datum/A as null|area|mob|obj|turf)
|
||||
/client/proc/callproc_datum(A as null|area|mob|obj|turf)
|
||||
set category = "Debug"
|
||||
set name = "Atom ProcCall"
|
||||
set waitfor = 0
|
||||
@@ -93,7 +111,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!procname)
|
||||
return
|
||||
if(!hascall(A,procname))
|
||||
usr << "<font color='red'>Error: callproc_datum(): type [A.type] has no proc named [procname].</font>"
|
||||
usr << "<span class='warning'>Error: callproc_datum(): target has no such call [procname].</span>"
|
||||
return
|
||||
var/list/lst = get_callproc_args()
|
||||
if(!lst)
|
||||
@@ -115,17 +133,59 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
|
||||
/client/proc/get_callproc_args()
|
||||
var/argnum = input("Number of arguments","Number:",0) as num|null
|
||||
if(isnull(argnum))
|
||||
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/value = vv_get_value(restricted_classes = list(VV_RESTORE_DEFAULT))
|
||||
if (!value["class"])
|
||||
return
|
||||
lst += value["value"]
|
||||
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
|
||||
|
||||
|
||||
@@ -150,7 +210,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
. += "</font>"
|
||||
|
||||
else
|
||||
. = "<font color='blue'>[procname] returned: [!isnull(returnval) ? returnval : "null"]</font>"
|
||||
. = "<font color='blue'>[procname] returned: [returnval ? returnval : "null"]</font>"
|
||||
|
||||
|
||||
/client/proc/Cell()
|
||||
@@ -160,7 +220,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
return
|
||||
var/turf/T = mob.loc
|
||||
|
||||
if(!isturf(T))
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/env = T.return_air()
|
||||
@@ -181,7 +241,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
log_admin("[key_name(src)] has robotized [M.key].")
|
||||
var/mob/living/carbon/human/H = M
|
||||
spawn(0)
|
||||
@@ -197,11 +257,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
if(istype(M, /mob/living/carbon/human))
|
||||
log_admin("[key_name(src)] has blobized [M.key].")
|
||||
var/mob/living/carbon/human/H = M
|
||||
spawn(0)
|
||||
var/mob/camera/blob/B = H.become_overmind(FALSE)
|
||||
var/mob/camera/blob/B = H.become_overmind()
|
||||
B.place_blob_core(B.base_point_rate, -1) //place them wherever they are
|
||||
|
||||
else
|
||||
@@ -220,7 +280,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
alert("That mob doesn't seem to exist, close the panel and try again.")
|
||||
return
|
||||
|
||||
if(isnewplayer(M))
|
||||
if(istype(M, /mob/new_player))
|
||||
alert("The mob must not be a new_player.")
|
||||
return
|
||||
|
||||
@@ -241,7 +301,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
if(!choice)
|
||||
return 0
|
||||
if(!isobserver(choice))
|
||||
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
|
||||
@@ -298,51 +358,26 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
/obj/item/weapon/reagent_containers/food/drinks = "DRINK", //longest paths comes first
|
||||
/obj/item/weapon/reagent_containers/food = "FOOD",
|
||||
/obj/item/weapon/reagent_containers = "REAGENT_CONTAINERS",
|
||||
/obj/item/weapon = "WEAPON",
|
||||
/obj/machinery/atmospherics = "ATMOS_MECH",
|
||||
/obj/machinery/atmospherics = "ATMOS",
|
||||
/obj/machinery/portable_atmospherics = "PORT_ATMOS",
|
||||
/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/launcher/missile_rack = "MECHA_MISSILE_RACK",
|
||||
/obj/item/mecha_parts/mecha_equipment = "MECHA_EQUIP",
|
||||
/obj/item/organ = "ORGAN",
|
||||
/obj/item = "ITEM",
|
||||
/obj/machinery = "MACHINERY",
|
||||
/obj/effect = "EFFECT",
|
||||
/obj = "O",
|
||||
/datum = "D",
|
||||
/turf/open = "OPEN",
|
||||
/turf/closed = "CLOSED",
|
||||
/turf = "T",
|
||||
/mob/living/carbon = "CARBON",
|
||||
/mob/living/simple_animal = "SIMPLE",
|
||||
/mob/living = "LIVING",
|
||||
/mob = "M"
|
||||
)
|
||||
|
||||
/proc/make_types_fancy(var/list/types)
|
||||
if (ispath(types))
|
||||
types = list(types)
|
||||
. = list()
|
||||
for(var/type in types)
|
||||
var/typename = "[type]"
|
||||
for (var/tn in TYPES_SHORTCUTS)
|
||||
if (copytext(typename,1, length("[tn]/")+1)=="[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
|
||||
typename = TYPES_SHORTCUTS[tn]+copytext(typename,length("[tn]/"))
|
||||
break
|
||||
.[typename] = type
|
||||
|
||||
/proc/get_fancy_list_of_atom_types()
|
||||
var/static/list/pre_generated_list
|
||||
if (!pre_generated_list) //init
|
||||
pre_generated_list = make_types_fancy(typesof(/atom))
|
||||
return pre_generated_list
|
||||
|
||||
|
||||
/proc/get_fancy_list_of_datum_types()
|
||||
var/static/list/pre_generated_list
|
||||
if (!pre_generated_list) //init
|
||||
pre_generated_list = make_types_fancy(sortList(typesof(/datum) - typesof(/atom)))
|
||||
return pre_generated_list
|
||||
|
||||
var/global/list/g_fancy_list_of_types = null
|
||||
/proc/get_fancy_list_of_types()
|
||||
if (isnull(g_fancy_list_of_types)) //init
|
||||
var/list/temp = sortList(subtypesof(/atom) - typesof(/area) - /atom/movable)
|
||||
g_fancy_list_of_types = new(temp.len)
|
||||
for(var/type in temp)
|
||||
var/typename = "[type]"
|
||||
for (var/tn in TYPES_SHORTCUTS)
|
||||
if (copytext(typename,1, length("[tn]/")+1)=="[tn]/" /*findtextEx(typename,"[tn]/",1,2)*/ )
|
||||
typename = TYPES_SHORTCUTS[tn]+copytext(typename,length("[tn]/"))
|
||||
break
|
||||
g_fancy_list_of_types[typename] = type
|
||||
return g_fancy_list_of_types
|
||||
|
||||
/proc/filter_fancy_list(list/L, filter as text)
|
||||
var/list/matches = new
|
||||
@@ -357,7 +392,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
set category = "Debug"
|
||||
set name = "Del-All"
|
||||
|
||||
var/list/matches = get_fancy_list_of_atom_types()
|
||||
var/list/matches = get_fancy_list_of_types()
|
||||
if (!isnull(object) && object!="")
|
||||
matches = filter_fancy_list(matches, object)
|
||||
|
||||
@@ -392,7 +427,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("Wait until the game starts")
|
||||
return
|
||||
if(ishuman(M))
|
||||
if (istype(M, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/obj/item/worn = H.wear_id
|
||||
var/obj/item/weapon/card/id/id = null
|
||||
@@ -538,6 +573,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
if(!ishuman(M))
|
||||
alert("Invalid mob")
|
||||
return
|
||||
//log_admin("[key_name(src)] has alienized [M.key].")
|
||||
|
||||
|
||||
var/list/outfits = list("Naked","Custom","As Job...")
|
||||
@@ -570,7 +606,9 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
return
|
||||
|
||||
feedback_add_details("admin_verb","SEQ") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
for (var/obj/item/I in M.get_equipped_items())
|
||||
for (var/obj/item/I in M)
|
||||
if (istype(I, /obj/item/weapon/implant))
|
||||
continue
|
||||
qdel(I)
|
||||
switch(dresscode)
|
||||
if ("Naked")
|
||||
@@ -592,6 +630,7 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
|
||||
log_admin("[key_name(usr)] changed the equipment of [key_name(M)] to [dresscode].")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode]..</span>")
|
||||
return
|
||||
|
||||
/client/proc/startSinglo()
|
||||
|
||||
@@ -727,30 +766,4 @@ var/list/TYPES_SHORTCUTS = list(
|
||||
var/datum/map_template/ruin/template = landmark.ruin_template
|
||||
usr.forceMove(get_turf(landmark))
|
||||
usr << "<span class='name'>[template.name]</span>"
|
||||
usr << "<span class='italics'>[template.description]</span>"
|
||||
|
||||
/client/proc/clear_dynamic_transit()
|
||||
set category = "Debug"
|
||||
set name = "Clear Dynamic Transit"
|
||||
set desc = "Deallocates all transit space, restoring it to round start \
|
||||
conditions."
|
||||
if(!holder)
|
||||
return
|
||||
SSshuttle.clear_transit = TRUE
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(src)] cleared dynamic transit space.</span>")
|
||||
feedback_add_details("admin_verb","CDT") // If...
|
||||
log_admin("[key_name(src)] cleared dynamic transit space.")
|
||||
|
||||
|
||||
/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(!holder)
|
||||
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.")
|
||||
usr << "<span class='italics'>[template.description]</span>"
|
||||
@@ -8,7 +8,7 @@
|
||||
var/datum/gas_mixture/GM = target.return_air()
|
||||
var/list/GM_gases
|
||||
var/burning = 0
|
||||
if(isopenturf(target))
|
||||
if(istype(target, /turf/open))
|
||||
var/turf/open/T = target
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
//replaces the old Ticklag verb, fps is easier to understand
|
||||
/client/proc/set_server_fps()
|
||||
/client/proc/set_fps()
|
||||
set category = "Debug"
|
||||
set name = "Set server fps"
|
||||
set name = "Set fps"
|
||||
set desc = "Sets game speed in frames-per-second. Can potentially break the game"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
var/new_fps = round(input("Sets game frames-per-second. Can potentially break the game (default: [config.fps])","FPS", world.fps) as num|null)
|
||||
var/fps = round(input("Sets game frames-per-second. Can potentially break the game","FPS", config.fps) as num|null)
|
||||
|
||||
if(new_fps <= 0)
|
||||
src << "<span class='danger'>Error: set_server_fps(): Invalid world.fps value. No changes made.</span>"
|
||||
if(fps <= 0)
|
||||
src << "<span class='danger'>Error: ticklag(): Invalid world.ticklag value. No changes made.</span>"
|
||||
return
|
||||
if(new_fps > config.fps*1.5)
|
||||
if(alert(src, "You are setting fps to a high value:\n\t[new_fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
|
||||
if(fps > config.fps)
|
||||
if(alert(src, "You are setting fps to a high value:\n\t[fps] frames-per-second\n\tconfig.fps = [config.fps]","Warning!","Confirm","ABORT-ABORT-ABORT") != "Confirm")
|
||||
return
|
||||
|
||||
var/msg = "[key_name(src)] has modified world.fps to [new_fps]"
|
||||
var/msg = "[key_name(src)] has modified world.fps to [fps]"
|
||||
log_admin(msg, 0)
|
||||
message_admins(msg, 0)
|
||||
feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
world.fps = new_fps
|
||||
world.fps = fps
|
||||
|
||||
@@ -26,12 +26,10 @@
|
||||
organ.implant(C)
|
||||
|
||||
if("drop organ/implant", "remove organ/implant")
|
||||
for(var/X in C.internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
for(var/obj/item/organ/I in C.internal_organs)
|
||||
organs["[I.name] ([I.type])"] = I
|
||||
|
||||
for(var/X in C.implants)
|
||||
var/obj/item/weapon/implant/I = X
|
||||
for(var/obj/item/weapon/implant/I in C)
|
||||
organs["[I.name] ([I.type])"] = I
|
||||
|
||||
var/obj/item/organ = input("Select organ/implant:", "Organ Manipulation", null) in organs
|
||||
|
||||
@@ -33,7 +33,7 @@ var/list/admin_verbs_debug_mapping = list(
|
||||
/client/proc/count_objects_all,
|
||||
/client/proc/cmd_assume_direct_control, //-errorage
|
||||
/client/proc/startSinglo,
|
||||
/client/proc/set_server_fps, //allows you to set the ticklag.
|
||||
/client/proc/set_fps, //allows you to set the ticklag.
|
||||
/client/proc/cmd_admin_grantfullaccess,
|
||||
/client/proc/cmd_admin_areatest,
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
|
||||
@@ -3,32 +3,46 @@
|
||||
set name = "Mass Edit Variables"
|
||||
set desc="(target) Edit all instances of a target item's variables"
|
||||
|
||||
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL items)
|
||||
var/method = 0 //0 means strict type detection while 1 means this type and all subtypes (IE: /obj/item with this set to 1 will set it to ALL itms)
|
||||
|
||||
if(!check_rights(R_VAREDIT))
|
||||
return
|
||||
|
||||
if(A && A.type)
|
||||
method = vv_subtype_prompt(A.type)
|
||||
if(typesof(A.type))
|
||||
switch(input("Strict object type detection?") as null|anything in list("Strictly this type","This type and subtypes", "Cancel"))
|
||||
if("Strictly this type")
|
||||
method = 0
|
||||
if("This type and subtypes")
|
||||
method = 1
|
||||
if("Cancel")
|
||||
return
|
||||
if(null)
|
||||
return
|
||||
|
||||
src.massmodify_variables(A, var_name, method)
|
||||
feedback_add_details("admin_verb","MEV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/massmodify_variables(datum/O, var_name = "", method = 0)
|
||||
|
||||
/client/proc/massmodify_variables(atom/O, var_name = "", method = 0)
|
||||
if(!check_rights(R_VAREDIT))
|
||||
return
|
||||
if(!istype(O))
|
||||
return
|
||||
|
||||
for(var/p in forbidden_varedit_object_types)
|
||||
if( istype(O,p) )
|
||||
usr << "<span class='danger'>It is forbidden to edit this object's variables.</span>"
|
||||
return
|
||||
|
||||
var/list/names = list()
|
||||
for (var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
var/variable = ""
|
||||
|
||||
if(!var_name)
|
||||
var/list/names = list()
|
||||
for (var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
|
||||
variable = input("Which var?", "Var") as null|anything in names
|
||||
variable = input("Which var?","Var") as null|anything in names
|
||||
else
|
||||
variable = var_name
|
||||
|
||||
@@ -36,9 +50,10 @@
|
||||
return
|
||||
var/default
|
||||
var/var_value = O.vars[variable]
|
||||
var/dir
|
||||
|
||||
if(variable in VVckey_edit)
|
||||
src << "It's forbidden to mass-modify ckeys. It'll crash everyone's client you dummy."
|
||||
usr << "It's forbidden to mass-modify ckeys. I'll crash everyone's client you dummy."
|
||||
return
|
||||
if(variable in VVlocked)
|
||||
if(!check_rights(R_DEBUG))
|
||||
@@ -46,221 +61,478 @@
|
||||
if(variable in VVicon_edit_lock)
|
||||
if(!check_rights(R_FUN|R_DEBUG))
|
||||
return
|
||||
if(variable in VVpixelmovement)
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/prompt = alert(src, "Editing this var may irreparably break tile gliding for the rest of the round. THIS CAN'T BE UNDONE", "DANGER", "ABORT ", "Continue", " ABORT")
|
||||
if (prompt != "Continue")
|
||||
return
|
||||
|
||||
default = vv_get_class(var_value)
|
||||
if(isnull(var_value))
|
||||
usr << "Unable to determine variable type."
|
||||
|
||||
else if(isnum(var_value))
|
||||
usr << "Variable appears to be <b>NUM</b>."
|
||||
default = "num"
|
||||
setDir(1)
|
||||
|
||||
else if(istext(var_value))
|
||||
usr << "Variable appears to be <b>TEXT</b>."
|
||||
default = "text"
|
||||
|
||||
else if(isloc(var_value))
|
||||
usr << "Variable appears to be <b>REFERENCE</b>."
|
||||
default = "reference"
|
||||
|
||||
else if(isicon(var_value))
|
||||
usr << "Variable appears to be <b>ICON</b>."
|
||||
var_value = "\icon[var_value]"
|
||||
default = "icon"
|
||||
|
||||
else if(istype(var_value,/atom) || istype(var_value,/datum))
|
||||
usr << "Variable appears to be <b>TYPE</b>."
|
||||
default = "type"
|
||||
|
||||
else if(istype(var_value,/list))
|
||||
usr << "Variable appears to be <b>LIST</b>."
|
||||
default = "list"
|
||||
|
||||
else if(istype(var_value,/client))
|
||||
usr << "Variable appears to be <b>CLIENT</b>."
|
||||
default = "cancel"
|
||||
|
||||
if(isnull(default))
|
||||
src << "Unable to determine variable type."
|
||||
else
|
||||
src << "Variable appears to be <b>[uppertext(default)]</b>."
|
||||
usr << "Variable appears to be <b>FILE</b>."
|
||||
default = "file"
|
||||
|
||||
src << "Variable contains: [var_value]"
|
||||
usr << "Variable contains: [var_value]"
|
||||
if(dir)
|
||||
switch(var_value)
|
||||
if(1)
|
||||
setDir("NORTH")
|
||||
if(2)
|
||||
setDir("SOUTH")
|
||||
if(4)
|
||||
setDir("EAST")
|
||||
if(8)
|
||||
setDir("WEST")
|
||||
if(5)
|
||||
setDir("NORTHEAST")
|
||||
if(6)
|
||||
setDir("SOUTHEAST")
|
||||
if(9)
|
||||
setDir("NORTHWEST")
|
||||
if(10)
|
||||
setDir("SOUTHWEST")
|
||||
else
|
||||
setDir(null)
|
||||
if(dir)
|
||||
usr << "If a direction, direction is: [dir]"
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
if(dir < 0 && dir < 16)
|
||||
if(dir & 1)
|
||||
dir_text += "NORTH"
|
||||
if(dir & 2)
|
||||
dir_text += "SOUTH"
|
||||
if(dir & 4)
|
||||
dir_text += "EAST"
|
||||
if(dir & 8)
|
||||
dir_text += "WEST"
|
||||
var/class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
|
||||
"num","type","icon","file","edit referenced object","restore to default")
|
||||
|
||||
if(dir_text)
|
||||
src << "If a direction, direction is: [dir_text]"
|
||||
|
||||
var/value = vv_get_value(default_class = default)
|
||||
var/new_value = value["value"]
|
||||
var/class = value["class"]
|
||||
|
||||
if(!class || !new_value == null && class != VV_NULL)
|
||||
if(!class)
|
||||
return
|
||||
|
||||
if (class == VV_MESSAGE)
|
||||
class = VV_TEXT
|
||||
var/original_name
|
||||
|
||||
if (value["type"])
|
||||
class = VV_NEW_TYPE
|
||||
|
||||
var/original_name = "[O]"
|
||||
|
||||
var/rejected = 0
|
||||
var/accepted = 0
|
||||
if (!istype(O, /atom))
|
||||
original_name = "\ref[O] ([O])"
|
||||
else
|
||||
original_name = O:name
|
||||
|
||||
switch(class)
|
||||
if(VV_RESTORE_DEFAULT)
|
||||
src << "Finding items..."
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if (D.vv_edit_var(variable, initial(D.vars[variable])) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
CHECK_TICK
|
||||
|
||||
if(VV_TEXT)
|
||||
var/list/varsvars = vv_parse_text(O, new_value)
|
||||
var/pre_processing = new_value
|
||||
var/unique
|
||||
if (varsvars && varsvars.len)
|
||||
unique = alert(usr, "Process vars unique to each instance, or same for all?", "Variable Association", "Unique", "Same")
|
||||
if(unique == "Unique")
|
||||
unique = TRUE
|
||||
if("restore to default")
|
||||
O.vars[variable] = initial(O.vars[variable])
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
if("edit referenced object")
|
||||
return .(O.vars[variable])
|
||||
|
||||
if("text")
|
||||
var/new_value = input("Enter new text:","Text",O.vars[variable]) as message|null
|
||||
if(new_value == null) return
|
||||
|
||||
var/process_vars = 0
|
||||
var/unique = 0
|
||||
if(findtext(new_value,"\["))
|
||||
process_vars = alert(usr,"\[] detected in string, process as variables?","Process Variables?","Yes","No")
|
||||
if(process_vars == "Yes")
|
||||
process_vars = 1
|
||||
unique = alert(usr,"Process vars unique to each instance, or same for all?","Variable Association","Unique","Same")
|
||||
if(unique == "Unique")
|
||||
unique = 1
|
||||
else
|
||||
unique = 0
|
||||
else
|
||||
unique = FALSE
|
||||
process_vars = 0
|
||||
|
||||
var/pre_processing = new_value
|
||||
var/list/varsvars = list()
|
||||
|
||||
if(process_vars)
|
||||
varsvars = string2listofvars(new_value, O)
|
||||
if(varsvars.len)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[O.vars[V]]")
|
||||
|
||||
src << "Finding items..."
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if(unique)
|
||||
new_value = pre_processing
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[D.vars[V]]")
|
||||
O.vars[variable] = new_value
|
||||
|
||||
if (D.vv_edit_var(variable, new_value) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
CHECK_TICK
|
||||
//Convert the string vars for anything that's not O
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
new_value = pre_processing //reset new_value, ready to convert it uniquely for the next iteration
|
||||
|
||||
if (VV_NEW_TYPE)
|
||||
var/many = alert(src, "Create only one [value["type"]] and assign each or a new one for each thing", "How Many", "One", "Many", "Cancel")
|
||||
if (many == "Cancel")
|
||||
return
|
||||
if (many == "Many")
|
||||
many = TRUE
|
||||
if(process_vars)
|
||||
if(unique)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[M.vars[V]]")
|
||||
else
|
||||
new_value = O.vars[variable] //We already processed the non-unique form for O, reuse it
|
||||
|
||||
M.vars[variable] = new_value
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
new_value = pre_processing
|
||||
|
||||
if(process_vars)
|
||||
if(unique)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[A.vars[V]]")
|
||||
else
|
||||
new_value = O.vars[variable]
|
||||
|
||||
A.vars[variable] = new_value
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
new_value = pre_processing
|
||||
|
||||
if(process_vars)
|
||||
if(unique)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[A.vars[V]]")
|
||||
else
|
||||
new_value = O.vars[variable]
|
||||
|
||||
A.vars[variable] = new_value
|
||||
CHECK_TICK
|
||||
else
|
||||
many = FALSE
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
new_value = pre_processing
|
||||
|
||||
var/type = value["type"]
|
||||
src << "Finding items..."
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if(many && !new_value)
|
||||
new_value = new type()
|
||||
if(process_vars)
|
||||
if(unique)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[M.vars[V]]")
|
||||
else
|
||||
new_value = O.vars[variable]
|
||||
|
||||
if (D.vv_edit_var(variable, new_value) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
new_value = null
|
||||
M.vars[variable] = new_value
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
new_value = pre_processing
|
||||
|
||||
if(process_vars)
|
||||
if(unique)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[A.vars[V]]")
|
||||
else
|
||||
new_value = O.vars[variable]
|
||||
|
||||
A.vars[variable] = new_value
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
new_value = pre_processing
|
||||
|
||||
if(process_vars)
|
||||
if(unique)
|
||||
for(var/V in varsvars)
|
||||
new_value = replacetext(new_value,"\[[V]]","[A.vars[V]]")
|
||||
else
|
||||
new_value = O.vars[variable]
|
||||
|
||||
A.vars[variable] = new_value
|
||||
CHECK_TICK
|
||||
|
||||
if("num")
|
||||
var/new_value = input("Enter new number:","Num",\
|
||||
O.vars[variable]) as num|null
|
||||
if(new_value == null) return
|
||||
|
||||
if(variable=="luminosity")
|
||||
O.set_light(new_value)
|
||||
else
|
||||
O.vars[variable] = new_value
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
if(variable=="luminosity")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="luminosity")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
if(variable=="luminosity")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
M.set_light(new_value)
|
||||
else
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
if(variable=="luminosity")
|
||||
A.set_light(new_value)
|
||||
else
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
if("type")
|
||||
var/new_value
|
||||
new_value = input("Enter type:","Type",O.vars[variable]) as null|anything in typesof(/obj,/mob,/area,/turf)
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
if("file")
|
||||
var/new_value = input("Pick file:","File",O.vars[variable]) as null|file
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O.type, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O.type, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
if("icon")
|
||||
var/new_value = input("Pick icon:","Icon",O.vars[variable]) as null|icon
|
||||
if(new_value == null) return
|
||||
O.vars[variable] = new_value
|
||||
if(method)
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if ( istype(M , O.type) )
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if ( istype(A , O.type) )
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if (M.type == O.type)
|
||||
M.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if (A.type == O.type)
|
||||
A.vars[variable] = O.vars[variable]
|
||||
CHECK_TICK
|
||||
|
||||
if(method)
|
||||
if(istype(O,/mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(istype(M,O.type))
|
||||
M.on_varedit(variable)
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
src << "Finding items..."
|
||||
var/list/items = get_all_of_type(O.type, method)
|
||||
src << "Changing [items.len] items..."
|
||||
for(var/thing in items)
|
||||
if (!thing)
|
||||
continue
|
||||
var/datum/D = thing
|
||||
if (D.vv_edit_var(variable, new_value) != FALSE)
|
||||
accepted++
|
||||
else
|
||||
rejected++
|
||||
else if(istype(O,/obj))
|
||||
for(var/obj/A in world)
|
||||
if(istype(A,O.type))
|
||||
A.on_varedit(variable)
|
||||
CHECK_TICK
|
||||
|
||||
|
||||
var/count = rejected+accepted
|
||||
if (!count)
|
||||
src << "No objects found"
|
||||
return
|
||||
if (!accepted)
|
||||
src << "Every object rejected your edit"
|
||||
return
|
||||
if (rejected)
|
||||
src << "[rejected] out of [count] objects rejected your edit"
|
||||
|
||||
world.log << "### MassVarEdit by [src]: [O.type] (A/R [accepted]/[rejected]) [variable]=[html_encode("[O.vars[variable]]")]([list2params(value)])"
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]] ([accepted] objects modified)")
|
||||
|
||||
|
||||
/proc/get_all_of_type(var/T, subtypes = TRUE)
|
||||
var/list/typecache = list()
|
||||
typecache[T] = 1
|
||||
if (subtypes)
|
||||
typecache = typecacheof(typecache)
|
||||
. = list()
|
||||
if (ispath(T, /mob))
|
||||
for(var/mob/thing in mob_list)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /obj/machinery/door))
|
||||
for(var/obj/machinery/door/thing in airlocks)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /obj/machinery))
|
||||
for(var/obj/machinery/thing in machines)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /obj))
|
||||
for(var/obj/thing in world)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /atom/movable))
|
||||
for(var/atom/movable/thing in world)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /turf))
|
||||
for(var/turf/thing in world)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /atom))
|
||||
for(var/atom/thing in world)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /client))
|
||||
for(var/client/thing in clients)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
|
||||
else if (ispath(T, /datum))
|
||||
for(var/datum/thing)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
else if(istype(O,/turf))
|
||||
for(var/turf/A in block(locate(1,1,1),locate(world.maxx,world.maxy,world.maxz)))
|
||||
if(istype(A,O.type))
|
||||
A.on_varedit(variable)
|
||||
CHECK_TICK
|
||||
|
||||
else
|
||||
for(var/datum/thing in world)
|
||||
if (typecache[thing.type])
|
||||
. += thing
|
||||
CHECK_TICK
|
||||
if(istype(O, /mob))
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.type == O.type)
|
||||
M.on_varedit(variable)
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /obj))
|
||||
for(var/obj/A in world)
|
||||
if(A.type == O.type)
|
||||
A.on_varedit(variable)
|
||||
CHECK_TICK
|
||||
|
||||
else if(istype(O, /turf))
|
||||
for(var/turf/A in world)
|
||||
if(A.type == O.type)
|
||||
A.on_varedit(variable)
|
||||
CHECK_TICK
|
||||
|
||||
world.log << "### MassVarEdit by [src]: [O.type] [variable]=[html_encode("[O.vars[variable]]")]"
|
||||
log_admin("[key_name(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
message_admins("[key_name_admin(src)] mass modified [original_name]'s [variable] to [O.vars[variable]]")
|
||||
File diff suppressed because it is too large
Load Diff
@@ -11,18 +11,18 @@
|
||||
/datum/admins/proc/one_click_antag()
|
||||
|
||||
var/dat = {"
|
||||
<a href='?src=\ref[src];makeAntag=traitors'>Make Traitors</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=changelings'>Make Changelings</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=revs'>Make Revs</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=cult'>Make Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=clockcult'>Make Clockwork Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=blob'>Make Blob</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=gangs'>Make Gangsters</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=wizard'>Make Wizard (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=nukeops'>Make Nuke Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=centcom'>Make Centcom Response Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=abductors'>Make Abductor Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=revenant'>Make Revenant (Requires Ghost)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=1'>Make Traitors</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=2'>Make Changelings</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=3'>Make Revs</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=4'>Make Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=15'>Make Clockwork Cult</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=11'>Make Blob</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=12'>Make Gangsters</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=6'>Make Wizard (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=7'>Make Nuke Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=13'>Make Centcom Response Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=14'>Make Abductor Team (Requires Ghosts)</a><br>
|
||||
<a href='?src=\ref[src];makeAntag=15'>Make Revenant (Requires Ghost)</a><br>
|
||||
"}
|
||||
|
||||
var/datum/browser/popup = new(usr, "oneclickantag", "Quick-Create Antagonist", 400, 400)
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
var/list/mob/dead/observer/candidates = pollCandidates("Do you wish to be considered for the position of a Wizard Foundation 'diplomat'?", "wizard", null)
|
||||
|
||||
var/mob/dead/observer/selected = pick_n_take(candidates)
|
||||
var/mob/dead/observer/selected = popleft(candidates)
|
||||
|
||||
var/mob/living/carbon/human/new_character = makeBody(selected)
|
||||
new_character.mind.make_Wizard()
|
||||
@@ -239,7 +239,7 @@
|
||||
if(agentcount < 3)
|
||||
return 0
|
||||
|
||||
var/nuke_code = random_nukecode()
|
||||
var/nuke_code = "[rand(10000, 99999)]"
|
||||
|
||||
var/obj/machinery/nuclearbomb/nuke = locate("syndienuke") in nuke_list
|
||||
if(nuke)
|
||||
@@ -552,5 +552,5 @@
|
||||
return 1
|
||||
|
||||
/datum/admins/proc/makeRevenant()
|
||||
new /datum/round_event/ghost_role/revenant(TRUE, TRUE)
|
||||
new /datum/round_event/ghost_role/revenant
|
||||
return 1
|
||||
|
||||
@@ -1,77 +1,54 @@
|
||||
var/highlander = FALSE
|
||||
/client/proc/only_one() //Gives everyone kilts, berets, claymores, and pinpointers, with the objective to hijack the emergency shuttle.
|
||||
/client/proc/only_one()
|
||||
if(!ticker || !ticker.mode)
|
||||
alert("The game hasn't started yet!")
|
||||
return
|
||||
highlander = TRUE
|
||||
|
||||
world << "<span class='userdanger'><i>THERE CAN BE ONLY ONE!!!</i></span>"
|
||||
world << sound('sound/misc/highlander.ogg')
|
||||
|
||||
for(var/obj/item/weapon/disk/nuclear/N in poi_list)
|
||||
N.relocate() //Gets it out of bags and such
|
||||
|
||||
for(var/mob/living/carbon/human/H in player_list)
|
||||
if(H.stat == DEAD || !(H.client))
|
||||
continue
|
||||
H.make_scottish()
|
||||
if(H.stat == 2 || !(H.client)) continue
|
||||
if(is_special_character(H)) continue
|
||||
|
||||
ticker.mode.traitors += H.mind
|
||||
H.mind.special_role = "traitor"
|
||||
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = H.mind
|
||||
steal_objective.set_target(new /datum/objective_item/steal/nukedisc)
|
||||
H.mind.objectives += steal_objective
|
||||
|
||||
var/datum/objective/hijack/hijack_objective = new
|
||||
hijack_objective.owner = H.mind
|
||||
H.mind.objectives += hijack_objective
|
||||
|
||||
H << "<B>You are the traitor.</B>"
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/OBJ in H.mind.objectives)
|
||||
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
for (var/obj/item/I in H)
|
||||
if (istype(I, /obj/item/weapon/implant))
|
||||
continue
|
||||
qdel(I)
|
||||
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/under/kilt(H), slot_w_uniform)
|
||||
H.equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(H), slot_ears)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/head/beret(H), slot_head)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/claymore(H), slot_l_hand)
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(H), slot_shoes)
|
||||
H.equip_to_slot_or_del(new /obj/item/weapon/pinpointer(H.loc), slot_l_store)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(H)
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Highlander"
|
||||
W.registered_name = H.real_name
|
||||
W.update_label(H.real_name)
|
||||
H.equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] used THERE CAN BE ONLY ONE!</span>")
|
||||
log_admin("[key_name(usr)] used THERE CAN BE ONLY ONE.")
|
||||
addtimer(SSshuttle.emergency, "request", 50, TIMER_NORMAL, null, 1)
|
||||
log_admin("[key_name(usr)] used there can be only one.")
|
||||
|
||||
/mob/living/carbon/human/proc/make_scottish()
|
||||
ticker.mode.traitors += mind
|
||||
mind.special_role = "highlander"
|
||||
dna.species.species_traits |= NOGUNS //nice try jackass
|
||||
|
||||
var/datum/objective/steal/steal_objective = new
|
||||
steal_objective.owner = mind
|
||||
steal_objective.set_target(new /datum/objective_item/steal/nukedisc)
|
||||
mind.objectives += steal_objective
|
||||
|
||||
var/datum/objective/hijack/hijack_objective = new
|
||||
hijack_objective.explanation_text = "Escape on the shuttle alone. Ensure that nobody else makes it out."
|
||||
hijack_objective.owner = mind
|
||||
mind.objectives += hijack_objective
|
||||
|
||||
mind.announce_objectives()
|
||||
|
||||
for(var/obj/item/I in get_equipped_items())
|
||||
qdel(I)
|
||||
for(var/obj/item/I in held_items)
|
||||
qdel(I)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/kilt/highlander(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/device/radio/headset/heads/captain(src), slot_ears)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/head/beret/highlander(src), slot_head)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/combat(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/weapon/pinpointer(src), slot_l_store)
|
||||
for(var/obj/item/weapon/pinpointer/P in src)
|
||||
P.attack_self(src)
|
||||
var/obj/item/weapon/card/id/W = new(src)
|
||||
W.icon_state = "centcom"
|
||||
W.access = get_all_accesses()
|
||||
W.access += get_all_centcom_access()
|
||||
W.assignment = "Highlander"
|
||||
W.registered_name = real_name
|
||||
W.flags |= NODROP
|
||||
W.update_label(real_name)
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
var/obj/item/weapon/claymore/highlander/H1 = new(src)
|
||||
if(!highlander)
|
||||
H1.admin_spawned = TRUE //To prevent announcing
|
||||
put_in_hands(H1)
|
||||
H1.pickup(src) //For the stun shielding
|
||||
|
||||
var/obj/item/weapon/bloodcrawl/antiwelder = new(src)
|
||||
antiwelder.name = "compulsion of honor"
|
||||
antiwelder.desc = "You are unable to hold anything in this hand until you're the last one left!"
|
||||
antiwelder.icon_state = "bloodhand_right"
|
||||
put_in_hands(antiwelder)
|
||||
|
||||
src << "<span class='boldannounce'>Your [H1.name] cries out for blood. Join in the slaughter, lest you be claimed yourself...\n\
|
||||
Activate it in your hand, and it will lead to the nearest target. Attack the nuclear authentication disk with it, and you will store it.</span>"
|
||||
|
||||
/proc/only_me()
|
||||
if(!ticker || !ticker.mode)
|
||||
@@ -90,21 +67,18 @@ var/highlander = FALSE
|
||||
H.mind.objectives += hijack_objective
|
||||
|
||||
H << "<B>You are the multiverse summoner. Activate your blade to summon copies of yourself from another universe to fight by your side.</B>"
|
||||
H.mind.announce_objectives()
|
||||
|
||||
var/datum/gang/multiverse/G = new(src, "[H.real_name]")
|
||||
ticker.mode.gangs += G
|
||||
G.bosses += H.mind
|
||||
G.add_gang_hud(H.mind)
|
||||
H.mind.gang_datum = G
|
||||
var/obj_count = 1
|
||||
for(var/datum/objective/OBJ in H.mind.objectives)
|
||||
H << "<B>Objective #[obj_count]</B>: [OBJ.explanation_text]"
|
||||
obj_count++
|
||||
|
||||
var/obj/item/slot_item_ID = H.get_item_by_slot(slot_wear_id)
|
||||
qdel(slot_item_ID)
|
||||
var/obj/item/slot_item_hand = H.get_item_for_held_index(2)
|
||||
var/obj/item/slot_item_hand = H.get_item_by_slot(slot_r_hand)
|
||||
H.unEquip(slot_item_hand)
|
||||
|
||||
var /obj/item/weapon/multisword/multi = new(H)
|
||||
H.put_in_hands_or_del(multi)
|
||||
H.equip_to_slot_or_del(multi, slot_r_hand)
|
||||
|
||||
var/obj/item/weapon/card/id/W = new(H)
|
||||
W.icon_state = "centcom"
|
||||
|
||||
@@ -18,26 +18,15 @@
|
||||
return
|
||||
|
||||
var/image/cross = image('icons/obj/storage.dmi',"bible")
|
||||
var/font_color = "purple"
|
||||
var/prayer_type = "PRAYER"
|
||||
var/deity
|
||||
if(usr.job == "Chaplain")
|
||||
cross = image('icons/obj/storage.dmi',"kingyellow")
|
||||
font_color = "blue"
|
||||
prayer_type = "CHAPLAIN PRAYER"
|
||||
if(SSreligion.Bible_deity_name)
|
||||
deity = SSreligion.Bible_deity_name
|
||||
msg = "<span class='adminnotice'>\icon[cross] <b><font color=blue>CHAPLAIN PRAYER: </font>[key_name_admin(src)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[src]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[src]'>TP</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
|
||||
else if(iscultist(usr))
|
||||
cross = image('icons/obj/storage.dmi',"tome")
|
||||
font_color = "red"
|
||||
prayer_type = "CULTIST PRAYER"
|
||||
deity = "Nar-Sie"
|
||||
|
||||
msg = "<span class='adminnotice'>\icon[cross] \
|
||||
<b><font color=[font_color]>[prayer_type][deity ? " (to [deity])" : ""]: </font>\
|
||||
[ADMIN_FULLMONTY(src)] [ADMIN_SC(src)]:</b> \
|
||||
[msg]</span>"
|
||||
|
||||
msg = "<span class='adminnotice'>\icon[cross] <b><font color=red>CULTIST PRAYER: </font>[key_name_admin(src)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[src]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[src]'>TP</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
|
||||
else
|
||||
cross = image('icons/obj/storage.dmi',"bible")
|
||||
msg = "<span class='adminnotice'>\icon[cross] <b><font color=purple>PRAYER: </font>[key_name_admin(src)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[src]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[src]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[src]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[src]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[src]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[src]'>TP</A>) (<A HREF='?_src_=holder;adminspawncookie=\ref[src]'>SC</a>):</b> [msg]</span>"
|
||||
for(var/client/C in admins)
|
||||
if(C.prefs.chat_toggles & CHAT_PRAYER)
|
||||
C << msg
|
||||
@@ -51,34 +40,22 @@
|
||||
|
||||
/proc/Centcomm_announce(text , mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "<span class='adminnotice'>\
|
||||
<b><font color=orange>CENTCOM:</font>\
|
||||
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
|
||||
[ADMIN_CENTCOM_REPLY(Sender)]:</b> \
|
||||
[msg]</span>"
|
||||
msg = "<span class='adminnotice'><b><font color=orange>CENTCOM:</font>[key_name_admin(Sender)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[Sender]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Sender]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[Sender]'>TP</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
admins << msg
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
/proc/Syndicate_announce(text , mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "<span class='adminnotice'><b>\
|
||||
<font color=crimson>SYNDICATE:</font>\
|
||||
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
|
||||
[ADMIN_SYNDICATE_REPLY(Sender)]:</b> \
|
||||
[msg]</span>"
|
||||
msg = "<span class='adminnotice'><b><font color=crimson>SYNDICATE:</font>[key_name_admin(Sender)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[Sender]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Sender]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[Sender]'>TP</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;SyndicateReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
admins << msg
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
/proc/Nuke_request(text , mob/Sender)
|
||||
var/msg = copytext(sanitize(text), 1, MAX_MESSAGE_LEN)
|
||||
msg = "<span class='adminnotice'>\
|
||||
<b><font color=orange>NUKE CODE REQUEST:</font>\
|
||||
[ADMIN_FULLMONTY(Sender)] [ADMIN_BSA(Sender)] \
|
||||
[ADMIN_CENTCOM_REPLY(Sender)] \
|
||||
[ADMIN_SET_SD_CODE]:</b> \
|
||||
[msg]</span>"
|
||||
msg = "<span class='adminnotice'><b><font color=orange>NUKE CODE REQUEST:</font>[key_name_admin(Sender)] (<A HREF='?_src_=holder;adminmoreinfo=\ref[Sender]'>?</A>) (<A HREF='?_src_=holder;adminplayeropts=\ref[Sender]'>PP</A>) (<A HREF='?_src_=vars;Vars=\ref[Sender]'>VV</A>) (<A HREF='?_src_=holder;subtlemessage=\ref[Sender]'>SM</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[Sender]'>FLW</A>) (<A HREF='?_src_=holder;traitor=\ref[Sender]'>TP</A>) (<A HREF='?_src_=holder;BlueSpaceArtillery=\ref[Sender]'>BSA</A>) (<A HREF='?_src_=holder;CentcommReply=\ref[Sender]'>RPLY</A>):</b> [msg]</span>"
|
||||
admins << msg
|
||||
admins << "<span class='adminnotice'><b>At this current time, the nuke must have the code manually set via varedit.</b></span>"
|
||||
for(var/obj/machinery/computer/communications/C in machines)
|
||||
C.overrideCooldown()
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
return
|
||||
|
||||
if(!M)
|
||||
M = input("Direct narrate to whom?", "Active Players") as null|anything in player_list
|
||||
M = input("Direct narrate to who?", "Active Players") as null|anything in player_list
|
||||
|
||||
if(!M)
|
||||
return
|
||||
@@ -521,7 +521,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
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 category = "Abusive"
|
||||
set name = "Explosion"
|
||||
|
||||
if (!holder)
|
||||
@@ -594,8 +594,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
|
||||
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]")
|
||||
|
||||
if(isobserver(M))
|
||||
new /obj/effect/gibspawner/generic(M.loc, M.viruses)
|
||||
if(istype(M, /mob/dead/observer))
|
||||
gibs(M.loc, M.viruses)
|
||||
return
|
||||
if(confirm == "Yes")
|
||||
M.gib()
|
||||
@@ -612,7 +612,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
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!
|
||||
mob.gib(1, 1, 1)
|
||||
mob.gib(1, 1)
|
||||
|
||||
/client/proc/cmd_admin_check_contents(mob/living/M in mob_list)
|
||||
set category = "Special Verbs"
|
||||
@@ -689,7 +689,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
|
||||
/client/proc/everyone_random()
|
||||
set category = "Fun"
|
||||
set category = "Abusive"
|
||||
set name = "Make Everyone Random"
|
||||
set desc = "Make everyone have a random appearance. You can only use this before rounds!"
|
||||
|
||||
@@ -754,32 +754,29 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
|
||||
/client/proc/toggle_nuke(obj/machinery/nuclearbomb/N in nuke_list)
|
||||
set name = "Toggle Nuke"
|
||||
set category = "Fun"
|
||||
set category = "Abusive"
|
||||
set popup_menu = 0
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(!N.timing)
|
||||
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timer_set]") as num
|
||||
var/newtime = input(usr, "Set activation timer.", "Activate Nuke", "[N.timeleft]") as num
|
||||
if(!newtime)
|
||||
return
|
||||
N.timer_set = newtime
|
||||
N.timeleft = newtime
|
||||
N.set_safety()
|
||||
N.set_active()
|
||||
|
||||
log_admin("[key_name(usr)] [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z]).")
|
||||
message_admins("[ADMIN_LOOKUPFLW(usr)] [N.timing ? "activated" : "deactivated"] a nuke at [ADMIN_COORDJMP(N)].")
|
||||
message_admins("[key_name_admin(usr)] (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[usr]'>FLW</A>) [N.timing ? "activated" : "deactivated"] a nuke at ([N.x],[N.y],[N.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[N.x];Y=[N.y];Z=[N.z]'>JMP</a>).")
|
||||
feedback_add_details("admin_verb","TN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/reset_latejoin_spawns()
|
||||
set category = "Debug"
|
||||
set category = "Abusive"
|
||||
set name = "Remove Latejoin Spawns"
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
var/confirm = alert(src, "Disable Latejoin spawns??", "Message", "Yes", "No")
|
||||
if(confirm != "Yes")
|
||||
return
|
||||
|
||||
latejoin.Cut()
|
||||
|
||||
@@ -997,7 +994,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
M.ui_interact(usr)
|
||||
|
||||
/client/proc/mass_zombie_infection()
|
||||
set category = "Fun"
|
||||
set category = "Abusive"
|
||||
set name = "Mass Zombie Infection"
|
||||
set desc = "Infects all humans with a latent organ that will zombify \
|
||||
them on death."
|
||||
@@ -1017,7 +1014,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
feedback_add_details("admin_verb","MZI")
|
||||
|
||||
/client/proc/mass_zombie_cure()
|
||||
set category = "Fun"
|
||||
set category = "Abusive"
|
||||
set name = "Mass Zombie Cure"
|
||||
set desc = "Removes the zombie infection from all humans, returning them to normal."
|
||||
if(!holder)
|
||||
@@ -1035,7 +1032,7 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
feedback_add_details("admin_verb","MZC")
|
||||
|
||||
/client/proc/polymorph_all()
|
||||
set category = "Fun"
|
||||
set category = "Abusive"
|
||||
set name = "Polymorph All"
|
||||
set desc = "Applies the effects of the bolt of change to every single mob."
|
||||
|
||||
@@ -1140,33 +1137,3 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits
|
||||
H.regenerate_icons()
|
||||
|
||||
#undef ON_PURRBATION
|
||||
|
||||
/client/proc/modify_goals()
|
||||
set category = "Debug"
|
||||
set name = "Modify goals"
|
||||
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
|
||||
holder.modify_goals()
|
||||
|
||||
/datum/admins/proc/modify_goals()
|
||||
var/dat = ""
|
||||
for(var/datum/station_goal/S in ticker.mode.station_goals)
|
||||
dat += "[S.name] - <a href='?src=\ref[S];announce=1'>Announce</a> | <a href='?src=\ref[S];remove=1'>Remove</a><br>"
|
||||
dat += "<br><a href='?src=\ref[src];add_station_goal=1'>Add New Goal</a>"
|
||||
usr << browse(dat, "window=goals;size=400x400")
|
||||
|
||||
|
||||
/client/proc/toggle_hub()
|
||||
set category = "Server"
|
||||
set name = "Toggle Hub"
|
||||
|
||||
world.visibility = (!world.visibility)
|
||||
|
||||
log_admin("[key_name(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.")
|
||||
message_admins("[key_name_admin(usr)] has toggled the server's hub status for the round, it is now [(world.visibility?"on":"off")] the hub.")
|
||||
if (world.visibility && !world.reachable)
|
||||
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
||||
|
||||
feedback_add_details("admin_verb","HUB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
Reference in New Issue
Block a user