[Alternative to #6407] Makes mutant bodyparts and mutcolors into editable genetic traits (#6750)

* Makes mutant bodyparts and mutcolors into editable genetic traits (plus a whole shitload of otherwise out of scope code improvements because I just HAD to touch old code)

* Mirror

* genetically-editable mutant bodyparts and colors - skyrat edition

Co-authored-by: Funce <funce.973@gmail.com>
This commit is contained in:
Y0SH1M4S73R
2021-07-08 16:04:19 +01:00
committed by GitHub
co-authored by Funce
parent 091024586d
commit 93d03dc6bb
62 changed files with 731 additions and 138 deletions
+14 -5
View File
@@ -41,8 +41,11 @@
M.name = M.real_name
M.dna.blood_type = fields["blood_type"]
if(fields["UI"]) //UI+UE
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
M.updateappearance(mutations_overlay_update=1)
M.dna.unique_identity = merge_text(M.dna.unique_identity, fields["UI"])
if(fields["UF"])
M.dna.unique_features = merge_text(M.dna.unique_features, fields["UF"])
if(fields["UI"] || fields["UF"])
M.updateappearance(mutcolor_update=1, mutations_overlay_update=1)
log_attack("[log_msg] [loc_name(user)]")
return TRUE
return FALSE
@@ -484,10 +487,16 @@
M.dna.temporary_mutations[UE_CHANGED] = endtime
if(fields["UI"]) //UI+UE
if(!M.dna.previous["UI"])
M.dna.previous["UI"] = M.dna.uni_identity
M.dna.uni_identity = merge_text(M.dna.uni_identity, fields["UI"])
M.updateappearance(mutations_overlay_update=1)
M.dna.previous["UI"] = M.dna.unique_identity
M.dna.unique_identity = merge_text(M.dna.unique_identity, fields["UI"])
M.dna.temporary_mutations[UI_CHANGED] = endtime
if(fields["UF"]) //UI+UE
if(!M.dna.previous["UF"])
M.dna.previous["UF"] = M.dna.unique_features
M.dna.unique_features = merge_text(M.dna.unique_features, fields["UF"])
M.dna.temporary_mutations[UF_CHANGED] = endtime
if(fields["UI"] || fields["UF"])
M.updateappearance(mutcolor_update=1, mutations_overlay_update=1)
log_attack("[log_msg] [loc_name(user)]")
return TRUE
else