#pragma once #include "../../entity.hpp" #include "area_manager.hpp" #include "text.hpp" #include namespace game::state::play { class ItemManager { public: static constexpr auto LIMIT = 100; bool isDisabled{}; bool isAutomation{}; std::vector items{}; int heldItemIndex{-1}; int queuedRemoveItemIndex{-1}; int pendingEatItemIndex{-1}; int pendingEatEventID{-1}; int pendingEatAnimationIndex{-1}; glm::vec4 pendingEatRect{}; bool isPendingEatRect{}; bool isEatTextPending{}; bool isEatTextOverCapacity{}; bool isItemHovered{}; bool isItemHoveredPrevious{}; bool isJustItemHoveredStopped{}; bool isItemHeld{}; bool isItemHeldPrevious{}; bool isJustItemHeldStopped{}; bool isJustItemHeld{}; bool isJustItemThrown{}; bool isItemFinished{}; glm::vec2 cursorPositionPrevious{}; glm::vec2 cursorDeltaPrevious{}; std::vector queuedItemIDs{}; std::vector discoveredItemIDs{}; int spawnDelayTicks{}; struct Particle { std::string label{}; glm::vec2 position{}; }; struct Input { bool isImguiCaptureMouse{}; bool isMouseLeftClicked{}; bool isMouseLeftDown{}; bool isMouseLeftReleased{}; bool isMouseRightClicked{}; bool isAutomation{}; int targetItemIndex{-1}; }; std::optional inputOverride{}; std::vector particles{}; int spawn_delay_get(Entity&); bool spawn_possible_get(Entity&); bool spawn_available_get(Entity&); bool spawn_queue(Entity&, int itemID, bool isLimitIgnored = false); bool spawn_queue(Entity&); void update(Entity&, Entity&, AreaManager&, Text&, const glm::vec4& bounds, Canvas&); }; }