Skip to content

Commit

Permalink
Fix "Overweight" trait unintended interaction (#2535)
Browse files Browse the repository at this point in the history
* Fix "Overweight" trait unintended interaction

The hunger hud update changed how the Overweight trait is handled, making it give any character using it the speed malus that the trait already gives, but also giving them an extra speed malus as if they were overfed at all times. Currently there's no way to get rid of the permanently overfed state without manually removing the "Overweight" trait directly from the mob that has it, this PR removes that permanent overfed state.

* I think this is right?

proper removal documentation, sans module since uh... dunno if it needs to be modularized

* New Solution

much easier to just make a new trait define, and then apply that new trait to where the old, conflicting one was being applied.

* add new trait to _globalvars

* Update code/_onclick/hud/screen_objects.dm



* upstream fix integration

trait now adds the trait that was added upstream `TRAIT_OFF_BALANCE_TACKLER`. Which handles the only effect that we need to handle independently of `TRAIT_FAT` now.

---------

Co-authored-by: Varoxus <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
4 people authored Mar 25, 2024
1 parent f371f1b commit 18b6e63
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modular_nova/master_files/code/datums/traits/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ GLOBAL_VAR_INIT(DNR_trait_overlay, generate_DNR_trait_overlay())
value = 0
icon = FA_ICON_HAMBURGER // I'm very hungry. Give me the burger!
medical_record_text = "Patient weighs higher than average."
mob_trait = TRAIT_FAT
mob_trait = TRAIT_OFF_BALANCE_TACKLER

/datum/quirk/overweight/add(client/client_source)
quirk_holder.add_movespeed_modifier(/datum/movespeed_modifier/overweight)
Expand All @@ -296,6 +296,6 @@ GLOBAL_VAR_INIT(DNR_trait_overlay, generate_DNR_trait_overlay())

/datum/mood_event/fat/New(mob/parent_mob, ...)
. = ..()
if(HAS_TRAIT_FROM(parent_mob, TRAIT_FAT, QUIRK_TRAIT))
if(HAS_TRAIT_FROM(parent_mob, TRAIT_OFF_BALANCE_TACKLER, QUIRK_TRAIT))
mood_change = 0 // They are probably used to it, no reason to be viscerally upset about it.
description = "<b>I'm fat.</b>"

0 comments on commit 18b6e63

Please sign in to comment.