From 7f63a878d3dd8f9c990aff710f92ca4834d654e0 Mon Sep 17 00:00:00 2001 From: nevimer <77420409+nevimer@users.noreply.github.com> Date: Fri, 6 Jun 2025 04:40:56 -0400 Subject: [PATCH] Micro Squishing & Quirk (for abusing small sprites and being SMALLER) (#3151) ## About The Pull Request Adds some balance around small sprites. You get trampled easily if you're smaller than normal, by pixel scale and not mutations. ## Why It's Good For The Game Micro Balance, arguable enterprise resource content. ## Proof Of Testing
Screenshots/Videos
## Changelog :cl: add: Three new micro-sized traits. They make you smaller at a cost. balance: Micro characters get squished easily. They also have to duck under people. /:cl: --------- Co-authored-by: The Sharkening <95130227+StrangeWeirdKitten@users.noreply.github.com> Co-authored-by: Roxy <75404941+TealSeer@users.noreply.github.com> Co-authored-by: Shadow-Quill <44811257+Shadow-Quill@users.noreply.github.com> --- .../subsystem/processing/quirks.dm | 1 + code/datums/components/squashable.dm | 14 ++++- .../datums/quirks/negative_quirks/micro.dm | 53 +++++++++++++++++++ tgstation.dme | 1 + 4 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 modular_zubbers/code/datums/quirks/negative_quirks/micro.dm diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 3d213c2f462..5d7be137abe 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -49,6 +49,7 @@ GLOBAL_LIST_INIT_TYPED(quirk_blacklist, /list/datum/quirk, list( list(/datum/quirk/equipping/entombed, /datum/quirk/equipping/seamless_clothes), list(/datum/quirk/equipping/entombed, /datum/quirk/badback), list(/datum/quirk/unblinking, /datum/quirk/item_quirk/fluoride_stare), + list(/datum/quirk/micro, /datum/quirk/micro/smaller, /datum/quirk/micro/smallest, /datum/quirk/oversized), //BUBBER EDIT ADDITION END )) diff --git a/code/datums/components/squashable.dm b/code/datums/components/squashable.dm index 785c6771ad3..ef1d400c13d 100644 --- a/code/datums/components/squashable.dm +++ b/code/datums/components/squashable.dm @@ -12,6 +12,7 @@ var/static/list/loc_connections = list( COMSIG_ATOM_ENTERED = PROC_REF(on_entered), ) + COOLDOWN_DECLARE(squish_cooldown) // BUBBER EDIT /datum/component/squashable/Initialize(squash_chance, squash_damage, squash_flags, squash_callback) @@ -28,6 +29,9 @@ on_squash_callback = CALLBACK(parent, squash_callback) AddComponent(/datum/component/connect_loc_behalf, parent, loc_connections) + if(squash_callback) // BUBBER EDIT BEGIN- NO ROACHES SQUISHING EACH OTHER FOR THE OTHER EDIT + return + RegisterSignal(parent, COMSIG_LIVING_MOB_BUMPED, PROC_REF(on_entered))// BUBBER EDIT END - MICRO BALANCE /datum/component/squashable/Destroy(force) on_squash_callback = null @@ -36,6 +40,8 @@ ///Handles the squashing of the mob /datum/component/squashable/proc/on_entered(turf/source_turf, atom/movable/crossing_movable) SIGNAL_HANDLER + if(istype(crossing_movable, /obj)) // BUBBER EDIT - don't get knocked down by items + return if(parent == crossing_movable) return @@ -45,6 +51,7 @@ return if((squash_flags & SQUASHED_SHOULD_BE_DOWN) && parent_as_living.body_position != LYING_DOWN) + parent_as_living.Knockdown(1 SECONDS) // BUBBER EDIT - MICRO BALANCE return var/should_squash = ((squash_flags & SQUASHED_ALWAYS_IF_DEAD) && parent_as_living.stat == DEAD) || prob(squash_chance) @@ -61,6 +68,7 @@ if(should_squash) crossing_mob.visible_message(span_notice("[crossing_mob] squashed [parent_as_living]."), span_notice("You squashed [parent_as_living].")) Squish(parent_as_living) + playsound(parent_as_living, 'sound/effects/blob/attackblob.ogg', 50, TRUE) // BUBBER EDIT else parent_as_living.visible_message(span_notice("[parent_as_living] avoids getting crushed.")) else if(isstructure(crossing_movable)) @@ -74,7 +82,11 @@ if(squash_flags & SQUASHED_SHOULD_BE_GIBBED) target.gib(DROP_ALL_REMAINS) else - target.adjustBruteLoss(squash_damage) + if(COOLDOWN_FINISHED(src, squish_cooldown))// BUBBER EDIT + target.take_bodypart_damage(squash_damage, wound_bonus = 5)// BUBBER EDIT + target.AddElement(/datum/element/squish, 20 SECONDS) // BUBBER EDIT + COOLDOWN_START(src, squish_cooldown, 20 SECONDS)// BUBBER EDIT + /datum/component/squashable/UnregisterFromParent() . = ..() diff --git a/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm b/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm new file mode 100644 index 00000000000..ace0760a3a9 --- /dev/null +++ b/modular_zubbers/code/datums/quirks/negative_quirks/micro.dm @@ -0,0 +1,53 @@ + +/datum/quirk/micro + name = "Small" + desc = "For whatever reason, you are slightly smaller than most. You are twenty smaller than others,\ + with the drawback of being easily squashed!" + icon = FA_ICON_MINIMIZE + quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_HIDE_FROM_SCAN|QUIRK_CHANGES_APPEARANCE + value = -4 + gain_text = span_danger("You feel a bit smaller.") + lose_text = span_notice("You feel a bit larger.") + medical_record_text = "Patient is short and small." + hardcore_value = 0 + var/squash_damage_ = 8 + var/squash_chance_ = 25 + var/size_reduced = 0.8 + +/datum/quirk/micro/smaller + name = "Microsized" + desc = "You are thirty percent smaller than others... \ + with the drawback of being easily squashed and it HURTS!!" + icon = FA_ICON_LOCUST + squash_damage_ = 15 + squash_chance_ = 40 + size_reduced = 0.7 + value = -5 + +/datum/quirk/micro/smallest + name = "Microscopic" + desc = "You are fourty percent smaller than others... People really squint their eyes to see you! \ + You are also squished like a bug accidentally ALL the time!" + icon = FA_ICON_BACTERIUM + squash_damage_ = 30 + squash_chance_ = 50 + size_reduced = 0.6 + value = -6 + +/datum/quirk/micro/post_add() + var/mob/living/carbon/living_as_carbon = quirk_holder + living_as_carbon.dna.features["body_size"] = size_reduced + living_as_carbon.maptext_height = 32 * living_as_carbon.dna.features["body_size"] + living_as_carbon.dna.update_body_size() + living_as_carbon.AddComponent( \ + /datum/component/squashable, \ + squash_chance = squash_chance_, \ + squash_damage = squash_damage_, \ + squash_flags = SQUASHED_ALWAYS_IF_DEAD|SQUASHED_DONT_SQUASH_IN_CONTENTS|SQUASHED_SHOULD_BE_DOWN, \ + ) + +/datum/quirk/micro/remove() + qdel(quirk_holder.GetComponent(/datum/component/squashable)) + + + diff --git a/tgstation.dme b/tgstation.dme index a2a3445d570..2baaf04739a 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -8913,6 +8913,7 @@ #include "modular_zubbers\code\datums\quirks\negative_quirks\brainproblems.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\gifted.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\heavy_sleeper.dm" +#include "modular_zubbers\code\datums\quirks\negative_quirks\micro.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\monophobia.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\narcolepsy.dm" #include "modular_zubbers\code\datums\quirks\negative_quirks\nearsighted.dm"