mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
[MIRROR] DNA comparison fix (#2284)
* DNA fix (#55669) This PR fixes a problem where DNA proc "is_same_as" always returned FALSE because of bad assoc list comparison. The use of the proc mentioned above is very limited, and only practical effect will be that changelings cannot extract DNA they already have stored, which is intended limitation as per can_absorb_dna proc in the changeling antagonist datum. * DNA comparison fix Co-authored-by: Arkatos1 <43862960+Arkatos1@users.noreply.github.com>
This commit is contained in:
+9
-3
@@ -231,9 +231,15 @@
|
||||
update_instability(FALSE)
|
||||
return
|
||||
|
||||
/datum/dna/proc/is_same_as(datum/dna/D)
|
||||
if(uni_identity == D.uni_identity && mutation_index == D.mutation_index && real_name == D.real_name)
|
||||
if(species.type == D.species.type && features == D.features && blood_type == D.blood_type)
|
||||
/**
|
||||
* Checks if two DNAs are practically the same by comparing their most defining features
|
||||
*
|
||||
* Arguments:
|
||||
* * target_dna The DNA that we are comparing to
|
||||
*/
|
||||
/datum/dna/proc/is_same_as(datum/dna/target_dna)
|
||||
if(uni_identity == target_dna.uni_identity && mutation_index == target_dna.mutation_index && real_name == target_dna.real_name)
|
||||
if(species.type == target_dna.species.type && compare_list(features, target_dna.features) && blood_type == target_dna.blood_type)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user