Expand UseDelay to support multiple delays per entity; fix bible healing and bag pickup (#27234)

* Upgraded UseDelay to support multiple delays per entity

* Implement secondary delay for bibles.
Also some improvements to make it work nicely.

* Documentation is good

* Reserve the previous change; now Storage uses the special ID and Bible uses the default.

* .0

* Added VV support to UseDelayInfo

* Serialize better

* No register, just setlength
This commit is contained in:
Tayrtahn
2024-04-25 22:25:52 -04:00
committed by GitHub
parent 0aee198adf
commit b292905216
7 changed files with 193 additions and 62 deletions

View File

@@ -57,6 +57,19 @@ namespace Content.Shared.Storage
[DataField]
public bool QuickInsert; // Can insert storables by clicking them with the storage entity
/// <summary>
/// Minimum delay between quick/area insert actions.
/// </summary>
/// <remarks>Used to prevent autoclickers spamming server with individual pickup actions.</remarks>
public TimeSpan QuickInsertCooldown = TimeSpan.FromSeconds(0.5);
/// <summary>
/// Minimum delay between UI open actions.
/// <remarks>Used to spamming opening sounds.</remarks>
/// </summary>
[DataField]
public TimeSpan OpenUiCooldown = TimeSpan.Zero;
[DataField]
public bool ClickInsert = true; // Can insert stuff by clicking the storage entity with it