Resolves issue 635: cause, no checks for mob/M being null even though M = locate([ref]) in world >_> so basic

simplified armour rune code a little bit.

Added IP and ID fields to the unban panel. because I told somebody that I'd add it for them aaaages ago but forgot.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@4003 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
elly1989@rocketmail.com
2012-07-07 01:17:20 +00:00
parent 4cc6222d86
commit 23bb27645e
3 changed files with 27 additions and 25 deletions

View File

@@ -44,28 +44,25 @@
var/list/names = list()
var/list/namecounts = list()
var/list/creatures = list()
for (var/mob/M in world)
if (istype(M, /mob/new_player))
continue //cameras can't follow people who haven't started yet DUH OR DIDN'T YOU KNOW THAT
for(var/mob/living/M in world)
//Cameras can't track people wearing an agent card or a ninja hood.
if (istype(M, /mob/living/carbon/human))
if(istype(M, /mob/living/carbon/human))
if(istype(M:wear_id, /obj/item/weapon/card/id/syndicate))
continue
if(istype(M:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!M:head:canremove)
continue
if(!istype(M.loc, /turf)) //in a closet or something, AI can't see him anyways
continue
var/area/wizard_station/A = locate()//So that wizards are not tracked by the AI until they leave their sanctuary. Unless they talk on radio/N
if(M in A.contents)
if(istype(M.loc.loc, /area/wizard_station))
continue
if(M.invisibility)//cloaked
continue
if(istype(M.loc,/obj/effect/dummy))
continue
else if (M == usr)
if(M == usr)
continue
if(M.digitalcamo)
continue
if(M.loc.z == 2) // Don't detect mobs on Centcom
continue
var/name = M.name
if (name in names)
@@ -76,20 +73,18 @@
namecounts[name] = 1
creatures[name] = M
creatures = sortList(creatures)
var/target_name = input(usr, "Which creature should you track?") as null|anything in creatures
//I blame : usage!
var/target_name = input(usr, "Which creature should you track?") as null|anything in sortList(creatures)
if (!target_name)
usr:cameraFollow = null
return
var/mob/target = creatures[target_name]
ai_actual_track(target)
/mob/living/silicon/ai/proc/ai_actual_track(mob/target as mob)
/mob/living/silicon/ai/proc/ai_actual_track(mob/living/target as mob)
if(!istype(target)) return
usr:cameraFollow = target
usr << text("Now tracking [] on camera.", target.name)

View File

@@ -282,6 +282,7 @@ var/list/sacrificed = list()
corpse_to_raise.buckled = null
if (corpse_to_raise.handcuffed)
del(corpse_to_raise.handcuffed)
corpse_to_raise.update_inv_handcuffed(0)
corpse_to_raise.stat=0
corpse_to_raise.updatehealth()
corpse_to_raise.UpdateDamageIcon()
@@ -1002,15 +1003,9 @@ var/list/sacrificed = list()
user.equip_if_possible(new /obj/item/clothing/suit/cultrobes/alt(user), user.slot_wear_suit)
user.equip_if_possible(new /obj/item/clothing/shoes/cult(user), user.slot_shoes)
user.equip_if_possible(new /obj/item/weapon/storage/backpack/cultpack(user), user.slot_back)
if(!user.equip_if_possible(new /obj/item/weapon/melee/cultblade(user), user.slot_r_hand))
user.equip_if_possible(new /obj/item/weapon/melee/cultblade(user), user.slot_l_hand)
user.update_inv_head(0)
user.update_inv_wear_suit(0)
user.update_inv_shoes(0)
user.update_inv_back(0)
user.update_inv_l_hand(0)
user.update_inv_r_hand()
//the above update their overlay icons cache but do not call update_icons()
//the below calls update_icons() at the end, which will update overlay icons by using the (now updated) cache
user.put_in_hands(new /obj/item/weapon/melee/cultblade(user)) //put in hands or on floor
del(src)
return

View File

@@ -170,7 +170,19 @@ var/savefile/Banlist
for (var/A in Banlist.dir)
count++
Banlist.cd = "/base/[A]"
dat += text("<tr><td><A href='?src=\ref[src];unbanf=[Banlist["key"]][Banlist["id"]]'>(U)</A><A href='?src=\ref[src];unbane=[Banlist["key"]][Banlist["id"]]'>(E)</A> Key: <B>[Banlist["key"]]</B></td><td> ([Banlist["temp"] ? "[GetExp(Banlist["minutes"]) ? GetExp(Banlist["minutes"]) : "Removal pending" ]" : "Permaban"])</td><td>(By: [Banlist["bannedby"]])</td><td>(Reason: [Banlist["reason"]])</td></tr>")
var/ref = "\ref[src]"
var/key = Banlist["key"]
var/id = Banlist["id"]
var/ip = Banlist["ip"]
var/reason = Banlist["reason"]
var/by = Banlist["bannedby"]
var/expiry
if(Banlist["temp"])
expiry = GetExp(Banlist["minutes"])
if(!expiry) expiry = "Removal Pending"
else expiry = "Permaban"
dat += text("<tr><td><A href='?src=[ref];unbanf=[key][id]'>(U)</A><A href='?src=[ref];unbane=[key][id]'>(E)</A> Key: <B>[key]</B></td><td>ComputerID: <B>[id]</B></td><td>IP: <B>[ip]</B></td><td> [expiry]</td><td>(By: [by])</td><td>(Reason: [reason])</td></tr>")
dat += "</table>"
dat = "<HR><B>Bans:</B> <FONT COLOR=blue>(U) = Unban , (E) = Edit Ban</FONT> - <FONT COLOR=green>([count] Bans)</FONT><HR><table border=1 rules=all frame=void cellspacing=0 cellpadding=3 >[dat]"