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/names = list()
var/list/namecounts = list() var/list/namecounts = list()
var/list/creatures = list() var/list/creatures = list()
for (var/mob/M in world) for(var/mob/living/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
//Cameras can't track people wearing an agent card or a ninja hood. //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)) if(istype(M:wear_id, /obj/item/weapon/card/id/syndicate))
continue continue
if(istype(M:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!M:head:canremove) if(istype(M:head, /obj/item/clothing/head/helmet/space/space_ninja)&&!M:head:canremove)
continue continue
if(!istype(M.loc, /turf)) //in a closet or something, AI can't see him anyways if(!istype(M.loc, /turf)) //in a closet or something, AI can't see him anyways
continue 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(istype(M.loc.loc, /area/wizard_station))
if(M in A.contents)
continue continue
if(M.invisibility)//cloaked if(M.invisibility)//cloaked
continue continue
if(istype(M.loc,/obj/effect/dummy)) if(M == usr)
continue
else if (M == usr)
continue continue
if(M.digitalcamo) if(M.digitalcamo)
continue continue
if(M.loc.z == 2) // Don't detect mobs on Centcom
continue
var/name = M.name var/name = M.name
if (name in names) if (name in names)
@@ -76,20 +73,18 @@
namecounts[name] = 1 namecounts[name] = 1
creatures[name] = M creatures[name] = M
//I blame : usage!
creatures = sortList(creatures) var/target_name = input(usr, "Which creature should you track?") as null|anything in sortList(creatures)
var/target_name = input(usr, "Which creature should you track?") as null|anything in creatures
if (!target_name) if (!target_name)
usr:cameraFollow = null usr:cameraFollow = null
return return
var/mob/target = creatures[target_name] var/mob/target = creatures[target_name]
ai_actual_track(target) 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:cameraFollow = target
usr << text("Now tracking [] on camera.", target.name) usr << text("Now tracking [] on camera.", target.name)

View File

@@ -282,6 +282,7 @@ var/list/sacrificed = list()
corpse_to_raise.buckled = null corpse_to_raise.buckled = null
if (corpse_to_raise.handcuffed) if (corpse_to_raise.handcuffed)
del(corpse_to_raise.handcuffed) del(corpse_to_raise.handcuffed)
corpse_to_raise.update_inv_handcuffed(0)
corpse_to_raise.stat=0 corpse_to_raise.stat=0
corpse_to_raise.updatehealth() corpse_to_raise.updatehealth()
corpse_to_raise.UpdateDamageIcon() 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/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/clothing/shoes/cult(user), user.slot_shoes)
user.equip_if_possible(new /obj/item/weapon/storage/backpack/cultpack(user), user.slot_back) 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)) //the above update their overlay icons cache but do not call update_icons()
user.equip_if_possible(new /obj/item/weapon/melee/cultblade(user), user.slot_l_hand) //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
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()
del(src) del(src)
return return

View File

@@ -170,7 +170,19 @@ var/savefile/Banlist
for (var/A in Banlist.dir) for (var/A in Banlist.dir)
count++ count++
Banlist.cd = "/base/[A]" 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 += "</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]" 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]"