Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into proc-define-shit
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
AH.Resolve() //with prejudice
|
||||
if(banned_client && banned_client.ckey == ckey)
|
||||
qdel(banned_client)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/admins/proc/DB_ban_unban(ckey, bantype, job = "")
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
if(!GLOB.Banlist) // if Banlist cannot be located for some reason
|
||||
LoadBans() // try to load the bans
|
||||
if(!GLOB.Banlist) // uh oh, can't find bans!
|
||||
return 0 // ABORT ABORT ABORT
|
||||
return FALSE // ABORT ABORT ABORT
|
||||
|
||||
. = list()
|
||||
var/appeal
|
||||
@@ -20,7 +20,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
if (GLOB.Banlist["temp"])
|
||||
if (!GetExp(GLOB.Banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]] during round ID [GLOB.Banlist["roundid"]][appeal]"
|
||||
else
|
||||
@@ -47,18 +47,18 @@ GLOBAL_PROTECT(Banlist)
|
||||
if(GLOB.Banlist["temp"])
|
||||
if (!GetExp(GLOB.Banlist["minutes"]))
|
||||
ClearTempbans()
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: [GetExp(GLOB.Banlist["minutes"])]\nBy: [GLOB.Banlist["bannedby"]] during round ID [GLOB.Banlist["roundid"]][appeal]"
|
||||
else
|
||||
.["desc"] = "\nReason: [GLOB.Banlist["reason"]]\nExpires: <B>PERMENANT</B>\nBy: [GLOB.Banlist["bannedby"]] during round ID [GLOB.Banlist["roundid"]][appeal]"
|
||||
.["reason"] = matches
|
||||
return .
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/proc/UpdateTime() //No idea why i made this a proc.
|
||||
GLOB.CMinutes = (world.realtime / 10) / 60
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/proc/LoadBans()
|
||||
if(!CONFIG_GET(flag/ban_legacy_system))
|
||||
@@ -78,7 +78,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
ClearTempbans()
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/proc/ClearTempbans()
|
||||
UpdateTime()
|
||||
@@ -97,7 +97,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
if (GLOB.CMinutes >= GLOB.Banlist["minutes"])
|
||||
RemoveBan(A)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
/proc/AddBan(key, computerid, reason, bannedby, temp, minutes, address)
|
||||
@@ -111,7 +111,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
if ( GLOB.Banlist.dir.Find("[ban_ckey][computerid]") )
|
||||
to_chat(usr, text("<span class='danger'>Ban already exists.</span>"))
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
GLOB.Banlist.dir.Add("[ban_ckey][computerid]")
|
||||
GLOB.Banlist.cd = "/base/[ban_ckey][computerid]"
|
||||
@@ -128,7 +128,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
create_message("note", key, bannedby, "Permanently banned - [reason]", null, null, 0, 0, null, 0, 0)
|
||||
else
|
||||
create_message("note", key, bannedby, "Banned for [minutes] minutes - [reason]", null, null, 0, 0, null, 0, 0)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/proc/RemoveBan(foldername)
|
||||
var/key
|
||||
@@ -140,7 +140,7 @@ GLOBAL_PROTECT(Banlist)
|
||||
GLOB.Banlist.cd = "/base"
|
||||
|
||||
if (!GLOB.Banlist.dir.Remove(foldername))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!usr)
|
||||
log_admin_private("Ban Expired: [key]")
|
||||
@@ -157,13 +157,13 @@ GLOBAL_PROTECT(Banlist)
|
||||
GLOB.Banlist.dir.Remove(A)
|
||||
continue
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/proc/GetExp(minutes as num)
|
||||
UpdateTime()
|
||||
var/exp = minutes - GLOB.CMinutes
|
||||
if (exp <= 0)
|
||||
return 0
|
||||
return FALSE
|
||||
else
|
||||
var/timeleftstring
|
||||
if (exp >= 1440) //1440 = 1 day in minutes
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
else
|
||||
logs_missing += "[subject] (empty)"
|
||||
|
||||
var/list/combined = sortList(logs_present) + sortList(logs_missing)
|
||||
var/list/combined = sort_list(logs_present) + sort_list(logs_missing)
|
||||
|
||||
var/selected = input("Investigate what?", "Investigate") as null|anything in combined
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ GLOBAL_PROTECT(admin_verbs_default)
|
||||
/client/proc/cmd_admin_pm_panel, /*admin-pm list*/
|
||||
/client/proc/stop_sounds,
|
||||
/client/proc/mark_datum_mapview,
|
||||
/client/proc/tag_datum_mapview,
|
||||
/client/proc/debugstatpanel
|
||||
// /client/proc/fix_air /*resets air in designated radius to its default atmos composition*/
|
||||
)
|
||||
@@ -88,7 +89,8 @@ GLOBAL_PROTECT(admin_verbs_admin)
|
||||
/client/proc/addbunkerbypass, //CIT
|
||||
/client/proc/revokebunkerbypass, //CIT
|
||||
/datum/admins/proc/open_borgopanel,
|
||||
/datum/admins/proc/change_laws //change AI laws
|
||||
/datum/admins/proc/change_laws, //change AI laws
|
||||
/datum/admins/proc/display_tags,
|
||||
)
|
||||
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/DB_ban_panel, /client/proc/stickybanpanel))
|
||||
GLOBAL_PROTECT(admin_verbs_ban)
|
||||
@@ -692,7 +694,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
// if(!SStrading_card_game.loaded)
|
||||
// message_admins("The card subsystem is not currently loaded")
|
||||
// return
|
||||
// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sortList(SStrading_card_game.card_packs)
|
||||
// var/pack = input("Which pack should we test?", "You fucked it didn't you") as null|anything in sort_list(SStrading_card_game.card_packs)
|
||||
// var/batchCount = input("How many times should we open it?", "Don't worry, I understand") as null|num
|
||||
// var/batchSize = input("How many cards per batch?", "I hope you remember to check the validation") as null|num
|
||||
// var/guar = input("Should we use the pack's guaranteed rarity? If so, how many?", "We've all been there. Man you should have seen the old system") as null|num
|
||||
@@ -712,7 +714,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
var/type_length = length_char("/obj/effect/proc_holder/spell") + 2
|
||||
for(var/A in GLOB.spells)
|
||||
spell_list[copytext_char("[A]", type_length)] = A
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sortList(spell_list)
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to give to that guy", "ABRAKADABRA") as null|anything in sort_list(spell_list)
|
||||
if(!S)
|
||||
return
|
||||
|
||||
@@ -733,7 +735,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
set desc = "Remove a spell from the selected mob."
|
||||
|
||||
if(T?.mind)
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sortList(T.mind.spell_list)
|
||||
var/obj/effect/proc_holder/spell/S = input("Choose the spell to remove", "NO ABRAKADABRA") as null|anything in sort_list(T.mind.spell_list)
|
||||
if(S)
|
||||
T.mind.RemoveSpell(S)
|
||||
log_admin("[key_name(usr)] removed the spell [S] from [key_name(T)].")
|
||||
@@ -747,7 +749,7 @@ GLOBAL_PROTECT(admin_verbs_hideable)
|
||||
if(!istype(T))
|
||||
to_chat(src, "<span class='notice'>You can only give a disease to a mob of type /mob/living.</span>", confidential = TRUE)
|
||||
return
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sortList(SSdisease.diseases, GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
var/datum/disease/D = input("Choose the disease to give to that guy", "ACHOO") as null|anything in sort_list(SSdisease.diseases, GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
if(!D)
|
||||
return
|
||||
T.ForceContractDisease(new D, FALSE, TRUE)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if ("Instant Runoff Voting")
|
||||
polltype = POLLTYPE_IRV
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
var/starttime = SQLtime()
|
||||
var/endtime = input("Set end time for poll as format YYYY-MM-DD HH:MM:SS. All times in server time. HH:MM:SS is optional and 24-hour. Must be later than starting time for obvious reasons.", "Set end time", SQLtime()) as text
|
||||
if(!endtime)
|
||||
@@ -117,7 +117,7 @@
|
||||
if("Finish")
|
||||
add_option = 0
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
var/m1 = "[key_name(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"] - Question: [question]"
|
||||
var/m2 = "[key_name_admin(usr)] has created a new server poll. Poll type: [polltype] - Admin Only: [adminonly ? "Yes" : "No"]<br>Question: [question]"
|
||||
var/datum/db_query/query_polladd_question = SSdbcore.NewQuery({"
|
||||
|
||||
@@ -30,6 +30,9 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
var/datum/filter_editor/filteriffic
|
||||
|
||||
/// A lazylist of tagged datums, for quick reference with the View Tags verb
|
||||
var/list/tagged_datums
|
||||
|
||||
/datum/admins/CanProcCall(procname)
|
||||
. = ..()
|
||||
if(!check_rights(R_SENSITIVE))
|
||||
@@ -137,21 +140,21 @@ GLOBAL_PROTECT(href_token)
|
||||
|
||||
/datum/admins/proc/check_for_rights(rights_required)
|
||||
if(rights_required && !(rights_required & rank.rights))
|
||||
return 0
|
||||
return 1
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
/datum/admins/proc/check_if_greater_rights_than_holder(datum/admins/other)
|
||||
if(!other)
|
||||
return 1 //they have no rights
|
||||
return TRUE //they have no rights
|
||||
if(rank.rights == R_EVERYTHING)
|
||||
return 1 //we have all the rights
|
||||
return TRUE //we have all the rights
|
||||
if(src == other)
|
||||
return 1 //you always have more rights than yourself
|
||||
return TRUE //you always have more rights than yourself
|
||||
if(rank.rights != other.rank.rights)
|
||||
if( (rank.rights & other.rank.rights) == other.rank.rights )
|
||||
return 1 //we have all the rights they have and more
|
||||
return 0
|
||||
return TRUE //we have all the rights they have and more
|
||||
return FALSE
|
||||
|
||||
/datum/admins/vv_edit_var(var_name, var_value)
|
||||
if(var_name == NAMEOF(src, fakekey))
|
||||
@@ -161,7 +164,7 @@ GLOBAL_PROTECT(href_token)
|
||||
/*
|
||||
checks if usr is an admin with at least ONE of the flags in rights_required. (Note, they don't need all the flags)
|
||||
if rights_required == 0, then it simply checks if they are an admin.
|
||||
if it doesn't return 1 and show_msg=1 it will prints a message explaining why the check has failed
|
||||
if it doesn't return TRUE and show_msg=1 it will prints a message explaining why the check has failed
|
||||
generally it would be used like so:
|
||||
|
||||
/proc/admin_proc()
|
||||
@@ -175,26 +178,26 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
/proc/check_rights(rights_required, show_msg=1)
|
||||
if(usr && usr.client)
|
||||
if (check_rights_for(usr.client, rights_required))
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
if(show_msg)
|
||||
to_chat(usr, "<font color='red'>Error: You do not have sufficient rights to do that. You require one of the following flags:[rights2text(rights_required," ")].</font>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//probably a bit iffy - will hopefully figure out a better solution
|
||||
/proc/check_if_greater_rights_than(client/other)
|
||||
if(usr && usr.client)
|
||||
if(usr.client.holder)
|
||||
if(!other || !other.holder)
|
||||
return 1
|
||||
return TRUE
|
||||
return usr.client.holder.check_if_greater_rights_than_holder(other.holder)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//This proc checks whether subject has at least ONE of the rights specified in rights_required.
|
||||
/proc/check_rights_for(client/subject, rights_required)
|
||||
if(subject && subject.holder)
|
||||
return subject.holder.check_for_rights(rights_required)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/proc/GenerateToken()
|
||||
. = ""
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
clients += list(client)
|
||||
|
||||
clients = sortList(clients, GLOBAL_PROC_REF(cmp_playtime))
|
||||
clients = sort_list(clients, GLOBAL_PROC_REF(cmp_playtime))
|
||||
data["clients"] = clients
|
||||
return data
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
var/new_label = stripped_input(user, "Choose a new label.", "Sound Emitter")
|
||||
if(!new_label)
|
||||
return
|
||||
maptext = new_label
|
||||
maptext = MAPTEXT(new_label)
|
||||
to_chat(user, "<span class='notice'>Label set to [maptext].</span>", confidential = TRUE)
|
||||
if(href_list["edit_sound_file"])
|
||||
var/new_file = input(user, "Choose a sound file.", "Sound Emitter") as null|sound
|
||||
|
||||
@@ -403,7 +403,7 @@
|
||||
if (SSstickyban.dbcacheexpire)
|
||||
return SSstickyban.dbcache.Copy()
|
||||
|
||||
return sortList(world.GetConfig("ban"))
|
||||
return sort_list(world.GetConfig("ban"))
|
||||
|
||||
|
||||
/proc/get_stickyban_from_ckey(ckey)
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* Inserts the target_datum into [/datum/admins/var/tagged_datums], for later reference.
|
||||
*
|
||||
* Arguments:
|
||||
* * target_datum - The datum you want to create a tag for
|
||||
*/
|
||||
/datum/admins/proc/add_tagged_datum(datum/target_datum)
|
||||
if(LAZYFIND(tagged_datums, target_datum))
|
||||
to_chat(owner, span_warning("[target_datum] is already tagged!"))
|
||||
return
|
||||
|
||||
LAZYADD(tagged_datums, target_datum)
|
||||
RegisterSignal(target_datum, COMSIG_PARENT_QDELETING, .proc/handle_tagged_del, override = TRUE)
|
||||
to_chat(owner, span_notice("[target_datum] has been tagged."))
|
||||
|
||||
/// Get ahead of the curve with deleting
|
||||
/datum/admins/proc/handle_tagged_del(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
// No point, we don't even care about it anymore.
|
||||
if(!LAZYFIND(tagged_datums, source))
|
||||
return
|
||||
|
||||
if(owner)
|
||||
to_chat(owner, span_boldnotice("Tagged datum [source] ([source.type]) has been deleted."))
|
||||
remove_tagged_datum(source, silent = TRUE)
|
||||
|
||||
/**
|
||||
* Attempts to remove the specified datum from [/datum/admins/var/tagged_datums] if it exists
|
||||
*
|
||||
* Arguments:
|
||||
* * target_datum - The datum you want to remove from the tagged_datums list
|
||||
* * silent - If TRUE, won't print messages to the owner's chat
|
||||
*/
|
||||
/datum/admins/proc/remove_tagged_datum(datum/target_datum, silent=FALSE)
|
||||
if(!istype(target_datum))
|
||||
return
|
||||
|
||||
if(LAZYFIND(tagged_datums, target_datum))
|
||||
LAZYREMOVE(tagged_datums, target_datum)
|
||||
if(!silent)
|
||||
to_chat(owner, span_notice("[target_datum] has been untagged."))
|
||||
else if(!silent)
|
||||
to_chat(owner, span_warning("[target_datum] was not already tagged."))
|
||||
|
||||
/// Quick define for readability
|
||||
#define TAGS_REFRESH "<A href='?src=[REF(src)];[HrefToken(TRUE)];show_tags=1'>Refresh</a>"
|
||||
#define TAGS_CLEAR "<A href='?src=[REF(src)];[HrefToken(TRUE)];clear_tags=1'>Untag all</a>"
|
||||
|
||||
#define TAG_DEL(X) "<b>(<A href='?src=[REF(src)];[HrefToken(TRUE)];del_tag=[REF(X)]'>UNTAG</a>)</b>"
|
||||
#define TAG_MARK(X) "<b>(<A href='?src=[REF(src)];[HrefToken(TRUE)];mark_datum=[REF(X)]'>MARK</a>)</b>"
|
||||
#define TAG_SIMPLE_HEALTH(X) "<font color='#ff0000'><b>Health: [X.health]</b></font>"
|
||||
#define TAG_CARBON_HEALTH(X) "<font color='#ff0000'><b>Health: [X.health]</b></font> (\
|
||||
<font color='#ff3333'>[X.getBruteLoss()]</font> \
|
||||
<font color='#ff9933'>[X.getFireLoss()]</font> \
|
||||
<font color='#00cc66'>[X.getToxLoss()]</font> \
|
||||
<font color='#00cccc'>[X.getOxyLoss()]</font>\
|
||||
[X.getCloneLoss() ? " <font color='#1c3ac4'>[X.getCloneLoss()]</font>" : ""])"
|
||||
|
||||
/// Display all of the tagged datums
|
||||
/datum/admins/proc/display_tags()
|
||||
set category = "Admin.Game"
|
||||
set name = "View Tags"
|
||||
|
||||
if (!istype(src, /datum/admins))
|
||||
src = usr.client.holder
|
||||
if (!istype(src, /datum/admins))
|
||||
to_chat(usr, "Error: you are not an admin!", confidential = TRUE)
|
||||
return
|
||||
|
||||
var/index = 0
|
||||
var/list/dat = list("<center><B>Tag Menu</B></center><hr>")
|
||||
|
||||
dat += "<br>[TAGS_REFRESH] | [TAGS_CLEAR]<br>"
|
||||
if(LAZYLEN(tagged_datums))
|
||||
for(var/datum/iter_datum as anything in tagged_datums)
|
||||
index++
|
||||
var/specific_info
|
||||
|
||||
if(isnull(iter_datum))
|
||||
dat += "\t[index]: Null reference - Check runtime logs!"
|
||||
stack_trace("Null datum found in tagged datum menu! User: [usr]")
|
||||
continue
|
||||
else if(iscarbon(iter_datum))
|
||||
var/mob/living/carbon/resolved_carbon = iter_datum
|
||||
specific_info = "[TAG_CARBON_HEALTH(resolved_carbon)] | [AREACOORD(resolved_carbon)] [ADMIN_PP(iter_datum)] [ADMIN_FLW(iter_datum)]"
|
||||
else if(isliving(iter_datum))
|
||||
var/mob/living/resolved_living = iter_datum
|
||||
specific_info = "[TAG_SIMPLE_HEALTH(resolved_living)] | [AREACOORD(resolved_living)] [ADMIN_PP(iter_datum)] [ADMIN_FLW(iter_datum)]"
|
||||
else if(ismob(iter_datum))
|
||||
var/atom/resolved_atom = iter_datum // needed for ADMIN_JMP
|
||||
specific_info = "[AREACOORD(resolved_atom)] [ADMIN_PP(iter_datum)] [ADMIN_FLW(iter_datum)]"
|
||||
else if(ismovable(iter_datum))
|
||||
var/atom/resolved_atom = iter_datum // needed for ADMIN_JMP
|
||||
specific_info = "[AREACOORD(resolved_atom)] [ADMIN_FLW(iter_datum)]"
|
||||
else if(isatom(iter_datum))
|
||||
var/atom/resolved_atom = iter_datum // needed for ADMIN_JMP
|
||||
specific_info = "[AREACOORD(resolved_atom)] [ADMIN_JMP(resolved_atom)]"
|
||||
else if(istype(iter_datum, /datum/controller/subsystem))
|
||||
var/datum/controller/subsystem/resolved_subsystem = iter_datum
|
||||
specific_info = "[resolved_subsystem.stat_entry()]"
|
||||
// else, it's just a /datum
|
||||
|
||||
dat += "\t[index]: [iter_datum] | [specific_info] | [ADMIN_VV(iter_datum)]| [TAG_DEL(iter_datum)] | [iter_datum == marked_datum ? "<b>Marked</b>" : TAG_MARK(iter_datum)] "
|
||||
dat += "\t(<b><font size='2'>[iter_datum.type])</font></b>"
|
||||
else
|
||||
dat += "No datums tagged :("
|
||||
|
||||
dat = dat.Join("<br>")
|
||||
usr << browse(dat, "window=tag;size=800x480")
|
||||
|
||||
/**
|
||||
* Clears tagged datums
|
||||
*/
|
||||
/datum/admins/proc/clear_tags()
|
||||
var/amount_of_tags = LAZYLEN(tagged_datums)
|
||||
if(!amount_of_tags)
|
||||
to_chat(owner, span_warning("There are no tagged datums to clear."))
|
||||
return
|
||||
var/confirmation = alert(usr, "Clear your tagged datums? ([amount_of_tags])", "Confirmation", "Yes", "No")
|
||||
if(confirmation != "Yes")
|
||||
return
|
||||
LAZYNULL(tagged_datums)
|
||||
to_chat(owner, span_notice("Tagged datums have been cleared, [amount_of_tags] item\s removed."))
|
||||
|
||||
#undef TAGS_REFRESH
|
||||
#undef TAGS_CLEAR
|
||||
|
||||
#undef TAG_DEL
|
||||
#undef TAG_MARK
|
||||
#undef TAG_SIMPLE_HEALTH
|
||||
#undef TAG_CARBON_HEALTH
|
||||
@@ -1026,7 +1026,7 @@
|
||||
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='danger'>This jobban will be lifted in [mins] minutes.</span>")
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
return TRUE
|
||||
if("No")
|
||||
var/reason = input(usr,"Please State Reason For Banning [M.key].","Reason") as message|null
|
||||
severity = input("Set the severity of the note/ban.", "Severity", null, null) as null|anything in list("High", "Medium", "Minor", "None")
|
||||
@@ -1052,7 +1052,7 @@
|
||||
to_chat(M, "<span class='boldannounce'>The reason is: [reason]</span>")
|
||||
to_chat(M, "<span class='danger'>Jobban can be lifted only upon request.</span>")
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
return TRUE
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
@@ -1081,8 +1081,8 @@
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] unbanned [key_name_admin(M)] from [msg].</span>")
|
||||
to_chat(M, "<span class='boldannounce'><BIG>You have been un-jobbanned by [usr.client.key] from [msg].</BIG></span>")
|
||||
href_list["jobban2"] = 1 // lets it fall through and refresh
|
||||
return 1
|
||||
return 0 //we didn't do anything!
|
||||
return TRUE
|
||||
return FALSE //we didn't do anything!
|
||||
|
||||
else if(href_list["boot2"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
@@ -1351,7 +1351,7 @@
|
||||
for (var/rule in subtypesof(/datum/dynamic_ruleset/roundstart))
|
||||
var/datum/dynamic_ruleset/roundstart/newrule = new rule()
|
||||
roundstart_rules[newrule.name] = newrule
|
||||
var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sortList(roundstart_rules)
|
||||
var/added_rule = input(usr,"What ruleset do you want to force? This will bypass threat level and population restrictions.", "Rigging Roundstart", null) as null|anything in sort_list(roundstart_rules)
|
||||
if (added_rule)
|
||||
GLOB.dynamic_forced_roundstart_ruleset += roundstart_rules[added_rule]
|
||||
log_admin("[key_name(usr)] set [added_rule] to be a forced roundstart ruleset.")
|
||||
@@ -2705,6 +2705,31 @@
|
||||
log_query_debug("[usr.key] | [response]")
|
||||
else if(answer == "no")
|
||||
log_query_debug("[usr.key] | Reported no server hang")
|
||||
else if(href_list["del_tag"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/datum_to_remove = locate(href_list["del_tag"])
|
||||
if(!datum_to_remove)
|
||||
return
|
||||
return remove_tagged_datum(datum_to_remove)
|
||||
|
||||
else if(href_list["show_tags"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
return display_tags()
|
||||
|
||||
else if(href_list["clear_tags"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
return clear_tags()
|
||||
|
||||
else if(href_list["mark_datum"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
var/datum/datum_to_mark = locate(href_list["mark_datum"])
|
||||
if(!datum_to_mark)
|
||||
return
|
||||
return usr.client?.mark_datum(datum_to_mark)
|
||||
|
||||
/datum/admins/proc/HandleCMode()
|
||||
if(!check_rights(R_ADMIN))
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
|
||||
else
|
||||
targets["(No Mob) - [T]"] = T
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sortList(targets)
|
||||
var/target = input(src,"To whom shall we send a message?","Admin PM",null) as null|anything in sort_list(targets)
|
||||
cmd_admin_pm(targets[target],null)
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Admin PM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -50,15 +50,12 @@
|
||||
"lockdown" = borg.locked_down,
|
||||
"scrambledcodes" = borg.scrambledcodes
|
||||
)
|
||||
.["upgrades"] = list()
|
||||
for (var/upgradetype in subtypesof(/obj/item/borg/upgrade)-/obj/item/borg/upgrade/hypospray) //hypospray is a dummy parent for hypospray upgrades
|
||||
var/obj/item/borg/upgrade/upgrade = upgradetype
|
||||
if (initial(upgrade.module_type) && !is_type_in_list(borg.module, initial(upgrade.module_type))) // Upgrade requires a different module
|
||||
continue
|
||||
var/installed = FALSE
|
||||
if (locate(upgradetype) in borg)
|
||||
installed = TRUE
|
||||
.["upgrades"] += list(list("name" = initial(upgrade.name), "installed" = installed, "type" = upgradetype))
|
||||
var/obj/item/gun/energy/kinetic_accelerator/kinetic_accelerator = locate(/obj/item/gun/energy/kinetic_accelerator) in borg.module
|
||||
if(kinetic_accelerator)
|
||||
.["ka_remaining_capacity"] = kinetic_accelerator.get_remaining_mod_capacity()
|
||||
.["active_upgrades"] = list()
|
||||
for (var/obj/item/borg/upgrade/upgrade as anything in borg.upgrades) // put a non-upgrade here, i dare you.
|
||||
.["active_upgrades"] += list(list("type" = upgrade.type))
|
||||
.["laws"] = borg.laws ? borg.laws.get_law_list(include_zeroth = TRUE, render_html = FALSE) : list()
|
||||
.["channels"] = list()
|
||||
for (var/k in GLOB.radiochannels)
|
||||
@@ -77,6 +74,28 @@
|
||||
for(var/mob/living/silicon/ai/ai in GLOB.ai_list)
|
||||
.["ais"] += list(list("name" = ai.name, "ref" = REF(ai), "connected" = (borg.connected_ai == ai)))
|
||||
|
||||
/datum/borgpanel/ui_static_data(mob/user)
|
||||
. = ..()
|
||||
.["upgrades"] = list()
|
||||
for(var/obj/item/borg/upgrade/upgrade as anything in GLOB.borg_upgrades)
|
||||
if(upgrade.type == upgrade.abstract_type)
|
||||
continue
|
||||
var/obj/item/borg/upgrade/modkit/modkit
|
||||
if(istype(upgrade, /obj/item/borg/upgrade/modkit))
|
||||
modkit = upgrade
|
||||
if(modkit.minebot_exclusive)
|
||||
continue
|
||||
modkit = upgrade
|
||||
.["upgrades"] += list(
|
||||
list(
|
||||
"name" = upgrade.name,
|
||||
"type" = upgrade.type,
|
||||
"module_type" = upgrade.module_type,
|
||||
"maximum_of_type" = modkit ? modkit.maximum_of_type : null,
|
||||
"denied_type" = modkit ? modkit.denied_type : null,
|
||||
"cost" = modkit ? modkit.cost : null
|
||||
)
|
||||
)
|
||||
|
||||
/datum/borgpanel/ui_act(action, params)
|
||||
if(..())
|
||||
@@ -148,17 +167,31 @@
|
||||
var/upgradepath = text2path(params["upgrade"])
|
||||
var/obj/item/borg/upgrade/installedupgrade = locate(upgradepath) in borg
|
||||
if (installedupgrade)
|
||||
installedupgrade.deactivate(borg, user)
|
||||
borg.upgrades -= installedupgrade
|
||||
qdel(installedupgrade)
|
||||
message_admins("[key_name_admin(user)] removed the [installedupgrade] upgrade from [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_admin("[key_name(user)] removed the [installedupgrade] upgrade from [key_name(borg)].")
|
||||
qdel(installedupgrade)
|
||||
else
|
||||
var/obj/item/borg/upgrade/upgrade = new upgradepath(borg)
|
||||
upgrade.action(borg, user)
|
||||
borg.upgrades += upgrade
|
||||
var/obj/item/borg/upgrade/upgrade = new upgradepath()
|
||||
if(!borg.apply_upgrade(upgrade, user, TRUE))
|
||||
to_chat(user, span_danger("Upgrade error."))
|
||||
return
|
||||
message_admins("[key_name_admin(user)] added the [upgrade] borg upgrade to [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_admin("[key_name(user)] added the [upgrade] borg upgrade to [key_name(borg)].")
|
||||
if ("add_upgrade")
|
||||
var/upgradepath = text2path(params["upgrade"])
|
||||
var/obj/item/borg/upgrade/upgrade = new upgradepath()
|
||||
if(!borg.apply_upgrade(upgrade, user, TRUE))
|
||||
to_chat(user, span_danger("Upgrade error."))
|
||||
return
|
||||
message_admins("[key_name_admin(user)] added the [upgrade] borg upgrade to [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_admin("[key_name(user)] added the [upgrade] borg upgrade to [key_name(borg)].")
|
||||
if ("remove_upgrade")
|
||||
var/upgradepath = text2path(params["upgrade"])
|
||||
var/obj/item/borg/upgrade/installedupgrade = locate(upgradepath) in borg
|
||||
if (installedupgrade)
|
||||
qdel(installedupgrade)
|
||||
message_admins("[key_name_admin(user)] removed the [installedupgrade] upgrade from [ADMIN_LOOKUPFLW(borg)].")
|
||||
log_admin("[key_name(user)] removed the [installedupgrade] upgrade from [key_name(borg)].")
|
||||
if ("toggle_radio")
|
||||
var/channel = params["channel"]
|
||||
if (channel in borg.radio.channels) // We're removing a channel
|
||||
@@ -226,13 +259,20 @@
|
||||
if (!istype(chosensilicon, /mob/living/silicon))
|
||||
to_chat(usr, "<span class='warning'>Silicon is required for law changes</span>", confidential=TRUE)
|
||||
return
|
||||
var/chosen = pick_closest_path(null, make_types_fancy(typesof(/obj/item/aiModule)))
|
||||
var/chosen = pick_closest_path(null, make_types_fancy(typesof(/obj/item/ai_module)))
|
||||
if (!chosen)
|
||||
return
|
||||
var/new_board = new chosen(src)
|
||||
var/obj/item/aiModule/chosenboard = new_board
|
||||
var/obj/item/ai_module/chosenboard = new_board
|
||||
var/mob/living/silicon/beepboop = chosensilicon
|
||||
chosenboard.install(beepboop.laws, usr)
|
||||
message_admins("[key_name_admin(usr)] added [chosenboard] to [ADMIN_LOOKUPFLW(beepboop)].")
|
||||
log_admin("[key_name(usr)] added [chosenboard] to [key_name(beepboop)].")
|
||||
qdel(new_board)
|
||||
|
||||
GLOBAL_LIST_INIT(borg_upgrades, populate_borg_upgrades())
|
||||
|
||||
/proc/populate_borg_upgrades()
|
||||
. = list()
|
||||
for(var/type in typesof(/obj/item/borg/upgrade))
|
||||
. += new type
|
||||
|
||||
@@ -89,11 +89,11 @@
|
||||
available.Add(C)
|
||||
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
|
||||
if(!choice)
|
||||
return 0
|
||||
return FALSE
|
||||
if(!isobserver(choice))
|
||||
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
|
||||
return FALSE
|
||||
var/obj/item/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
|
||||
@@ -238,7 +238,7 @@
|
||||
if(M.ckey)
|
||||
if(alert("This mob is being controlled by [M.key]. Are you sure you wish to give someone else control of it? [M.key] will be made a ghost.",,"Yes","No") != "Yes")
|
||||
return
|
||||
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sortList(GLOB.clients)
|
||||
var/client/newkey = input(src, "Pick the player to put in control.", "New player") as null|anything in sort_list(GLOB.clients)
|
||||
var/mob/oldmob = newkey.mob
|
||||
var/delmob = FALSE
|
||||
if((isobserver(oldmob) || alert("Do you want to delete [newkey]'s old mob?","Delete?","Yes","No") != "No"))
|
||||
@@ -494,7 +494,7 @@
|
||||
var/datum/outfit/O = path //not much to initalize here but whatever
|
||||
outfits[initial(O.name)] = path
|
||||
|
||||
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sortList(outfits)
|
||||
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in baseoutfits + sort_list(outfits)
|
||||
if (isnull(dresscode))
|
||||
return
|
||||
|
||||
@@ -508,7 +508,7 @@
|
||||
var/datum/outfit/O = path
|
||||
job_outfits[initial(O.name)] = path
|
||||
|
||||
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sortList(job_outfits)
|
||||
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in sort_list(job_outfits)
|
||||
dresscode = job_outfits[dresscode]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -520,7 +520,7 @@
|
||||
var/datum/outfit/O = path
|
||||
plasmaman_outfits[initial(O.name)] = path
|
||||
|
||||
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sortList(plasmaman_outfits)
|
||||
dresscode = input("Select plasmeme equipment", "Robust quick dress shop") as null|anything in sort_list(plasmaman_outfits)
|
||||
dresscode = plasmaman_outfits[dresscode]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -529,7 +529,7 @@
|
||||
var/list/custom_names = list()
|
||||
for(var/datum/outfit/D in GLOB.custom_outfits)
|
||||
custom_names[D.name] = D
|
||||
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sortList(custom_names)
|
||||
var/selected_name = input("Select outfit", "Robust quick dress shop") as null|anything in sort_list(custom_names)
|
||||
dresscode = custom_names[selected_name]
|
||||
if(isnull(dresscode))
|
||||
return
|
||||
@@ -828,15 +828,15 @@
|
||||
set name = "Show Line Profiling"
|
||||
set desc = "Shows tracked profiling info from code lines that support it"
|
||||
|
||||
var/sortlist = list(
|
||||
var/sort_list = list(
|
||||
"Avg time" = GLOBAL_PROC_REF(cmp_profile_avg_time_dsc),
|
||||
"Total Time" = GLOBAL_PROC_REF(cmp_profile_time_dsc),
|
||||
"Call Count" = GLOBAL_PROC_REF(cmp_profile_count_dsc)
|
||||
)
|
||||
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sortlist
|
||||
var/sort = input(src, "Sort type?", "Sort Type", "Avg time") as null|anything in sort_list
|
||||
if (!sort)
|
||||
return
|
||||
sort = sortlist[sort]
|
||||
sort = sort_list[sort]
|
||||
profile_show(src, sort)
|
||||
|
||||
/client/proc/reload_configuration()
|
||||
|
||||
@@ -65,7 +65,7 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping)
|
||||
icon_state = "yellow"
|
||||
|
||||
/obj/effect/debugging/marker/Move()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/client/proc/camera_view()
|
||||
set category = "Mapping"
|
||||
@@ -83,7 +83,7 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping)
|
||||
for(var/turf/T in C.can_see())
|
||||
seen[T]++
|
||||
for(var/turf/T in seen)
|
||||
T.maptext = "[seen[T]]"
|
||||
T.maptext = MAPTEXT("[seen[T]]")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range")
|
||||
|
||||
@@ -111,7 +111,7 @@ GLOBAL_LIST_EMPTY(dirty_vars)
|
||||
|
||||
if(!Master)
|
||||
alert(usr,"Master_controller not found.","Sec Camera Report")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/list/obj/machinery/camera/CL = list()
|
||||
|
||||
|
||||
@@ -70,10 +70,10 @@
|
||||
H.mind.make_Traitor()
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/admins/proc/makeChangelings()
|
||||
@@ -102,9 +102,9 @@
|
||||
H.mind.make_Changeling()
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/admins/proc/makeRevs()
|
||||
|
||||
@@ -131,9 +131,9 @@
|
||||
H = pick(candidates)
|
||||
H.mind.make_Rev()
|
||||
candidates.Remove(H)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/datum/admins/proc/makeWizard()
|
||||
|
||||
@@ -171,9 +171,9 @@
|
||||
H.mind.make_Cultist()
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
/datum/admins/proc/makeClockCult()
|
||||
@@ -206,9 +206,9 @@
|
||||
SSticker.mode.equip_servant(H)
|
||||
candidates.Remove(H)
|
||||
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
break
|
||||
//Making sure we have atleast 3 Nuke agents, because less than that is kinda bad
|
||||
if(agentcount < 3)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
//Let's find the spawn locations
|
||||
var/leader_chosen = FALSE
|
||||
@@ -249,9 +249,9 @@
|
||||
nuke_team = N.nuke_team
|
||||
else
|
||||
new_character.mind.add_antag_datum(/datum/antagonist/nukeop,nuke_team)
|
||||
return 1
|
||||
return TRUE
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
|
||||
|
||||
@@ -451,8 +451,8 @@
|
||||
//Abductors
|
||||
/datum/admins/proc/makeAbductorTeam()
|
||||
new /datum/round_event/ghost_role/abductor
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/datum/admins/proc/makeRevenant()
|
||||
new /datum/round_event/ghost_role/revenant(TRUE, TRUE)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
@@ -300,7 +300,7 @@
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>Error: create_xeno(): no suitable candidates.</span>")
|
||||
if(!istext(ckey))
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
var/alien_caste = input(usr, "Please choose which caste to spawn.","Pick a caste",null) as null|anything in list("Queen","Praetorian","Hunter","Sentinel","Drone","Larva")
|
||||
var/obj/effect/landmark/spawn_here = GLOB.xeno_spawn.len ? pick(GLOB.xeno_spawn) : null
|
||||
@@ -319,7 +319,7 @@
|
||||
if("Larva")
|
||||
new_xeno = new /mob/living/carbon/alien/larva(spawn_here)
|
||||
else
|
||||
return 0
|
||||
return FALSE
|
||||
if(!spawn_here)
|
||||
SSjob.SendToLateJoin(new_xeno, FALSE)
|
||||
|
||||
@@ -327,7 +327,7 @@
|
||||
var/msg = "<span class='notice'>[key_name_admin(usr)] has spawned [ckey] as a filthy xeno [alien_caste].</span>"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(new_xeno, msg)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/*
|
||||
If a guy was gibbed and you want to revive him, this is a good way to do so.
|
||||
@@ -1672,7 +1672,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
var/name = GLOB.trait_name_map[trait] || trait
|
||||
availible_traits[name] = trait
|
||||
|
||||
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sortList(availible_traits)
|
||||
var/chosen_trait = input("Select trait to modify", "Trait") as null|anything in sort_list(availible_traits)
|
||||
if(!chosen_trait)
|
||||
return
|
||||
chosen_trait = availible_traits[chosen_trait]
|
||||
@@ -1689,7 +1689,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if("All")
|
||||
source = null
|
||||
if("Specific")
|
||||
source = input("Source to be removed","Trait Remove/Add") as null|anything in sortList(D.status_traits[chosen_trait])
|
||||
source = input("Source to be removed","Trait Remove/Add") as null|anything in sort_list(D.status_traits[chosen_trait])
|
||||
if(!source)
|
||||
return
|
||||
REMOVE_TRAIT(D,chosen_trait,source)
|
||||
|
||||
@@ -246,7 +246,7 @@
|
||||
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
|
||||
E = DC.runEvent()
|
||||
if("Choose")
|
||||
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sortList(typesof(/datum/disease), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
var/virus = input("Choose the virus to spread", "BIOHAZARD") as null|anything in sort_list(typesof(/datum/disease), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
var/datum/round_event_control/disease_outbreak/DC = locate(/datum/round_event_control/disease_outbreak) in SSevents.control
|
||||
var/datum/round_event/disease_outbreak/DO = DC.runEvent()
|
||||
DO.virus_type = virus
|
||||
|
||||
@@ -77,6 +77,15 @@
|
||||
markstring = "[VV_MARKED_DATUM] (CURRENT: [(istype(holder) && istype(holder.marked_datum))? holder.marked_datum.type : "NULL"])"
|
||||
classes += markstring
|
||||
|
||||
var/list/tagstrings = new
|
||||
if(!(VV_TAGGED_DATUM in restricted_classes) && holder && LAZYLEN(holder.tagged_datums))
|
||||
var/i = 0
|
||||
for(var/datum/iter_tagged_datum as anything in holder.tagged_datums)
|
||||
i++
|
||||
var/new_tagstring = "[VV_TAGGED_DATUM] #[i]: [iter_tagged_datum.type])"
|
||||
tagstrings[new_tagstring] = iter_tagged_datum
|
||||
classes += new_tagstring
|
||||
|
||||
if(restricted_classes)
|
||||
classes -= restricted_classes
|
||||
|
||||
@@ -87,6 +96,11 @@
|
||||
if(holder && holder.marked_datum && .["class"] == markstring)
|
||||
.["class"] = VV_MARKED_DATUM
|
||||
|
||||
if(holder && tagstrings[.["class"]])
|
||||
var/datum/chosen_datum = tagstrings[.["class"]]
|
||||
.["value"] = chosen_datum
|
||||
.["class"] = VV_TAGGED_DATUM
|
||||
|
||||
switch(.["class"])
|
||||
if(VV_TEXT)
|
||||
.["value"] = input("Enter new text:", "Text", current_value) as null|text
|
||||
@@ -202,6 +216,11 @@
|
||||
.["class"] = null
|
||||
return
|
||||
|
||||
if(VV_TAGGED_DATUM)
|
||||
if(.["value"] == null)
|
||||
.["class"] = null
|
||||
return
|
||||
|
||||
if(VV_PROCCALL_RETVAL)
|
||||
var/list/get_retval = list()
|
||||
callproc_blocking(get_retval)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
for (var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
names = sort_list(names)
|
||||
|
||||
variable = input("Which var?", "Var") as null|anything in names
|
||||
else
|
||||
|
||||
@@ -306,7 +306,7 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
for (var/V in O.vars)
|
||||
names += V
|
||||
|
||||
names = sortList(names)
|
||||
names = sort_list(names)
|
||||
|
||||
variable = input("Which var?","Var") as null|anything in names
|
||||
if(!variable)
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/client/proc/tag_datum(datum/target_datum)
|
||||
if(!holder || QDELETED(target_datum))
|
||||
return
|
||||
holder.add_tagged_datum(target_datum)
|
||||
|
||||
/client/proc/toggle_tag_datum(datum/target_datum)
|
||||
if(!holder || !target_datum)
|
||||
return
|
||||
|
||||
if(LAZYFIND(holder.tagged_datums, target_datum))
|
||||
holder.remove_tagged_datum(target_datum)
|
||||
else
|
||||
holder.add_tagged_datum(target_datum)
|
||||
|
||||
/client/proc/tag_datum_mapview(datum/target_datum as mob|obj|turf|area in view(view))
|
||||
set category = "Debug"
|
||||
set name = "Tag Datum"
|
||||
tag_datum(target_datum)
|
||||
@@ -59,15 +59,17 @@
|
||||
|
||||
if(href_list[VV_HK_MARK])
|
||||
usr.client.mark_datum(target)
|
||||
if(href_list[VV_HK_TAG])
|
||||
usr.client.tag_datum(target)
|
||||
if(href_list[VV_HK_ADDCOMPONENT])
|
||||
if(!check_rights(NONE))
|
||||
return
|
||||
var/list/names = list()
|
||||
var/list/componentsubtypes = sortList(subtypesof(/datum/component), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
var/list/componentsubtypes = sort_list(subtypesof(/datum/component), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
names += "---Components---"
|
||||
names += componentsubtypes
|
||||
names += "---Elements---"
|
||||
names += sortList(subtypesof(/datum/element), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
names += sort_list(subtypesof(/datum/element), GLOBAL_PROC_REF(cmp_typepaths_asc))
|
||||
var/result = input(usr, "Choose a component/element to add","better know what ur fuckin doin pal") as null|anything in names
|
||||
if(!usr || !result || result == "---Components---" || result == "---Elements---")
|
||||
return
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
value = L[key]
|
||||
variable_html += debug_variable(i, value, 0, L)
|
||||
else
|
||||
names = sortList(names)
|
||||
names = sort_list(names)
|
||||
for(var/V in names)
|
||||
if(D.can_vv_get(V))
|
||||
variable_html += D.vv_get_var(V)
|
||||
|
||||
Reference in New Issue
Block a user