[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)
{

View File

@@ -22,6 +22,8 @@
Quantity: 20
- ReagentId: Vitamin
Quantity: 5
- type: Item
size: 25
- type: entity
parent: FoodCakeBase
@@ -43,6 +45,8 @@
Quantity: 4
- ReagentId: Vitamin
Quantity: 1
- type: Item
size: 5
# Custom Cake Example
@@ -90,6 +94,8 @@
- type: SliceableFood
slice: FoodCakePlainSlice
# Added in type lines above
- type: entity
name: slice of cake
parent: FoodCakeSliceBase