Fixes for some DNA/Fingerprint stuff

Fixed explosions autogibbing corpses at any power (WHY was this there?)
This commit is contained in:
SkyMarshal
2012-02-26 16:33:15 -07:00
parent 2c59cbd71d
commit 50ffc5409c
7 changed files with 56 additions and 56 deletions
+1 -2
View File
@@ -518,7 +518,7 @@
#include "code\game\machinery\computer\id.dm"
#include "code\game\machinery\computer\lockdown.dm"
#include "code\game\machinery\computer\medical.dm"
#include "code\game\machinery\computer\Operating.dm"
#include "code\game\machinery\computer\operating.dm"
#include "code\game\machinery\computer\power.dm"
#include "code\game\machinery\computer\robot.dm"
#include "code\game\machinery\computer\security.dm"
@@ -952,7 +952,6 @@
#include "code\modules\mob\new_player\preferences.dm"
#include "code\modules\mob\new_player\preferences_setup.dm"
#include "code\modules\mob\new_player\savefile.dm"
#include "code\modules\mob\new_player\skill.dm"
#include "code\modules\mob\new_player\sprite_accessories.dm"
#include "code\modules\mob\organ\organ.dm"
#include "code\modules\mob\organ\organ_external.dm"
+40 -39
View File
@@ -91,51 +91,52 @@
src.fingerprintslast = M.key
return 0
var/mob/living/carbon/human/H = M
if (!istype(H.dna, /datum/dna))
return 0
if (!istype(H.dna, /datum/dna) || !H.dna.uni_identity || (length(H.dna.uni_identity) != 32))
if(!istype(H.dna, /datum/dna))
H.dna = new /datum/dna(null)
H.check_dna()
if (H.gloves && H.gloves != src)
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("(Wearing gloves). Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
H.gloves.add_fingerprint(M)
if (H.dna.uni_identity)
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
var/new_prints = 0
var/prints
for(var/i = 1, i <= src.fingerprints.len, i++)
var/list/L = params2list(src.fingerprints[i])
if(L[num2text(1)] == md5(H.dna.uni_identity))
new_prints = i
prints = L[num2text(2)]
break
else
var/test_print = stars(L[num2text(2)], rand(80,90))
if(stringpercent(test_print) == 32)
if(src.fingerprints.len == 1)
src.fingerprints = list()
else
for(var/j = (i + 1), j < (src.fingerprints.len), j++)
src.fingerprints[j-1] = src.fingerprints[j]
src.fingerprints.len--
if(H.gloves != src)
if(prob(75) && istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
else if(H.gloves && !istype(H.gloves, /obj/item/clothing/gloves/latex))
return 0
if(src.fingerprintslast != H.key)
src.fingerprintshidden += text("Real name: [], Key: []",H.real_name, H.key)
src.fingerprintslast = H.key
var/new_prints = 0
var/prints
for(var/i = 1, i <= src.fingerprints.len, i++)
var/list/L = params2list(src.fingerprints[i])
if(L[num2text(1)] == md5(H.dna.uni_identity))
new_prints = i
prints = L[num2text(2)]
break
else
var/test_print = stars(L[num2text(2)], rand(80,90))
if(stringpercent(test_print) == 32)
if(src.fingerprints.len == 1)
src.fingerprints = list()
else
src.fingerprints[i] = "1=" + L[num2text(1)] + "&2=" + test_print
if(new_prints)
src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40)))))
else if(new_prints == 0)
if(!src.fingerprints)
src.fingerprints = list(text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40))))
src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))
for(var/i = 1, i <= src.fingerprints.len, i++)
if(length(src.fingerprints[i]) != 69)
src.fingerprints.Remove(src.fingerprints[i])
return 1
for(var/j = (i + 1), j < (src.fingerprints.len), j++)
src.fingerprints[j-1] = src.fingerprints[j]
src.fingerprints.len--
else
src.fingerprints[i] = "1=" + L[num2text(1)] + "&2=" + test_print
if(new_prints)
src.fingerprints[new_prints] = text("1=[]&2=[]", md5(H.dna.uni_identity), stringmerge(prints,stars(md5(H.dna.uni_identity), (H.gloves ? rand(10,20) : rand(25,40)))))
else if(new_prints == 0)
if(!src.fingerprints)
src.fingerprints = list(text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40))))
src.fingerprints += text("1=[]&2=[]", md5(H.dna.uni_identity), stars(md5(H.dna.uni_identity), H.gloves ? rand(10,20) : rand(25,40)))
for(var/i = 1, i <= src.fingerprints.len, i++)
if(length(src.fingerprints[i]) != 69)
src.fingerprints.Remove(src.fingerprints[i])
return 1
else
if(src.fingerprintslast != M.key)
src.fingerprintshidden += text("Real name: [], Key: []",M.real_name, M.key)
@@ -86,14 +86,14 @@
/mob/living/carbon/alien/humanoid/ex_act(severity)
flick("flash", flash)
if (stat == 2 && client)
gib(1)
return
// if (stat == 2 && client)
// gib(1)
// return
else if (stat == 2 && !client)
xgibs(loc, viruses)
del(src)
return
// else if (stat == 2 && !client)
// xgibs(loc, viruses)
// del(src)
// return
var/shielded = 0
@@ -75,7 +75,7 @@
/mob/living/carbon/alien/larva/ex_act(severity)
flick("flash", flash)
/*
if (stat == 2 && client)
gib(1)
return
@@ -84,7 +84,7 @@
gibs(loc, viruses)
del(src)
return
*/
var/b_loss = null
var/f_loss = null
switch (severity)
@@ -239,7 +239,7 @@
// /obj/item/clothing/suit/bomb_suit(src)
// /obj/item/clothing/head/bomb_hood(src)
/*
if (stat == 2 && client)
gib(1)
return
@@ -248,7 +248,7 @@
gibs(loc, viruses)
del(src)
return
*/
var/shielded = 0
var/b_loss = null
var/f_loss = null
@@ -150,14 +150,14 @@
..()
/mob/living/carbon/metroid/ex_act(severity)
/*
if (stat == 2 && client)
return
else if (stat == 2 && !client)
del(src)
return
*/
var/b_loss = null
var/f_loss = null
switch (severity)
@@ -211,7 +211,7 @@
/mob/living/silicon/robot/ex_act(severity)
flick("flash", flash)
/*
if (stat == 2 && client)
gib(1)
return
@@ -219,7 +219,7 @@
else if (stat == 2 && !client)
del(src)
return
*/
switch(severity)
if(1.0)
if (stat != 2)