mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-09 15:05:38 +01:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
@@ -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 = "<span class='notice'>You feel absorbant.</span>"
|
||||
lose_text = "<span class='notice'>You don't feel absorbant anymore.</span>"
|
||||
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
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return
|
||||
var/mob/living/carbon/U = user
|
||||
if(slot == SLOT_BELT)
|
||||
to_chat(user, "<span class='notice'>You put the belt around your waist and your mass begins to shrink...</span>")
|
||||
to_chat(U, "<span class='notice'>You put the belt around your waist and your mass begins to shrink...</span>")
|
||||
U.hider_add(src)
|
||||
else
|
||||
to_chat(user, "<span class='notice'>The belt is opened, letting your mass flow out!</span>")
|
||||
@@ -25,8 +25,8 @@
|
||||
..()
|
||||
if(!iscarbon(user))
|
||||
return
|
||||
to_chat(user, "<span class='warning'>The belt is opened, letting your mass flow out!</span>")
|
||||
var/mob/living/carbon/U = user
|
||||
to_chat(U, "<span class='warning'>The belt is opened, letting your mass flow out!</span>")
|
||||
U.hider_remove(src)
|
||||
|
||||
/obj/item/bluespace_belt/proc/fat_hide(var/mob/living/carbon/user)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user