From: Hunter Sagerer Date: Sat, 15 Apr 2023 22:40:51 +0000 (-0400) Subject: [Tweak] Adjusted cake sizes (#15382) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=10c87a4b24684d0dd073e2b2edc031fddd77478d;p=space-station-14.git [Tweak] Adjusted cake sizes (#15382) --- diff --git a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs index 2e7b037d33..3825d78045 100644 --- a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs @@ -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) { diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml index 47067b654d..96bc3d85b9 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Food/Baked/cake.yml @@ -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