mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
DNA2 Bug Fixes - Part 2
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.
This commit is contained in:
@@ -30,8 +30,8 @@
|
||||
continue
|
||||
var/datum/disease/dnaspread/D = new
|
||||
D.strain_data["name"] = H.real_name
|
||||
D.strain_data["UI"] = H.dna.UI
|
||||
D.strain_data["SE"] = H.dna.SE
|
||||
D.strain_data["UI"] = H.dna.UI.Copy()
|
||||
D.strain_data["SE"] = H.dna.SE.Copy()
|
||||
D.carrier = 1
|
||||
D.holder = H
|
||||
D.affected_mob = H
|
||||
|
||||
Reference in New Issue
Block a user