Skip to content

Commit

Permalink
[FULLY MODULAR] Adds a very small healing buff to the high complexity…
Browse files Browse the repository at this point in the history
… food mood (Bubberstation#603)

## About The Pull Request

Provides a very minor buff to eating high quality and high liking foods.

The heal has a pretty small chance to happen every tick (2 seconds)
(~5-12.5%) and heals 3 points of damage (5 if the food was godlike), so
it isn't in any way game winning. (This basically means that on average,
Godlike will heal like 90hp over 5 minutes, with the rest doing
significantly less (45, 33, 22))

## Why It's Good For The Game

Adds a reason for people to cook actually good foods, for people to
request said foods, etc.
Moffy asked me to do this and I obey our great leader and his every
request he deems good.

## Changelog

:cl:
add: Added a minor healing effect to excellent foods
/:cl:

---------

Co-authored-by: StrangeWeirdKitten <[email protected]>
  • Loading branch information
Majkl-J and StrangeWeirdKitten authored Nov 2, 2023
1 parent d1737fe commit bd19472
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
33 changes: 33 additions & 0 deletions modular_zubbers/code/datums/mood_events/food_events.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/datum/mood_event/food/add_effects(param)
. = ..()
if(quality >= FOOD_QUALITY_VERYGOOD)
var/effect_strength = quality - FOOD_QUALITY_VERYGOOD
var/mob/living/carbon/human/O = owner
if(istype(O))
O.apply_status_effect(/datum/status_effect/food/quality_healing, effect_strength)


/datum/status_effect/food/quality_healing
id = "food_quality_healing"
status_type = STATUS_EFFECT_REPLACE //The last food you ate should be the one to affect it

/// Used to determine how good our heal is
var/qheal_strength = 0
var/healpwr = 3

/datum/status_effect/food/quality_healing/on_creation(mob/living/new_owner, _qheal_strength)
qheal_strength = _qheal_strength
if(qheal_strength > 2) //Godlike food is pretty hard to achieve (Unless you're a moff) and should be rewarded
healpwr = 5
return ..()

/datum/status_effect/food/quality_healing/tick(seconds_between_ticks)
. = ..()
var/mob/living/carbon/human/O = owner
if(istype(O))
if(O.stat == HARD_CRIT)
return
if(prob(5 + (qheal_strength * 2.5))) //Very tiny and in no way combat viable, might pick you up from crit in a very rare case
O.heal_bodypart_damage(brute = healpwr, burn = healpwr, required_bodytype = BODYTYPE_ORGANIC)
for(var/obj/item/organ/internal/stomach/S in O.organs)
S.apply_organ_damage((S.healing_factor * healpwr))
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -7862,6 +7862,7 @@
#include "modular_zubbers\code\datums\computer_datums\protolathe_modifications.dm"
#include "modular_zubbers\code\datums\diseases\advance\presets.dm"
#include "modular_zubbers\code\datums\id_trim\jobs.dm"
#include "modular_zubbers\code\datums\mood_events\food_events.dm"
#include "modular_zubbers\code\datums\quirks\neutral_quirks\hungry.dm"
#include "modular_zubbers\code\datums\shuttle\arena.dm"
#include "modular_zubbers\code\datums\shuttles\emergency.dm"
Expand Down

0 comments on commit bd19472

Please sign in to comment.