2020-01-09 00:27:52 +01:00
|
|
|
using Content.Shared.GameObjects.Components;
|
2020-08-01 17:37:12 +02:00
|
|
|
using Content.Shared.GameObjects.EntitySystems;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.GameObjects;
|
2019-10-13 22:49:07 +02:00
|
|
|
using Robust.Shared.Localization;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.Utility;
|
|
|
|
|
using Robust.Shared.ViewVariables;
|
2018-08-02 08:29:55 +02:00
|
|
|
|
|
|
|
|
namespace Content.Server.GameObjects.Components.Stack
|
|
|
|
|
{
|
|
|
|
|
// TODO: Naming and presentation and such could use some improvement.
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2020-10-08 17:41:23 +02:00
|
|
|
[ComponentReference(typeof(SharedStackComponent))]
|
2021-05-26 10:20:57 +02:00
|
|
|
public class StackComponent : SharedStackComponent, IExamine
|
2018-08-02 08:29:55 +02:00
|
|
|
{
|
2020-02-13 22:43:02 +00:00
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
2021-05-26 10:20:57 +02:00
|
|
|
public bool ThrowIndividually { get; set; } = false;
|
2018-08-02 08:29:55 +02:00
|
|
|
|
2020-05-31 19:29:06 +01:00
|
|
|
void IExamine.Examine(FormattedMessage message, bool inDetailsRange)
|
2018-08-02 08:29:55 +02:00
|
|
|
{
|
2020-05-31 19:29:06 +01:00
|
|
|
if (inDetailsRange)
|
|
|
|
|
{
|
2021-02-22 00:07:46 +00:00
|
|
|
message.AddMarkup(
|
|
|
|
|
Loc.GetString(
|
2021-02-28 20:02:03 -04:00
|
|
|
"comp-stack-examine-detail-count",
|
2021-02-22 00:07:46 +00:00
|
|
|
("count", Count),
|
|
|
|
|
("markupCountColor", "lightgray")
|
|
|
|
|
)
|
|
|
|
|
);
|
2020-05-31 19:29:06 +01:00
|
|
|
}
|
2018-08-02 08:29:55 +02:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|