Make vending machine restocks predicted (and its sound not spammable) (#38609)

* feat: make vending machine restocks predicted

* refactor: VendingMachineRestockComponent cleanup

* refactor: minor simplification

* revert: refactor: minor simplification; load bearing IsFirstTimePredicted

lol second guessed myself

* chore: unneeded VendingMachineSystem dep

* Update Content.Shared/VendingMachines/VendingMachineComponent.cs

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
This commit is contained in:
Perry Fraser
2025-09-11 14:27:54 -04:00
committed by GitHub
parent 77eca4a570
commit fbf65b7f74
5 changed files with 77 additions and 70 deletions

View File

@@ -139,6 +139,12 @@ namespace Content.Shared.VendingMachines
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan NextEmpEject = TimeSpan.Zero;
/// <summary>
/// Audio entity used during restock in case the doafter gets canceled.
/// </summary>
[DataField]
public EntityUid? RestockStream;
#region Client Visuals
/// <summary>
/// RSI state for when the vending machine is unpowered.