Fixed damagetypes not working in admin investigate (The (?) button when someone adminhelps)

Committing for Zekkeit/39kk9t
- Attack logs now display the reagents the pill/snack had when you forced it down someone's throat.
- List entries can now be edited and deleted! (don't try editing any of the contents list entries, it spits a runtime and I don't know how to make it uneditable)
- Fix for issue 598. Now pAI carriers can re-enable the pAI radio settings.
- Adminmoreinfo now displays the status of the mob.
- Added a confirmation message to unjobbanning from the Display Job bans panel.
- When being exposed to a virus, resistances are now taken into account. In addition, list entries that contained a virus that has been cured are now deleted.

Proposed commit: http://nanotrasen.com/phpBB3/viewtopic.php?f=16&t=9262

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4008 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
johnsonmt88@gmail.com
2012-07-07 19:32:31 +00:00
parent a7baf04430
commit 22c872a2a3
6 changed files with 57 additions and 41 deletions
+20 -9
View File
@@ -576,11 +576,12 @@ var/global/BSACooldown = 0
if (href_list["removejobban"])
if ((src.rank in list("Game Admin", "Game Master" )))
var/t = href_list["removejobban"]
if(t)
log_admin("[key_name(usr)] removed [t]")
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
if(input(alert("Do you want to unjobban [t]?","Unjobban confirmation", "Yes", "No") == "Yes")) //No more misclicks! Unless you do it twice.
if(t)
log_admin("[key_name(usr)] removed [t]")
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
if (href_list["newban"])
if ((src.rank in list( "Temporary Admin", "Admin Candidate", "Trial Admin", "Badmin", "Game Admin", "Game Master" )))
@@ -1133,6 +1134,7 @@ var/global/BSACooldown = 0
return
if(src && src.owner)
// //world <<"Passed the owner-check. Owner is [src.owner]. The mob is [M]."
var/location_description = ""
var/special_role_description = ""
var/health_description = ""
@@ -1140,10 +1142,11 @@ var/global/BSACooldown = 0
//Location
if(T && isturf(T))
// //world <<"Has a location."
if(T.loc && isarea(T.loc))
location_description = "([T.x], [T.y], [T.z] in area <b>[T.loc]</b>)"
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z] in area <b>[T.loc]</b>)"
else
location_description = "([T.x], [T.y], [T.z])"
location_description = "([M.loc == T ? "at coordinates " : "in [M.loc] at coordinates "] [T.x], [T.y], [T.z])"
//Job + antagonist
if(M.mind)
@@ -1153,11 +1156,19 @@ var/global/BSACooldown = 0
//Health
if(isliving(M))
var/mob/living/L
health_description = "Oxy: [L.oxyloss] - Tox: [L.toxloss] - Fire: [L.fireloss] - Brute: [L.bruteloss] - Clone: [L.cloneloss] - Brain: [L.brainloss]"
var/mob/living/L = M
var/status
switch (M.stat)
if (0) status = "Alive"
if (1) status = "\yellow Unconscious"
if (2) status = "\red Dead"
health_description = "Status - [status]"
health_description += "<BR>Oxy: [L.getOxyLoss()] - Tox: [L.getToxLoss()] - Fire: [L.getFireLoss()] - Brute: [L.getBruteLoss()] - Clone: [L.getCloneLoss()] - Brain: [L.getBrainLoss()]"
else
// world <<"Has no health."
health_description = "This mob type has no health to speak of."
// world <<"Displaying info about the mob..."
src.owner << "<b>Info about [M.name]:</b> "
src.owner << "Mob type = [M.type]; Damage = [health_description]"
src.owner << "Name = <b>[M.name]</b>; Real_name = [M.real_name]; Original_name = [M.original_name]; Key = <b>[M.key]</b>;"
+14 -21
View File
@@ -127,7 +127,6 @@ var/list/forbidden_varedit_object_types = list(
if(!istype(L,/list)) src << "Not a List."
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "viruses", "cuffed", "ka", "last_eaten", "urine", "poo", "icon", "icon_state")
var/list/names = sortList(L)
var/variable = input("Which var?","Var") as null|anything in names + "(ADD VAR)"
@@ -211,10 +210,10 @@ var/list/forbidden_varedit_object_types = list(
var/class = "text"
if(src.holder && src.holder.marked_datum)
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])")
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default","marked datum ([holder.marked_datum.type])", "DELETE FROM LIST")
else
class = input("What kind of variable?","Variable Type",default) as null|anything in list("text",
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default")
"num","type","reference","mob reference", "icon","file","list","edit referenced object","restore to default", "DELETE FROM LIST")
if(!class)
return
@@ -222,51 +221,45 @@ var/list/forbidden_varedit_object_types = list(
if(holder.marked_datum && class == "marked datum ([holder.marked_datum.type])")
class = "marked datum"
switch(class)
switch(class) //Spits a runtime error if you try to modify an entry in the contents list. Dunno how to fix it, yet.
if("list")
mod_list(variable)
if("restore to default")
variable = initial(variable)
L[L.Find(variable)]=initial(variable)
if("edit referenced object")
modify_variables(variable)
if("(DELETE FROM LIST)")
if("DELETE FROM LIST")
L -= variable
return
if("text")
variable = input("Enter new text:","Text",\
variable) as text
L[L.Find(variable)] = input("Enter new text:","Text") as text
if("num")
variable = input("Enter new number:","Num",\
variable) as num
L[L.Find(variable)] = input("Enter new number:","Num") as num
if("type")
variable = input("Enter type:","Type",variable) \
in typesof(/obj,/mob,/area,/turf)
L[L.Find(variable)] = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
if("reference")
variable = input("Select reference:","Reference",\
variable) as mob|obj|turf|area in world
L[L.Find(variable)] = input("Select reference:","Reference") as mob|obj|turf|area in world
if("mob reference")
variable = input("Select reference:","Reference",\
variable) as mob in world
L[L.Find(variable)] = input("Select reference:","Reference") as mob in world
if("file")
variable = input("Pick file:","File",variable) \
as file
L[L.Find(variable)] = input("Pick file:","File") as file
if("icon")
variable = input("Pick icon:","Icon",variable) \
as icon
L[L.Find(variable)] = input("Pick icon:","Icon") as icon
if("marked datum")
variable = holder.marked_datum
L[L.Find(variable)] = holder.marked_datum
/client/proc/modify_variables(var/atom/O, var/param_var_name = null, var/autodetect_class = 0)
var/list/locked = list("vars", "key", "ckey", "client", "firemut", "ishulk", "telekinesis", "xray", "virus", "cuffed", "ka", "last_eaten", "icon", "icon_state", "mutantrace")