Files
wwdpublic/Content.Server/Traits/Assorted/ConsumeDelayModifierComponent.cs
Angelo Fallaria 23fc467bd1 New Trait: Voracious (#668)
# Description

**Voracious** is a 1-point Physical trait that makes you eat and drink
twice as fast.

Inspired by the SS13 trait of the same name. Roughly based on the
Parkstation implementation of Voracious by @DEATHB4DEFEAT.

## Technical Details

The new component `ConsumeDelayModifierComponent` is rather generic, and
can decrease or _increase_ the consumption speed of food and/or drinks.
This gives room to add a negative trait that includes slower
eating/drinking.

## Media


![image](https://github.com/user-attachments/assets/f8475b2a-de0b-4cae-83c6-8a280139bfd8)

# Changelog

🆑 Skubman
add: Add the Voracious trait, a 1-point trait that makes you eat and
drink twice as fast.
2024-08-04 10:30:31 +01:00

23 lines
628 B
C#

using Robust.Shared.GameStates;
namespace Content.Server.Traits.Assorted.Components;
/// <summary>
/// This is used for any trait that modifies how fast an entity consumes food and drinks.
/// </summary>
[RegisterComponent]
public sealed partial class ConsumeDelayModifierComponent : Component
{
/// <summary>
/// What to multiply the eating delay by.
/// </summary>
[DataField]
public float FoodDelayMultiplier { get; set; } = 1f;
/// <summary>
/// What to multiply the drinking delay by.
/// </summary>
[DataField]
public float DrinkDelayMultiplier { get; set; } = 1f;
}