DNA2 Bug Fixes - Part 2 (CHERRY PICK)

We discovered that most of the problems were were having was because of BYOND passing lists (e.g. SE and UI) by-ref instead of the assumed by-val.

This commit adds dna.Clone() and (UI|SE).Copy() where needed.  These should be used where DNA or SE/UI lists are COPIED, otherwise changes made in the reference will affect the real strand.

This change also messes with the gene activation logic.

Conflicts:
	code/game/dna/dna2_domutcheck.dm
	code/game/dna/genes/powers.dm
This commit is contained in:
Rob Nelson
2014-02-06 23:07:35 -08:00
committed by Ccomp5950
parent 1088888791
commit fa20b9c2ee
22 changed files with 240 additions and 414 deletions

View File

@@ -29,10 +29,9 @@
O = new species.primitive(loc)
O.dna = dna
//O.dna.uni_identity = "000000000000000000DC00000660004DA0A0E00"
//O.dna.struc_enzymes = "[copytext(O.dna.struc_enzymes,1,1+3*(STRUCDNASIZE-1))]BB8"
O.dna = dna.Clone()
O.dna.SetSEState(MONKEYBLOCK,1)
O.dna.SetSEValueRange(MONKEYBLOCK,0xDAC, 0xFFF)
O.loc = loc
O.viruses = viruses
O.a_intent = "hurt"
@@ -166,7 +165,7 @@
mind.transfer_to(O)
if(O.mind.assigned_role == "Cyborg")
O.mind.original = O
else if(mind.special_role)
else if(mind&&mind.special_role)
O.mind.store_memory("In case you look at this after being borged, the objectives are only here until I find a way to make them not show up for you, as I can't simply delete them without screwing up round-end reporting. --NeoFite")
else
O.key = key