[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 11:04:19 -04:00
committed by GitHub
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
+1
View File
@@ -216,6 +216,7 @@
if(ReadHSV(temp_hsv)[3] >= ReadHSV("#7F7F7F")[3]) // mutantcolors must be bright
H.dna.features["mcolor"] = sanitize_hexcolor(new_mutantcolor)
H.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)
else
to_chat(H, span_notice("Invalid color. Your color is not bright enough."))