mirror of
https://github.com/KabKebab/GS13.git
synced 2026-02-09 23:27:37 +00:00
wew
This commit is contained in:
@@ -1,17 +1,55 @@
|
||||
#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%
|
||||
var/weight_loss_rate = 1
|
||||
|
||||
///Adjusts the fatness level of the parent mob. Positive numbers increase fatness, negative numbers remove fatness.
|
||||
/mob/living/carbon/proc/adjust_fatness(adjustment_amount)
|
||||
if(!adjustment_amount)
|
||||
/**
|
||||
* 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
|
||||
|
||||
fatness += adjustment_amount
|
||||
fatness = max(adjustment_amount, MINIMUM_FATNESS_LEVEL) //It would be a little silly if someone got negative fat.
|
||||
|
||||
if(!HAS_TRAIT(src, TRAIT_UNIVERSAL_GAINER))
|
||||
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
|
||||
|
||||
var/amount_to_change = adjustment_amount
|
||||
if(adjustment_amount > 0)
|
||||
amount_to_change * weight_gain_rate
|
||||
else
|
||||
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
|
||||
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
@@ -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,20 @@
|
||||
#define TRAIT_NO_TELEPORT "no-teleport" //you just can't
|
||||
#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_UNIVERSAL_GAINER "universal_gainer"
|
||||
|
||||
|
||||
// common trait sources
|
||||
#define TRAIT_GENERIC "generic"
|
||||
#define EYE_DAMAGE "eye_damage"
|
||||
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -363,7 +363,7 @@
|
||||
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
|
||||
to_chat(M, "<span class='warning'>Nothing happens.</span>")
|
||||
else
|
||||
M.fatness = M.fatness + 20
|
||||
M.adjust_fatness(20, FATTENING_TYPE_ITEM)
|
||||
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))
|
||||
@@ -381,7 +381,7 @@
|
||||
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
|
||||
to_chat(M, "<span class='warning'>Nothing happens.</span>")
|
||||
else
|
||||
M.fatness = M.fatness + 20
|
||||
M.adjust_fatness(20, FATTENING_TYPE_ITEM)
|
||||
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))
|
||||
@@ -399,7 +399,7 @@
|
||||
if(HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
|
||||
to_chat(M, "<span class='warning'>Nothing happens.</span>")
|
||||
else
|
||||
M.fatness = M.fatness + 20
|
||||
M.adjust_fatness(20, FATTENING_TYPE_ITEM)
|
||||
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))
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
if(!istype(M, /mob/living/carbon) || HAS_TRAIT(M, TRAIT_LIPOIFIER_IMMUNE))
|
||||
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
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -114,6 +114,7 @@
|
||||
/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
|
||||
return
|
||||
|
||||
|
||||
@@ -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 ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user