mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 10:34:10 +01:00
fix: update_dna no longer resets SE blocks, fixing morph gene wipe bug (#19291)
update_dna() was calling dna.ready_dna() which internally calls ResetSE(), setting all SE blocks to rand(1,1024) (the OFF range). Any subsequent domutcheck(MUTCHK_FORCED) call would then deactivate every trait gene because all SE values read as inactive, including the morph gene itself. Replace dna.ready_dna(src) with dna.ResetUIFrom(src), which re-encodes appearance DNA from the mob's current state without touching the SE layer. Also correct the stale sync_organ_dna(dna) call to the correct no-argument form matching the proc signature. Affected call sites that triggered this bug: the morph appearance editor, change_gender, add_marking, remove_marking, change_priority_of_marking, and change_marking_color. Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -171,8 +171,8 @@
|
||||
|
||||
/mob/living/carbon/human/proc/update_dna()
|
||||
check_dna()
|
||||
dna.ready_dna(src)
|
||||
sync_organ_dna(dna)
|
||||
dna.ResetUIFrom(src) // Do not call ready_dna here: it resets ALL SE blocks, wiping trait gene state
|
||||
sync_organ_dna()
|
||||
|
||||
/mob/living/carbon/human/proc/generate_valid_species(var/check_whitelist = 1, var/list/whitelist = list(), var/list/blacklist = list())
|
||||
var/list/valid_species = new()
|
||||
|
||||
Reference in New Issue
Block a user