Material generators from Afterlight (#18387)
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user