Merge pull request #2561 from Razharas/LingFix

Fixes ling dna handling and tiny dna scanner fix
This commit is contained in:
fleure
2014-01-30 15:41:23 -08:00
3 changed files with 20 additions and 7 deletions
+1 -1
View File
@@ -935,7 +935,7 @@
if("pulsese")
var/len = length(viable_occupant.dna.struc_enzymes)
num = Wrap(num, 1, len+1)
num = randomize_radiation_accuracy(num, radduration, len)
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len)
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
var/subblock = num - block*DNA_BLOCK_SIZE
+15 -4
View File
@@ -277,9 +277,14 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
U << "<span class='warning'>We could gain no benefit from absorbing a lesser creature.</span>"
return 0
if(T.dna in absorbed_dna)
U << "<span class='warning'>We already have that DNA in storage.</span>"
return 0
for(var/datum/dna/D in absorbed_dna)
if(T.dna.uni_identity == D.uni_identity)
if(T.dna.struc_enzymes == D.struc_enzymes)
if(T.dna.real_name == D.real_name)
if(T.dna.mutantrace == D.mutantrace)
if(T.dna.blood_type == D.blood_type)
U << "<span class='warning'>We already have that DNA in storage.</span>"
return 0
if(!check_dna_integrity(T))
U << "<span class='warning'>[T] is not compatible with our biology.</span>"
@@ -292,7 +297,13 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon"
/datum/changeling/proc/absorb_dna(mob/living/carbon/T)
shuffle_dna()
T.dna.real_name = T.real_name //Set this again, just to be sure that it's properly set.
absorbed_dna |= T.dna //And add the target DNA to our absorbed list.
var/datum/dna/new_dna = new T.dna.type
new_dna.uni_identity = T.dna.uni_identity
new_dna.struc_enzymes = T.dna.struc_enzymes
new_dna.real_name = T.dna.real_name
new_dna.mutantrace = T.dna.mutantrace
new_dna.blood_type = T.dna.blood_type
absorbed_dna |= new_dna //And add the target DNA to our absorbed list.
absorbedcount++ //all that done, let's increment the objective counter.
/datum/changeling/proc/shuffle_dna()//boots out the stalest DNA.
@@ -161,7 +161,8 @@
changeling.chem_charges -= 5
changeling.geneticdamage = 3
hardset_dna(src, chosen_dna.uni_identity, chosen_dna.struc_enzymes, chosen_dna.real_name, chosen_dna.mutantrace, chosen_dna.blood_type)
src.dna = chosen_dna
src.real_name = chosen_dna.real_name
updateappearance(src)
domutcheck(src, null)
@@ -216,7 +217,8 @@
changeling.chem_charges -= 5
remove_changeling_powers()
src << "<span class='notice'>We transform our appearance.</span>"
hardset_dna(src, chosen_dna.uni_identity, chosen_dna.struc_enzymes, chosen_dna.real_name, chosen_dna.mutantrace, chosen_dna.blood_type)
src.dna = chosen_dna
var/mob/living/carbon/human/O = humanize((TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPSRC),chosen_dna.real_name)