From 9fc2f811503489e75a50d37a58975adc4fbd1111 Mon Sep 17 00:00:00 2001 From: Pinta <124479862+deertools@users.noreply.github.com> Date: Wed, 8 Feb 2023 18:24:13 -0500 Subject: [PATCH] wew --- GainStation13/code/mechanics/fatness.dm | 61 ++++++------ .../modules/client/preferences/preferences.dm | 18 ++++ code/__DEFINES/misc.dm | 11 +++ code/__DEFINES/traits.dm | 11 +-- code/datums/components/mood.dm | 5 +- .../diseases/advance/symptoms/weight.dm | 8 +- code/datums/traits/neutral.dm | 10 -- code/game/objects/structures/statues.dm | 96 +++++++++---------- .../turfs/simulated/floor/mineral_floor.dm | 2 +- code/modules/mob/living/living.dm | 1 - code/modules/mob/mob_defines.dm | 2 + code/modules/projectiles/guns/misc/fatbeam.dm | 4 +- .../chemistry/reagents/food_reagents.dm | 2 +- tgstation.dme | 1 + 14 files changed, 126 insertions(+), 106 deletions(-) create mode 100644 GainStation13/code/modules/client/preferences/preferences.dm diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm index 1a59b334..c31a7fef 100644 --- a/GainStation13/code/mechanics/fatness.dm +++ b/GainStation13/code/mechanics/fatness.dm @@ -1,18 +1,6 @@ -#define MINIMUM_FATNESS_LEVEL = 0 - -#define FATTENING_TYPE_ITEM 0 -#define FATTENING_TYPE_FOOD 1 -#define FATTENING_TYPE_CHEM 2 -#define FATTENING_TYPE_WEAPON 3 -#define FATTENING_TYPE_MAGIC 4 -#define FATTENING_TYPE_VIRUS 5 -#define FATTENING_TYPE_WEIGHT_LOSS 6 - /mob/living/carbon ///What level of fatness is the parent mob at? var/fatness = 0 - ///How full is the parent mob? - var/fullness = FULLNESS_LEVEL_HALF_FULL ///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% @@ -28,28 +16,47 @@ if(!adjustment_amount || !type_of_fattening) return FALSE - if(!HAS_TRAIT(src, TRAIT_UNIVERSAL_GAINER)) + if(!HAS_TRAIT(src, TRAIT_UNIVERSAL_GAINER) && client?.prefs) switch(type_of_fattening) - if(FATTENING_TYPE_ITEM && HAS_TRAIT(src, TRAIT_GAIN_ITEM_IMMUNE)) - return FALSE - if(FATTENING_TYPE_FOOD && HAS_TRAIT(src, TRAIT_GAIN_FOOD_IMMUNE)) - return FALSE - if(FATTENING_TYPE_CHEM && HAS_TRAIT(src, TRAIT_GAIN_CHEM_IMMUNE)) - return FALSE - if(FATTENING_TYPE_WEAPON && HAS_TRAIT(src, TRAIT_GAIN_WEAPON_IMMUNE)) - return FALSE - if(FATTENING_TYPE_MAGIC && HAS_TRAIT(src, TRAIT_GAIN_MAGIC_IMMUNE)) - return FALSE - if(FATTENING_TYPE_WEIGHT_LOSS && HAS_TRAIT(src, TRAIT_WEIGHT_LOSS_IMMUNE)) - return FALSE + 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 * weight_gain_rate + amount_to_change = amount_to_change * weight_gain_rate else - amount_to_change * weight_loss_rate + 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 + . = ..() diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm new file mode 100644 index 00000000..09748049 --- /dev/null +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -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 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 6f72bd48..8f9ad059 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -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" diff --git a/code/__DEFINES/traits.dm b/code/__DEFINES/traits.dm index 273a56ff..3fe39024 100644 --- a/code/__DEFINES/traits.dm +++ b/code/__DEFINES/traits.dm @@ -215,16 +215,7 @@ #define TRAIT_NO_ALCOHOL "alcohol_intolerance" //GS13 - -//Weight gain immunity traits -#define TRAIT_GAIN_FOOD_IMMUNE "food_gain_immune" -#define TRAIT_GAIN_CHEM_IMMUNE "chem_gain_immune" -#define TRAIT_GAIN_ITEM_IMMUNE "item_gain_immune" -#define TRAIT_GAIN_WEAPON_IMMUNE "weapon_gain_immune" -#define TRAIT_GAIN_MAGIC_IMMUNE "magic_gain_immune" -#define TRAIT_GAIN_VIRUS_IMMUNE "virus_gain_immune" - -#define TRIAT_WEIGHT_LOSS_IMMUNE "weight_loss_immune" +#define TRAIT_WEIGHT_LOSS_IMMUNE "weight_loss_immune" #define TRAIT_UNIVERSAL_GAINER "universal_gainer" diff --git a/code/datums/components/mood.dm b/code/datums/components/mood.dm index dbeec758..f188c66c 100644 --- a/code/datums/components/mood.dm +++ b/code/datums/components/mood.dm @@ -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) diff --git a/code/datums/diseases/advance/symptoms/weight.dm b/code/datums/diseases/advance/symptoms/weight.dm index 4b267176..652a771b 100644 --- a/code/datums/diseases/advance/symptoms/weight.dm +++ b/code/datums/diseases/advance/symptoms/weight.dm @@ -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)) @@ -74,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)) diff --git a/code/datums/traits/neutral.dm b/code/datums/traits/neutral.dm index ed3c3643..e025626d 100644 --- a/code/datums/traits/neutral.dm +++ b/code/datums/traits/neutral.dm @@ -127,16 +127,6 @@ lose_text = "You don't feel as prudish as before." 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 = "You feel less prone to sudden weight gain." - lose_text = "You don't feel that resistant to gaining sudden weight anymore." - 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." diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 6448da98..361f7b2d 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -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, "Nothing happens.") + return + + if(M.fatness < 200) + to_chat(M, "The moment your hand meets the statue, you feel a little warmer...") + if(HAS_TRAIT(M, TRAIT_FAT)) + to_chat(M, "Upon each poke of the statue, you feel yourself get a little heavier.") + if(HAS_TRAIT(M, TRAIT_OBESE)) + to_chat(M, "With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.") + if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE)) + to_chat(M, "The world around you blurs as you focus on prodding the statue, your waistline widening further...") + if(HAS_TRAIT(M, TRAIT_IMMOBILE)) + to_chat(M, "A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.") + if(HAS_TRAIT(M, TRAIT_BLOB)) + to_chat(M, "You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...") - if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE)) - to_chat(M, "Nothing happens.") - else - M.adjust_fatness(20, FATTENING_TYPE_ITEM) - if(M.fatness < 200) - to_chat(M, "The moment your hand meets the statue, you feel a little warmer...") - if(HAS_TRAIT(M, TRAIT_FAT)) - to_chat(M, "Upon each poke of the statue, you feel yourself get a little heavier.") - if(HAS_TRAIT(M, TRAIT_OBESE)) - to_chat(M, "With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.") - if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE)) - to_chat(M, "The world around you blurs as you focus on prodding the statue, your waistline widening further...") - if(HAS_TRAIT(M, TRAIT_IMMOBILE)) - to_chat(M, "A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.") - if(HAS_TRAIT(M, TRAIT_BLOB)) - to_chat(M, "You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...") - /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, "Nothing happens.") - else - M.adjust_fatness(20, FATTENING_TYPE_ITEM) - if(M.fatness < 200) - to_chat(M, "The moment your hand meets the statue, you feel a little warmer...") - if(HAS_TRAIT(M, TRAIT_FAT)) - to_chat(M, "Upon each poke of the statue, you feel yourself get a little heavier.") - if(HAS_TRAIT(M, TRAIT_OBESE)) - to_chat(M, "With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.") - if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE)) - to_chat(M, "The world around you blurs as you focus on prodding the statue, your waistline widening further...") - if(HAS_TRAIT(M, TRAIT_IMMOBILE)) - to_chat(M, "A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.") - if(HAS_TRAIT(M, TRAIT_BLOB)) - to_chat(M, "You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...") - + return + + if(M.fatness < 200) + to_chat(M, "The moment your hand meets the statue, you feel a little warmer...") + if(HAS_TRAIT(M, TRAIT_FAT)) + to_chat(M, "Upon each poke of the statue, you feel yourself get a little heavier.") + if(HAS_TRAIT(M, TRAIT_OBESE)) + to_chat(M, "With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.") + if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE)) + to_chat(M, "The world around you blurs as you focus on prodding the statue, your waistline widening further...") + if(HAS_TRAIT(M, TRAIT_IMMOBILE)) + to_chat(M, "A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.") + if(HAS_TRAIT(M, TRAIT_BLOB)) + to_chat(M, "You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...") + /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, "Nothing happens.") - else - M.adjust_fatness(20, FATTENING_TYPE_ITEM) - if(M.fatness < 200) - to_chat(M, "The moment your hand meets the statue, you feel a little warmer...") - if(HAS_TRAIT(M, TRAIT_FAT)) - to_chat(M, "Upon each poke of the statue, you feel yourself get a little heavier.") - if(HAS_TRAIT(M, TRAIT_OBESE)) - to_chat(M, "With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.") - if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE)) - to_chat(M, "The world around you blurs as you focus on prodding the statue, your waistline widening further...") - if(HAS_TRAIT(M, TRAIT_IMMOBILE)) - to_chat(M, "A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.") - if(HAS_TRAIT(M, TRAIT_BLOB)) - to_chat(M, "You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...") - \ No newline at end of file + return + + if(M.fatness < 200) + to_chat(M, "The moment your hand meets the statue, you feel a little warmer...") + if(HAS_TRAIT(M, TRAIT_FAT)) + to_chat(M, "Upon each poke of the statue, you feel yourself get a little heavier.") + if(HAS_TRAIT(M, TRAIT_OBESE)) + to_chat(M, "With each touch you keep getting fatter... But the fatter you grow, the more enticed you feel to poke the statue.") + if(HAS_TRAIT(M, TRAIT_MORBIDLYOBESE)) + to_chat(M, "The world around you blurs as you focus on prodding the statue, your waistline widening further...") + if(HAS_TRAIT(M, TRAIT_IMMOBILE)) + to_chat(M, "A whispering voice gently compliments your massive body, your own mind begging to touch the statue more.") + if(HAS_TRAIT(M, TRAIT_BLOB)) + to_chat(M, "You can barely reach the statue past your floor-covering stomach! And yet, it still calls to you...") diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index 31d09ab2..6ecec3dc 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -218,7 +218,7 @@ 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.adjust_fatness(fat_to_add, FATTENING_TYPE_ITEM) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 784e04cd..cc3c1c32 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 28bcb61f..46b56a9e 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -61,6 +61,8 @@ var/dizziness = 0//Carbon var/jitteriness = 0//Carbon + ///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 diff --git a/code/modules/projectiles/guns/misc/fatbeam.dm b/code/modules/projectiles/guns/misc/fatbeam.dm index 8f87b5e7..d6715f39 100644 --- a/code/modules/projectiles/guns/misc/fatbeam.dm +++ b/code/modules/projectiles/guns/misc/fatbeam.dm @@ -114,8 +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") - if(HAS_TRAIT(target, TRAIT_GAIN_WEAPON_IMMUNE)) - 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) diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index 5671ae1c..0c7e99fe 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -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 diff --git a/tgstation.dme b/tgstation.dme index 7626558e..de346663 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -3317,6 +3317,7 @@ #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"