Fission FSN
Loading...
Searching...
No Matches
gfCGameInventoryComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCGameInventoryComponent.h
4*
5* Purpose: Store any collected inventory entities
6*
7*********************************************************************/
8
9#ifndef gfCGameInventoryComponenthdr
10#define gfCGameInventoryComponenthdr
11
13
15
16
18{
19 friend class fsCComponentFactory;
20
21public:
22
24
25 static const fsCUniqueId mTypeId;
27
28 fsStr inventoryDataGet() const;
29
30protected:
31
32 // specialised case as inventory needs to be saved across levels
33 void serialiseState();
34 void deserialiseState();
35
36 void listenersDeregisterDo() override;
37 void listenersRegisterDo() override;
38 fsBool messageProcessDo(const fsCUniqueId& pMessageType,
39 const fsIMessageDispatcher::sMessageParameters& pParam) override;
40
41 static fsIComponent* create(fsCEntity* pParent);
42
45
46private:
47
48 void selectionsRecreate(fsStr& pLoadStr);
49
50 fsBool inventoryItemCreate(const fsStr& pEntityName);
51
52 std::vector<fsStr> mInventory;
53};
54
55#endif
Definition fsCEntity.h:39
Definition gfCInventorySlotGui.h:18
Definition fsCUniqueId.h:21
fsIComponent(fsCEntity *pParent)
Definition fsIComponent.cpp:86
fsIMessageListenerComponent(fsCEntity *pParent)
Definition fsIMessageListenerComponent.cpp:9
Definition fsStr.h:23
static const fsStr mInventorySavedDataKey
Definition gfCGameInventoryComponent.h:26
friend class fsCComponentFactory
Definition gfCGameInventoryComponent.h:19
static const fsCUniqueId mInventoryCollectedMsg
Definition gfCGameInventoryComponent.h:23
void serialiseState()
Definition gfCGameInventoryComponent.cpp:34
void listenersDeregisterDo() override
Definition gfCGameInventoryComponent.cpp:58
void listenersRegisterDo() override
Definition gfCGameInventoryComponent.cpp:65
fsBool messageProcessDo(const fsCUniqueId &pMessageType, const fsIMessageDispatcher::sMessageParameters &pParam) override
Definition gfCGameInventoryComponent.cpp:85
static const fsCUniqueId mTypeId
Definition gfCGameInventoryComponent.h:25
fsStr inventoryDataGet() const
Definition gfCGameInventoryComponent.cpp:24
gfCGameInventoryComponent(fsCEntity *pParent)
Definition gfCGameInventoryComponent.cpp:115
virtual ~gfCGameInventoryComponent()
Definition gfCGameInventoryComponent.cpp:120
void deserialiseState()
Definition gfCGameInventoryComponent.cpp:39
static fsIComponent * create(fsCEntity *pParent)
Definition gfCGameInventoryComponent.cpp:108
bool fsBool
Definition fsBaseTypes.h:26
Definition fsIMessageDispatcher.h:32