the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
1#pragma once
2
3#include "Container.h"
4#include "ArrayWithLength.h"
5
6class Merchant;
7class Player;
8class MerchantRecipe;
9
10class MerchantContainer : public Container
11{
12private:
13 shared_ptr<Merchant> merchant;
14 ItemInstanceArray items;
15 shared_ptr<Player> player;
16 MerchantRecipe *activeRecipe;
17 int selectionHint;
18
19public:
20 MerchantContainer(shared_ptr<Player> player, shared_ptr<Merchant> villager);
21 ~MerchantContainer();
22
23 unsigned int getContainerSize();
24 shared_ptr<ItemInstance> getItem(unsigned int slot);
25 shared_ptr<ItemInstance> removeItem(unsigned int slot, int count);
26
27private:
28 bool isPaymentSlot(int slot);
29
30public:
31 shared_ptr<ItemInstance> removeItemNoUpdate(int slot);
32 void setItem(unsigned int slot, shared_ptr<ItemInstance> item);
33 wstring getName();
34 wstring getCustomName();
35 bool hasCustomName();
36 int getMaxStackSize() const;
37 bool stillValid(shared_ptr<Player> player);
38 void startOpen();
39 void stopOpen();
40 bool canPlaceItem(int slot, shared_ptr<ItemInstance> item);
41 void setChanged();
42 void updateSellItem();
43 MerchantRecipe *getActiveRecipe();
44 void setSelectionHint(int selectionHint);
45};