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 "Slot.h"
4
5class MerchantContainer;
6class Player;
7class Merchant;
8
9class MerchantResultSlot : public Slot
10{
11private:
12 shared_ptr<MerchantContainer> slots;
13 Player *player;
14 int removeCount;
15 shared_ptr<Merchant> merchant;
16
17public:
18 MerchantResultSlot(Player *player, shared_ptr<Merchant> merchant, shared_ptr<MerchantContainer> slots, int id, int x, int y);
19
20 bool mayPlace(shared_ptr<ItemInstance> item);
21 shared_ptr<ItemInstance> remove(int c);
22
23protected:
24 void onQuickCraft(shared_ptr<ItemInstance> picked, int count);
25 void checkTakeAchievements(shared_ptr<ItemInstance> carried);
26
27public:
28 void onTake(shared_ptr<Player> player, shared_ptr<ItemInstance> carried);
29 virtual bool mayCombine(shared_ptr<ItemInstance> item); // 4J Added
30
31private:
32 bool removePaymentItemsIfMatching(MerchantRecipe *activeRecipe, shared_ptr<ItemInstance> a, shared_ptr<ItemInstance> b);
33};