From 519ebd5ed873aa9f1ca33b800478b37b46edbb29 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 1 Apr 2020 15:29:35 +0200 Subject: [PATCH] Porting the mutation conflict system, and resizing quantum realm fix. --- code/datums/mutations/_mutations.dm | 9 +++++++++ code/datums/mutations/body.dm | 2 ++ .../reagents/chemistry/reagents/drink_reagents.dm | 6 ++++-- .../reagents/chemistry/reagents/other_reagents.dm | 15 ++++++++------- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/code/datums/mutations/_mutations.dm b/code/datums/mutations/_mutations.dm index 2156581cb1..9edaa7605c 100644 --- a/code/datums/mutations/_mutations.dm +++ b/code/datums/mutations/_mutations.dm @@ -31,6 +31,7 @@ //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 + var/list/conflicts //any mutations that might conflict. put mutation typepath defines in here. make sure to enter it both ways (so that A conflicts with B, and B with A) 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 @@ -60,6 +61,14 @@ return TRUE if(limb_req && !H.get_bodypart(limb_req)) return TRUE + for(var/M in H.dna.mutations)//check for conflicting powers + var/datum/mutation/human/mewtayshun = M + if(LAZYLEN(mewtayshun.conflicts)) + for(var/cons in mewtayshun.conflicts) + var/datum/mutation/human/conflicter = cons + if(conflicter == type) + to_chat(H, "You feel your genes resisting something.") + return TRUE owner = H dna = H.dna dna.mutations += src diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index cc286058f1..7c2c954bcc 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -75,6 +75,7 @@ quality = POSITIVE difficulty = 16 instability = 5 + conflicts = list(GIGANTISM) locked = TRUE // Default intert species for now, so locked from regular pool. /datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner) @@ -333,6 +334,7 @@ desc = "The cells within the subject spread out to cover more area, making the subject appear larger." quality = MINOR_NEGATIVE difficulty = 12 + conflicts = list(DWARFISM) /datum/mutation/human/gigantism/on_acquiring(mob/living/carbon/human/owner) if(..()) diff --git a/code/modules/reagents/chemistry/reagents/drink_reagents.dm b/code/modules/reagents/chemistry/reagents/drink_reagents.dm index 482dfde1d6..52c06bca9b 100644 --- a/code/modules/reagents/chemistry/reagents/drink_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/drink_reagents.dm @@ -864,12 +864,13 @@ glass_icon_state = "red_queen" glass_name = "Red Queen" glass_desc = "DRINK ME." - var/current_size = 1 + var/current_size = RESIZE_DEFAULT_SIZE /datum/reagent/consumable/red_queen/on_mob_life(mob/living/carbon/H) if(prob(75)) return ..() var/newsize = pick(0.5, 0.75, 1, 1.50, 2) + newsize *= RESIZE_DEFAULT_SIZE H.resize = newsize/current_size current_size = newsize H.update_transform() @@ -878,7 +879,8 @@ ..() /datum/reagent/consumable/red_queen/on_mob_end_metabolize(mob/living/M) - M.resize = 1/current_size + M.resize = RESIZE_DEFAULT_SIZE/current_size + current_size = RESIZE_DEFAULT_SIZE M.update_transform() ..() diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 1fbb3cc346..d9b2aafb4b 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1917,22 +1917,22 @@ name = "Growth Serum" description = "A commercial chemical designed to help older men in the bedroom."//not really it just makes you a giant color = "#ff0000"//strong red. rgb 255, 0, 0 - var/current_size = 1 + var/current_size = RESIZE_DEFAULT_SIZE taste_description = "bitterness" // apparently what viagra tastes like /datum/reagent/growthserum/on_mob_life(mob/living/carbon/H) var/newsize = current_size switch(volume) if(0 to 19) - newsize = 1.25 + newsize = 1.25*RESIZE_DEFAULT_SIZE if(20 to 49) - newsize = 1.5 + newsize = 1.5*RESIZE_DEFAULT_SIZE if(50 to 99) - newsize = 2 + newsize = 2*RESIZE_DEFAULT_SIZE if(100 to 199) - newsize = 2.5 + newsize = 2.5*RESIZE_DEFAULT_SIZE if(200 to INFINITY) - newsize = 3.5 + newsize = 3.5*RESIZE_DEFAULT_SIZE H.resize = newsize/current_size current_size = newsize @@ -1940,7 +1940,8 @@ ..() /datum/reagent/growthserum/on_mob_end_metabolize(mob/living/M) - M.resize = 1/current_size + M.resize = RESIZE_DEFAULT_SIZE/current_size + current_size = RESIZE_DEFAULT_SIZE M.update_transform() ..()