osb/source/game/items/StarUnlockItem.hpp

33 lines
735 B
C++
Raw Normal View History

#pragma once
2023-06-20 04:33:09 +00:00
#include "StarItem.hpp"
#include "StarWorld.hpp"
#include "StarSwingableItem.hpp"
#include "StarPreviewableItem.hpp"
namespace Star {
STAR_CLASS(UnlockItem);
class UnlockItem : public Item, public SwingableItem, public PreviewableItem {
public:
UnlockItem(Json const& config, String const& directory, Json const& itemParameters = JsonObject());
ItemPtr clone() const override;
List<Drawable> drawables() const override;
List<Drawable> preview(PlayerPtr const& viewer = {}) const override;
protected:
void fireTriggered() override;
private:
Maybe<String> m_sectorUnlock;
Maybe<String> m_tierRecipesUnlock;
Maybe<unsigned> m_shipUpgrade;
String m_unlockMessage;
List<Drawable> m_drawables;
};
}