Material generators from Afterlight (#18387)

This commit is contained in:
Nemanja
2023-07-31 14:42:38 -04:00
committed by GitHub
parent b9af7d3668
commit 2d08f02d23
34 changed files with 639 additions and 29 deletions

View File

@@ -3,7 +3,6 @@ using Content.Shared.Examine;
using Content.Shared.Hands.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Popups;
using JetBrains.Annotations;
using Robust.Shared.GameStates;
@@ -228,6 +227,17 @@ namespace Content.Shared.Stacks
return merged;
}
/// <summary>
/// Gets the amount of items in a stack. If it cannot be stacked, returns 1.
/// </summary>
/// <param name="uid"></param>
/// <param name="component"></param>
/// <returns></returns>
public int GetCount(EntityUid uid, StackComponent? component = null)
{
return Resolve(uid, ref component, false) ? component.Count : 1;
}
/// <summary>
/// Gets the max count for a given entity prototype
/// </summary>