[Tweak] Adjusted cake sizes (#15382)

This commit is contained in:
Hunter Sagerer
2023-04-15 18:40:51 -04:00
committed by GitHub
parent 06228dde28
commit 10c87a4b24
2 changed files with 15 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ using Content.Shared.Examine;
using Content.Shared.FixedPoint;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.Player;
@@ -78,7 +79,15 @@ namespace Content.Server.Nutrition.EntitySystems
SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid),
transform.Coordinates, AudioParams.Default.WithVolume(-2));
// Decrease size of item based on count - Could implement in the future
// Bug with this currently is the size in a container is not updated
// if (TryComp(uid, out ItemComponent? itemComp) && TryComp(sliceUid, out ItemComponent? sliceComp))
// {
// itemComp.Size -= sliceComp.Size;
// }
component.Count--;
// If someone makes food proto with 1 slice...
if (component.Count < 1)
{