Revert "12/21 modernizations from TG live"
This commit is contained in:
+27
-60
@@ -1,5 +1,3 @@
|
||||
|
||||
/////////////////////////// DNA DATUM
|
||||
/datum/dna
|
||||
var/unique_enzymes
|
||||
var/struc_enzymes
|
||||
@@ -11,15 +9,13 @@
|
||||
var/list/mutations = list() //All mutations are from now on here
|
||||
var/list/temporary_mutations = list() //Timers for temporary mutations
|
||||
var/list/previous = list() //For temporary name/ui/ue/blood_type modifications
|
||||
var/mob/living/holder
|
||||
var/mob/living/carbon/holder
|
||||
|
||||
/datum/dna/New(mob/living/new_holder)
|
||||
/datum/dna/New(mob/living/carbon/new_holder)
|
||||
if(new_holder)
|
||||
holder = new_holder
|
||||
|
||||
/datum/dna/proc/transfer_identity(mob/living/carbon/destination, transfer_SE = 0)
|
||||
if(!istype(destination))
|
||||
return
|
||||
destination.dna.unique_enzymes = unique_enzymes
|
||||
destination.dna.uni_identity = uni_identity
|
||||
destination.dna.blood_type = blood_type
|
||||
@@ -168,36 +164,12 @@
|
||||
features = random_features()
|
||||
|
||||
|
||||
/datum/dna/stored //subtype used by brain mob's stored_dna
|
||||
|
||||
/datum/dna/stored/add_mutation(mutation_name) //no mutation changes on stored dna.
|
||||
return
|
||||
|
||||
/datum/dna/stored/remove_mutation(mutation_name)
|
||||
return
|
||||
|
||||
/datum/dna/stored/check_mutation(mutation_name)
|
||||
return
|
||||
|
||||
/datum/dna/stored/remove_all_mutations()
|
||||
return
|
||||
|
||||
/datum/dna/stored/remove_mutation_group(list/group)
|
||||
return
|
||||
|
||||
/////////////////////////// DNA MOB-PROCS //////////////////////
|
||||
|
||||
/mob/proc/set_species(datum/species/mrace, icon_update = 1)
|
||||
return
|
||||
|
||||
/mob/living/brain/set_species(datum/species/mrace, icon_update = 1)
|
||||
if(mrace)
|
||||
if(ispath(mrace))
|
||||
stored_dna.species = new mrace()
|
||||
else
|
||||
stored_dna.species = mrace //not calling any species update procs since we're a brain, not a monkey/human
|
||||
|
||||
|
||||
/mob/living/carbon/set_species(datum/species/mrace, icon_update = 1)
|
||||
if(mrace && has_dna())
|
||||
dna.species.on_species_loss(src)
|
||||
@@ -266,7 +238,7 @@
|
||||
return
|
||||
gender = (deconstruct_block(getblock(dna.uni_identity, DNA_GENDER_BLOCK), 2)-1) ? FEMALE : MALE
|
||||
|
||||
/mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
|
||||
mob/living/carbon/human/updateappearance(icon_update=1, mutcolor_update=0, mutations_overlay_update=0)
|
||||
..()
|
||||
var/structure = dna.uni_identity
|
||||
hair_color = sanitize_hexcolor(getblock(structure, DNA_HAIR_COLOR_BLOCK))
|
||||
@@ -287,12 +259,12 @@
|
||||
/mob/proc/domutcheck()
|
||||
return
|
||||
|
||||
/mob/living/carbon/domutcheck(force_powers=0) //Set force_powers to 1 to bypass the power chance
|
||||
/mob/living/carbon/domutcheck()
|
||||
if(!has_dna())
|
||||
return
|
||||
|
||||
for(var/datum/mutation/human/A in good_mutations | bad_mutations | not_good_mutations)
|
||||
if(ismob(A.check_block(src, force_powers)))
|
||||
if(ismob(A.check_block(src)))
|
||||
return //we got monkeyized/humanized, this mob will be deleted, no need to continue.
|
||||
|
||||
update_mutations_overlay()
|
||||
@@ -316,46 +288,41 @@
|
||||
return 0
|
||||
return getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
||||
|
||||
/mob/living/carbon/proc/randmut(list/candidates, difficulty = 2)
|
||||
if(!has_dna())
|
||||
/proc/randmut(mob/living/carbon/M, list/candidates, difficulty = 2)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
var/datum/mutation/human/num = pick(candidates)
|
||||
. = num.force_give(src)
|
||||
. = num.force_give(M)
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/randmutb()
|
||||
if(!has_dna())
|
||||
/proc/randmutb(mob/living/carbon/M)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
var/datum/mutation/human/HM = pick((bad_mutations | not_good_mutations) - mutations_list[RACEMUT])
|
||||
. = HM.force_give(src)
|
||||
. = HM.force_give(M)
|
||||
|
||||
/mob/living/carbon/proc/randmutg()
|
||||
if(!has_dna())
|
||||
/proc/randmutg(mob/living/carbon/M)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
var/datum/mutation/human/HM = pick(good_mutations)
|
||||
. = HM.force_give(src)
|
||||
. = HM.force_give(M)
|
||||
|
||||
/mob/living/carbon/proc/randmutvg()
|
||||
if(!has_dna())
|
||||
return
|
||||
var/datum/mutation/human/HM = pick((good_mutations) - mutations_list[HULK] - mutations_list[DWARFISM])
|
||||
. = HM.force_give(src)
|
||||
|
||||
/mob/living/carbon/proc/randmuti()
|
||||
if(!has_dna())
|
||||
/proc/randmuti(mob/living/carbon/M)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
var/num = rand(1, DNA_UNI_IDENTITY_BLOCKS)
|
||||
var/newdna = setblock(dna.uni_identity, num, random_string(DNA_BLOCK_SIZE, hex_characters))
|
||||
dna.uni_identity = newdna
|
||||
updateappearance(mutations_overlay_update=1)
|
||||
var/newdna = setblock(M.dna.uni_identity, num, random_string(DNA_BLOCK_SIZE, hex_characters))
|
||||
M.dna.uni_identity = newdna
|
||||
return
|
||||
|
||||
/mob/living/carbon/proc/clean_dna()
|
||||
if(!has_dna())
|
||||
/proc/clean_dna(mob/living/carbon/M)
|
||||
if(!M.has_dna())
|
||||
return
|
||||
dna.remove_all_mutations()
|
||||
M.dna.remove_all_mutations()
|
||||
|
||||
/mob/living/carbon/proc/clean_randmut(list/candidates, difficulty = 2)
|
||||
clean_dna()
|
||||
randmut(candidates, difficulty)
|
||||
/proc/clean_randmut(mob/living/carbon/M, list/candidates, difficulty = 2)
|
||||
clean_dna(M)
|
||||
randmut(M, candidates, difficulty)
|
||||
|
||||
/proc/scramble_dna(mob/living/carbon/M, ui=FALSE, se=FALSE, probability)
|
||||
if(!M.has_dna())
|
||||
@@ -389,4 +356,4 @@
|
||||
value = values
|
||||
return value
|
||||
|
||||
/////////////////////////// DNA HELPER-PROCS
|
||||
/////////////////////////// DNA HELPER-PROCS
|
||||
Reference in New Issue
Block a user