AlpacaLibrary/Include/Game/Interfaces/Bank.hpp

120 lines
4.7 KiB
C++
Raw Normal View History

2017-12-25 23:49:48 +00:00
#ifndef BANK_HPP_INCLUDED
#define BANK_HPP_INCLUDED
#include "../../Core/Types/Convex.hpp"
2018-06-28 02:22:43 +00:00
#include "../../Game/Interactable/Item.hpp"
#include <functional>
2017-12-25 23:49:48 +00:00
#include <string>
#include <cstdint>
#include <vector>
/** @addtogroup Interfaces
2018-06-28 02:22:43 +00:00
* @{
2017-12-25 23:49:48 +00:00
*/
class Bank
{
public:
2018-04-16 03:53:24 +00:00
2018-06-28 02:22:43 +00:00
enum BANK_AMOUNT
{
ALL = -1,
ALL_BUT_ONE = 0
};
2018-04-16 03:53:24 +00:00
typedef enum WITHDRAW_MODE
{
ITEM,
NOTED
} WITHDRAW_MODE;
2018-06-28 02:22:43 +00:00
typedef enum PIN_STEP
{
FIRST,
SECOND,
THIRD,
FOURTH,
SUBMITTING,
TOO_MANY_ATTEMPTS,
BANK_OPEN
} PIN_STEP;
2017-12-25 23:49:48 +00:00
static bool IsOpen();
2018-08-30 03:04:03 +00:00
static bool Close(bool AllowEsc = true);
2017-12-25 23:49:48 +00:00
static std::vector<std::int32_t> GetItemIDs();
static std::vector<std::string> GetItemNames();
static std::vector<std::int32_t> GetItemAmounts();
2018-06-28 02:22:43 +00:00
static std::vector<Interactable::Item> GetItems();
static std::vector<Interactable::Item> GetItems(std::int32_t ID);
static std::vector<Interactable::Item> GetItems(const std::string& Name);
static std::vector<Interactable::Item> GetItems(const std::vector<std::int32_t>& IDs);
static std::vector<Interactable::Item> GetItems(const std::vector<std::string>& Names);
static std::vector<Interactable::Item> GetItems(const std::function<bool (const Interactable::Item&)>& Filter);
static Interactable::Item GetItem(std::int32_t ID);
static Interactable::Item GetItem(const std::string& Name);
static Interactable::Item GetItem(const std::vector<std::int32_t>& IDs);
static Interactable::Item GetItem(const std::vector<std::string>& Names);
static Interactable::Item GetItem(const std::function<bool (const Interactable::Item&)>& Filter);
static std::int32_t Count(std::int32_t ID);
static std::int32_t Count(const std::string& Name);
static std::int32_t Count(const Interactable::Item& Item);
2017-12-25 23:49:48 +00:00
static std::int32_t GetIndexOf(std::int32_t ID);
static std::int32_t GetIndexOf(const std::string& Name);
static bool Contains(std::int32_t ID);
static bool Contains(const std::string& Name);
2018-06-28 02:22:43 +00:00
static bool Contains(const Interactable::Item& Item);
static bool Contains(const std::vector<std::int32_t>& IDs); // true if all items are found at least once
static bool Contains(const std::vector<std::string>& Names); // true if all items are found at least once
static bool Contains(const std::vector<Interactable::Item>& Items);
2017-12-25 23:49:48 +00:00
2018-01-18 02:45:28 +00:00
static bool ContainsAny(const std::vector<std::int32_t>& IDs);
static bool ContainsAny(const std::vector<std::string>& Names);
2018-06-28 02:22:43 +00:00
static bool ContainsAny(const std::vector<Interactable::Item>& Items);
2018-01-18 02:45:28 +00:00
2017-12-25 23:49:48 +00:00
static std::int32_t GetCurrentTab();
static std::int32_t GetTabOf(std::int32_t ID);
static std::int32_t GetTabOf(const std::string& Name);
2018-06-28 02:22:43 +00:00
static std::int32_t GetTabOf(const Interactable::Item& Item);
2017-12-25 23:49:48 +00:00
static bool OpenTab(std::int32_t Tab);
2018-05-10 14:03:33 +00:00
static bool ScrollTo(std::int32_t ID, bool OpenRespectiveTab = false);
static bool ScrollTo(const std::string& Name, bool OpenRespectiveTab = false);
2018-06-28 02:22:43 +00:00
static bool ScrollTo(const Interactable::Item& Item, bool OpenRespectiveTab = false);
// -1 = all, 0 = all-but-one
static bool Withdraw(std::int32_t ID, std::int32_t Amount, bool OpenRespectiveTab = false);
static bool Withdraw(const std::string& Name, std::int32_t Amount, bool OpenRespectiveTab = false);
static bool Withdraw(const Interactable::Item& Item, std::int32_t Amount, bool OpenRespectiveTab = false);
// -1 = all
static bool Deposit(std::int32_t ID, std::int32_t Amount);
static bool Deposit(const std::string& Name, std::int32_t Amount);
static bool Deposit(const Interactable::Item& Item, std::int32_t Amount);
2017-12-25 23:49:48 +00:00
2018-04-14 01:05:35 +00:00
static bool DepositAllExcept(std::int32_t ID);
2018-06-28 02:22:43 +00:00
static bool DepositAllExcept(const std::string& Name);
static bool DepositAllExcept(const Interactable::Item& Item);
2018-05-10 01:08:38 +00:00
static bool DepositAllExcept(const std::vector<std::int32_t>& IDs);
2018-06-28 02:22:43 +00:00
static bool DepositAllExcept(const std::vector<std::string>& Names);
static bool DepositAllExcept(const std::vector<Interactable::Item>& Items);
2018-05-10 01:08:38 +00:00
2017-12-25 23:49:48 +00:00
static bool DepositAll();
static bool DepositEquipment();
2018-04-16 03:53:24 +00:00
static WITHDRAW_MODE GetWithdrawMode();
2018-05-10 01:08:38 +00:00
static bool SetWithdrawMode(WITHDRAW_MODE Mode);
2018-06-28 02:22:43 +00:00
static PIN_STEP GetEnterPinStep();
static bool IsEnterPinOpen();
static bool EnterPin(bool Terminate = true);
2017-12-25 23:49:48 +00:00
};
/** @} */
#endif // BANK_HPP_INCLUDED