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
|
|
@ -5,6 +5,24 @@ namespace AcDream.App.Tests.UI;
|
|||
|
||||
public class UiItemListTests
|
||||
{
|
||||
[Fact]
|
||||
public void CooldownPresentation_propagates_to_existing_and_future_cells()
|
||||
{
|
||||
var list = new UiItemList();
|
||||
uint[] sprites = Enumerable.Range(1, 10).Select(i => (uint)i).ToArray();
|
||||
Func<uint, int> provider = _ => 7;
|
||||
|
||||
list.CooldownSprites = sprites;
|
||||
list.CooldownStepProvider = provider;
|
||||
var future = new UiItemSlot();
|
||||
list.AddItem(future);
|
||||
|
||||
Assert.Same(sprites, list.Cell.CooldownSprites);
|
||||
Assert.Same(provider, list.Cell.CooldownStepProvider);
|
||||
Assert.Same(sprites, future.CooldownSprites);
|
||||
Assert.Same(provider, future.CooldownStepProvider);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void IsLeafWidget() => Assert.True(new UiItemList().ConsumesDatChildren);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue