From 75244c75561b526d8c9c3f69745d10c5307111aa Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Wed, 5 Jun 2024 12:29:39 +0200 Subject: [PATCH 1/6] Metal Cruncher quirk Adds the Metal Cruncher quirk, allowing those who have it to eat certain items and gain some nutrition from them --- .../code/mechanics/metal_cruncher.dm | 87 +++++++++++++++++++ code/__DEFINES/traits.dm | 1 + tgstation.dme | 3 +- 3 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 GainStation13/code/mechanics/metal_cruncher.dm diff --git a/GainStation13/code/mechanics/metal_cruncher.dm b/GainStation13/code/mechanics/metal_cruncher.dm new file mode 100644 index 00000000..2dcd57f9 --- /dev/null +++ b/GainStation13/code/mechanics/metal_cruncher.dm @@ -0,0 +1,87 @@ +/datum/quirk/metal_cruncher + name = "Metal Cruncher" + desc = "You can eat most minerals. Brush your teeth." + value = 0 //ERP quirk + gain_text = "You feel like you could eat steel." + lose_text = "Your teeth hurt too much..." + category = CATEGORY_FOOD + mob_trait = TRAIT_METAL_CRUNCHER + +/obj/item/stack + var/crunch_value = 0 + +/obj/item/stack/attack(mob/living/M, mob/living/user) + if(HAS_TRAIT(M, TRAIT_METAL_CRUNCHER)) + if(crunch_value > 0) + if(M == user) + user.visible_message("[user] crunches on some of [src].", "You crunch on some of [src].") + else + M.visible_message("[user] attempts to feed some of [src] to [M].", "[user] attempts to feed some of [src] to [M].") + playsound(M,'sound/items/eatfood.ogg', rand(10,50), 1) + use(1) + M.nutrition += crunch_value + if(HAS_TRAIT(M, TRAIT_VORACIOUS)) + M.changeNext_move(CLICK_CD_MELEE * 0.5) + return + . = ..() + +/obj/item/stack/cable_coil + crunch_value = 2 +/obj/item/stack/sheet/metal + crunch_value = 4 +/obj/item/stack/rods + crunch_value = 2 +/obj/item/stack/sheet/glass + crunch_value = 2 +/obj/item/stack/sheet/rglass + crunch_value = 4 +/obj/item/stack/sheet/plasmaglass + crunch_value = 12 +/obj/item/stack/sheet/plasmarglass + crunch_value = 14 +/obj/item/stack/sheet/titaniumglass + crunch_value = 27 +/obj/item/stack/sheet/plastitaniumglass + crunch_value = 37 +/obj/item/stack/sheet/plasteel + crunch_value = 14 +/obj/item/stack/sheet/durathread + crunch_value = 10 +/obj/item/stack/sheet/plastic + crunch_value = 2 +/obj/item/stack/sheet/micro_bricks + crunch_value = 1 +/obj/item/stack/sheet/cardboard + crunch_value = 1 +/obj/item/stack/sheet/mineral/calorite + crunch_value = 100 +/obj/item/stack/sheet/mineral/sandstone + crunch_value = 1 +/obj/item/stack/sheet/mineral/uranium + crunch_value = 50 +/obj/item/stack/sheet/mineral/plasma + crunch_value = 10 +/obj/item/stack/sheet/mineral/gold + crunch_value = 20 +/obj/item/stack/sheet/mineral/silver + crunch_value = 15 +/obj/item/stack/sheet/mineral/titanium + crunch_value = 25 +/obj/item/stack/sheet/mineral/plastitanium + crunch_value = 35 +/obj/item/stack/sheet/mineral/adamantine + crunch_value = 75 +/obj/item/stack/sheet/mineral/mythril + crunch_value = 75 +/obj/item/stack/sheet/mineral/coal + crunch_value = 50 +/obj/item/stack/sheet/mineral/wood + crunch_value = 4 +/obj/item/stack/sheet/mineral/bamboo + crunch_value = 10 +/obj/item/stack/sheet/mineral/shadoww + crunch_value = 15 +/obj/item/stack/sheet/mineral/gmushroom + crunch_value = 15 +/obj/item/stack/sheet/mineral/plaswood + crunch_value = 15 diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 1778d470..f513280b 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -204,6 +204,7 @@ #define TRAIT_WEAKLEGS "weak_legs" #define TRAIT_STRONGLEGS "strong_legs" #define TRAIT_WEB_WEAVER "web_weaving" +#define TRAIT_METAL_CRUNCHER "metal_cruncher" //Hyper #define TRAIT_MACROPHILE "macrophile" //likes the big diff --git a/tgstation.dme b/tgstation.dme index 65903ef3..a21ddae9 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -2784,7 +2784,6 @@ #include "code\modules\research\nanites\nanite_program_hub.dm" #include "code\modules\research\nanites\nanite_programmer.dm" #include "code\modules\research\nanites\nanite_programs.dm" -#include "code\modules\research\nanites\nanite_programs\protocols.dm" #include "code\modules\research\nanites\nanite_remote.dm" #include "code\modules\research\nanites\program_disks.dm" #include "code\modules\research\nanites\public_chamber.dm" @@ -2796,6 +2795,7 @@ #include "code\modules\research\nanites\extra_settings\type.dm" #include "code\modules\research\nanites\nanite_programs\buffing.dm" #include "code\modules\research\nanites\nanite_programs\healing.dm" +#include "code\modules\research\nanites\nanite_programs\protocols.dm" #include "code\modules\research\nanites\nanite_programs\rogue.dm" #include "code\modules\research\nanites\nanite_programs\sensor.dm" #include "code\modules\research\nanites\nanite_programs\suppression.dm" @@ -3094,6 +3094,7 @@ #include "GainStation13\code\mechanics\fatness.dm" #include "GainStation13\code\mechanics\fattening_trap.dm" #include "GainStation13\code\mechanics\infestation.dm" +#include "GainStation13\code\mechanics\metal_cruncher.dm" #include "GainStation13\code\mechanics\spells.dm" #include "GainStation13\code\mechanics\wand.dm" #include "GainStation13\code\mechanics\web_weaving.dm" From adc59230340b40ba95fde355b6b1b1d3b6828b7f Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Thu, 6 Jun 2024 12:49:33 +0200 Subject: [PATCH 2/6] Fatness Hiding Rework Fatness hiding has been reworked to allow multiple items that add or reduce a character's fatness value. A thing that wishes to use this system needs to add and remove itself to a character's hiding list (hider_add(), hider_remove()) based on that thing's conditions. Then it needs to have a /proc/fat_hide() that will return the value by which to shift fatness --- .../datums/diseases/advance/symptoms/berry.dm | 8 ++-- GainStation13/code/mechanics/fatness.dm | 40 ++++++++++--------- .../code/obj/items/bluespace_belt.dm | 15 +++++-- GainStation13/code/obj/items/holy.dm | 18 ++++----- .../code/modules/vore/eating/belly_obj_vr.dm | 36 ++++++++++------- .../code/modules/vore/eating/bellymodes_vr.dm | 22 ++++++---- 6 files changed, 83 insertions(+), 56 deletions(-) diff --git a/GainStation13/code/datums/diseases/advance/symptoms/berry.dm b/GainStation13/code/datums/diseases/advance/symptoms/berry.dm index cf387b79..444ccd0b 100644 --- a/GainStation13/code/datums/diseases/advance/symptoms/berry.dm +++ b/GainStation13/code/datums/diseases/advance/symptoms/berry.dm @@ -57,7 +57,7 @@ affected_mob.reagents.remove_reagent(/datum/reagent/berry_juice_infection, volume) return picked_color = pick(random_color_list) - affected_mob.fat_hide(affected_mob.fatness_real + ((3 * (volume * volume))/50), src) + affected_mob.hider_add(src) else L.reagents.remove_reagent(/datum/reagent/berry_juice_infection, volume) ..() @@ -68,7 +68,6 @@ return if(!no_mob_color) M.add_atom_colour(picked_color, WASHABLE_COLOUR_PRIORITY) - M.fat_hide(M.fatness_real + ((3 * (volume * volume))/50), src) M.adjust_fatness(1, FATTENING_TYPE_CHEM) ..() @@ -76,7 +75,7 @@ if(!iscarbon(L)) return var/mob/living/carbon/C = L - C.fat_show() + C.hider_remove(src) /obj/item/reagent_containers/glass/attack(mob/M, mob/user, obj/target) if(M.reagents.get_reagent_amount(/datum/reagent/berry_juice_infection) > 0 && (reagents.total_volume + min(amount_per_transfer_from_this, 10)) <= volume) @@ -89,3 +88,6 @@ to_chat(user, "You get some juice out of you...") return ..() + +/datum/reagent/berry_juice_infection/proc/fat_hide() + return (3 * (volume * volume))/50 diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm index 5d6cc33f..608f8ee4 100644 --- a/GainStation13/code/mechanics/fatness.dm +++ b/GainStation13/code/mechanics/fatness.dm @@ -5,12 +5,10 @@ // -fatness_real is the value a mob is actually at, even if it's being hidden. For permanent changes, use this one //What level of fatness is the parent mob currently at? var/fatness = 0 - //Is something hiding the actual fatness value of a character? - var/fat_hider = FALSE + //The list of items/effects that are being added/subtracted from our real fatness + var/fat_hiders = list() //The actual value a mob is at. Is equal to fatness if fat_hider is FALSE. var/fatness_real = 0 - //The value a mob's fatness is being overwritten with if fat_hider has something in it. - var/fatness_over = 0 ///At what rate does the parent mob gain weight? 1 = 100% var/weight_gain_rate = 1 //At what rate does the parent mob lose weight? 1 = 100% @@ -44,11 +42,12 @@ if(client?.prefs?.max_weight) // GS13 fatness_real = min(fatness_real, (client?.prefs?.max_weight - 1)) - if(fat_hider) //If a character's real fatness is being hidden + if(fat_hiders) //If a character's real fatness is being hidden + var/fatness_over = hiders_calc() //calculate the sum of all hiders if(client?.prefs?.max_weight) //Check their prefs fatness_over = min(fatness_over, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max - fatness = fatness_over //Then, make that value their current fatness + fatness = fatness_real + fatness_over //Then, make their current fatness the sum of their real plus/minus the calculated amount else //If it's not being hidden fatness = fatness_real //Make their current fatness their real fatness @@ -102,23 +101,28 @@ return TRUE -/mob/living/carbon/proc/fat_hide(hide_amount, hide_source) //If something wants to hide fatness_real, it'll call this method and give it an amount to cover it with - fat_hider = hide_source - fatness_over = hide_amount - fatness = fatness_over //To update a mob's fatness with the new amount to be shown immediately - if(client?.prefs?.weight_gain_extreme) - xwg_resize() +/mob/living/carbon/proc/hider_add(hide_source) + if(!(hide_source in fat_hiders)) + fat_hiders += hide_source return TRUE -/mob/living/carbon/proc/fat_show() //If something that hides fatness is removed or expires, it'll call this method - fat_hider = FALSE - fatness = fatness_real //To update a mob's fatness with their real one immediately - if(client?.prefs?.weight_gain_extreme) - xwg_resize() - +/mob/living/carbon/proc/hider_remove(hide_source) + if(hide_source in fat_hiders) + fat_hiders -= hide_source return TRUE +/mob/living/carbon/proc/hiders_calc() + var/hiders_value = 0 + for(var/hider in fat_hiders) + var/hide_values = hider:fat_hide(src) + if(!islist(hide_values)) + hiders_value += hide_values + else + for(var/hide_value in hide_values) + hiders_value += hide_value + return hiders_value + /mob/living/carbon/proc/xwg_resize() var/xwg_size = sqrt(fatness/FATNESS_LEVEL_BLOB) xwg_size = min(xwg_size, RESIZE_HUGE) diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index db676eb1..8095bad5 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -8,20 +8,27 @@ equip_sound = 'sound/items/equip/toolbelt_equip.ogg' drop_sound = 'sound/items/handling/toolbelt_drop.ogg' pickup_sound = 'sound/items/handling/toolbelt_pickup.ogg' - var/hide_value = 0 /obj/item/bluespace_belt/equipped(mob/user, slot) ..() + if(!iscarbon(user)) + return var/mob/living/carbon/U = user if(slot == SLOT_BELT) to_chat(user, "You put the belt around your waist and your mass begins to shrink...") - U.fat_hide(hide_value, src) + U.hider_add(src) else to_chat(user, "The belt is opened, letting your mass flow out!") - U.fat_show() + U.hider_remove(src) /obj/item/bluespace_belt/dropped(mob/user) ..() + if(!iscarbon(user)) + return to_chat(user, "The belt is opened, letting your mass flow out!") var/mob/living/carbon/U = user - U.fat_show() + U.hider_remove(src) + +/obj/item/bluespace_belt/proc/fat_hide(var/mob/living/carbon/user) + return -(user.fatness_real - 1) + diff --git a/GainStation13/code/obj/items/holy.dm b/GainStation13/code/obj/items/holy.dm index f1ae3358..b2207b6d 100644 --- a/GainStation13/code/obj/items/holy.dm +++ b/GainStation13/code/obj/items/holy.dm @@ -2,9 +2,9 @@ . = ..() if(iscarbon(target)) var/mob/living/carbon/T = target - if(T.fat_hider) - if(isitem(T.fat_hider)) - var/obj/item/O = T.fat_hider + for(var/hider in T.fat_hiders) + if(isitem(hider)) + var/obj/item/O = hider T.dropItemToGround(O) if(T.cursed_fat == 1) T.cursed_fat = 0 @@ -14,9 +14,9 @@ . = ..() if(iscarbon(M)) var/mob/living/carbon/T = M - if(T.fat_hider) - if(isitem(T.fat_hider)) - var/obj/item/O = T.fat_hider + for(var/hider in T.fat_hiders) + if(isitem(hider)) + var/obj/item/O = hider T.dropItemToGround(O) if(T.cursed_fat == 1) T.cursed_fat = 0 @@ -24,9 +24,9 @@ /datum/reagent/water/holywater/on_mob_life(mob/living/carbon/M) . = ..() - if(M.fat_hider) - if(isitem(M.fat_hider)) - var/obj/item/O = M.fat_hider + for(var/hider in M.fat_hiders) + if(isitem(hider)) + var/obj/item/O = hider M.dropItemToGround(O) if(M.cursed_fat == 1) M.cursed_fat = 0 diff --git a/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm b/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm index 2b46c376..7efa693e 100644 --- a/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm +++ b/modular_citadel/code/modules/vore/eating/belly_obj_vr.dm @@ -227,10 +227,9 @@ items_preserved.Cut() owner.update_icons() - var/mob/living/carbon/predator = owner - if(iscarbon(predator)) - if(digest_mode == DM_FATTEN && predator.fat_hider == src) - predator.fat_show() + if(iscarbon(owner)) + var/mob/living/carbon/predator = owner + predator.hider_remove(src) return count @@ -279,16 +278,17 @@ owner.visible_message("[owner] expels [M] from their [lowertext(name)]!") owner.update_icons() - var/mob/living/carbon/predator = owner - if(iscarbon(predator)) - if(digest_mode == DM_FATTEN && predator.fat_hider == src) - var/preys_fatness = 0 - for(var/mob/living/carbon/prey in contents) - preys_fatness += prey.fatness - if(preys_fatness > predator.fatness) - predator.fat_hide(preys_fatness, src) - else - predator.fat_show() + if(iscarbon(owner)) + var/mob/living/carbon/predator = owner + var/found = FALSE + for(var/prey in contents) + if(istype(prey, /mob/living/carbon)) + found = TRUE + if(found) + predator.hider_add(src) + else + predator.hider_remove(src) + return TRUE // Actually perform the mechanics of devouring the tasty prey. @@ -695,3 +695,11 @@ for(var/I in emote_lists[K]) dupe.emote_lists[K] += I return dupe + +/obj/belly/proc/fat_hide(var/mob/living/carbon/user) + var/preys_fatness = 0 + for(var/prey in contents) + if(iscarbon(prey)) + var/mob/living/carbon/cprey = prey + preys_fatness += cprey.fatness + return preys_fatness diff --git a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm index c85a27ee..8e7a6972 100644 --- a/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm +++ b/modular_citadel/code/modules/vore/eating/bellymodes_vr.dm @@ -58,6 +58,18 @@ var/sound/pred_death = sound(get_sfx("death_pred")) var/turf/source = get_turf(owner) +////////////////////////// Vore Fatness ///////////////////////////// + if(iscarbon(owner)) + var/mob/living/carbon/predator = owner + var/found = FALSE + for(var/prey in contents) + if(istype(prey, /mob/living/carbon)) + found = TRUE + if(found) + predator.hider_add(src) + else + predator.hider_remove(src) + ///////////////////////////// DM_HOLD ///////////////////////////// if(digest_mode == DM_HOLD) return SSBELLIES_PROCESSED @@ -65,8 +77,8 @@ ///////////////////////////// DM_FATTEN ///////////////////////////// if(digest_mode == DM_FATTEN) var/preys_fatness = 0 - var/mob/living/carbon/predator = owner - if(iscarbon(predator)) + if(iscarbon(owner)) + var/mob/living/carbon/predator = owner for(var/mob/living/M in contents) var/mob/living/carbon/prey = M if(iscarbon(prey) && predator.fatness_real) @@ -77,12 +89,6 @@ predator.nutrition -= 3 preys_fatness += prey.fatness - if(!predator.fat_hider || predator.fat_hider == src) - if(preys_fatness > predator.fatness) - predator.fat_hide(preys_fatness, src) - if(predator.fat_hider != src) - predator.fat_show() - //////////////////////////// DM_DIGEST //////////////////////////// else if(digest_mode == DM_DIGEST) if(HAS_TRAIT(owner, TRAIT_PACIFISM)) //obvious. From 42611cda49b4efbf9cd9ea71a0e446719dd904dc Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Thu, 6 Jun 2024 13:04:13 +0200 Subject: [PATCH 3/6] Fatness Hiding guide comment --- GainStation13/code/mechanics/fatness.dm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm index 608f8ee4..c41a0c5c 100644 --- a/GainStation13/code/mechanics/fatness.dm +++ b/GainStation13/code/mechanics/fatness.dm @@ -101,6 +101,14 @@ return TRUE + // THE FATNESS HIDING GUIDE!!! + // HOW 2 FATNESS HIDE + //Step 1) Grab a thing that will add or reduce fatness! + //Step 2) Give it a character.hider_add(src) and a character.hider_remove(src) depending on the conditions you want it to meet for which it will add or remove itself from messing with a character's fatness! + //Step 3) Give it a proc/fat_hide([character argument]), with a return that will give the amount to shift that character's fatness by! + //Step 4) There is no step 4, you did it bucko! + //Wanna see an example? Search for /obj/item/bluespace_belt !!! + /mob/living/carbon/proc/hider_add(hide_source) if(!(hide_source in fat_hiders)) fat_hiders += hide_source From 9d99cf2c13e050cc5ceae0938687a010cace1f85 Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Thu, 6 Jun 2024 19:55:08 +0200 Subject: [PATCH 4/6] Bee Pacification Injecting bees with 5u of pax now makes them unable to ever sting --- code/modules/hydroponics/beekeeping/beebox.dm | 2 ++ .../mob/living/simple_animal/hostile/bees.dm | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/code/modules/hydroponics/beekeeping/beebox.dm b/code/modules/hydroponics/beekeeping/beebox.dm index a058601c..52cb8dad 100644 --- a/code/modules/hydroponics/beekeeping/beebox.dm +++ b/code/modules/hydroponics/beekeeping/beebox.dm @@ -108,6 +108,8 @@ var/mob/living/simple_animal/hostile/poison/bees/B = new(get_turf(src)) B.beehome = src B.assign_reagent(queen_bee.beegent) + if(queen_bee.paxed) + B.paxed = TRUE bees += B diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 7da4cbc2..89264441 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -55,6 +55,8 @@ var/static/beehometypecache = typecacheof(/obj/structure/beebox) var/static/hydroponicstypecache = typecacheof(/obj/machinery/hydroponics) + var/paxed = FALSE + /mob/living/simple_animal/hostile/poison/bees/Initialize() . = ..() generate_bee_visuals() @@ -135,13 +137,13 @@ wanted_objects -= beehometypecache //so we don't attack beeboxes when not going home return //no don't attack the goddamm box else - . = ..() - if(. && beegent && isliving(target)) - var/mob/living/L = target - if(L.reagents) - beegent.reaction_mob(L, INJECT) - L.reagents.add_reagent(beegent.type, rand(1,5)) - + if(!paxed) + . = ..() + if(. && beegent && isliving(target)) + var/mob/living/L = target + if(L.reagents) + beegent.reaction_mob(L, INJECT) + L.reagents.add_reagent(beegent.type, rand(1,5)) /mob/living/simple_animal/hostile/poison/bees/proc/assign_reagent(datum/reagent/R) if(istype(R)) @@ -249,7 +251,6 @@ icon = 'icons/mob/bees.dmi' var/mob/living/simple_animal/hostile/poison/bees/queen/queen - /obj/item/queen_bee/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/reagent_containers/syringe)) var/obj/item/reagent_containers/syringe/S = I @@ -265,6 +266,10 @@ user.visible_message("[user] injects [src] with royal bee jelly, causing it to split into two bees, MORE BEES!","You inject [src] with royal bee jelly, causing it to split into two bees, MORE BEES!") else to_chat(user, "You don't have enough royal bee jelly to split a bee in two!") + if(S.reagents.get_reagent_amount(/datum/reagent/pax) >= 5 && !queen.paxed) + user.visible_message("[user] injects [src] with something, it looks relaxed!","You inject [src] with pax, it look relaxed!") + S.reagents.remove_reagent(/datum/reagent/pax, 5) + queen.paxed = TRUE else var/datum/reagent/R = GLOB.chemical_reagents_list[S.reagents.get_master_reagent_id()] if(R && S.reagents.has_reagent(R.type, 5)) From 0f791e3a45b2e9fa313e49d5d1db9780ec9e75da Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Fri, 7 Jun 2024 00:06:27 +0200 Subject: [PATCH 5/6] Water Sponge quirk & Fatness Hiding Rework Tweaks Added the Water Sponge quirk, it makes the user bloat when water is in their system and adds a few extra water-giving interactions to showers, vapors and water applications. Tweaked fatness hiding, application has been separated from adjust_fatness who now calls it. Breathing also calls for hiders recalculations --- GainStation13/code/mechanics/fatness.dm | 24 ++++++--- GainStation13/code/mechanics/water_sponge.dm | 51 +++++++++++++++++++ .../code/obj/items/bluespace_belt.dm | 4 +- code/__DEFINES/traits.dm | 1 + code/modules/surgery/organs/lungs.dm | 1 + tgstation.dme | 1 + 6 files changed, 72 insertions(+), 10 deletions(-) create mode 100644 GainStation13/code/mechanics/water_sponge.dm diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm index c41a0c5c..7cbb51a3 100644 --- a/GainStation13/code/mechanics/fatness.dm +++ b/GainStation13/code/mechanics/fatness.dm @@ -42,14 +42,9 @@ if(client?.prefs?.max_weight) // GS13 fatness_real = min(fatness_real, (client?.prefs?.max_weight - 1)) - if(fat_hiders) //If a character's real fatness is being hidden - var/fatness_over = hiders_calc() //calculate the sum of all hiders - if(client?.prefs?.max_weight) //Check their prefs - fatness_over = min(fatness_over, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max + fatness = fatness_real //Make their current fatness their real fatness - fatness = fatness_real + fatness_over //Then, make their current fatness the sum of their real plus/minus the calculated amount - else //If it's not being hidden - fatness = fatness_real //Make their current fatness their real fatness + hiders_apply() //Check and apply hiders if(client?.prefs?.weight_gain_extreme) xwg_resize() @@ -122,7 +117,7 @@ /mob/living/carbon/proc/hiders_calc() var/hiders_value = 0 - for(var/hider in fat_hiders) + for(var/hider in fat_hiders) var/hide_values = hider:fat_hide(src) if(!islist(hide_values)) hiders_value += hide_values @@ -131,6 +126,15 @@ hiders_value += hide_value return hiders_value +/mob/living/carbon/proc/hiders_apply() + if(fat_hiders) //do we have any hiders active? + var/fatness_over = hiders_calc() //calculate the sum of all hiders + if(client?.prefs?.max_weight) //Check their prefs + fatness_over = min(fatness_over, (client?.prefs?.max_weight - 1)) //And make sure it's not above their preferred max + fatness = fatness_real + fatness_over //Then, make their current fatness the sum of their real plus/minus the calculated amount + if(client?.prefs?.weight_gain_extreme) + xwg_resize() + /mob/living/carbon/proc/xwg_resize() var/xwg_size = sqrt(fatness/FATNESS_LEVEL_BLOB) xwg_size = min(xwg_size, RESIZE_HUGE) @@ -158,3 +162,7 @@ return "Immobile" return "Blob" + +/mob/living/carbon/human/handle_breathing(times_fired) + . = ..() + hiders_apply() diff --git a/GainStation13/code/mechanics/water_sponge.dm b/GainStation13/code/mechanics/water_sponge.dm new file mode 100644 index 00000000..1373a403 --- /dev/null +++ b/GainStation13/code/mechanics/water_sponge.dm @@ -0,0 +1,51 @@ +/datum/quirk/water_sponge + name = "Water Sponge" + desc = "You can hold lots of water in you! Careful with showers!" + value = 0 //ERP quirk + gain_text = "You feel absorbant." + lose_text = "You don't feel absorbant anymore." + category = CATEGORY_FOOD + mob_trait = TRAIT_WATER_SPONGE + +/datum/reagent/water/on_mob_add(mob/living/L, amount) + if(HAS_TRAIT(L, TRAIT_WATER_SPONGE)) + if(iscarbon(L)) + var/mob/living/carbon/C = L + C.hider_add(src) + . = ..() + +/datum/reagent/water/on_mob_delete(mob/living/L) + if(HAS_TRAIT(L, TRAIT_WATER_SPONGE)) + if(iscarbon(L)) + var/mob/living/carbon/C = L + C.hider_remove(src) + . = ..() + +/datum/reagent/water/reaction_mob(mob/living/M, method, reac_volume) + . = ..() + if(HAS_TRAIT(M, TRAIT_WATER_SPONGE)) + if(method == TOUCH) + M.reagents.add_reagent(/datum/reagent/water, reac_volume/2) + if(method == VAPOR) + M.reagents.add_reagent(/datum/reagent/water, reac_volume/3) + + +/datum/reagent/water/proc/fat_hide(mob/living/carbon/user) + return volume * 3.5 + +/obj/machinery/shower/process() + ..() + for(var/atom/movable/AM in loc) + if(iscarbon(AM)) + if(HAS_TRAIT(AM, TRAIT_WATER_SPONGE)) + var/mob/living/carbon/L = AM + L.reagents.add_reagent(/datum/reagent/water, 3) + +/mob/living/carbon/proc/water_check(datum/gas_mixture/breath) + var/breath_gases = breath.gases + if(breath_gases[/datum/gas/water_vapor]) + if(HAS_TRAIT(src, TRAIT_WATER_SPONGE)) + var/H2O_pp = breath.get_breath_partial_pressure(breath_gases[/datum/gas/water_vapor]) + reagents.add_reagent(/datum/reagent/water, H2O_pp/10) + breath_gases[/datum/gas/water_vapor] -= H2O_pp + diff --git a/GainStation13/code/obj/items/bluespace_belt.dm b/GainStation13/code/obj/items/bluespace_belt.dm index 8095bad5..c551b18e 100644 --- a/GainStation13/code/obj/items/bluespace_belt.dm +++ b/GainStation13/code/obj/items/bluespace_belt.dm @@ -15,7 +15,7 @@ return var/mob/living/carbon/U = user if(slot == SLOT_BELT) - to_chat(user, "You put the belt around your waist and your mass begins to shrink...") + to_chat(U, "You put the belt around your waist and your mass begins to shrink...") U.hider_add(src) else to_chat(user, "The belt is opened, letting your mass flow out!") @@ -25,8 +25,8 @@ ..() if(!iscarbon(user)) return - to_chat(user, "The belt is opened, letting your mass flow out!") var/mob/living/carbon/U = user + to_chat(U, "The belt is opened, letting your mass flow out!") U.hider_remove(src) /obj/item/bluespace_belt/proc/fat_hide(var/mob/living/carbon/user) diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index f513280b..a5ad770e 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -205,6 +205,7 @@ #define TRAIT_STRONGLEGS "strong_legs" #define TRAIT_WEB_WEAVER "web_weaving" #define TRAIT_METAL_CRUNCHER "metal_cruncher" +#define TRAIT_WATER_SPONGE "water_sponge" //Hyper #define TRAIT_MACROPHILE "macrophile" //likes the big diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index dd9db207..d644ffa8 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -102,6 +102,7 @@ /obj/item/organ/lungs/proc/check_breath(datum/gas_mixture/breath, mob/living/carbon/human/H) //TODO: add lung damage = less oxygen gains + H.water_check(breath) //GS13 Water Sponge quirk var/breathModifier = (5-(5*(damage/maxHealth)/2)) //range 2.5 - 5 if((H.status_flags & GODMODE)) return diff --git a/tgstation.dme b/tgstation.dme index a21ddae9..80b2bf8f 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3097,6 +3097,7 @@ #include "GainStation13\code\mechanics\metal_cruncher.dm" #include "GainStation13\code\mechanics\spells.dm" #include "GainStation13\code\mechanics\wand.dm" +#include "GainStation13\code\mechanics\water_sponge.dm" #include "GainStation13\code\mechanics\web_weaving.dm" #include "GainStation13\code\mechanics\den abductors\console.dm" #include "GainStation13\code\mechanics\den abductors\purchaseble_goodies.dm" From d099ff386397937f9ed4a848f46db69bb2bad852 Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Fri, 7 Jun 2024 00:48:34 +0200 Subject: [PATCH 6/6] Sink drinking You can now attach people to sinks to have them start gulping down water --- GainStation13/code/mechanics/water_sponge.dm | 33 ++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/GainStation13/code/mechanics/water_sponge.dm b/GainStation13/code/mechanics/water_sponge.dm index 1373a403..0b966ad2 100644 --- a/GainStation13/code/mechanics/water_sponge.dm +++ b/GainStation13/code/mechanics/water_sponge.dm @@ -49,3 +49,36 @@ reagents.add_reagent(/datum/reagent/water, H2O_pp/10) breath_gases[/datum/gas/water_vapor] -= H2O_pp +/obj/structure/sink + var/mob/living/attached + +/obj/structure/sink/MouseDrop(mob/living/target) + . = ..() + if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE) || !isliving(target)) + return + if(attached) + visible_message("[attached] is detached from [src].") + attached = null + return + if(Adjacent(target) && usr.Adjacent(target)) + usr.visible_message("[usr] attaches [target] to [src].", "You attach [target] to [src].") + add_fingerprint(usr) + attached = target + START_PROCESSING(SSobj, src) + +/obj/structure/sink/process() + if(!(get_dist(src, attached) <= 1 && isturf(attached.loc))) + to_chat(attached, "[attached] is ripped from the sink!") // GS13 + attached = null + return PROCESS_KILL + if(attached) + playsound(attached, 'sound/vore/pred/swallow_02.ogg', rand(10,50), 1) + attached.reagents.add_reagent(/datum/reagent/water, 5) + else + return PROCESS_KILL + +/obj/structure/sink/attack_hand(mob/living/user) + if(attached) + visible_message("[attached] is detached from [src]") + attached = null + return