mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
[MIRROR] [GOONETICS] Chromosomes (#4453)
* [GOONETICS] Chromosomes (#42151) * adds chromosomes * Makes the framework nice and functional * Adds chromosome interaction * Makes chromosomes work * removes the double instability update * Apply suggestions from code review Co-Authored-By: Time-Green <timkoster1@hotmail.com> * more review stuff also fixed some inconsistencies in chromosomes * unfucks defines * Fixes saved mutations runtiming with empty pods * Adds stability to the dna console and advanced health scanner * removes a random bug i stumbled upon * Update code/game/machinery/computer/dna_console.dm Co-Authored-By: Time-Green <timkoster1@hotmail.com> * makes chromosomes harder to get fixes double mutations, adds reinforcer and nerfs stabilizer * fixes edge case where fireballs would be harmless * cleans up find/replace all mess and 1 in 10 trillion chance of fireball breaking * [GOONETICS] Chromosomes * fuck you mirror bot
This commit is contained in:
committed by
monster860
parent
c928d48209
commit
05e86b90c3
@@ -130,3 +130,9 @@
|
||||
#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop"
|
||||
#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun"
|
||||
#define ORGAN_SLOT_TAIL "tail"
|
||||
|
||||
|
||||
//used for the can_chromosome var on mutations
|
||||
#define CHROMOSOME_NEVER 0
|
||||
#define CHROMOSOME_NONE 1
|
||||
#define CHROMOSOME_USED 2
|
||||
@@ -2,7 +2,11 @@
|
||||
//A bunch of helpers to make genetics less of a headache//
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
#define get_initialized_mutation(A) GLOB.all_mutations[A]
|
||||
#define mutation_in_sequence(A, B) ((A) in B.mutation_index)
|
||||
#define get_gene_string(A, B) (B.mutation_index[A])
|
||||
#define get_sequence(A) (GLOB.full_sequences[A])
|
||||
#define GET_INITIALIZED_MUTATION(A) GLOB.all_mutations[A]
|
||||
#define GET_GENE_STRING(A, B) (B.mutation_index[A])
|
||||
#define GET_SEQUENCE(A) (GLOB.full_sequences[A])
|
||||
|
||||
#define GET_MUTATION_STABILIZER(A) ((A.stabilizer_coeff < 0) ? 1 : A.stabilizer_coeff)
|
||||
#define GET_MUTATION_SYNCHRONIZER(A) ((A.synchronizer_coeff < 0) ? 1 : A.synchronizer_coeff)
|
||||
#define GET_MUTATION_POWER(A) ((A.power_coeff < 0) ? 1 : A.power_coeff)
|
||||
#define GET_MUTATION_ENERGY(A) ((A.energy_coeff < 0) ? 1 : A.energy_coeff)
|
||||
@@ -60,26 +60,30 @@
|
||||
new_dna.mutations = mutations.Copy()
|
||||
|
||||
//See mutation.dm for what 'class' does. 'time' is time till it removes itself in decimals. 0 for no timer
|
||||
/datum/dna/proc/add_mutation(mutation_type, class = MUT_OTHER, time)
|
||||
/datum/dna/proc/add_mutation(mutation, class = MUT_OTHER, time)
|
||||
var/mutation_type = mutation
|
||||
if(istype(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/HM = mutation
|
||||
mutation_type = HM.type
|
||||
if(get_mutation(mutation_type))
|
||||
return
|
||||
force_give(new mutation_type (class, time))
|
||||
return force_give(new mutation_type (class, time, copymut = mutation))
|
||||
|
||||
/datum/dna/proc/remove_mutation(mutation_type)
|
||||
force_lose(get_mutation(mutation_type))
|
||||
return force_lose(get_mutation(mutation_type))
|
||||
|
||||
/datum/dna/proc/check_mutation(mutation_type)
|
||||
return get_mutation(mutation_type)
|
||||
|
||||
/datum/dna/proc/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER))
|
||||
remove_mutation_group(mutations, classes)
|
||||
/datum/dna/proc/remove_all_mutations(list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE)
|
||||
remove_mutation_group(mutations, classes, mutadone)
|
||||
scrambled = FALSE
|
||||
|
||||
/datum/dna/proc/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER))
|
||||
/datum/dna/proc/remove_mutation_group(list/group, list/classes = list(MUT_NORMAL, MUT_EXTRA, MUT_OTHER), mutadone = FALSE)
|
||||
if(!group)
|
||||
return
|
||||
for(var/datum/mutation/human/HM in group)
|
||||
if(HM.class in classes)
|
||||
if((HM.class in classes) && !(HM.mutadone_proof && mutadone))
|
||||
force_lose(HM)
|
||||
|
||||
/datum/dna/proc/generate_uni_identity()
|
||||
@@ -110,7 +114,7 @@
|
||||
/datum/dna/proc/generate_dna_blocks()
|
||||
var/bonus
|
||||
if(species && species.inert_mutation)
|
||||
bonus = get_initialized_mutation(species.inert_mutation)
|
||||
bonus = GET_INITIALIZED_MUTATION(species.inert_mutation)
|
||||
var/list/mutations_temp = GLOB.good_mutations + GLOB.bad_mutations + GLOB.not_good_mutations + bonus
|
||||
if(!LAZYLEN(mutations_temp))
|
||||
return
|
||||
@@ -118,7 +122,7 @@
|
||||
shuffle_inplace(mutations_temp)
|
||||
if(ismonkey(holder))
|
||||
mutations |= new RACEMUT(MUT_NORMAL)
|
||||
mutation_index[RACEMUT] = get_sequence(RACEMUT)
|
||||
mutation_index[RACEMUT] = GET_SEQUENCE(RACEMUT)
|
||||
else
|
||||
mutation_index[RACEMUT] = create_sequence(RACEMUT, FALSE)
|
||||
for(var/i in 2 to DNA_MUTATION_BLOCKS)
|
||||
@@ -137,12 +141,12 @@
|
||||
//Used to create a chipped gene sequence
|
||||
/proc/create_sequence(mutation, active, difficulty)
|
||||
if(!difficulty)
|
||||
var/datum/mutation/human/A = get_initialized_mutation(mutation) //leaves the possibility to change difficulty mid-round
|
||||
var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation) //leaves the possibility to change difficulty mid-round
|
||||
if(!A)
|
||||
return
|
||||
difficulty = A.difficulty
|
||||
difficulty += rand(-2,4)
|
||||
var/sequence = get_sequence(mutation)
|
||||
var/sequence = GET_SEQUENCE(mutation)
|
||||
if(active)
|
||||
return sequence
|
||||
while(difficulty)
|
||||
@@ -188,12 +192,15 @@
|
||||
. = HM.on_acquiring(holder)
|
||||
if(.)
|
||||
qdel(HM)
|
||||
update_instability()
|
||||
|
||||
//Use remove_mutation instead
|
||||
/datum/dna/proc/force_lose(datum/mutation/human/HM)
|
||||
if(holder && (HM in mutations))
|
||||
set_se(0, HM)
|
||||
return HM.on_losing(holder)
|
||||
. = HM.on_losing(holder)
|
||||
update_instability(FALSE)
|
||||
return
|
||||
|
||||
/datum/dna/proc/mutations_say_mods(message)
|
||||
if(message)
|
||||
@@ -224,7 +231,7 @@
|
||||
stability = 100
|
||||
for(var/datum/mutation/human/M in mutations)
|
||||
if(M.class == MUT_EXTRA)
|
||||
stability -= M.instability
|
||||
stability -= M.instability * GET_MUTATION_STABILIZER(M)
|
||||
if(holder)
|
||||
var/message
|
||||
if(alert)
|
||||
@@ -456,23 +463,28 @@
|
||||
return is_gene_active(mutation)
|
||||
|
||||
/datum/dna/proc/is_gene_active(mutation)
|
||||
return (mutation_index[mutation] == get_sequence(mutation))
|
||||
return (mutation_index[mutation] == GET_SEQUENCE(mutation))
|
||||
|
||||
/datum/dna/proc/set_se(on=TRUE, datum/mutation/human/HM)
|
||||
if(!HM || !(HM.type in mutation_index) || (LAZYLEN(mutation_index) < DNA_MUTATION_BLOCKS))
|
||||
return
|
||||
. = TRUE
|
||||
if(on)
|
||||
mutation_index[HM.type] = get_sequence(HM.type)
|
||||
else if(get_sequence(HM.type) == mutation_index[HM.type])
|
||||
mutation_index[HM.type] = GET_SEQUENCE(HM.type)
|
||||
else if(GET_SEQUENCE(HM.type) == mutation_index[HM.type])
|
||||
mutation_index[HM.type] = create_sequence(HM.type, FALSE, HM.difficulty)
|
||||
|
||||
/datum/dna/proc/activate_mutation(mutation)
|
||||
/datum/dna/proc/activate_mutation(mutation) //note that this returns a boolean and not a new mob
|
||||
if(!mutation)
|
||||
return
|
||||
if(!mutation_in_sequence(mutation, src)) //cant activate what we dont have, use add_mutation
|
||||
return FALSE
|
||||
return add_mutation(mutation, MUT_NORMAL)
|
||||
var/mutation_type = mutation
|
||||
if(istype(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/M = mutation
|
||||
mutation_type = M.type
|
||||
if(!mutation_in_sequence(mutation_type)) //cant activate what we dont have, use add_mutation
|
||||
return FALSE
|
||||
add_mutation(mutation, MUT_NORMAL)
|
||||
return TRUE
|
||||
|
||||
/////////////////////////// DNA HELPER-PROCS //////////////////////////////
|
||||
|
||||
@@ -492,6 +504,17 @@
|
||||
return 0
|
||||
return getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
|
||||
|
||||
/datum/dna/proc/mutation_in_sequence(mutation)
|
||||
if(!mutation)
|
||||
return
|
||||
if(istype(mutation, /datum/mutation/human))
|
||||
var/datum/mutation/human/HM = mutation
|
||||
if(HM.type in mutation_index)
|
||||
return TRUE
|
||||
else if(mutation in mutation_index)
|
||||
return TRUE
|
||||
|
||||
|
||||
/mob/living/carbon/proc/randmut(list/candidates, difficulty = 2)
|
||||
if(!has_dna())
|
||||
return
|
||||
@@ -510,7 +533,7 @@
|
||||
mutations += GLOB.not_good_mutations
|
||||
var/list/possible = list()
|
||||
for(var/datum/mutation/human/A in mutations)
|
||||
if((!sequence || mutation_in_sequence(A.type, dna)) && !dna.get_mutation(A.type))
|
||||
if((!sequence || dna.mutation_in_sequence(A.type)) && !dna.get_mutation(A.type))
|
||||
possible += A.type
|
||||
if(exclude_monkey)
|
||||
possible.Remove(RACEMUT)
|
||||
|
||||
@@ -31,12 +31,26 @@
|
||||
//MUT_EXTRA - A mutation that is in the mutations tab, and can be given and taken away through though the DNA console. Has a 0 before it's name in the mutation section of the dna console
|
||||
//MUT_OTHER Cannot be interacted with by players through normal means. I.E. wizards mutate
|
||||
|
||||
/datum/mutation/human/New(class_ = MUT_OTHER, timer)
|
||||
|
||||
var/can_chromosome = CHROMOSOME_NONE //can we take chromosomes? 0: CHROMOSOME_NEVER never, 1:CHROMOSOME_NONE yeah, 2: CHROMOSOME_USED no, already have one
|
||||
var/chromosome_name //purely cosmetic
|
||||
var/modified = FALSE //ugly but we really don't want chromosomes and on_acquiring to overlap and apply double the powers
|
||||
var/mutadone_proof = FALSE
|
||||
|
||||
//Chromosome stuff - set to -1 to prevent people from changing it. Example: It'd be a waste to decrease cooldown on mutism
|
||||
var/stabilizer_coeff = 1 //genetic stability coeff
|
||||
var/synchronizer_coeff = -1 //makes the mutation hurt the user less
|
||||
var/power_coeff = -1 //boosts mutation strength
|
||||
var/energy_coeff = -1 //lowers mutation cooldown
|
||||
|
||||
/datum/mutation/human/New(class_ = MUT_OTHER, timer, datum/mutation/human/copymut)
|
||||
. = ..()
|
||||
class = class_
|
||||
if(timer)
|
||||
addtimer(CALLBACK(src, .proc/remove), timer)
|
||||
timed = TRUE
|
||||
if(copymut && istype(copymut, /datum/mutation/human))
|
||||
copy_mutation(copymut)
|
||||
|
||||
/datum/mutation/human/proc/on_acquiring(mob/living/carbon/human/H)
|
||||
if(!H || !istype(H) || H.stat == DEAD || (src in H.dna.mutations))
|
||||
@@ -60,11 +74,9 @@
|
||||
owner.remove_overlay(layer_used)
|
||||
owner.overlays_standing[layer_used] = mut_overlay
|
||||
owner.apply_overlay(layer_used)
|
||||
if(power)
|
||||
power = new power()
|
||||
power.action_background_icon_state = "bg_tech_blue_on"
|
||||
power.panel = "Genetic"
|
||||
owner.AddSpell(power)
|
||||
grant_spell() //we do checks here so nothing about hulk getting magic
|
||||
if(!modified)
|
||||
addtimer(CALLBACK(src, .proc/modify, 5)) //gonna want children calling ..() to run first
|
||||
|
||||
/datum/mutation/human/proc/get_visual_indicator()
|
||||
return
|
||||
@@ -127,7 +139,32 @@
|
||||
overlays_standing[CM.layer_used] = mut_overlay
|
||||
apply_overlay(CM.layer_used)
|
||||
|
||||
/datum/mutation/human/proc/copy_mutation(datum/mutation/human/HM) //Not yet implemented, useful for when assigning specific stats.
|
||||
/datum/mutation/human/proc/modify() //called when a genome is applied so we can properly update some stats without having to remove and reapply the mutation from someone
|
||||
if(modified || !power || !owner)
|
||||
return
|
||||
power.charge_max *= GET_MUTATION_ENERGY(src)
|
||||
power.charge_counter *= GET_MUTATION_ENERGY(src)
|
||||
modified = TRUE
|
||||
|
||||
/datum/mutation/human/proc/copy_mutation(datum/mutation/human/HM)
|
||||
if(!HM)
|
||||
return
|
||||
chromosome_name = HM.chromosome_name
|
||||
stabilizer_coeff = HM.stabilizer_coeff
|
||||
synchronizer_coeff = HM.synchronizer_coeff
|
||||
power_coeff = HM.power_coeff
|
||||
energy_coeff = HM.energy_coeff
|
||||
mutadone_proof = HM.mutadone_proof
|
||||
can_chromosome = HM.can_chromosome
|
||||
|
||||
/datum/mutation/human/proc/remove_chromosome()
|
||||
stabilizer_coeff = initial(stabilizer_coeff)
|
||||
synchronizer_coeff = initial(synchronizer_coeff)
|
||||
power_coeff = initial(power_coeff)
|
||||
energy_coeff = initial(energy_coeff)
|
||||
mutadone_proof = initial(mutadone_proof)
|
||||
can_chromosome = initial(can_chromosome)
|
||||
chromosome_name = null
|
||||
|
||||
/datum/mutation/human/proc/remove()
|
||||
if(dna)
|
||||
@@ -135,3 +172,12 @@
|
||||
else
|
||||
qdel(src)
|
||||
|
||||
/datum/mutation/human/proc/grant_spell()
|
||||
if(!power || !owner)
|
||||
return FALSE
|
||||
|
||||
power = new power()
|
||||
power.action_background_icon_state = "bg_tech_blue_on"
|
||||
power.panel = "Genetic"
|
||||
owner.AddSpell(power)
|
||||
return TRUE
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
difficulty = 12
|
||||
power = /obj/effect/proc_holder/spell/targeted/telepathy
|
||||
instability = 10
|
||||
energy_coeff = 1
|
||||
|
||||
|
||||
/datum/mutation/human/olfaction
|
||||
@@ -107,6 +108,13 @@
|
||||
text_lose_indication = "<span class='notice'>Your throat is cooling down.</span>"
|
||||
power = /obj/effect/proc_holder/spell/aimed/firebreath
|
||||
instability = 30
|
||||
energy_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/firebreath/modify()
|
||||
if(power)
|
||||
var/obj/effect/proc_holder/spell/aimed/firebreath/S = power
|
||||
S.strength = GET_MUTATION_POWER(src)
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath
|
||||
name = "Fire Breath"
|
||||
@@ -121,6 +129,7 @@
|
||||
sound = 'sound/magic/demon_dies.ogg' //horrifying lizard noises
|
||||
active_msg = "You built up heat in your mouth."
|
||||
deactive_msg = "You swallow the flame."
|
||||
var/strength = 1
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath/before_cast(list/targets)
|
||||
. = ..()
|
||||
@@ -132,6 +141,17 @@
|
||||
to_chat(C,"<span class='warning'>Something in front of your mouth caught fire!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/effect/proc_holder/spell/aimed/firebreath/ready_projectile(obj/item/projectile/P, atom/target, mob/user, iteration)
|
||||
if(!istype(P, /obj/item/projectile/magic/aoe/fireball))
|
||||
return
|
||||
var/obj/item/projectile/magic/aoe/fireball/F = P
|
||||
switch(strength)
|
||||
if(1 to 3)
|
||||
F.exp_light = strength-1
|
||||
if(4 to INFINITY)
|
||||
F.exp_heavy = strength-3
|
||||
F.exp_fire += strength
|
||||
|
||||
/obj/item/projectile/magic/aoe/fireball/firebreath
|
||||
name = "fire breath"
|
||||
exp_heavy = 0
|
||||
@@ -146,11 +166,13 @@
|
||||
text_gain_indication = "<span class='notice'>You feel a heavy, dull force just beyond the walls watching you.</span>"
|
||||
instability = 30
|
||||
power = /obj/effect/proc_holder/spell/self/void
|
||||
energy_coeff = 1
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/datum/mutation/human/void/on_life()
|
||||
if(!isturf(owner.loc))
|
||||
return
|
||||
if(prob(0.5+((100-dna.stability)/20))) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
|
||||
if(prob((0.5+((100-dna.stability)/20))) * GET_MUTATION_SYNCHRONIZER(src)) //very rare, but enough to annoy you hopefully. +0.5 probability for every 10 points lost in stability
|
||||
new /obj/effect/immortality_talisman/void(get_turf(owner), owner)
|
||||
|
||||
/obj/effect/proc_holder/spell/self/void
|
||||
|
||||
@@ -6,12 +6,14 @@
|
||||
desc = "A genetic defect that sporadically causes seizures."
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You get a headache.</span>"
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/epilepsy/on_life()
|
||||
if(prob(1) && owner.stat == CONSCIOUS)
|
||||
if(prob(1 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
|
||||
owner.visible_message("<span class='danger'>[owner] starts having a seizure!</span>", "<span class='userdanger'>You have a seizure!</span>")
|
||||
owner.Unconscious(200)
|
||||
owner.Jitter(1000)
|
||||
owner.Unconscious(200 * GET_MUTATION_POWER(src))
|
||||
owner.Jitter(1000 * GET_MUTATION_POWER(src))
|
||||
SEND_SIGNAL(owner, COMSIG_ADD_MOOD_EVENT, "epilepsy", /datum/mood_event/epilepsy)
|
||||
addtimer(CALLBACK(src, .proc/jitter_less), 90)
|
||||
|
||||
@@ -52,12 +54,17 @@
|
||||
desc = "A chronic cough."
|
||||
quality = MINOR_NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You start coughing.</span>"
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/cough/on_life()
|
||||
if(prob(5) && owner.stat == CONSCIOUS)
|
||||
if(prob(5 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS)
|
||||
owner.drop_all_held_items()
|
||||
owner.emote("cough")
|
||||
|
||||
if(GET_MUTATION_POWER(src) > 1)
|
||||
var/cough_range = GET_MUTATION_POWER(src) * 4
|
||||
var/turf/target = get_ranged_target_turf(owner, turn(owner.dir, 180), cough_range)
|
||||
owner.throw_at(target, cough_range, GET_MUTATION_POWER(src))
|
||||
|
||||
//Dwarfism shrinks your body and lets you pass tables.
|
||||
/datum/mutation/human/dwarfism
|
||||
@@ -109,9 +116,10 @@
|
||||
desc = "A chronic twitch that forces the user to scream bad words." //definitely needs rewriting
|
||||
quality = NEGATIVE
|
||||
text_gain_indication = "<span class='danger'>You twitch.</span>"
|
||||
synchronizer_coeff = 1
|
||||
|
||||
/datum/mutation/human/tourettes/on_life()
|
||||
if(prob(10) && owner.stat == CONSCIOUS && !owner.IsStun())
|
||||
if(prob(10 * GET_MUTATION_SYNCHRONIZER(src)) && owner.stat == CONSCIOUS && !owner.IsStun())
|
||||
owner.Stun(200)
|
||||
switch(rand(1, 3))
|
||||
if(1)
|
||||
@@ -169,6 +177,7 @@
|
||||
instability = 5
|
||||
var/obj/effect/dummy/luminescent_glow/glowth //shamelessly copied from luminescents
|
||||
var/glow = 1.5
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/glow/on_acquiring(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
@@ -176,6 +185,10 @@
|
||||
glowth = new(owner)
|
||||
glowth.set_light(glow, glow, dna.features["mcolor"])
|
||||
|
||||
/datum/mutation/human/glow/modify(mob/living/carbon/human/owner)
|
||||
if(glowth)
|
||||
glowth.set_light(glow + GET_MUTATION_POWER(src) , glow + GET_MUTATION_POWER(src), dna.features["mcolor"])
|
||||
|
||||
/datum/mutation/human/glow/on_losing(mob/living/carbon/human/owner)
|
||||
if(..())
|
||||
return
|
||||
@@ -214,10 +227,12 @@
|
||||
text_gain_indication = "<span class='warning'>You feel hot.</span>"
|
||||
text_lose_indication = "<span class'notice'>You feel a lot cooler.</span>"
|
||||
difficulty = 14
|
||||
synchronizer_coeff = 1
|
||||
power_coeff = 1
|
||||
|
||||
/datum/mutation/human/fire/on_life()
|
||||
if(prob(1+(100-dna.stability)/10))
|
||||
owner.adjust_fire_stacks(2)
|
||||
if(prob((1+(100-dna.stability)/10)) * GET_MUTATION_SYNCHRONIZER(src))
|
||||
owner.adjust_fire_stacks(2 * GET_MUTATION_POWER(src))
|
||||
owner.IgniteMob()
|
||||
|
||||
/datum/mutation/human/fire/on_acquiring(mob/living/carbon/human/owner)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
instability = 5
|
||||
difficulty = 8
|
||||
|
||||
|
||||
/datum/mutation/human/radioactive/on_life()
|
||||
radiation_pulse(owner, 20)
|
||||
|
||||
|
||||
@@ -36,9 +36,11 @@
|
||||
var/combine
|
||||
var/radduration = 2
|
||||
var/radstrength = 1
|
||||
var/max_chromosomes = 6
|
||||
|
||||
var/list/buffer[NUMBER_OF_BUFFERS]
|
||||
var/list/stored_mutations = list()
|
||||
var/list/stored_chromosomes = list()
|
||||
|
||||
var/injectorready = 0 //world timer cooldown var
|
||||
var/jokerready = 0
|
||||
@@ -59,6 +61,29 @@
|
||||
to_chat(user, "<span class='notice'>You insert [I].</span>")
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
if (istype(I, /obj/item/chromosome))
|
||||
if(LAZYLEN(stored_chromosomes) < max_chromosomes)
|
||||
I.forceMove(src)
|
||||
stored_chromosomes += I
|
||||
to_chat(user, "<span class='notice'>You insert [I]</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warnning'>You cannot store any more chromosomes.</span>")
|
||||
return
|
||||
if(istype(I, /obj/item/dnainjector/activator))
|
||||
var/obj/item/dnainjector/activator/A = I
|
||||
if(A.used)
|
||||
to_chat(user,"<span class='notice'>Recycled [I].</span>")
|
||||
if(A.research)
|
||||
var/c_typepath = generate_chromosome()
|
||||
var/obj/item/chromosome/CM = new c_typepath (drop_location())
|
||||
to_chat(user,"<span class='notice'>Recycled [I].</span>")
|
||||
if((LAZYLEN(stored_chromosomes) < max_chromosomes) && prob(60))
|
||||
CM.forceMove(src)
|
||||
stored_chromosomes += CM
|
||||
to_chat(user,"<span class='notice'>[capitalize(CM.name)] added to storage.</span>")
|
||||
qdel(I)
|
||||
return
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -216,7 +241,7 @@
|
||||
temp_html += "<div class='dnaBlockNumber'>[(i / DNA_BLOCK_SIZE) + 1]</div>"
|
||||
else
|
||||
temp_html += "---------"
|
||||
temp_html += "</div></div><h1>Buffer Menu</h1>"
|
||||
temp_html += "</div></div><br><h1>Buffer Menu</h1>"
|
||||
|
||||
if(istype(buffer))
|
||||
for(var/i=1, i<=buffer.len, i++)
|
||||
@@ -335,7 +360,14 @@
|
||||
temp_html += "<td><span class='linkOff'>Combine</span></td></tr>"
|
||||
else
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=combine;num=[i]'>Combine</a></td></tr>"
|
||||
temp_html += "</table><br>"
|
||||
temp_html += "<h3>Chromosome Storage:<br></h3>"
|
||||
temp_html += "<table>"
|
||||
for(var/i in 1 to stored_chromosomes.len)
|
||||
var/obj/item/chromosome/CM = stored_chromosomes[i]
|
||||
temp_html += "<td><a href='?src=[REF(src)];task=ejectchromosome;num=[i]'>[CM.name]</a></td><br>"
|
||||
temp_html += "</table>"
|
||||
|
||||
else
|
||||
temp_html += status
|
||||
temp_html += buttons
|
||||
@@ -390,15 +422,16 @@
|
||||
var/discovered = FALSE
|
||||
var/active = FALSE
|
||||
var/scrambled = FALSE
|
||||
var/instability
|
||||
var/mob/living/carbon/viable_occupant = get_viable_occupant()
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
|
||||
if(viable_occupant)
|
||||
var/datum/mutation/human/HM = viable_occupant.dna.get_mutation(mutation)
|
||||
if(HM)
|
||||
if(HM.scrambled)
|
||||
scrambled = TRUE
|
||||
var/datum/mutation/human/M = viable_occupant.dna.get_mutation(mutation)
|
||||
if(M)
|
||||
scrambled = M.scrambled
|
||||
active = TRUE
|
||||
var/datum/mutation/human/A = get_initialized_mutation(mutation)
|
||||
var/datum/mutation/human/A = GET_INITIALIZED_MUTATION(mutation)
|
||||
alias = A.alias
|
||||
if(active && !scrambled)
|
||||
discover(mutation)
|
||||
@@ -406,11 +439,10 @@
|
||||
mut_name = A.name
|
||||
mut_desc = A.desc
|
||||
discovered = TRUE
|
||||
instability = A.instability
|
||||
var/extra
|
||||
if(viable_occupant && !(storage_slot || mutation_in_sequence(mutation, viable_occupant.dna)))
|
||||
if(viable_occupant && !(storage_slot || viable_occupant.dna.mutation_in_sequence(mutation)))
|
||||
extra = TRUE
|
||||
var/datum/mutation/human/HM = get_initialized_mutation(mutation)
|
||||
|
||||
if(discovered && !scrambled)
|
||||
var/mutcolor
|
||||
switch(A.quality)
|
||||
@@ -420,13 +452,23 @@
|
||||
mutcolor = "average"
|
||||
if(NEGATIVE)
|
||||
mutcolor = "bad"
|
||||
if(HM)
|
||||
instability *= GET_MUTATION_STABILIZER(HM)
|
||||
temp_html += "<div class='statusDisplay'><div class='statusLine'><span class='[mutcolor]'><b>[mut_name]</b></span><small> ([alias])</small><br>"
|
||||
temp_html += "<div class='statusLine'>Instability : [round(instability)]</span><br>"
|
||||
else
|
||||
temp_html += "<div class='statusDisplay'><div class='statusLine'><b>[alias]</b><br>"
|
||||
temp_html += "<div class='statusLine'>[mut_desc]<br></div>"
|
||||
if(active && !storage_slot)
|
||||
if(HM?.can_chromosome && (HM in viable_occupant.dna.mutations))
|
||||
var/i = viable_occupant.dna.mutations.Find(HM)
|
||||
var/chromosome_name = "<a href='?src=[REF(src)];task=applychromosome;path=[mutation];num=[i];'>----</a>"
|
||||
if(HM.chromosome_name)
|
||||
chromosome_name = HM.chromosome_name
|
||||
temp_html += "<div class='statusLine'>Chromosome status: [chromosome_name]<br></div>"
|
||||
temp_html += "<div class='statusLine'>Sequence:<br><br></div>"
|
||||
if(!scrambled)
|
||||
for(var/block in 1 to HM.blocks)
|
||||
for(var/block in 1 to A.blocks)
|
||||
var/whole_sequence = get_valid_gene_string(mutation)
|
||||
var/sequence = copytext(whole_sequence, 1+(block-1)*(DNA_SEQUENCE_LENGTH*2),(DNA_SEQUENCE_LENGTH*2*block+1))
|
||||
temp_html += "<div class='statusLine'><table class='statusDisplay'><tr>"
|
||||
@@ -651,7 +693,7 @@
|
||||
var/datum/mutation/human/A = new HM.type()
|
||||
A.copy_mutation(HM)
|
||||
succes = TRUE
|
||||
stored_mutations[A] = get_sequence(mutation) //We only store active mutations and all active mutations have the full sequence.
|
||||
stored_mutations += A
|
||||
to_chat(usr,"<span class='notice'>Mutation succesfully stored.</span>")
|
||||
if(!succes) //we can exactly return here
|
||||
to_chat(usr,"<span class='warning'>Mutation storage is full.</span>")
|
||||
@@ -668,9 +710,10 @@
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
if(HM)
|
||||
var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc)
|
||||
I.add_mutations += HM.type
|
||||
I.add_mutations += new HM.type (copymut = HM)
|
||||
I.name = "[HM.name] activator"
|
||||
I.damage_coeff = connected.damage_coeff*4
|
||||
I.research = TRUE
|
||||
injectorready = world.time + INJECTOR_TIMEOUT
|
||||
if("mutator")
|
||||
if(injectorready < world.time)
|
||||
@@ -679,7 +722,7 @@
|
||||
var/datum/mutation/human/HM = get_valid_mutation(mutation)
|
||||
if(HM)
|
||||
var/obj/item/dnainjector/activator/I = new /obj/item/dnainjector/activator(loc)
|
||||
I.add_mutations += HM.type
|
||||
I.add_mutations += new HM.type (copymut = HM)
|
||||
I.doitanyway = TRUE
|
||||
I.name = "[HM.name] injector"
|
||||
I.damage_coeff = connected.damage_coeff
|
||||
@@ -687,9 +730,8 @@
|
||||
if("nullify")
|
||||
if(viable_occupant)
|
||||
var/datum/mutation/human/A = viable_occupant.dna.get_mutation(current_mutation)
|
||||
if(A && (!mutation_in_sequence(current_mutation, viable_occupant.dna) || A.scrambled))
|
||||
if(A && (!viable_occupant.dna.mutation_in_sequence(current_mutation) || A.scrambled))
|
||||
viable_occupant.dna.remove_mutation(current_mutation)
|
||||
viable_occupant.dna.update_instability()
|
||||
current_screen = "mainmenu"
|
||||
current_mutation = null
|
||||
if("pulsegene")
|
||||
@@ -699,14 +741,14 @@
|
||||
var/list/genes = list("A","T","G","C","X")
|
||||
if(jokerready < world.time)
|
||||
genes += "JOKER"
|
||||
var/sequence = get_gene_string(path, viable_occupant.dna)
|
||||
var/sequence = GET_GENE_STRING(path, viable_occupant.dna)
|
||||
var/original = sequence[num]
|
||||
var/new_gene = input("From [original] to-", "New block", original) as null|anything in genes
|
||||
if(!new_gene)
|
||||
new_gene = original
|
||||
if(viable_occupant == get_viable_occupant()) //No cheesing
|
||||
if((new_gene == "JOKER") && (jokerready < world.time))
|
||||
var/true_genes = get_sequence(current_mutation)
|
||||
var/true_genes = GET_SEQUENCE(current_mutation)
|
||||
new_gene = true_genes[num]
|
||||
jokerready = world.time + JOKER_TIMEOUT - (JOKER_UPGRADE * (connected.precision_coeff-1))
|
||||
sequence = copytext(sequence, 1, num) + new_gene + copytext(sequence, num+1, length(sequence)+1)
|
||||
@@ -735,7 +777,7 @@
|
||||
var/datum/mutation/human/A = diskette.mutations[num]
|
||||
var/datum/mutation/human/HM = new A.type()
|
||||
HM.copy_mutation(A)
|
||||
stored_mutations[HM] = get_sequence(HM.type)
|
||||
stored_mutations += HM
|
||||
to_chat(usr,"<span class='notice'>Successfully wrote [A.name] to storage.")
|
||||
if("combine")
|
||||
if(num && (LAZYLEN(stored_mutations) >= num))
|
||||
@@ -745,7 +787,7 @@
|
||||
if(combine)
|
||||
var/result_path = get_mixed_mutation(combine, path)
|
||||
if(result_path)
|
||||
stored_mutations[new result_path()] = get_sequence(result_path)
|
||||
stored_mutations += new result_path()
|
||||
to_chat(usr, "<span class='boldnotice'>Succes! New mutation has been added to storage</span>")
|
||||
discover(result_path)
|
||||
combine = null
|
||||
@@ -757,9 +799,29 @@
|
||||
to_chat(usr,"<span class='notice'>Selected [A.name] for combining</span>")
|
||||
else
|
||||
to_chat(usr, "<span class='warning'>Not enough space to store potential mutation.</span>")
|
||||
if("ejectchromosome")
|
||||
if(LAZYLEN(stored_chromosomes) <= num)
|
||||
var/obj/item/chromosome/CM = stored_chromosomes[num]
|
||||
CM.forceMove(drop_location())
|
||||
adjust_item_drop_location(CM)
|
||||
stored_chromosomes -= CM
|
||||
if("applychromosome")
|
||||
if(viable_occupant && (LAZYLEN(viable_occupant.dna.mutations) <= num))
|
||||
var/datum/mutation/human/HM = viable_occupant.dna.mutations[num]
|
||||
var/list/chromosomes = list()
|
||||
for(var/obj/item/chromosome/CM in stored_chromosomes)
|
||||
if(CM.can_apply(HM))
|
||||
chromosomes += CM
|
||||
if(chromosomes.len)
|
||||
var/obj/item/chromosome/CM = input("Select a chromosome to apply", "Apply Chromosome") as null|anything in chromosomes
|
||||
if(CM)
|
||||
to_chat(usr, "<span class='notice'>You apply [CM] to [HM.name].")
|
||||
stored_chromosomes -= CM
|
||||
CM.apply(HM)
|
||||
|
||||
ui_interact(usr,last_change)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd)
|
||||
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs,rd) //hexadecimal genetics. dont confuse with scramble button
|
||||
var/length = length(input)
|
||||
var/ran = gaussian(0, rs*RADIATION_STRENGTH_MULTIPLIER)
|
||||
if(ran == 0)
|
||||
@@ -819,12 +881,12 @@
|
||||
delayed_action = null //or make it stick + reset button ?
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_valid_mutation(mutation)
|
||||
for(var/datum/mutation/human/A in stored_mutations)
|
||||
if(A.type == mutation)
|
||||
return A
|
||||
var/mob/living/carbon/C = get_viable_occupant()
|
||||
if(C)
|
||||
return C.dna.get_mutation(mutation)
|
||||
for(var/datum/mutation/human/A in stored_mutations)
|
||||
if(A.type == mutation)
|
||||
return A
|
||||
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_mutation_list(include_storage) //Returns a list of the mutation index types and any extra mutations
|
||||
@@ -844,14 +906,14 @@
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_valid_gene_string(mutation)
|
||||
var/mob/living/carbon/C = get_viable_occupant()
|
||||
if(C && (mutation in C.dna.mutation_index))
|
||||
return get_gene_string(mutation, C.dna)
|
||||
return GET_GENE_STRING(mutation, C.dna)
|
||||
else if(C && (LAZYLEN(C.dna.mutations)))
|
||||
for(var/datum/mutation/human/A in C.dna.mutations)
|
||||
if(A.type == mutation)
|
||||
return get_sequence(mutation)
|
||||
return GET_SEQUENCE(mutation)
|
||||
for(var/datum/mutation/human/A in stored_mutations)
|
||||
if(A.type == mutation)
|
||||
return stored_mutations[A]
|
||||
return GET_SEQUENCE(mutation)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/discover(mutation)
|
||||
if(stored_research && !(mutation in stored_research.discovered_mutations))
|
||||
|
||||
@@ -293,12 +293,12 @@
|
||||
if(equip_ready) //disabled
|
||||
return
|
||||
var/area/A = get_area(chassis)
|
||||
var/pow_chan = get_power_channel(A)
|
||||
var/pow_chan = GET_MUTATION_POWER_channel(A)
|
||||
if(pow_chan)
|
||||
return 1000 //making magic
|
||||
|
||||
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(var/area/A)
|
||||
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/GET_MUTATION_POWER_channel(var/area/A)
|
||||
var/pow_chan
|
||||
if(A)
|
||||
for(var/c in use_channels)
|
||||
|
||||
92
code/game/objects/items/chromosome.dm
Normal file
92
code/game/objects/items/chromosome.dm
Normal file
@@ -0,0 +1,92 @@
|
||||
/obj/item/chromosome
|
||||
name = "blank chromosome"
|
||||
icon = 'icons/obj/chromosomes.dmi'
|
||||
icon_state = ""
|
||||
desc = "A tube holding chromosomic data."
|
||||
force = 0
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
var/stabilizer_coeff = 1 //lower is better, affects genetic stability
|
||||
var/synchronizer_coeff = 1 //lower is better, affects chance to backfire
|
||||
var/power_coeff = 1 //higher is better, affects "strength"
|
||||
var/energy_coeff = 1 //lower is better. affects recharge time
|
||||
|
||||
var/weight = 5
|
||||
|
||||
/obj/item/chromosome/proc/can_apply(datum/mutation/human/HM)
|
||||
if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE))
|
||||
return FALSE
|
||||
if((stabilizer_coeff != 1) && (HM.stabilizer_coeff != -1)) //if the chromosome is 1, we dont change anything. If the mutation is -1, we cant change it. sorry
|
||||
return TRUE
|
||||
if((synchronizer_coeff != 1) && (HM.synchronizer_coeff != -1))
|
||||
return TRUE
|
||||
if((power_coeff != 1) && (HM.power_coeff != -1))
|
||||
return TRUE
|
||||
if((energy_coeff != 1) && (HM.energy_coeff != -1))
|
||||
return TRUE
|
||||
|
||||
/obj/item/chromosome/proc/apply(datum/mutation/human/HM)
|
||||
if(HM.stabilizer_coeff != -1)
|
||||
HM.stabilizer_coeff = stabilizer_coeff
|
||||
if(HM.synchronizer_coeff != -1)
|
||||
HM.synchronizer_coeff = synchronizer_coeff
|
||||
if(HM.power_coeff != -1)
|
||||
HM.power_coeff = power_coeff
|
||||
if(HM.energy_coeff != -1)
|
||||
HM.energy_coeff = energy_coeff
|
||||
HM.can_chromosome = 2
|
||||
HM.chromosome_name = name
|
||||
HM.modify()
|
||||
qdel(src)
|
||||
|
||||
/proc/generate_chromosome()
|
||||
var/static/list/chromosomes
|
||||
if(!chromosomes)
|
||||
chromosomes = list()
|
||||
for(var/A in subtypesof(/obj/item/chromosome))
|
||||
var/obj/item/chromosome/CM = A
|
||||
if(!initial(CM.weight))
|
||||
break
|
||||
chromosomes[A] = initial(CM.weight)
|
||||
return pickweight(chromosomes)
|
||||
|
||||
|
||||
/obj/item/chromosome/stabilizer
|
||||
name = "stabilizer chromosome"
|
||||
desc = "A chromosome that adjusts to the body to reduce genetic damage by 20%."
|
||||
icon_state = "stabilizer"
|
||||
stabilizer_coeff = 0.8
|
||||
weight = 1
|
||||
|
||||
/obj/item/chromosome/synchronizer
|
||||
name = "synchronizer chromosome"
|
||||
desc = "A chromosome that gives the mind more controle over the mutation, reducing knockback and downsides by 50%."
|
||||
icon_state = "synchronizer"
|
||||
synchronizer_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/power
|
||||
name = "power chromosome"
|
||||
desc = "A power chromosome for boosting certain mutation's power by 50%."
|
||||
icon_state = "power"
|
||||
power_coeff = 1.5
|
||||
|
||||
/obj/item/chromosome/energy
|
||||
name = "energetic chromosome"
|
||||
desc = "A chromosome that reduces cooldown on action based mutations by 50%."
|
||||
icon_state = "energy"
|
||||
energy_coeff = 0.5
|
||||
|
||||
/obj/item/chromosome/reinforcer
|
||||
name = "reinforcement chromosome"
|
||||
desc = "Renders the mutation immune to mutadone."
|
||||
icon_state = "reinforcer"
|
||||
weight = 3
|
||||
|
||||
/obj/item/chromosome/reinforcer/can_apply(datum/mutation/human/HM)
|
||||
if(!HM || !(HM.can_chromosome == CHROMOSOME_NONE))
|
||||
return FALSE
|
||||
return !HM.mutadone_proof
|
||||
|
||||
/obj/item/chromosome/reinforcer/apply(datum/mutation/human/HM)
|
||||
HM.mutadone_proof = TRUE
|
||||
..()
|
||||
@@ -7,6 +7,7 @@ HEALTH ANALYZER
|
||||
GAS ANALYZER
|
||||
SLIME SCANNER
|
||||
NANITE SCANNER
|
||||
GENE SCANNER
|
||||
|
||||
*/
|
||||
/obj/item/t_scanner
|
||||
@@ -191,6 +192,7 @@ NANITE SCANNER
|
||||
to_chat(user, "\t<span class='info'>Subject has the following physiological traits: [C.get_trait_string()].</span>")
|
||||
if(advanced)
|
||||
to_chat(user, "\t<span class='info'>Brain Activity Level: [(200 - M.getBrainLoss())/2]%.</span>")
|
||||
|
||||
if (M.radiation)
|
||||
to_chat(user, "\t<span class='alert'>Subject is irradiated.</span>")
|
||||
if(advanced)
|
||||
@@ -254,6 +256,8 @@ NANITE SCANNER
|
||||
var/ldamage = H.return_liver_damage()
|
||||
if(ldamage > 10)
|
||||
to_chat(user, "\t<span class='alert'>[ldamage > 45 ? "Severe" : "Minor"] liver damage detected.</span>")
|
||||
if(advanced && H.has_dna())
|
||||
to_chat(user, "\t<span class='info'>Genetic Stability: [H.dna.stability]%.</span>")
|
||||
|
||||
// Body part damage report
|
||||
if(iscarbon(M) && mode == 1)
|
||||
@@ -701,13 +705,13 @@ NANITE SCANNER
|
||||
return
|
||||
to_chat(user, "<span class='notice'>[C.name]'s potential mutations.")
|
||||
for(var/A in C.dna.mutation_index)
|
||||
var/datum/mutation/human/HM = get_initialized_mutation(A)
|
||||
var/datum/mutation/human/HM = GET_INITIALIZED_MUTATION(A)
|
||||
var/mut_name
|
||||
if(G && (A in G.discovered))
|
||||
mut_name = "[HM.name] ([HM.alias])"
|
||||
else
|
||||
mut_name = HM.alias
|
||||
var/temp = get_gene_string(HM.type, C.dna)
|
||||
var/temp = GET_GENE_STRING(HM.type, C.dna)
|
||||
var/display
|
||||
for(var/i in 0 to length(temp) / DNA_MUTATION_BLOCKS-1)
|
||||
if(i)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(HM == RACEMUT)
|
||||
message_admins("[ADMIN_LOOKUPFLW(user)] injected [key_name_admin(M)] with the [name] <span class='danger'>(MONKEY)</span>")
|
||||
log_msg += " (MONKEY)"
|
||||
if(mutation_in_sequence(HM, M.dna))
|
||||
if(M.dna.mutation_in_sequence(HM))
|
||||
M.dna.activate_mutation(HM)
|
||||
else
|
||||
M.dna.add_mutation(HM, MUT_EXTRA)
|
||||
@@ -395,19 +395,30 @@
|
||||
name = "\improper DNA activator"
|
||||
desc = "Activates the current mutation on injection, if the subject has it."
|
||||
var/doitanyway = FALSE
|
||||
var/research = FALSE //Set to true to get expended and filled injectors for chromosomes
|
||||
var/filled = FALSE
|
||||
|
||||
/obj/item/dnainjector/activator/inject(mob/living/carbon/M, mob/user)
|
||||
if(M.has_dna() && !M.has_trait(TRAIT_RADIMMUNE) && !M.has_trait(TRAIT_BADDNA))
|
||||
M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
|
||||
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
|
||||
for(var/mutation in add_mutations)
|
||||
if(!M.dna.activate_mutation(mutation) && !doitanyway)
|
||||
log_msg += "(FAILED)"
|
||||
else if(doitanyway)
|
||||
M.dna.add_mutation(mutation, MUT_EXTRA)
|
||||
var/datum/mutation/human/HM = mutation
|
||||
if(istype(HM, /datum/mutation/human))
|
||||
mutation = HM.type
|
||||
if(!M.dna.activate_mutation(HM))
|
||||
if(!doitanyway)
|
||||
log_msg += "(FAILED)"
|
||||
else
|
||||
M.dna.add_mutation(HM, MUT_EXTRA)
|
||||
name = "expended [name]"
|
||||
else if(research && M.client)
|
||||
filled = TRUE
|
||||
name = "filled [name]"
|
||||
else
|
||||
name = "expended [name]"
|
||||
log_msg += "([mutation])"
|
||||
log_attack("[log_msg] [loc_name(user)]")
|
||||
M.dna.update_instability()
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
if(tr_flags & TR_KEEPSE)
|
||||
O.dna.mutation_index = dna.mutation_index
|
||||
O.dna.set_se(1, get_initialized_mutation(RACEMUT))
|
||||
O.dna.set_se(1, GET_INITIALIZED_MUTATION(RACEMUT))
|
||||
|
||||
if(suiciding)
|
||||
O.set_suicide(suiciding)
|
||||
@@ -209,7 +209,7 @@
|
||||
|
||||
if(tr_flags & TR_KEEPSE)
|
||||
O.dna.mutation_index = dna.mutation_index
|
||||
O.dna.set_se(0, get_initialized_mutation(RACEMUT))
|
||||
O.dna.set_se(0, GET_INITIALIZED_MUTATION(RACEMUT))
|
||||
O.domutcheck()
|
||||
|
||||
if(suiciding)
|
||||
|
||||
@@ -888,7 +888,7 @@
|
||||
/datum/reagent/medicine/mutadone/on_mob_life(mob/living/carbon/M)
|
||||
M.jitteriness = 0
|
||||
if(M.has_dna())
|
||||
M.dna.remove_all_mutations()
|
||||
M.dna.remove_all_mutations(mutadone = TRUE)
|
||||
if(!QDELETED(M)) //We were a monkey, now a human
|
||||
..()
|
||||
|
||||
|
||||
BIN
icons/obj/chromosomes.dmi
Normal file
BIN
icons/obj/chromosomes.dmi
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -465,11 +465,11 @@
|
||||
#include "code\datums\mood_events\generic_positive_events.dm"
|
||||
#include "code\datums\mood_events\mood_event.dm"
|
||||
#include "code\datums\mood_events\needs_events.dm"
|
||||
#include "code\datums\mutations\_combined.dm"
|
||||
#include "code\datums\mutations\actions.dm"
|
||||
#include "code\datums\mutations\body.dm"
|
||||
#include "code\datums\mutations\chameleon.dm"
|
||||
#include "code\datums\mutations\cold.dm"
|
||||
#include "code\datums\mutations\combined.dm"
|
||||
#include "code\datums\mutations\hulk.dm"
|
||||
#include "code\datums\mutations\radioactive.dm"
|
||||
#include "code\datums\mutations\sight.dm"
|
||||
@@ -786,6 +786,7 @@
|
||||
#include "code\game\objects\items\cardboard_cutouts.dm"
|
||||
#include "code\game\objects\items\cards_ids.dm"
|
||||
#include "code\game\objects\items\charter.dm"
|
||||
#include "code\game\objects\items\chromosome.dm"
|
||||
#include "code\game\objects\items\chrono_eraser.dm"
|
||||
#include "code\game\objects\items\cigs_lighters.dm"
|
||||
#include "code\game\objects\items\clown_items.dm"
|
||||
|
||||
@@ -480,11 +480,11 @@
|
||||
#include "code\datums\mood_events\generic_positive_events.dm"
|
||||
#include "code\datums\mood_events\mood_event.dm"
|
||||
#include "code\datums\mood_events\needs_events.dm"
|
||||
#include "code\datums\mutations\_combined.dm"
|
||||
#include "code\datums\mutations\actions.dm"
|
||||
#include "code\datums\mutations\body.dm"
|
||||
#include "code\datums\mutations\chameleon.dm"
|
||||
#include "code\datums\mutations\cold.dm"
|
||||
#include "code\datums\mutations\combined.dm"
|
||||
#include "code\datums\mutations\hulk.dm"
|
||||
#include "code\datums\mutations\radioactive.dm"
|
||||
#include "code\datums\mutations\sight.dm"
|
||||
@@ -801,6 +801,7 @@
|
||||
#include "code\game\objects\items\cardboard_cutouts.dm"
|
||||
#include "code\game\objects\items\cards_ids.dm"
|
||||
#include "code\game\objects\items\charter.dm"
|
||||
#include "code\game\objects\items\chromosome.dm"
|
||||
#include "code\game\objects\items\chrono_eraser.dm"
|
||||
#include "code\game\objects\items\cigs_lighters.dm"
|
||||
#include "code\game\objects\items\clown_items.dm"
|
||||
|
||||
Reference in New Issue
Block a user