public interface NPCDataStore
Modifier and Type | Method and Description |
---|---|
void |
clearData(NPC npc)
Clears all data about the given
NPC from storage. |
int |
createUniqueNPCId(NPCRegistry registry) |
void |
loadInto(NPCRegistry registry)
Loads NPCs from disk into the given
NPCRegistry . |
void |
reloadFromSource()
Reloads the data store from source (such as a file on disk).
|
void |
saveToDisk()
Notifies the data store to save all stored data to disk.
|
void |
saveToDiskImmediate()
Notifies the data store to save all stored data to disk immediately.
|
void |
store(NPC npc)
Stores the given
NPC into memory or to a disk representation. |
void |
storeAll(NPCRegistry registry)
Stores all
NPC s in the given NPCRegistry to disk. |
void clearData(NPC npc)
NPC
from storage. Called when the NPC is removed.npc
- The NPC to clear data fromint createUniqueNPCId(NPCRegistry registry)
registry
- The registry for the unique ID.void loadInto(NPCRegistry registry)
NPCRegistry
. The registry should be cleared before this is called.registry
- The NPCRegistry to load NPCs intovoid saveToDisk()
void saveToDiskImmediate()
void store(NPC npc)
NPC
into memory or to a disk representation.npc
- The NPC to storevoid storeAll(NPCRegistry registry)
NPC
s in the given NPCRegistry
to disk.registry
- The registry to store NPCs fromvoid reloadFromSource()
Copyright © 2019. All rights reserved.