Files
space-station-14/Content.Shared/Research/Components/SharedResearchConsoleComponent.cs
Fildrance 1f2d80297c feat: RnD tech research console now have reroll feature (#32931)
* feat: RnD tech research console now have reroll feature

* fix: disable Rediscover button when there is not enough currency or user have no access

* refactor: xml-doc, extract method, minor simplify xaml

* minor cleanup after review

* refactor: change sending research server points amount into BUI from state to  ResearchServerComponent (using AfterAutoHandleStateEvent)

* feat: now tech rerolls will have cooldown to ensure no one can spam-spend all dept budget instantly

* refactor: revert unneeded code

* refactor: whitespaces

---------

Co-authored-by: pa.pecherskij <pa.pecherskij@interfax.ru>
2025-12-18 21:06:24 +00:00

36 lines
959 B
C#

using Robust.Shared.Serialization;
namespace Content.Shared.Research.Components
{
[NetSerializable, Serializable]
public enum ResearchConsoleUiKey : byte
{
Key,
}
[Serializable, NetSerializable]
public sealed class ConsoleUnlockTechnologyMessage(string id) : BoundUserInterfaceMessage
{
public string Id = id;
}
[Serializable, NetSerializable]
public sealed class ConsoleRediscoverTechnologyMessage : BoundUserInterfaceMessage;
[Serializable, NetSerializable]
public sealed class ConsoleServerSelectionMessage : BoundUserInterfaceMessage
{
}
[Serializable, NetSerializable]
public sealed class ResearchConsoleBoundInterfaceState(int points, TimeSpan nextRediscover, int rediscoverCost) : BoundUserInterfaceState
{
public int Points = points;
public TimeSpan NextRediscover = nextRediscover;
public int RediscoverCost = rediscoverCost;
}
}