v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
41
source/game/StarPlayerCodexes.hpp
Normal file
41
source/game/StarPlayerCodexes.hpp
Normal file
|
@ -0,0 +1,41 @@
|
|||
#ifndef STAR_PLAYER_CODEXES_HPP
|
||||
#define STAR_PLAYER_CODEXES_HPP
|
||||
|
||||
#include "StarUuid.hpp"
|
||||
#include "StarJson.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(Codex);
|
||||
STAR_STRUCT(CodexEntry);
|
||||
STAR_CLASS(UniverseClient);
|
||||
|
||||
class PlayerCodexes {
|
||||
public:
|
||||
typedef pair<CodexConstPtr, bool> CodexEntry;
|
||||
|
||||
PlayerCodexes(Json const& json = {});
|
||||
|
||||
Json toJson() const;
|
||||
|
||||
List<CodexEntry> codexes() const;
|
||||
|
||||
bool codexKnown(String const& codexId) const;
|
||||
CodexConstPtr learnCodex(String const& codexId, bool markRead = false);
|
||||
|
||||
bool codexRead(String const& codexId) const;
|
||||
bool markCodexRead(String const& codexId);
|
||||
bool markCodexUnread(String const& codexId);
|
||||
|
||||
void learnInitialCodexes(String const& playerSpecies);
|
||||
|
||||
CodexConstPtr firstNewCodex() const;
|
||||
|
||||
private:
|
||||
StringMap<CodexEntry> m_codexes;
|
||||
};
|
||||
|
||||
typedef shared_ptr<PlayerCodexes> PlayerCodexesPtr;
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue