/// Adds text to the entity's description box based on its current hunger threshold.
/// </summary>
[RegisterComponent, NetworkedComponent]
-[Access(typeof(ExamineableHungerSystem))]
-public sealed partial class ExamineableHungerComponent : Component
+[Access(typeof(ExaminableHungerSystem))]
+public sealed partial class ExaminableHungerComponent : Component
{
/// <summary>
/// Dictionary of hunger thresholds to LocIds of the messages to display.
[DataField]
public Dictionary<HungerThreshold, LocId> Descriptions = new()
{
- { HungerThreshold.Overfed, "examineable-hunger-component-examine-overfed"},
- { HungerThreshold.Okay, "examineable-hunger-component-examine-okay"},
- { HungerThreshold.Peckish, "examineable-hunger-component-examine-peckish"},
- { HungerThreshold.Starving, "examineable-hunger-component-examine-starving"},
- { HungerThreshold.Dead, "examineable-hunger-component-examine-starving"}
+ { HungerThreshold.Overfed, "examinable-hunger-component-examine-overfed"},
+ { HungerThreshold.Okay, "examinable-hunger-component-examine-okay"},
+ { HungerThreshold.Peckish, "examinable-hunger-component-examine-peckish"},
+ { HungerThreshold.Starving, "examinable-hunger-component-examine-starving"},
+ { HungerThreshold.Dead, "examinable-hunger-component-examine-starving"}
};
/// <summary>
/// LocId of a fallback message to display if the entity has no <see cref="HungerComponent"/>
/// or does not have a value in <see cref="Descriptions"/> for the current threshold.
/// </summary>
- public LocId NoHungerDescription = "examineable-hunger-component-examine-none";
+ public LocId NoHungerDescription = "examinable-hunger-component-examine-none";
}
namespace Content.Shared.Nutrition.EntitySystems;
-/// <inheritdoc cref="ExamineableHungerComponent"/>
-public sealed class ExamineableHungerSystem : EntitySystem
+/// <inheritdoc cref="ExaminableHungerComponent"/>
+public sealed class ExaminableHungerSystem : EntitySystem
{
[Dependency] private readonly HungerSystem _hunger = default!;
private EntityQuery<HungerComponent> _hungerQuery;
_hungerQuery = GetEntityQuery<HungerComponent>();
- SubscribeLocalEvent<ExamineableHungerComponent, ExaminedEvent>(OnExamine);
+ SubscribeLocalEvent<ExaminableHungerComponent, ExaminedEvent>(OnExamine);
}
/// <summary>
/// Defines the text provided on examine.
/// Changes depending on the amount of hunger the target has.
/// </summary>
- private void OnExamine(Entity<ExamineableHungerComponent> entity, ref ExaminedEvent args)
+ private void OnExamine(Entity<ExaminableHungerComponent> entity, ref ExaminedEvent args)
{
var identity = Identity.Entity(entity, EntityManager);
--- /dev/null
+examinable-hunger-component-examine-overfed = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} stuffed!
+examinable-hunger-component-examine-okay = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} content.
+examinable-hunger-component-examine-peckish = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} hungry.
+examinable-hunger-component-examine-starving = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} starved!
+examinable-hunger-component-examine-none = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "seem", "seems")} not to get hungry.
+++ /dev/null
-examineable-hunger-component-examine-overfed = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} stuffed!
-examineable-hunger-component-examine-okay = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} content.
-examineable-hunger-component-examine-peckish = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} hungry.
-examineable-hunger-component-examine-starving = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "look", "looks")} starved!
-examineable-hunger-component-examine-none = {CAPITALIZE(SUBJECT($entity))} {CONJUGATE-BASIC($entity, "seem", "seems")} not to get hungry.
- type: EggLayer
eggSpawn:
- id: FoodEgg
- - type: ExamineableHunger
+ - type: ExaminableHunger
- type: ReplacementAccent
accent: chicken
- type: SentienceTarget
- type: EggLayer
eggSpawn:
- id: FoodEgg
- - type: ExamineableHunger
+ - type: ExaminableHunger
- type: ReplacementAccent
accent: duck
- type: SentienceTarget
reagentId: Milk
quantityPerUpdate: 25
growthDelay: 30
- - type: ExamineableHunger
+ - type: ExaminableHunger
- type: Butcherable
spawned:
- id: FoodMeat
reagentId: MilkGoat
quantityPerUpdate: 25
growthDelay: 20
- - type: ExamineableHunger
+ - type: ExaminableHunger
- type: Wooly
- type: Food
solution: wool