aboutsummaryrefslogtreecommitdiff
path: root/internal/game/inventory_pickup_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/inventory_pickup_test.go')
-rw-r--r--internal/game/inventory_pickup_test.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/internal/game/inventory_pickup_test.go b/internal/game/inventory_pickup_test.go
index 2fc89b7..0492339 100644
--- a/internal/game/inventory_pickup_test.go
+++ b/internal/game/inventory_pickup_test.go
@@ -17,7 +17,8 @@ func TestPickupMergesIntoFullInventory(t *testing.T) {
h.seedAccount("alice")
p := h.seedCharacter("alice", "alice")
writeSeedFile(t, filepath.Join(h.dir, "items", "chips.yaml"), []byte("id: chips\nname: chips\nstackable: true\n"))
- sess := &net.Session{Conn: newChanConn(), Player: p, State: net.StateGame}
+ sess := &net.Session{Conn: newChanConn(), Player: p}
+ sess.SetState(net.StateGame)
h.g.RunOnOwner(func() {
h.g.ItemStore.Reload(h.dir)
for i := 0; i < 28; i++ {
@@ -37,7 +38,8 @@ func TestPickupFullInventoryWithoutStackStillRefused(t *testing.T) {
h.seedAccount("alice")
p := h.seedCharacter("alice", "alice")
writeSeedFile(t, filepath.Join(h.dir, "items", "chips.yaml"), []byte("id: chips\nname: chips\nstackable: true\n"))
- sess := &net.Session{Conn: newChanConn(), Player: p, State: net.StateGame}
+ sess := &net.Session{Conn: newChanConn(), Player: p}
+ sess.SetState(net.StateGame)
h.g.RunOnOwner(func() {
h.g.ItemStore.Reload(h.dir)
for i := 0; i < 28; i++ {