Missing blood_DNA now goes into admin logs and stuff.

This commit is contained in:
SkyMarshal
2012-02-15 10:26:22 -07:00
parent b5c1d99471
commit 58d7da9008
2 changed files with 14 additions and 5 deletions

View File

@@ -143,7 +143,8 @@
return return
if(!blood_DNA) if(!blood_DNA)
var/turf/Z = get_turf(src) var/turf/Z = get_turf(src)
world << "\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list! Tell a dev!" message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
return return
if (blood_DNA.len) if (blood_DNA.len)
if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected. if (istype(src, /obj/item)&&!istype(src, /obj/item/weapon/melee/energy))//Only regular items. Energy melee weapon are not affected.
@@ -247,7 +248,8 @@
return return
if(!blood_DNA) if(!blood_DNA)
var/turf/Z = get_turf(src) var/turf/Z = get_turf(src)
world << "\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list! Tell a dev!" message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
blood_DNA = list() blood_DNA = list()
return return
if ( src.blood_DNA.len ) if ( src.blood_DNA.len )
@@ -260,14 +262,20 @@
var/obj/item/source2 = src var/obj/item/source2 = src
source2.blood_DNA = list() source2.blood_DNA = list()
// var/icon/I = new /icon(source2.icon_old, source2.icon_state) // var/icon/I = new /icon(source2.icon_old, source2.icon_state)
if(source2.icon_old)
source2.icon = source2.icon_old source2.icon = source2.icon_old
source2.update_icon() source2.update_icon()
else
source2.icon = initial(icon)
source2.update_icon()
if (istype(src, /turf/simulated)) if (istype(src, /turf/simulated))
var/obj/item/source2 = src var/obj/item/source2 = src
source2.blood_DNA = list() source2.blood_DNA = list()
if(source2.icon_old) if(source2.icon_old)
var/icon/I = new /icon(source2.icon_old, source2.icon_state) var/icon/I = new /icon(source2.icon_old, source2.icon_state)
source2.icon = I source2.icon = I
else
source2.icon = initial(icon)
if(src.fingerprints && src.fingerprints.len) if(src.fingerprints && src.fingerprints.len)
var/done = 0 var/done = 0
while(!done) while(!done)

View File

@@ -103,7 +103,8 @@
if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking" if ((usr.mutations & CLUMSY) && prob(50)) t = "funny-looking"
if(!blood_DNA) if(!blood_DNA)
var/turf/Z = get_turf(src) var/turf/Z = get_turf(src)
world << "\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list! Tell a dev!" message_admins("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
log_game("\red ERROR: [src] at [Z.x], [Z.y], [Z.z] is missing it's blood_DNA list!")
return return
usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA.len ? "" : "bloody ",src, src.name, t) usr << text("This is a []\icon[][]. It is a [] item.", !src.blood_DNA.len ? "" : "bloody ",src, src.name, t)
if(src.desc) if(src.desc)