Merge pull request #51 from deertools/fatness-refactor

Refactors Weight gain
This commit is contained in:
MrSky12
2023-02-09 02:52:25 +00:00
committed by GitHub
23 changed files with 222 additions and 94 deletions
+62
View File
@@ -0,0 +1,62 @@
/mob/living/carbon
///What level of fatness is the parent mob at?
var/fatness = 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%
var/weight_loss_rate = 1
/**
* Adjusts the fatness level of the parent mob.
*
* * adjustment_amount - adjusts how much weight is gained or loss. Positive numbers add weight.
* * type_of_fattening - what type of fattening is being used. Look at the traits in fatness.dm for valid options.
*/
/mob/living/carbon/proc/adjust_fatness(adjustment_amount, type_of_fattening = FATTENING_TYPE_ITEM)
if(!adjustment_amount || !type_of_fattening)
return FALSE
if(!HAS_TRAIT(src, TRAIT_UNIVERSAL_GAINER) && client?.prefs)
switch(type_of_fattening)
if(FATTENING_TYPE_ITEM)
if(!client.prefs.weight_gain_items)
return FALSE
if(FATTENING_TYPE_FOOD)
if(!client.prefs.weight_gain_food)
return FALSE
if(FATTENING_TYPE_CHEM)
if(!client.prefs.weight_gain_chems)
return FALSE
if(FATTENING_TYPE_WEAPON)
if(!client.prefs.weight_gain_weapons)
return FALSE
if(FATTENING_TYPE_MAGIC)
if(!client.prefs.weight_gain_magic)
return FALSE
if(FATTENING_TYPE_VIRUS)
if(!client.prefs.weight_gain_viruses)
return FALSE
if(FATTENING_TYPE_WEIGHT_LOSS)
if(!HAS_TRAIT(src, TRAIT_WEIGHT_LOSS_IMMUNE))
return FALSE
var/amount_to_change = adjustment_amount
if(adjustment_amount > 0)
amount_to_change = amount_to_change * weight_gain_rate
else
amount_to_change = amount_to_change * weight_loss_rate
fatness += amount_to_change
fatness = max(fatness, MINIMUM_FATNESS_LEVEL) //It would be a little silly if someone got negative fat.
return TRUE
/mob/living/carbon/fully_heal(admin_revive)
fatness = 0
. = ..()
@@ -0,0 +1,18 @@
//GS13 Preferences
/datum/preferences
//Weight Gain Sources
///Weight gain from food
var/weight_gain_food = FALSE
///Weight gain from chems
var/weight_gain_chems = FALSE
///Weight gain from items
var/weight_gain_items = FALSE
///Weight gain from weapons
var/weight_gain_weapons = FALSE
///Weight gain from magic
var/weight_gain_magic = FALSE
///Weight gain from viruses
var/weight_gain_viruses = FALSE
///Does the person wish to be involved with non-con weight gain events?
var/noncon_weight_gain = FALSE
@@ -10,7 +10,5 @@
metabolization_rate = 0.5 * REAGENTS_METABOLISM
/datum/reagent/consumable/lipoifier/on_mob_life(mob/living/carbon/M)
if(M && !HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
M.fatness = M.fatness + 10
M.adjust_fatness(10, FATTENING_TYPE_CHEM)
return ..()
+11
View File
@@ -517,3 +517,14 @@ GLOBAL_LIST_INIT(lighter_reskins, list(ZIPPO_SKIN_PLAIN = "plain", ZIPPO_SKIN_DA
#define FOURSPACES "    "
#define CANT_REENTER_ROUND -1
//GS13 WEIGHT GAIN TYPES
#define MINIMUM_FATNESS_LEVEL 0
#define FATTENING_TYPE_ITEM "item"
#define FATTENING_TYPE_FOOD "food"
#define FATTENING_TYPE_CHEM "chem"
#define FATTENING_TYPE_WEAPON "weapon"
#define FATTENING_TYPE_MAGIC "magic"
#define FATTENING_TYPE_VIRUS "virus"
#define FATTENING_TYPE_WEIGHT_LOSS "weight_loss"
+5 -1
View File
@@ -180,7 +180,6 @@
#define TRAIT_PHOTOGRAPHER "photographer"
#define TRAIT_MUSICIAN "musician"
#define TRAIT_CROCRIN_IMMUNE "crocin_immune"
#define TRAIT_LIPOIFIER_IMMUNE "lipoifier_immune"
#define TRAIT_NYMPHO "nymphomania"
#define TRAIT_DISTANT "headpat_hater"
//#define TRAIT_FLUID_LEAK "leaky_fluids" removed because milk snail trails are not okay
@@ -215,6 +214,11 @@
#define TRAIT_NO_TELEPORT "no-teleport" //you just can't
#define TRAIT_NO_ALCOHOL "alcohol_intolerance"
//GS13
#define TRAIT_WEIGHT_LOSS_IMMUNE "weight_loss_immune"
#define TRAIT_UNIVERSAL_GAINER "universal_gainer"
// common trait sources
#define TRAIT_GENERIC "generic"
#define EYE_DAMAGE "eye_damage"
+4 -1
View File
@@ -291,7 +291,10 @@
/datum/component/mood/proc/hud_click(datum/source, location, control, params, mob/user)
print_mood(user)
/datum/component/mood/proc/HandleFatness(mob/living/L)
/datum/component/mood/proc/HandleFatness(mob/living/carbon/L)
if(!L)
return FALSE
switch(L.fatness)
if(FATNESS_LEVEL_FAT to INFINITY)
add_event(null, "fatness", /datum/mood_event/fat)
@@ -42,7 +42,7 @@ Bonus
/datum/symptom/weight_loss/Activate(datum/disease/advance/A)
if(!..())
return
var/mob/living/M = A.affected_mob
var/mob/living/carbon/M = A.affected_mob
switch(A.stage)
if(1, 2, 3, 4)
if(prob(base_message_chance))
@@ -51,12 +51,9 @@ Bonus
to_chat(M, "<span class='warning'><i>[pick("So hungry...", "You'd kill someone for a bite of food...", "Hunger cramps seize you...")]</i></span>")
M.overeatduration = max(M.overeatduration - 100, 0)
M.nutrition = max(M.nutrition - 100, 0)
M.fatness = M.fatness - 30
M.adjust_fatness(-30, FATTENING_TYPE_WEIGHT_LOSS)
/datum/symptom/weight_gain
name = "Weight Gain"
desc = "The virus mutates and merges itself with the host's adipocytes, allowing them to perform a form of mitosis and replicate on their own."
stealth = -3
@@ -77,9 +74,9 @@ Bonus
/datum/symptom/weight_gain/Activate(datum/disease/advance/A)
if(!..())
return
var/mob/living/M = A.affected_mob
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
return
var/mob/living/carbon/M = A.affected_mob
if(!(M?.client?.prefs?.weight_gain_viruses))
return FALSE
switch(A.stage)
if(1, 2, 3, 4)
if(prob(base_message_chance))
@@ -87,8 +84,8 @@ Bonus
else
to_chat(M, "<span class='warning'><i>[pick("You feel your body churn...", "You feel heavier...", "You hear an ominous gurgle from your belly...", "You feel bulkier...")]</i></span>")
if(A.properties["transmittable"] >= 12) //get chunkier quicker
M.fatness = M.fatness + 70
M.adjust_fatness(70, FATTENING_TYPE_VIRUS)
else if(A.properties["transmittable"] >= 7)
M.fatness = M.fatness + 40
M.adjust_fatness(40, FATTENING_TYPE_VIRUS)
else
M.fatness = M.fatness + 15
M.adjust_fatness(15, FATTENING_TYPE_VIRUS)
-10
View File
@@ -127,16 +127,6 @@
lose_text = "<span class='notice'>You don't feel as prudish as before.</span>"
medical_record_text = "Patient exhibits a special gene that makes them immune to Crocin and Hexacrocin."
/datum/quirk/lipoifier_immunity
name = "Lipoifier Immunity"
desc = "Your body is mostly immune to widening properties of Lipoifier chemical and its cheaper alternative: corn oil."
mob_trait = TRAIT_LIPOIFIER_IMMUNE
value = 0
category = CATEGORY_SEXUAL
gain_text = "<span class='notice'>You feel less prone to sudden weight gain.</span>"
lose_text = "<span class='notice'>You don't feel that resistant to gaining sudden weight anymore.</span>"
medical_record_text = "Patient exhibits a special gene that makes them immune to Lipoifier and Corn Oil."
/datum/quirk/assblastusa
name = "Buns of Steel"
desc = "You've never skipped ass day. With this trait, you are completely immune to all forms of ass slapping and anyone who tries to slap your rock hard ass usually gets a broken hand."
+1 -4
View File
@@ -279,10 +279,7 @@
if(world.time > last_event+15)
active = 1
for(var/mob/living/carbon/human/M in orange(3,src))
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
return
else
M.fatness = M.fatness + 50
M.adjust_fatness(50, FATTENING_TYPE_ITEM)
last_event = world.time
active = null
return
+47 -49
View File
@@ -359,57 +359,55 @@
..()
/obj/structure/statue/calorite/fatty/attackby(obj/item/W, mob/living/carbon/M, params)
if(!M.adjust_fatness(20, FATTENING_TYPE_ITEM))
to_chat(M, "<span class='warning'>Nothing happens.</span>")
return
if(M.fatness < 200)
to_chat(M, "<span class='warning'>The moment your hand meets the statue, you feel a little warmer...</span>")
if(HAS_TRAIT(M, TRAIT_FAT))
to_chat(M, "<span class='warning'>Upon each poke of the statue, you feel yourself get a little heavier.</span>")
if(HAS_TRAIT(M, TRAIT_OBESE))
to_chat(M, "<span class='warning'>With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.</span>")
if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE))
to_chat(M, "<span class='warning'>The world around you blurs as you focus on prodding the statue, your waistline widening further...</span>")
if(HAS_TRAIT(M, TRAIT_IMMOBILE))
to_chat(M, "<span class='warning'>A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.</span>")
if(HAS_TRAIT(M, TRAIT_BLOB))
to_chat(M, "<span class='warning'>You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...</span>")
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
to_chat(M, "<span class='warning'>Nothing happens.</span>")
else
M.fatness = M.fatness + 20
if(M.fatness < 200)
to_chat(M, "<span class='warning'>The moment your hand meets the statue, you feel a little warmer...</span>")
if(HAS_TRAIT(M, TRAIT_FAT))
to_chat(M, "<span class='warning'>Upon each poke of the statue, you feel yourself get a little heavier.</span>")
if(HAS_TRAIT(M, TRAIT_OBESE))
to_chat(M, "<span class='warning'>With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.</span>")
if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE))
to_chat(M, "<span class='warning'>The world around you blurs as you focus on prodding the statue, your waistline widening further...</span>")
if(HAS_TRAIT(M, TRAIT_IMMOBILE))
to_chat(M, "<span class='warning'>A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.</span>")
if(HAS_TRAIT(M, TRAIT_BLOB))
to_chat(M, "<span class='warning'>You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...</span>")
/obj/structure/statue/calorite/fatty/attack_hand(mob/living/carbon/M)
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
if(!M.adjust_fatness(20, FATTENING_TYPE_ITEM))
to_chat(M, "<span class='warning'>Nothing happens.</span>")
else
M.fatness = M.fatness + 20
if(M.fatness < 200)
to_chat(M, "<span class='warning'>The moment your hand meets the statue, you feel a little warmer...</span>")
if(HAS_TRAIT(M, TRAIT_FAT))
to_chat(M, "<span class='warning'>Upon each poke of the statue, you feel yourself get a little heavier.</span>")
if(HAS_TRAIT(M, TRAIT_OBESE))
to_chat(M, "<span class='warning'>With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.</span>")
if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE))
to_chat(M, "<span class='warning'>The world around you blurs as you focus on prodding the statue, your waistline widening further...</span>")
if(HAS_TRAIT(M, TRAIT_IMMOBILE))
to_chat(M, "<span class='warning'>A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.</span>")
if(HAS_TRAIT(M, TRAIT_BLOB))
to_chat(M, "<span class='warning'>You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...</span>")
return
if(M.fatness < 200)
to_chat(M, "<span class='warning'>The moment your hand meets the statue, you feel a little warmer...</span>")
if(HAS_TRAIT(M, TRAIT_FAT))
to_chat(M, "<span class='warning'>Upon each poke of the statue, you feel yourself get a little heavier.</span>")
if(HAS_TRAIT(M, TRAIT_OBESE))
to_chat(M, "<span class='warning'>With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.</span>")
if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE))
to_chat(M, "<span class='warning'>The world around you blurs as you focus on prodding the statue, your waistline widening further...</span>")
if(HAS_TRAIT(M, TRAIT_IMMOBILE))
to_chat(M, "<span class='warning'>A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.</span>")
if(HAS_TRAIT(M, TRAIT_BLOB))
to_chat(M, "<span class='warning'>You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...</span>")
/obj/structure/statue/calorite/fatty/attack_paw(mob/living/carbon/M)
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
if(!M.adjust_fatness(20, FATTENING_TYPE_ITEM))
to_chat(M, "<span class='warning'>Nothing happens.</span>")
else
M.fatness = M.fatness + 20
if(M.fatness < 200)
to_chat(M, "<span class='warning'>The moment your hand meets the statue, you feel a little warmer...</span>")
if(HAS_TRAIT(M, TRAIT_FAT))
to_chat(M, "<span class='warning'>Upon each poke of the statue, you feel yourself get a little heavier.</span>")
if(HAS_TRAIT(M, TRAIT_OBESE))
to_chat(M, "<span class='warning'>With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.</span>")
if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE))
to_chat(M, "<span class='warning'>The world around you blurs as you focus on prodding the statue, your waistline widening further...</span>")
if(HAS_TRAIT(M, TRAIT_IMMOBILE))
to_chat(M, "<span class='warning'>A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.</span>")
if(HAS_TRAIT(M, TRAIT_BLOB))
to_chat(M, "<span class='warning'>You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...</span>")
return
if(M.fatness < 200)
to_chat(M, "<span class='warning'>The moment your hand meets the statue, you feel a little warmer...</span>")
if(HAS_TRAIT(M, TRAIT_FAT))
to_chat(M, "<span class='warning'>Upon each poke of the statue, you feel yourself get a little heavier.</span>")
if(HAS_TRAIT(M, TRAIT_OBESE))
to_chat(M, "<span class='warning'>With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.</span>")
if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE))
to_chat(M, "<span class='warning'>The world around you blurs as you focus on prodding the statue, your waistline widening further...</span>")
if(HAS_TRAIT(M, TRAIT_IMMOBILE))
to_chat(M, "<span class='warning'>A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.</span>")
if(HAS_TRAIT(M, TRAIT_BLOB))
to_chat(M, "<span class='warning'>You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...</span>")
@@ -218,10 +218,10 @@
var/fat_to_add = 50
/turf/open/floor/mineral/calorite/Entered(mob/living/carbon/M)
if(!istype(M, /mob/living/carbon) || HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
if(!istype(M, /mob/living/carbon))
return FALSE
else
M.fatness = M.fatness + fat_to_add
M.adjust_fatness(fat_to_add, FATTENING_TYPE_ITEM)
// calorite floor, disguised version - GS13
@@ -55,10 +55,7 @@
if(world.time > last_event+15)
active = 1
for(var/mob/living/carbon/human/M in orange(3,src))
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
return
else
M.fatness = M.fatness + 50
M.adjust_fatness(50, FATTENING_TYPE_ITEM)
last_event = world.time
active = null
return
+28
View File
@@ -1018,6 +1018,18 @@ GLOBAL_LIST_EMPTY(preferences_datums)
dat += "<b>Screen Shake:</b> <a href='?_src_=prefs;preference=screenshake'>[(screenshake==100) ? "Full" : ((screenshake==0) ? "None" : "[screenshake]")]</a><br>"
if (user && user.client && !user.client.prefs.screenshake==0)
dat += "<b>Damage Screen Shake:</b> <a href='?_src_=prefs;preference=damagescreenshake'>[(damagescreenshake==1) ? "On" : ((damagescreenshake==0) ? "Off" : "Only when down")]</a><br>"
//GS13 stuff goes here
dat += "<h2>GS13 Preferences</h2>"
dat += "<b>NonCon - Weight Gain:</b><a href='?_src_=prefs;preference=noncon_weight_gain'>[noncon_weight_gain == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<h2>GS13 Weight Gain</h2>"
dat += "<b>Weight Gain - Food:</b><a href='?_src_=prefs;preference=weight_gain_food'>[weight_gain_food == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Weight Gain - Items:</b><a href='?_src_=prefs;preference=weight_gain_items'>[weight_gain_items == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Weight Gain - Chems:</b><a href='?_src_=prefs;preference=weight_gain_chems'>[weight_gain_chems == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Weight Gain - Weapons:</b><a href='?_src_=prefs;preference=weight_gain_weapons'>[weight_gain_weapons == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Weight Gain - Magic:</b><a href='?_src_=prefs;preference=weight_gain_magic'>[weight_gain_magic == TRUE ? "Enabled" : "Disabled"]</a><BR>"
dat += "<b>Weight Gain - Viruses:</b><a href='?_src_=prefs;preference=weight_gain_viruses'>[weight_gain_viruses == TRUE ? "Enabled" : "Disabled"]</a><BR>"
//Add the Hyper stuff below here
dat += "<h2>Hyper Preferences</h2>"
dat += "<b>NonCon - Bottom:</b><a href='?_src_=prefs;preference=noncon'>[noncon == TRUE ? "Enabled" : "Disabled"]</a><BR>"
@@ -2531,6 +2543,22 @@ GLOBAL_LIST_EMPTY(preferences_datums)
features["hide_belly"] = FALSE
features["inflatable_belly"] = FALSE
features["belly_size"] = 1
if("weight_gain_items")
weight_gain_items = !weight_gain_items
if("weight_gain_chems")
weight_gain_chems = !weight_gain_chems
if("weight_gain_food")
weight_gain_food = !weight_gain_food
if("weight_gain_weapons")
weight_gain_weapons = !weight_gain_weapons
if("weight_gain_magic")
weight_gain_magic = !weight_gain_magic
if("weight_gain_viruses")
weight_gain_viruses = !weight_gain_viruses
if("noncon_weight_gain")
noncon_weight_gain = !noncon_weight_gain
if("inflatable_belly")
features["inflatable_belly"] = !features["inflatable_belly"]
@@ -146,6 +146,15 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
S["importantroles"] >> importantroles
S["pins"] >> pins
//GS13 code
S["weight_gain_food"] >> weight_gain_food
S["weight_gain_chems"] >> weight_gain_chems
S["weight_gain_items"] >> weight_gain_items
S["weight_gain_magic"] >> weight_gain_magic
S["weight_gain_viruses"] >> weight_gain_viruses
S["weight_gain_weapons"] >> weight_gain_weapons
S["noncon_weight_gain"] >> noncon_weight_gain
//try to fix any outdated data if necessfary
if(needs_update >= 0)
update_preferences(needs_update, S) //needs_update = savefile_version if we need an update (positive integer)
@@ -268,6 +277,14 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car
//Hyper
WRITE_FILE(S["noncon"], noncon)
WRITE_FILE(S["pins"], pins)
//GS13
WRITE_FILE(S["weight_gain_food"], weight_gain_food)
WRITE_FILE(S["weight_gain_items"], weight_gain_items)
WRITE_FILE(S["weight_gain_magic"], weight_gain_magic)
WRITE_FILE(S["weight_gain_viruses"], weight_gain_viruses)
WRITE_FILE(S["weight_gain_chems"], weight_gain_chems)
WRITE_FILE(S["weight_gain_weapons"], weight_gain_weapons)
WRITE_FILE(S["noncon_weight_gain"], noncon_weight_gain)
return 1
@@ -46,7 +46,7 @@
fat_burned = min(HUNGER_FACTOR/20, fatness)
nutrition_lost_divider = 5
nutrition -= (HUNGER_FACTOR/nutrition_lost_divider - fat_burned)
fatness -= fat_burned
adjust_fatness(fat_burned, FATTENING_TYPE_WEIGHT_LOSS)
if(HAS_TRAIT(src, TRAIT_NOTHIRST))
@@ -369,6 +369,9 @@
if(digitalcamo)
msg += "[t_He] [t_is] moving [t_his] body in an unnatural and blatantly inhuman manner.\n"
if(client?.prefs?.noncon_weight_gain)
msg += "<span class='purple'><b>Non-con fattening is allowed</b></span>\n"
if (length(msg))
. += "<span class='warning'>[msg.Join("")]</span>"
msg += common_trait_examine()
@@ -419,7 +422,7 @@
"<a href='?src=[REF(src)];hud=s;add_comment=1'>\[Add comment\]</a>"), "")
else if(isobserver(user) && traitstring)
. += "<span class='info'><b>Traits:</b> [traitstring]</span>"
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .) //This also handles flavor texts now
. += "*---------*</span>"
@@ -1606,7 +1606,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/fatConversionRate = 100 //GS13 what percentage of the excess nutrition should go to fat (total nutrition to transfer can't be under 1)
var/nutritionThatBecomesFat = max((H.nutrition - NUTRITION_LEVEL_FULL)*(fatConversionRate / 100),1)
H.nutrition -= nutritionThatBecomesFat
H.fatness += nutritionThatBecomesFat
H.adjust_fatness(nutritionThatBecomesFat, FATTENING_TYPE_FOOD)
if(H.fullness > FULLNESS_LEVEL_EMPTY)//GS13 stomach-emptying routine
var/ticksToEmptyStomach = 20 // GS13 how many ticks it takes to decrease the fullness by 1
H.fullness -= 1/ticksToEmptyStomach
-1
View File
@@ -517,7 +517,6 @@
radiation = 0
nutrition = NUTRITION_LEVEL_FED + 50
fullness = FULLNESS_LEVEL_HALF_FULL // GS13
fatness = 0 // GS13
thirst = THIRST_LEVEL_QUENCHED + 50
bodytemperature = BODYTEMP_NORMAL
set_blindness(0)
+3 -2
View File
@@ -60,8 +60,9 @@
var/drowsyness = 0//Carbon
var/dizziness = 0//Carbon
var/jitteriness = 0//Carbon
var/fatness = 0//Carbon, GS13 addition
var/fullness = FULLNESS_LEVEL_HALF_FULL//Carbon, GS13 addition
///How full is the parent mob?
var/fullness = FULLNESS_LEVEL_HALF_FULL
var/nutrition = NUTRITION_LEVEL_START_MIN // randomised in Initialize
var/thirst = THIRST_LEVEL_START_MIN //same for this
var/satiety = 0//Carbon
@@ -114,7 +114,8 @@
/obj/item/gun/fatbeam/proc/on_beam_tick(var/mob/living/target)
if(target.health != target.maxHealth)
new /obj/effect/temp_visual/heal(get_turf(target), "#FFC2F8")
target.nutrition += 50
if(target?.client?.prefs?.weight_gain_weapons)
target.nutrition += 50
return
/obj/item/gun/fatbeam/proc/on_beam_release(var/mob/living/target)
@@ -453,7 +453,7 @@
taste_description = "slime"
/datum/reagent/consumable/cornoil/on_mob_life(mob/living/carbon/M)
if(M && !HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
if(M && M?.client?.prefs.weight_gain_chems)
M.nutrition += 20 * REAGENTS_METABOLISM
else
M.nutrition += 1
@@ -619,9 +619,11 @@
/datum/reagent/medicine/lipolicide/on_mob_life(mob/living/carbon/M)
if(M.nutrition <= NUTRITION_LEVEL_STARVING)
M.adjustToxLoss(1*REM, 0)
M.fatness = max(M.fatness - 10, 0)
if(M.fatness == 0)
M.nutrition = max(M.nutrition - 3, 0) // making the chef more valuable, one meme trap at a time
else
M.adjust_fatness(-10, FATTENING_TYPE_WEIGHT_LOSS)
M.overeatduration = 0
return ..()
+2
View File
@@ -3316,6 +3316,8 @@
#include "code\modules\VR\vr_sleeper.dm"
#include "code\modules\zombie\items.dm"
#include "code\modules\zombie\organs.dm"
#include "GainStation13\code\mechanics\fatness.dm"
#include "GainStation13\code\modules\client\preferences\preferences.dm"
#include "GainStation13\code\modules\mob\living\emote.dm"
#include "GainStation13\code\modules\reagents\chemistry\reagents\consumable_reagents.dm"
#include "GainStation13\code\modules\reagents\chemistry\recipes\fatchem.dm"