Tech disk 4891 (#16752)

* Tech disk gacha

* customtypeserializer
This commit is contained in:
Nemanja
2023-05-25 18:07:39 -04:00
committed by GitHub
parent bf2417db34
commit e62c11dd85
6 changed files with 34 additions and 33 deletions

View File

@@ -85,7 +85,9 @@ public sealed class DiskConsoleSystem : EntitySystem
{
totalPoints = server.Points;
}
var canPrint = !HasComp<DiskConsolePrintingComponent>(uid) && totalPoints >= component.PricePerDisk;
var canPrint = !(TryComp<DiskConsolePrintingComponent>(uid, out var printing) && printing.FinishTime >= _timing.CurTime) &&
totalPoints >= component.PricePerDisk;
var state = new DiskConsoleBoundUserInterfaceState(totalPoints, component.PricePerDisk, canPrint);
_ui.TrySetUiState(uid, DiskConsoleUiKey.Key, state);