Merge remote-tracking branch 'upstream/stable' into ed-30-04-2025-upstream-sync
# Conflicts: # Content.Client/Parallax/ParallaxControl.cs # Content.Client/UserInterface/Systems/Storage/Controls/ItemGridPiece.cs # Content.IntegrationTests/Tests/PostMapInitTest.cs # Content.Server/Chat/Managers/ChatManager.cs # Content.Server/Fluids/EntitySystems/PuddleSystem.Evaporation.cs # Content.Server/Labels/Label/LabelSystem.cs # Content.Shared/Actions/SharedActionsSystem.cs # Content.Shared/Fluids/Components/EvaporationComponent.cs # Content.Shared/Labels/EntitySystems/SharedLabelSystem.cs # README.md # Resources/Prototypes/Entities/Mobs/Player/admin_ghost.yml # Resources/Prototypes/Maps/Pools/deathmatch.yml # Resources/Prototypes/Maps/arenas.yml
This commit is contained in:
@@ -123,6 +123,7 @@ public sealed class HungerSystem : EntitySystem
|
||||
entity.Comp.LastAuthoritativeHungerChangeTime = _timing.CurTime;
|
||||
entity.Comp.LastAuthoritativeHungerValue = ClampHungerWithinThresholds(entity.Comp, value);
|
||||
DirtyField(entity.Owner, entity.Comp, nameof(HungerComponent.LastAuthoritativeHungerChangeTime));
|
||||
DirtyField(entity.Owner, entity.Comp, nameof(HungerComponent.LastAuthoritativeHungerValue));
|
||||
}
|
||||
|
||||
private void UpdateCurrentThreshold(EntityUid uid, HungerComponent? component = null)
|
||||
@@ -140,6 +141,7 @@ public sealed class HungerSystem : EntitySystem
|
||||
//CP14 Raise hunger event for vampire end
|
||||
|
||||
component.CurrentThreshold = calculatedHungerThreshold;
|
||||
DirtyField(uid, component, nameof(HungerComponent.CurrentThreshold));
|
||||
DoHungerThresholdEffects(uid, component);
|
||||
}
|
||||
|
||||
@@ -168,10 +170,12 @@ public sealed class HungerSystem : EntitySystem
|
||||
if (component.HungerThresholdDecayModifiers.TryGetValue(component.CurrentThreshold, out var modifier))
|
||||
{
|
||||
component.ActualDecayRate = component.BaseDecayRate * modifier;
|
||||
DirtyField(uid, component, nameof(HungerComponent.ActualDecayRate));
|
||||
SetAuthoritativeHungerValue((uid, component), GetHunger(component));
|
||||
}
|
||||
|
||||
component.LastThreshold = component.CurrentThreshold;
|
||||
DirtyField(uid, component, nameof(HungerComponent.LastThreshold));
|
||||
}
|
||||
|
||||
private void DoContinuousHungerEffects(EntityUid uid, HungerComponent? component = null)
|
||||
|
||||
Reference in New Issue
Block a user