Paradaux

PAR-310

0

Remove the AdminInventory fake-Inventory; model unlimited admin shops explicitly

Pending ReleaseNormalUnassignedChestShopImprovement

AdminInventory was a 38-method Inventory implementation faking an infinite container so the real-shop trade code could be reused for unlimited admin shops — a naive shoehorn. Removed it and modelled the special case honestly: a unlimitedOwner flag (= admin shop && (no chest || FORCE_UNLIMITED_ADMIN_SHOP)) on the PendingTransaction/Transaction context. The owner side of stock/space validation is skipped when unlimited, and the goods move client-side only (buy spawns the stock into the client, sell vanishes it) via a new moveUnlimited() with the same snapshot/restore atomicity as transferItems. Deleted ChestShopSign.isAdminShop(Inventory) (the instanceof) — its two callers mapped exactly to unlimitedOwner (one was a redundant check in deleteEmptyShop, which already returns early for admin shops). isOwnerEconomicallyActive now takes the boolean. Verified: AdminShopTest (buy/sell) + ForceUnlimitedAdminShopTest all green.

Resources

Comments

No comments yet.

Activity

  • tesks changed status to Status → Pending Release
  • ParadauxIO linked a commit — Commit d9931e3 — Remove the AdminInventory fake-Inventory; model unlimited admin shops explicitly (PAR-310)
  • tesks created the issue