Merge branch 'master' of git://github.com/Baystation12/Baystation12 into TGUpdates

Conflicts:
	code/modules/mob/mob_defines.dm
This commit is contained in:
Ren Erthilo
2012-04-04 20:19:23 +01:00
42 changed files with 923 additions and 361 deletions
+22 -1
View File
@@ -78,6 +78,20 @@
var/datum/player_info/P = new
P.author = usr.key
P.content = add
var/modifyer = "th"
switch(time2text(world.timeofday, "DD"))
if("01","21","31")
modifyer = "st"
if("02","22",)
modifyer = "nd"
if("03","23")
modifyer = "rd"
var/day_string = "[time2text(world.timeofday, "DD")][modifyer]"
if(copytext(day_string,1,2) == "0")
day_string = copytext(day_string,2)
var/full_date = time2text(world.timeofday, "DDD, MMM DD of YYYY")
var/day_loc = findtext(full_date, time2text(world.timeofday, "DD"))
P.timestamp = "[copytext(full_date,1,day_loc)][day_string][copytext(full_date,day_loc+2)]"
infos += P
@@ -1871,6 +1885,7 @@
/datum/player_info/var
author // admin who authored the information
content // text content of the information
timestamp // Because this is bloody annoying
/obj/admins/proc/player_has_info(var/key as text)
var/savefile/info = new("data/player_saves/[copytext(key, 1, 2)]/[key]/info.sav")
@@ -1896,13 +1911,18 @@
if(!infos)
dat += "No information found on the given key.<br>"
else
var/update_file = 0
var/i = 0
for(var/datum/player_info/I in infos)
i += 1
dat += "<font color=#008800>[I.content]</font> <i>by [I.author]</i> "
if(!I.timestamp)
I.timestamp = "Pre-4/3/2012"
update_file = 1
dat += "<font color=#008800>[I.content]</font> <i>by [I.author]</i> on <i><font color=blue>[I.timestamp]</i></font> "
if(I.author == usr.key)
dat += "<A href='?src=\ref[src];remove_player_info=[key];remove_index=[i]'>Remove</A>"
dat += "<br><br>"
if(update_file) info << infos
dat += "<br>"
dat += "<A href='?src=\ref[src];add_player_info=[key]'>Add Comment</A><br>"
@@ -1941,6 +1961,7 @@
if(!note_keys)
dat += "No notes found."
else
sortList(note_keys)
for(var/t in note_keys)
dat += text("<tr><td><A href='?src=\ref[src];view_player_info=[t]'>[t]</A></td></tr>")
dat += "</table>"
+3 -3
View File
@@ -5,7 +5,7 @@
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name/Real Name</th><th>Type</th><th>Assigned Job</th><th>Info</th><th>Options</th><th>Traitor?</th></tr></B>"
//add <th>IP:</th> to this if wanting to add back in IP checking
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
var/list/mobs = sortmobs()
var/list/mobs = get_sorted_mobs()
var/i = 1
for(var/mob/M in mobs)
@@ -45,7 +45,7 @@
else if(istype(M,/mob/new_player))
dat += "<td>New Player</td>"
else
dat += "<td>ERROR</td>"
dat += "<td>\red ERROR</td>\black"
if(M.mind && M.mind.assigned_role && istype(M, /mob/living/carbon/human)) // Adds a column to Player Panel that shows their current job.
var/mob/living/carbon/human/H = M
@@ -117,7 +117,7 @@
dat += "<body><table border=1 cellspacing=5><B><tr><th>Name</th><th>Real Name</th><th>Assigned Job</th><th>Key</th><th>Options</th><th>PM</th><th>Traitor?</th></tr></B>"
//add <th>IP:</th> to this if wanting to add back in IP checking
//add <td>(IP: [M.lastKnownIP])</td> if you want to know their ip to the lists below
var/list/mobs = sortmobs()
var/list/mobs = get_sorted_mobs()
for(var/mob/M in mobs)
if(!M.ckey) continue
+26 -14
View File
@@ -28,7 +28,7 @@
alert("Admin jumping disabled")
return
/client/proc/jumptomob(var/mob/M in world)
/client/proc/jumptomob()
set category = "Admin"
set name = "Jump to Mob"
@@ -37,15 +37,18 @@
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(src.mob)
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
A.loc = T
else
A << "This mob is not located in the game world."
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs()
var/mob/M = selection
if(!istype(M))
return
var/mob/A = src.mob
var/turf/T = get_turf(M)
if(T && isturf(T))
A.loc = T
log_admin("[key_name(usr)] jumped to [key_name(M)]")
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
else
A << "This mob is not located in the game world."
else
alert("Admin jumping disabled")
@@ -71,7 +74,7 @@
else
alert("Admin jumping disabled")
/client/proc/Getmob(var/mob/M in world)
/client/proc/Getmob()
set category = "Admin"
set name = "Get Mob"
set desc = "Mob to teleport"
@@ -79,9 +82,18 @@
src << "Only administrators may use this command."
return
if(config.allow_admin_jump)
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
M.loc = get_turf(usr)
var/selection = input("Please, select a player!", "Admin Jumping", null, null) as null|anything in getmobs()
var/mob/M = selection
if(!istype(M))
return
var/mob/A = src.mob
var/turf/T = get_turf(A)
if(T && isturf(T))
M.loc = T
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
else
A << "You are not located in the game world."
else
alert("Admin jumping disabled")
+4 -3
View File
@@ -50,7 +50,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
if("Obj")
target = input("Enter target:","Target",usr) as obj in world
if("Mob")
target = input("Enter target:","Target",usr) as mob in world
target = input("Enter target:","Target",usr) as mob in getmobs()
if("Area or Turf")
target = input("Enter target:","Target",usr.loc) as area|turf in world
if("Client")
@@ -105,7 +105,7 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
lst[i] = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
lst[i] = input("Select reference:","Reference",usr) as mob in world
lst[i] = input("Select reference:","Reference",usr) as mob in getmobs()
if("file")
lst[i] = input("Pick file:","File") as file
@@ -117,10 +117,11 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/list/keys = list()
for(var/mob/M in world)
keys += M.client
sortList(keys)
lst[i] = input("Please, select a player!", "Selection", null, null) as null|anything in keys
if("mob's area")
var/mob/temp = input("Select mob", "Selection", usr) as mob in world
var/mob/temp = input("Select mob", "Selection", usr) as mob in getmobs()
lst[i] = temp.loc
+13 -13
View File
@@ -62,7 +62,7 @@
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as null|mob in world
var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
if("file")
var_value = input("Pick file:","File") as null|file
@@ -99,10 +99,10 @@
switch(class)
if("text")
var_value = input("Enter new text:","Text") as text
var_value = input("Enter new text:","Text") as null|text
if("num")
var_value = input("Enter new number:","Num") as num
var_value = input("Enter new number:","Num") as null|num
if("type")
var_value = input("Enter type:","Type") in typesof(/obj,/mob,/area,/turf)
@@ -127,13 +127,13 @@
var_value = input("Select reference:","Reference") as null|mob|obj|turf|area in world
if("mob reference")
var_value = input("Select reference:","Reference") as mob in world
var_value = input("Select reference:","Reference") as null|mob in get_sorted_mobs()
if("file")
var_value = input("Pick file:","File") as file
var_value = input("Pick file:","File") as null|file
if("icon")
var_value = input("Pick icon:","Icon") as icon
var_value = input("Pick icon:","Icon") as null|icon
if("marked datum")
var_value = holder.marked_datum
@@ -263,11 +263,11 @@
if("text")
variable = input("Enter new text:","Text",\
variable) as text
variable) as null|text
if("num")
variable = input("Enter new number:","Num",\
variable) as num
variable) as null|num
if("type")
variable = input("Enter type:","Type",variable) \
@@ -276,7 +276,7 @@
if("reference")
switch(alert("Would you like to enter a specific object, or search for it from the world?","Choose!","Specifc UID (Hexadecimal number)", "Search"))
if("Specifc UID (Hexadecimal number)")
var/UID = input("Type in UID, without the leading 0x","Type in UID") as text|null
var/UID = input("Type in UID, without the leading 0x","Type in UID") as null|text
if(!UID) return
if(length(UID) != 7)
usr << "ERROR. UID must be 7 digits"
@@ -294,15 +294,15 @@
if("mob reference")
variable = input("Select reference:","Reference",\
variable) as mob in world
variable) as null|mob in get_sorted_mobs()
if("file")
variable = input("Pick file:","File",variable) \
as file
as null|file
if("icon")
variable = input("Pick icon:","Icon",variable) \
as icon
as null|icon
if("marked datum")
variable = holder.marked_datum
@@ -533,7 +533,7 @@
O.vars[variable] = var_new
if("mob reference")
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in world
var/var_new = input("Select reference:","Reference",O.vars[variable]) as null|mob in get_sorted_mobs()
if(var_new==null) return
O.vars[variable] = var_new