From 3b541cb9e5afc51590be510f796e8cd75c7859a5 Mon Sep 17 00:00:00 2001 From: Dahlular Date: Mon, 14 Sep 2020 02:45:45 -0600 Subject: [PATCH] Reworks Dwarfism and Adds Giantism --- code/__DEFINES/DNA.dm | 3 +- code/datums/mutations/body.dm | 38 +++++++++++++++++++++---- code/game/objects/items/dna_injector.dm | 9 ++++++ 3 files changed, 43 insertions(+), 7 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 0c5d6121..9a066493 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -12,6 +12,7 @@ #define MUTATE /datum/mutation/human/bad_dna #define COUGH /datum/mutation/human/cough #define DWARFISM /datum/mutation/human/dwarfism +#define GIANTISM /datum/mutation/human/giantism #define CLOWNMUT /datum/mutation/human/clumsy #define TOURETTES /datum/mutation/human/tourettes #define DEAFMUT /datum/mutation/human/deaf @@ -151,4 +152,4 @@ //used for the can_chromosome var on mutations #define CHROMOSOME_NEVER 0 #define CHROMOSOME_NONE 1 -#define CHROMOSOME_USED 2 \ No newline at end of file +#define CHROMOSOME_USED 2 diff --git a/code/datums/mutations/body.dm b/code/datums/mutations/body.dm index a64f4afd..517c406c 100644 --- a/code/datums/mutations/body.dm +++ b/code/datums/mutations/body.dm @@ -68,7 +68,7 @@ owner.throw_at(target, cough_range, GET_MUTATION_POWER(src)) -//Dwarfism shrinks your body and lets you pass tables. +//Dwarfism shrinks your body. /datum/mutation/human/dwarfism name = "Dwarfism" desc = "A mutation believed to be the cause of dwarfism." @@ -80,17 +80,43 @@ /datum/mutation/human/dwarfism/on_acquiring(mob/living/carbon/human/owner) if(..()) return - owner.transform = owner.transform.Scale(1, 0.8) - owner.pass_flags |= PASSTABLE + if(owner.size_multiplier <= RESIZE_A_TINYMICRO) //Because what's optimization? + return + owner.resize(owner.size_multiplier-0.2) owner.visible_message("[owner] suddenly shrinks!", "Everything around you seems to grow..") /datum/mutation/human/dwarfism/on_losing(mob/living/carbon/human/owner) if(..()) return - owner.transform = owner.transform.Scale(1, 1.25) - owner.pass_flags &= ~PASSTABLE + if(owner.size_multiplier >= RESIZE_A_MACROHUGE) + return + owner.resize(owner.size_multiplier+0.2) owner.visible_message("[owner] suddenly grows!", "Everything around you seems to shrink..") +//Giantism grows your body. +/datum/mutation/human/giantism + name = "Giantism" + desc = "A mutation believed to be the cause of giantism." + quality = POSITIVE + difficulty = 14 + instability = 5 + locked = TRUE + +/datum/mutation/human/giantism/on_acquiring(mob/living/carbon/human/owner) + if(..()) + return + if(owner.size_multiplier >= RESIZE_A_MACROHUGE) + return + owner.resize(owner.size_multiplier+0.2) + owner.visible_message("", "Everything around you compresses smaller...") + +/datum/mutation/human/giantism/on_losing(mob/living/carbon/human/owner) + if(..()) + return + if(owner.size_multiplier <= RESIZE_A_TINYMICRO) + return + owner.resize(owner.size_multiplier-0.2) + owner.visible_message("[owner] suddenly shrinks back down!", "You shrink back down in size.") //Clumsiness has a very large amount of small drawbacks depending on item. /datum/mutation/human/clumsy @@ -259,4 +285,4 @@ owner.jitteriness = min(max(0, owner.jitteriness + 5), 30) if(prob(25)) to_chat(owner,"You feel someone creeping in on you...") - owner.hallucination += 20 \ No newline at end of file + owner.hallucination += 20 diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm index 8849ac51..575cee78 100644 --- a/code/game/objects/items/dna_injector.dm +++ b/code/game/objects/items/dna_injector.dm @@ -140,6 +140,15 @@ desc = "It's a small world after all." add_mutations = list(DWARFISM) +/obj/item/dnainjector/antigiant + name = "\improper DNA injector (Anti-Giantism)" + desc = "Makes you small and weak." + remove_mutations = list(GIANTISM) + +/obj/item/dnainjector/giant + name = "\improper DNA injector (Giantism)" + desc = "Makes you bigger." + /obj/item/dnainjector/clumsymut name = "\improper DNA injector (Clumsy)" desc = "Makes clown minions."