mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 01:24:21 +01:00
* 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:
@@ -93,11 +93,13 @@ GLOBAL_DATUM(current_anonymous_theme, /datum/anonymous_theme)
|
||||
if(issilicon(player))
|
||||
player.fully_replace_character_name(player.real_name, theme.anonymous_ai_name(isAI(player)))
|
||||
else
|
||||
var/mob/living/carbon/human/human_mob = player
|
||||
var/original_name = player.real_name //id will not be changed if you do not do this
|
||||
randomize_human(player) //do this first so the special name can be given
|
||||
player.fully_replace_character_name(original_name, theme.anonymous_name(player))
|
||||
if(extras_enabled)
|
||||
player_extras(player)
|
||||
human_mob.dna.update_dna_identity()
|
||||
|
||||
/**
|
||||
* restore_all_players: sets all crewmembers on station back to their preference name.
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
for(var/i in GLOB.human_list)
|
||||
var/mob/living/carbon/human/H = i
|
||||
if(H.ckey)
|
||||
dat += "<tr><td>[H]</td><td>[md5(H.dna.uni_identity)]</td></tr>"
|
||||
dat += "<tr><td>[H]</td><td>[md5(H.dna.unique_identity)]</td></tr>"
|
||||
dat += "</table>"
|
||||
holder << browse(dat, "window=fingerprints;size=440x410")
|
||||
if("ctfbutton")
|
||||
|
||||
@@ -13,3 +13,4 @@
|
||||
randomize_human(owner)
|
||||
var/species = pick(list(/datum/species/human, /datum/species/lizard, /datum/species/moth, /datum/species/fly))
|
||||
owner.set_species(species)
|
||||
owner.dna.update_dna_identity()
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
var/list/compiled_list = list()
|
||||
|
||||
for(var/mob/living/carbon/human/human_to_check as anything in GLOB.human_list)
|
||||
if(fingerprints[md5(human_to_check.dna.uni_identity)])
|
||||
if(fingerprints[md5(human_to_check.dna.unique_identity)])
|
||||
compiled_list |= human_to_check.real_name
|
||||
compiled_list[human_to_check.real_name] = human_to_check
|
||||
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
|
||||
var/mob/living/carbon/human/H = A
|
||||
if(!H.gloves)
|
||||
fingerprints += md5(H.dna.uni_identity)
|
||||
fingerprints += md5(H.dna.unique_identity)
|
||||
|
||||
else if(!ismob(A))
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
D = new virus_type()
|
||||
var/datum/disease/dnaspread/DS = D
|
||||
DS.strain_data["name"] = H.real_name
|
||||
DS.strain_data["UI"] = H.dna.uni_identity
|
||||
DS.strain_data["UI"] = H.dna.unique_identity
|
||||
DS.strain_data["SE"] = H.dna.mutation_index
|
||||
else
|
||||
D = new virus_type()
|
||||
|
||||
@@ -474,8 +474,8 @@
|
||||
var/parentcolor = parent.atom_colours[FIXED_COLOUR_PRIORITY]
|
||||
SV.add_atom_colour(parentcolor, FIXED_COLOUR_PRIORITY)
|
||||
if(prob(mutativeness))
|
||||
var/datum/spacevine_mutation/randmut = pick(vine_mutations_list - SV.mutations)
|
||||
randmut.add_mutation_to_vinepiece(SV)
|
||||
var/datum/spacevine_mutation/random_mutate = pick(vine_mutations_list - SV.mutations)
|
||||
random_mutate.add_mutation_to_vinepiece(SV)
|
||||
|
||||
for(var/datum/spacevine_mutation/SM in SV.mutations)
|
||||
SM.on_birth(SV)
|
||||
|
||||
@@ -1285,7 +1285,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
if(radiation > RAD_MOB_MUTATE && DT_PROB(RAD_MOB_MUTATE_PROB, delta_time))
|
||||
to_chat(source, span_danger("You mutate!"))
|
||||
source.easy_randmut(NEGATIVE + MINOR_NEGATIVE)
|
||||
source.easy_random_mutate(NEGATIVE + MINOR_NEGATIVE)
|
||||
source.emote("gasp")
|
||||
source.domutcheck()
|
||||
|
||||
|
||||
@@ -242,6 +242,7 @@
|
||||
spare.underwear = "Nude"
|
||||
H.dna.transfer_identity(spare, transfer_SE=1)
|
||||
spare.dna.features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
spare.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)
|
||||
spare.real_name = spare.dna.real_name
|
||||
spare.name = spare.dna.real_name
|
||||
spare.updateappearance(mutcolor_update=1)
|
||||
|
||||
@@ -437,11 +437,18 @@
|
||||
if(dna.temporary_mutations[mut] < world.time)
|
||||
if(mut == UI_CHANGED)
|
||||
if(dna.previous["UI"])
|
||||
dna.uni_identity = merge_text(dna.uni_identity,dna.previous["UI"])
|
||||
dna.unique_identity = merge_text(dna.unique_identity,dna.previous["UI"])
|
||||
updateappearance(mutations_overlay_update=1)
|
||||
dna.previous.Remove("UI")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
if(mut == UF_CHANGED)
|
||||
if(dna.previous["UF"])
|
||||
dna.unique_features = merge_text(dna.unique_features,dna.previous["UF"])
|
||||
updateappearance(mutcolor_update=1, mutations_overlay_update=1)
|
||||
dna.previous.Remove("UF")
|
||||
dna.temporary_mutations.Remove(mut)
|
||||
continue
|
||||
if(mut == UE_CHANGED)
|
||||
if(dna.previous["name"])
|
||||
real_name = dna.previous["name"]
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
info_list += "[span_info("SpiderOS Status: [s_initialized ? "Initialized" : "Disabled"]")]\n"
|
||||
info_list += "[span_info("Current Time: [station_time_timestamp()]")]\n"
|
||||
//Ninja status
|
||||
info_list += "[span_info("Fingerprints: [md5(ninja.dna.uni_identity)]")]\n"
|
||||
info_list += "[span_info("Fingerprints: [md5(ninja.dna.unique_identity)]")]\n"
|
||||
info_list += "[span_info("Unique Identity: [ninja.dna.unique_enzymes]")]\n"
|
||||
info_list += "[span_info("Overall Status: [ninja.stat > 1 ? "dead" : "[ninja.health]% healthy"]")]\n"
|
||||
info_list += "[span_info("Nutrition Status: [ninja.nutrition]")]\n"
|
||||
|
||||
@@ -18,10 +18,11 @@
|
||||
if(iscarbon(L) && L.has_dna())
|
||||
var/mob/living/carbon/C = L
|
||||
if(prob(80))
|
||||
C.easy_randmut(NEGATIVE + MINOR_NEGATIVE)
|
||||
C.easy_random_mutate(NEGATIVE + MINOR_NEGATIVE)
|
||||
else
|
||||
C.easy_randmut(POSITIVE)
|
||||
C.randmuti()
|
||||
C.easy_random_mutate(POSITIVE)
|
||||
C.random_mutate_unique_identity()
|
||||
C.random_mutate_unique_features()
|
||||
C.domutcheck()
|
||||
else
|
||||
L.adjustFireLoss(rand(5, 15))
|
||||
|
||||
@@ -717,6 +717,7 @@
|
||||
to_chat(H, span_warning("<b>You grit your teeth in pain as your body rapidly mutates!</b>"))
|
||||
H.visible_message("<b>[H]</b> suddenly transforms!")
|
||||
randomize_human(H)
|
||||
H.dna.update_dna_identity()
|
||||
|
||||
/datum/reagent/aslimetoxin
|
||||
name = "Advanced Mutation Toxin"
|
||||
|
||||
@@ -50,11 +50,12 @@
|
||||
if(!exposed_mob.has_dna() || HAS_TRAIT(exposed_mob, TRAIT_GENELESS) || HAS_TRAIT(exposed_mob, TRAIT_BADDNA))
|
||||
return //No robots, AIs, aliens, Ians or other mobs should be affected by this.
|
||||
if(((methods & VAPOR) && prob(min(33, reac_volume))) || (methods & (INGEST|PATCH|INJECT)))
|
||||
exposed_mob.randmuti()
|
||||
exposed_mob.random_mutate_unique_identity()
|
||||
exposed_mob.random_mutate_unique_features()
|
||||
if(prob(98))
|
||||
exposed_mob.easy_randmut(NEGATIVE+MINOR_NEGATIVE)
|
||||
exposed_mob.easy_random_mutate(NEGATIVE+MINOR_NEGATIVE)
|
||||
else
|
||||
exposed_mob.easy_randmut(POSITIVE)
|
||||
exposed_mob.easy_random_mutate(POSITIVE)
|
||||
exposed_mob.updateappearance()
|
||||
exposed_mob.domutcheck()
|
||||
|
||||
|
||||
@@ -776,6 +776,7 @@
|
||||
originalname = H.real_name
|
||||
H.dna.copy_dna(originalDNA)
|
||||
randomize_human(H)
|
||||
H.dna.update_dna_identity()
|
||||
return ..()
|
||||
|
||||
/datum/status_effect/stabilized/green/tick() //Only occasionally give examiners a warning.
|
||||
|
||||
@@ -606,6 +606,7 @@
|
||||
switch(activation_type)
|
||||
if(SLIME_ACTIVATE_MINOR)
|
||||
user.dna.features["mcolor"] = pick("FFFFFF","7F7F7F", "7FFF7F", "7F7FFF", "FF7F7F", "7FFFFF", "FF7FFF", "FFFF7F")
|
||||
user.dna.update_uf_block(DNA_MUTANT_COLOR_BLOCK)
|
||||
user.updateappearance(mutcolor_update=1)
|
||||
species.update_glow(user)
|
||||
to_chat(user, span_notice("You feel different..."))
|
||||
|
||||
@@ -42,7 +42,7 @@ GLOBAL_LIST_EMPTY(cursed_minds)
|
||||
all_species += stype
|
||||
var/random_race = pick(all_species)
|
||||
H.set_species(random_race)
|
||||
H.dna.unique_enzymes = H.dna.generate_unique_enzymes()
|
||||
H.dna.update_dna_identity()
|
||||
L = H
|
||||
var/turf/T = find_safe_turf()
|
||||
L.forceMove(T)
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
return
|
||||
var/mob/living/carbon/human/human_knight = .
|
||||
randomize_human(human_knight)
|
||||
human_knight.dna.update_dna_identity()
|
||||
human_knight.dna.add_mutation(MEDIEVAL, MUT_OTHER)
|
||||
var/oldname = human_knight.name
|
||||
var/title = "error"
|
||||
|
||||
@@ -112,10 +112,10 @@
|
||||
//humans
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(dna[H.dna.uni_identity])
|
||||
if(dna[H.dna.unique_identity])
|
||||
to_chat(user, span_notice("Humanoid data already present in local storage."))
|
||||
return
|
||||
dna[H.dna.uni_identity] = 1
|
||||
dna[H.dna.unique_identity] = 1
|
||||
to_chat(user, span_notice("Humanoid data added to local storage."))
|
||||
|
||||
/obj/machinery/dna_vault
|
||||
|
||||
@@ -39,5 +39,10 @@
|
||||
human_target.dna.features["moth_wings"] = human_target.dna.features["original_moth_wings"]
|
||||
else
|
||||
human_target.dna.features["moth_wings"] = "Plain"
|
||||
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION
|
||||
/*
|
||||
human_target.dna.update_uf_block(DNA_MOTH_WINGS_BLOCK)
|
||||
*/
|
||||
//SKYRAT EDIT REMOVAL END
|
||||
human_target.update_mutant_bodyparts()
|
||||
return ..()
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
icon_state = "severedtail"
|
||||
zone = BODY_ZONE_PRECISE_GROIN
|
||||
slot = ORGAN_SLOT_TAIL
|
||||
/// The sprite accessory this tail gives to the human it's attached to. If null, it will inherit its value from the human's DNA once attached.
|
||||
var/tail_type = "None"
|
||||
|
||||
/obj/item/organ/tail/Insert(mob/living/carbon/human/tail_owner, special = FALSE, drop_if_replaced = TRUE)
|
||||
@@ -28,13 +29,16 @@
|
||||
if(istype(tail_owner))
|
||||
var/default_part = tail_owner.dna.species.mutant_bodyparts["tail_human"]
|
||||
if(!default_part || default_part == "None")
|
||||
tail_owner.dna.features["tail_human"] = tail_owner.dna.species.mutant_bodyparts["tail_human"] = tail_type
|
||||
if(tail_type)
|
||||
tail_owner.dna.features["tail_human"] = tail_owner.dna.species.mutant_bodyparts["tail_human"] = tail_type
|
||||
tail_owner.dna.update_uf_block(DNA_HUMAN_TAIL_BLOCK)
|
||||
else
|
||||
tail_owner.dna.species.mutant_bodyparts["tail_human"] = tail_owner.dna.features["tail_human"]
|
||||
tail_owner.update_body()
|
||||
|
||||
/obj/item/organ/tail/cat/Remove(mob/living/carbon/human/tail_owner, special = FALSE)
|
||||
..()
|
||||
if(istype(tail_owner))
|
||||
tail_owner.dna.features["tail_human"] = "None"
|
||||
tail_owner.dna.species.mutant_bodyparts -= "tail_human"
|
||||
color = tail_owner.hair_color
|
||||
tail_owner.update_body()
|
||||
@@ -46,6 +50,7 @@
|
||||
desc = "A severed lizard tail. Somewhere, no doubt, a lizard hater is very pleased with themselves."
|
||||
color = "#116611"
|
||||
tail_type = "Smooth"
|
||||
/// The sprite accessory this tail gives to the human it's attached to. If null, it will inherit its value from the human's DNA once attached.
|
||||
var/spines = "None"
|
||||
|
||||
//SKYRAT EDIT REMOVAL BEGIN - CUSTOMIZATION
|
||||
@@ -60,18 +65,25 @@
|
||||
// Checks here are necessary so it wouldn't overwrite the tail of a lizard it spawned in
|
||||
var/default_part = tail_owner.dna.species.mutant_bodyparts["tail_lizard"]
|
||||
if(!default_part || default_part == "None")
|
||||
tail_owner.dna.features["tail_lizard"] = tail_owner.dna.species.mutant_bodyparts["tail_lizard"] = tail_type
|
||||
if(tail_type)
|
||||
tail_owner.dna.features["tail_lizard"] = tail_owner.dna.species.mutant_bodyparts["tail_lizard"] = tail_type
|
||||
tail_owner.dna.update_uf_block(DNA_LIZARD_TAIL_BLOCK)
|
||||
else
|
||||
tail_owner.dna.species.mutant_bodyparts["tail_lizard"] = tail_owner.dna.features["tail_lizard"]
|
||||
|
||||
default_part = tail_owner.dna.species.mutant_bodyparts["spines"]
|
||||
if(!default_part || default_part == "None")
|
||||
tail_owner.dna.features["spines"] = tail_owner.dna.species.mutant_bodyparts["spines"] = spines
|
||||
if(spines)
|
||||
tail_owner.dna.features["spines"] = tail_owner.dna.species.mutant_bodyparts["spines"] = spines
|
||||
tail_owner.dna.update_uf_block(DNA_SPINES_BLOCK)
|
||||
else
|
||||
tail_owner.dna.species.mutant_bodyparts["spines"] = tail_owner.dna.features["spines"]
|
||||
tail_owner.update_body()
|
||||
|
||||
/obj/item/organ/tail/lizard/Remove(mob/living/carbon/human/tail_owner, special = FALSE)
|
||||
..()
|
||||
if(istype(tail_owner))
|
||||
tail_owner.dna.species.mutant_bodyparts -= "tail_lizard"
|
||||
tail_owner.dna.species.mutant_bodyparts -= "spines"
|
||||
color = "#" + tail_owner.dna.features["mcolor"]
|
||||
tail_type = tail_owner.dna.features["tail_lizard"]
|
||||
spines = tail_owner.dna.features["spines"]
|
||||
@@ -92,6 +104,8 @@
|
||||
/obj/item/organ/tail/lizard/fake
|
||||
name = "fabricated lizard tail"
|
||||
desc = "A fabricated severed lizard tail. This one's made of synthflesh. Probably not usable for lizard wine."
|
||||
tail_type = null
|
||||
spines = null
|
||||
|
||||
/obj/item/organ/tail/monkey
|
||||
name = "monkey tail"
|
||||
@@ -106,13 +120,14 @@
|
||||
if(istype(tail_owner))
|
||||
if(!("tail_monkey" in tail_owner.dna.species.mutant_bodyparts))
|
||||
tail_owner.dna.species.mutant_bodyparts |= "tail_monkey"
|
||||
tail_owner.dna.features["tail_monkey"] = tail_type
|
||||
if(tail_type)
|
||||
tail_owner.dna.features["tail_monkey"] = tail_type
|
||||
tail_owner.dna.update_uf_block(DNA_MONKEY_TAIL_BLOCK)
|
||||
tail_owner.update_body()
|
||||
|
||||
/obj/item/organ/tail/monkey/Remove(mob/living/carbon/human/tail_owner, special = FALSE)
|
||||
..()
|
||||
if(istype(tail_owner))
|
||||
tail_owner.dna.features["tail_monkey"] = "None"
|
||||
tail_owner.dna.species.mutant_bodyparts -= "tail_monkey"
|
||||
tail_owner.update_body()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user