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>
22 lines
597 B
C#
22 lines
597 B
C#
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));
|
|
|
|
}
|