aorecomp

Anarchy Online classic in the browser

git clone https://aorecomp.ubeagle.com/code/aorecomp.git


commit bb31bb505463cda3b0b66f06a44625ba6da9aebc
parent fc2a13adf0d2a3d2153b9c94d973b465dbc7567f
Author: anon <anon@example.com>
Date:   Mon, 26 Oct 2026 19:52:37 +0000

Add period-documented Omni-Med clothing shop stock

Bind the seven original fixed-QL designs to Omni clothing terminals using
existing purchase, requirements, equipment and stat-modifier rules. Keep
stock-policy evidence and ordinary earned-income acceptance limits explicit.

Cover purchased wear/removal, duplicate sleeves, laboratory qualification,
rejections, SQL failures and cold recovery. Verify the native purchase and
wear flow with two GPU WASM clients, then restart and account for every
item and credit. Full server, focused/race, gamedata and vet checks pass.

Diffstat:
MTODO.md | 18++++++++++++++++++
Adocs/shop-med-suit.md | 104+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mdocs/shops.md | 6++++++
Mserver/gamedata/shop_stock.yaml | 5+++++
Aserver/shop_med_suit_test.go | 291++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 424 insertions(+), 0 deletions(-)

diff --git a/TODO.md b/TODO.md @@ -49,6 +49,9 @@ and the remaining connected native gameplay regression are the immediate gaps. A normally created Atrox Enforcer has now killed two ordinary Leets, recovered, collected cash, picked up a Monster Part, retained it across a server restart and sold it through the training shop. See [starter progression](docs/starter-progression.md). +Omni clothing terminals now also sell the seven period-documented Omni-Med +designs through shared purchase/wear rules. These useful skill upgrades have +been checked with controlled funds; normal loot funding remains unverified. Quest and mission checkboxes below are still open; they have not been implemented by the shop or dialogue work. @@ -807,6 +810,12 @@ introduction and starting-item gameplay remain open below. endpoint pairs. Keep unsupported effects explicit rather than granting partial bonuses silently. Audit the older Pre-Universe container action-8 fallback against the native action-6 gate. See [clothing](docs/clothing.md). +- [ ] [P2] Audit complete Omni-Med outfit appearance in the WASM client. The + purchase/wear run has correct slots and bonuses, but green arm/leg regions + remain visible alongside white torso/boots. Check original texture categories, + bare skin, both sleeve instances and skirt/trousers on owner and observer, + including cold bootstrap. Captures are in `local/early-shop/runtime/`; do not + infer complete visual fidelity from successful wear notifications alone. - [ ] [P1] Reconstruct the original Arrival Hall and training-ground introduction. Check all three factions' entry/exit flow, authored tutorial NPC identities, dialogues, starter instructions and camera state. Replace training NPC @@ -858,6 +867,15 @@ introduction and starting-item gameplay remain open below. Original terminal bindings keep the opaque OTIM code from leaking Tools entries into Computers. Native purchases preserve each row's template, price, Unique rules and durable identity. +- [x] Add the period-documented Omni-Med suit to original Omni clothing terminal + 99490. All seven fixed-QL designs retain authored prices, slots, access and + skill modifiers through existing generic rules. Test purchased wear/removal, + duplicate sleeves, full-set bonuses, invalid slots, insufficient funds, + faction changes, failed/ignored writes, failed COMMIT and cold recovery. + Native WASM checks cover purchases, both arm slots, alternative designs, + independent sleeve removal and using purchased gloves to qualify for a + laboratory. Controlled funds isolate these rules; the P0 earned-income + purchase above remains open. See [medical clothing stock](docs/shop-med-suit.md). - [ ] [P2] Audit static type-51005 shop Use aliases against full typed identities, templates and positions. Equal numeric IDs can belong to distinct objects: the live-edit scene's 51005:3221226655 is template 43553 at a different diff --git a/docs/shop-med-suit.md b/docs/shop-med-suit.md @@ -0,0 +1,104 @@ +# Omni-Med suit stock + +Original Omni clothing terminal 99490 now exposes the seven authored QL 1 +Omni-Med suit designs. The existing shop, purchase, clothing, requirements and +stat-modifier handlers supply the behavior; there is no suit-specific game +rule or price override. + +## Evidence and scope + +A [May 2002 firsthand implant discussion](https://forums-archive.anarchy-online.com/showthread.php?24492-More-Than-You-Wanted-to-Know-Implants=) +places the suit in Omni supermarkets and explicitly identifies clothing +terminals. The discussion estimates the combined bonus differently in two +posts. The original 14.9.1 records resolve the actual pieces and modifiers: + +| Item | Template | Absolute slot | First Aid / Treatment | Base price | +| --- | ---: | --- | ---: | ---: | +| Gloves | 27381 | 24 | +10 each | 500 | +| Boots | 27382 | 30 | +6 each | 750 | +| Shirt | 27383 | 21 | +20 each | 1500 | +| Skirt | 27384 | 27 | +14 each | 1000 | +| Sleeves | 27385 | 23 or 25 | +14 each | 500 | +| Trousers | 27386 | 27 | +14 each | 750 | +| Female shirt | 27387 | 21 | +20 each | 1500 | + +Each item has native type 51022, ItemType 2, CanWear and a fixed QL of 1. +The authored unconditional Modify functions add stats 123 and 124; native +texture functions supply their appearance. There are no authored wear criteria +restricting faction or sex. Wearing the female design is not prohibited by an +invented server condition. The suit has no armor-class protection. One shirt, +one leg piece, gloves, boots and two separate sleeves give +78 to both skills. +Skirt/trousers and the two shirt designs are alternatives in the same slots. + +Terminal 99490 has an explicit Use requirement Side 33 == 2 and purchase/sale +modifiers 100/6. Follow that target-version criterion even though one period +post describes broader buyer access. Non-Omni characters cannot use this +terminal; the garments themselves remain wearable and transferable. Four +original placements use this template: Omni basic, advanced and superior shop +interiors 1183/1184/1185, and playfield 1887. Other clothing families and the +unresolved QETS startup terminals do not inherit this stock. + +The period account establishes family availability, not a complete inventory +or guaranteed original refresh behavior. Always exposing this small fixed +subset is reconstruction policy, consistent with the other documented fixed +shop entries. Keep complete random stock generation and NPC tailors separate. +All prices come from original stat 74 and the existing terminal/literacy rules. +These are useful skill upgrades, but their 500..1500 base prices do not prove +that the current ordinary loot profile funds them affordably. The normal-play +purchase milestone remains open; no balance values were changed to pay for them. + +## Automated checks + +`server/shop_med_suit_test.go` buys and wears every design, rejects an invalid +head slot, removes the same purchased instance and checks cold recovery. A +single basket buys two distinct sleeves and the standard six-piece set, then +removes only one sleeve. Bonuses are 78 for the set and 64 with one removed. + +A second purchase sequence buys a laboratory and gloves from their actual +terminal catalogs. Bare laboratory use fails without charge loss. Wearing the +purchased gloves grants no health, but enables one heal and a durable cooldown; +a repeated use cannot consume another charge. Raw Treatment stays unchanged. +Failed/ignored placement writes and a failed COMMIT retain purchased ownership +and cash with no worn bonus, and retry wears the same instance. Unfunded, +foreign-faction and eligibility-changed baskets cannot allocate an item or +spend cash. These tests isolate game rules with controlled wallets and location; +they do not complete the normal-earned-income acceptance scenario. + +## Native WASM verification + +Two headed Chromium clients used the GPU/OpenGL renderer. Controlled +wallets and positions placed an Omni buyer and a Clan observer beside the +original basic-shop booths in playfield 1183. No owned items were granted. +The buyer bought the regular 50-charge laboratory for 150, then the gloves +for 500. Bare use was rejected at effective Treatment 6 without charge loss; +the gloves raised both medical skills to 16 and enabled one laboratory use. +An immediate repeat consumed nothing, leaving 49 charges. + +The buyer purchased and wore the standard set, including two distinct sleeve +instances in slots 23 and 25. Native skills showed 84/84, then 70/70 after +removing one sleeve, then 84/84 after replacing that exact instance. The second +sleeve's right-click attempted the already occupied arm; explicit placement in +the other arm succeeded without losing either item. The skirt and female shirt +were then bought and worn, retaining the original trousers and shirt. All seven +designs emitted wear notifications to both clients. The Clan client refused +the terminal locally with the original faction requirement message. + +The final wallet was 2850: 10000 minus the laboratory, standard 4500-credit set, +1000-credit skirt and 1500-credit female shirt. After closing both clients and +restarting the sole server without changing the database, fresh sessions +retained all nine item identities/locations, 49 charges, cash and raw skills. +The native skill window still showed 84/84. No browser exceptions occurred. +Visible white torso/boot changes do not establish complete appearance fidelity: +the final outfit still has green arm/leg regions, which need a separate visual +audit before claiming all textures match the original game. + +The full server suite passed 1364 roots (14508 results). Focused and race +selections each passed 87 roots (3878 results); gamedata and vet also passed. +With only the embedded stock file replaced by its previous version, four new +purchase/wear roots failed and the rejection control passed. This isolates the +new stock binding from existing item rules. Source manifests, wire captures, +screenshots, item accounting and verification reports are in `local/early-shop/`. + +Both clients closed and the two owned characters/nine purchased items were +removed. Unrelated rows and user characters were preserved; foreign-key and +integrity checks passed. One shared HTTPS preview remains available. diff --git a/docs/shops.md b/docs/shops.md @@ -88,6 +88,12 @@ Lock Pick, fixed QL 1, type 51005, price stat 74 equal to 230. | Basic medical supplies | 3 | Treatment Laboratory 25812 | 51005 | 1 | 150 | | Basic medical supplies | 3 | Simple Nano Kit 85366 | 51005 | 1 | 20 | | Basic medical supplies | 3 | Basic Nano Recharger 25820 | 51005 | 1 | 250 | +| Omni clothing | 1 | Seven Omni-Med designs 27381..27387 | 51022 | 1 | 500..1500 | + +The Omni clothing subset follows a May 2002 account and the original seven +garment records. Purchases, two separate sleeves, wear bonuses and laboratory +eligibility use the shared item rules. See [Omni-Med suit stock](shop-med-suit.md) +for the evidence, exact prices and acceptance boundaries. The original Personal Lockpick guide, updated 28 August 2002 and [captured 7 March 2003](https://web.archive.org/web/20030307031410id_/http://home.c2i.net:80/ellusion/gadgets_personallockpick.html), diff --git a/server/gamedata/shop_stock.yaml b/server/gamedata/shop_stock.yaml @@ -42,3 +42,8 @@ 117649: [116683, 116684, 116685, 116692, 116694] 117749: [116683, 116684, 116685, 116692, 116694] 118050: [116683, 116684, 116685, 116692, 116694] + +# Omni clothing: fixed-QL Omni-Med suit pieces. May 2002 clothing-terminal +# accounts establish the family; the original records supply slots and effects. +# See docs/shop-med-suit.md for stock-policy and access evidence boundaries. +99490: [27381, 27382, 27383, 27384, 27385, 27386, 27387] diff --git a/server/shop_med_suit_test.go b/server/shop_med_suit_test.go @@ -0,0 +1,291 @@ +package main + +import ( + "ao/server/gamedata" + "encoding/binary" + "fmt" + "slices" + "testing" +) + +func newMedSuitShopWorld(t *testing.T) (*server, *combatTestConn) { + t.Helper() + world, output := newPurchaseWorld(t) + player := world.characters[1] + // Both authored clothing and medical booths are within use range here. + player.position = [3]float32{184, 5.75, 138} + player.stats.TradeRepair.ComputerLiteracy = 5 + player.inventory.Credits = 5000 + if err := world.saveUser_locked(player); err != nil { + t.Fatal(err) + } + if err := world.savePosition_locked(player); err != nil { + t.Fatal(err) + } + if err := world.saveInventory_locked(player, player.inventory); err != nil { + t.Fatal(err) + } + request := shopUseRequest(2) + binary.BigEndian.PutUint32(request[44:48], 3221619871) + if err := world.handleShopUse(world.clients[1], request); err != nil { + t.Fatal(err) + } + return world, output +} + +func TestShopMedSuitPurchasedPiecesWearAndRecover(t *testing.T) { + for index, scenario := range []struct { + template, slot, price uint32 + bonus int32 + }{ + {27381, 24, 500, 10}, {27382, 30, 750, 6}, {27383, 21, 1500, 20}, + {27384, 27, 1000, 14}, {27385, 23, 500, 14}, {27386, 27, 750, 14}, {27387, 21, 1500, 20}, + } { + t.Run(fmt.Sprint(scenario.template), func(t *testing.T) { + world, _ := newMedSuitShopWorld(t) + player, client := world.characters[1], world.clients[1] + if !slices.Equal(client.shop.stock, []uint32{27381, 27382, 27383, 27384, 27385, 27386, 27387}) { + t.Fatal("original Omni clothing terminal did not expose the fixed suit subset") + } + weapon := player.inventory.Items[0] + + for _, request := range [][]byte{ + shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221619871}, [2]uint32{111, uint32(index)})[20:], + shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:], + } { + if err := world.handleTrade(client, request); err != nil { + t.Fatal(err) + } + } + if err := world.handleInventory(client, inventoryMovePacket(1, 65, 16)[20:]); err != nil { + t.Fatal(err) + } + if client.equipment != nil || len(player.inventory.Items) != 2 || player.inventory.Items[1].Slot != 65 { + t.Fatal("invalid head placement lost the purchased garment") + } + if err := world.handleInventory(client, inventoryMovePacket(1, 65, scenario.slot)[20:]); err != nil || client.equipment == nil { + t.Fatal("purchased garment did not begin wear", err) + } + world.advanceEquipment(client.equipment.readyAt) + cold := newTestInventoryServer(t) + if err := world.handleInventory(client, itemMovePacket(1, scenario.slot, 111)[20:]); err != nil || client.equipment == nil { + t.Fatal("purchased garment could not be removed", err) + } + world.advanceEquipment(client.equipment.readyAt) + removed := newTestInventoryServer(t) + + expected := []ownedItem{weapon, {ID: 2, Type: 51022, Template: scenario.template, Quality: 1, Slot: scenario.slot, Count: 1}} + if !slices.Equal(cold.characters[1].inventory.Items, expected) || cold.characters[1].inventory.Credits != 5000-scenario.price || + cold.characters[1].equipmentBonus(123) != scenario.bonus || cold.characters[1].equipmentBonus(124) != scenario.bonus || + cold.characters[1].equipmentBonus(91) != 0 { + t.Fatal("purchased suit price, type, identity, slot or medical effects changed", cold.characters[1].inventory) + } + expected[1].Slot = 65 + if !slices.Equal(removed.characters[1].inventory.Items, expected) || removed.characters[1].equipmentBonus(123) != 0 || + removed.characters[1].equipmentBonus(124) != 0 || removed.nextItem != 2 { + t.Fatal("removal lost the garment or retained its bonuses") + } + }) + } +} + +func TestShopMedSuitDuplicateSleevesCompleteOneSet(t *testing.T) { + world, _ := newMedSuitShopWorld(t) + player, client := world.characters[1], world.clients[1] + weapon := player.inventory.Items[0] + + for _, index := range []uint32{0, 1, 2, 4, 4, 5} { + if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221619871}, [2]uint32{111, index})[20:]); err != nil { + t.Fatal(err) + } + } + if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:]); err != nil { + t.Fatal(err) + } + for index, slot := range []uint32{24, 30, 21, 23, 25, 27} { + if err := world.handleInventory(client, inventoryMovePacket(1, uint32(65+index), slot)[20:]); err != nil || client.equipment == nil { + t.Fatal("full-set piece did not begin wear", index, err) + } + world.advanceEquipment(client.equipment.readyAt) + } + cold := newTestInventoryServer(t) + if err := world.handleInventory(client, itemMovePacket(1, 23, 111)[20:]); err != nil { + t.Fatal(err) + } + world.advanceEquipment(client.equipment.readyAt) + oneSleeve := newTestInventoryServer(t) + + expected := []ownedItem{weapon, + {ID: 2, Type: 51022, Template: 27381, Quality: 1, Slot: 24, Count: 1}, + {ID: 3, Type: 51022, Template: 27382, Quality: 1, Slot: 30, Count: 1}, + {ID: 4, Type: 51022, Template: 27383, Quality: 1, Slot: 21, Count: 1}, + {ID: 5, Type: 51022, Template: 27385, Quality: 1, Slot: 23, Count: 1}, + {ID: 6, Type: 51022, Template: 27385, Quality: 1, Slot: 25, Count: 1}, + {ID: 7, Type: 51022, Template: 27386, Quality: 1, Slot: 27, Count: 1}, + } + if !slices.Equal(cold.characters[1].inventory.Items, expected) || cold.characters[1].inventory.Credits != 500 || + cold.characters[1].equipmentBonus(123) != 78 || cold.characters[1].equipmentBonus(124) != 78 || cold.nextItem != 7 || + oneSleeve.characters[1].equipmentBonus(123) != 64 || oneSleeve.characters[1].equipmentBonus(124) != 64 { + t.Fatal("duplicate sleeve purchase or independent wear effects changed the full set", cold.characters[1].inventory) + } +} + +func TestShopMedSuitGlovesEnablePurchasedTreatment(t *testing.T) { + world, _ := newMedSuitShopWorld(t) + player, client := world.characters[1], world.clients[1] + player.stats.NanoAiding.Treatment = 0 + player.health, player.nano, player.sitting = 1, 1, true + client.selectedTarget = [2]uint32{50000, 1} + if err := world.saveUser_locked(player); err != nil { + t.Fatal(err) + } + request := shopUseRequest(3) + binary.BigEndian.PutUint32(request[44:48], 3221423263) + if err := world.handleShopUse(client, request); err != nil { + t.Fatal(err) + } + for _, request := range [][]byte{ + shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221423263}, [2]uint32{111, 0})[20:], + shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:], + } { + if err := world.handleTrade(client, request); err != nil { + t.Fatal(err) + } + } + + if err := world.handleOwnedItemUse(client, backpackUseRequest(1, 65, 4)[20:]); err != nil { + t.Fatal(err) + } + if player.health != 1 || player.inventory.Items[1].Count != 50 || !player.skillLocks[124].IsZero() { + t.Fatal("unqualified laboratory use healed, consumed a charge or created a lock") + } + request = shopUseRequest(5) + binary.BigEndian.PutUint32(request[44:48], 3221619871) + if err := world.handleShopUse(client, request); err != nil { + t.Fatal(err) + } + for _, request := range [][]byte{ + shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221619871}, [2]uint32{111, 0})[20:], + shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:], + } { + if err := world.handleTrade(client, request); err != nil { + t.Fatal(err) + } + } + if err := world.handleInventory(client, inventoryMovePacket(1, 66, 24)[20:]); err != nil || client.equipment == nil { + t.Fatal("purchased gloves did not begin wear", err) + } + world.advanceEquipment(client.equipment.readyAt) + if player.health != 1 { + t.Fatal("wearing medical clothing granted free healing") + } + for _, sequence := range []uint32{6, 7} { + if err := world.handleOwnedItemUse(client, backpackUseRequest(1, 65, sequence)[20:]); err != nil { + t.Fatal(err) + } + } + cold := newTestInventoryServer(t).characters[1] + + if cold.health != 31 || cold.inventory.Credits != 4350 || cold.stats.NanoAiding.Treatment != 0 || cold.skillLocks[124].IsZero() || + cold.inventory.Items[1] != (ownedItem{ID: 2, Type: 51005, Template: 25812, Quality: 1, Slot: 65, Count: 49}) || + cold.inventory.Items[2] != (ownedItem{ID: 3, Type: 51022, Template: 27381, Quality: 1, Slot: 24, Count: 1}) || + cold.equipmentBonus(123) != 10 || cold.equipmentBonus(124) != 10 { + t.Fatal("purchased medical equipment did not unlock one durable laboratory use", cold.inventory, cold.health) + } +} + +func TestShopMedSuitFailedWearRetainsPurchasedInstance(t *testing.T) { + for _, failure := range []struct{ name, sql string }{ + {"write", "CREATE TRIGGER fail_med_wear BEFORE INSERT ON item_locations WHEN NEW.slot=24 BEGIN SELECT RAISE(FAIL,'wear'); END"}, + {"ignored write", "CREATE TRIGGER fail_med_wear BEFORE INSERT ON item_locations WHEN NEW.slot=24 BEGIN SELECT RAISE(IGNORE); END"}, + {"commit", "CREATE TABLE pending_med_wear (player_id INTEGER REFERENCES players(id) DEFERRABLE INITIALLY DEFERRED); CREATE TRIGGER fail_med_wear AFTER INSERT ON item_locations WHEN NEW.slot=24 BEGIN INSERT INTO pending_med_wear VALUES(999999); END"}, + } { + t.Run(failure.name, func(t *testing.T) { + world, _ := newMedSuitShopWorld(t) + player, client := world.characters[1], world.clients[1] + for _, request := range [][]byte{ + shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221619871}, [2]uint32{111, 0})[20:], + shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:], + } { + if err := world.handleTrade(client, request); err != nil { + t.Fatal(err) + } + } + before := slices.Clone(player.inventory.Items) + if _, err := world.db.Exec(failure.sql); err != nil { + t.Fatal(err) + } + + if err := world.handleInventory(client, inventoryMovePacket(1, 65, 24)[20:]); err != nil || client.equipment == nil { + t.Fatal("purchased gloves did not begin wear", err) + } + world.advanceEquipment(client.equipment.readyAt) + cold := newTestInventoryServer(t).characters[1] + + if !slices.Equal(player.inventory.Items, before) || !slices.Equal(cold.inventory.Items, before) || + cold.inventory.Credits != 4500 || player.equipmentBonus(124) != 0 || cold.equipmentBonus(124) != 0 { + t.Fatal("failed wear lost purchased clothing, cash or leaked its effect") + } + if _, err := world.db.Exec("DROP TRIGGER fail_med_wear"); err != nil { + t.Fatal(err) + } + if err := world.handleInventory(client, inventoryMovePacket(1, 65, 24)[20:]); err != nil || client.equipment == nil { + t.Fatal("retry did not retain a wearable instance", err) + } + world.advanceEquipment(client.equipment.readyAt) + if player.inventory.Items[1] != (ownedItem{ID: 2, Type: 51022, Template: 27381, Quality: 1, Slot: 24, Count: 1}) || player.equipmentBonus(124) != 10 { + t.Fatal("retry changed the purchased identity or duplicated the bonus") + } + }) + } +} + +func TestShopMedSuitRejectsUnfundedAndForeignPurchases(t *testing.T) { + for _, scenario := range []string{"poor", "neutral", "clan", "changed faction"} { + t.Run(scenario, func(t *testing.T) { + world, _ := newMedSuitShopWorld(t) + player, client := world.characters[1], world.clients[1] + before := slices.Clone(player.inventory.Items) + if scenario == "poor" { + player.inventory.Credits = 499 + if err := world.saveInventory_locked(player, player.inventory); err != nil { + t.Fatal(err) + } + } + if scenario == "changed faction" { + if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221619871}, [2]uint32{111, 0})[20:]); err != nil { + t.Fatal(err) + } + } + appearance := unpackAppearance(player.appearance) + if scenario == "neutral" { + appearance.Side = 0 + } else if scenario == "clan" || scenario == "changed faction" { + appearance.Side = 1 + } + player.appearance = appearance.packed() + + if scenario != "changed faction" { + if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 4, [2]uint32{51035, 3221619871}, [2]uint32{111, 0})[20:]); err != nil { + t.Fatal(err) + } + } + if err := world.handleTrade(client, shopTradePacket([2]uint32{50000, 1}, 1, [2]uint32{}, [2]uint32{})[20:]); err != nil { + t.Fatal(err) + } + + credits := uint32(5000) + if scenario == "poor" { + credits = 499 + } + if !slices.Equal(player.inventory.Items, before) || player.inventory.Credits != credits || world.nextItem != 1 || client.shop != nil { + t.Fatal("rejected clothing purchase changed ownership, cash or allocation") + } + }) + } + for _, template := range []uint32{99526, 99637, 100034, 100035, 99643} { + if slices.Contains(gamedata.ShopStock[template], 27381) { + t.Fatal("Omni clothing subset leaked into another terminal", template) + } + } +}