feat(items): port retail shared cooldown overlays
Preserve public shared-cooldown metadata, resolve the authoritative cooldown enchantment with retail expiry semantics, and project the exact ten DAT-authored radial steps through the shared retained item-slot architecture. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
19e8863f4e
commit
6b1ae4fb76
27 changed files with 875 additions and 20 deletions
22
tests/AcDream.Core.Tests/Items/ItemCooldownDisplayTests.cs
Normal file
22
tests/AcDream.Core.Tests/Items/ItemCooldownDisplayTests.cs
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
using AcDream.Core.Items;
|
||||
namespace AcDream.Core.Tests.Items;
|
||||
|
||||
public sealed class ItemCooldownDisplayTests
|
||||
{
|
||||
[Theory]
|
||||
[InlineData(10.0, 10.0, 10)]
|
||||
[InlineData(10.0, 9.0, 10)]
|
||||
[InlineData(10.0, 8.999, 9)]
|
||||
[InlineData(10.0, 5.0, 6)]
|
||||
[InlineData(10.0, 0.001, 1)]
|
||||
[InlineData(10.0, 0.0, 0)]
|
||||
[InlineData(0.0, 5.0, 0)]
|
||||
public void GetOverlayStep_matches_retail_truncation(
|
||||
double duration,
|
||||
double remaining,
|
||||
int expected)
|
||||
=> Assert.Equal(
|
||||
expected,
|
||||
ItemCooldownDisplay.GetOverlayStep(duration, remaining));
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue