Crossfire Server, Trunk
|
#include <ResourcesManager.h>
Public Slots | |
void | archetypeModified (archetype *arch) |
void | generalMessageModified (GeneralMessage *message) |
void | questModified (quest_definition *quest) |
void | saveArchetypes () |
void | saveArtifacts () |
void | saveGeneralMessages () |
void | saveQuests () |
void | saveTreasures () |
void | treasureModified (treasurelist *treasure) |
Public Member Functions | |
std::vector< std::string > | archetypeFiles () const |
virtual void | assetDefined (const Animations *asset, const std::string &filename) override |
virtual void | assetDefined (const archetype *arch, const std::string &filename) override |
virtual void | assetDefined (const artifact *asset, const std::string &filename) override |
virtual void | assetDefined (const Face *asset, const std::string &filename) override |
virtual void | assetDefined (const GeneralMessage *asset, const std::string &filename) override |
virtual void | assetDefined (const quest_definition *asset, const std::string &filename) override |
virtual void | assetDefined (const treasurelist *asset, const std::string &filename) override |
CREMapInformationManager * | getMapInformationManager () |
const recipe * | getRecipe (int ingredients, const QString &name) const |
bool | hasPendingChanges () const |
LicenseManager * | licenseManager () |
void | load () |
std::string | originOf (const archetype *arch) const |
std::string | originOf (const artifact *art) const |
std::string | originOf (const Face *face) const |
std::string | originOfQuest (const quest_definition *quest) const |
const std::map< std::string, std::set< const archetype * > > & | origins () const |
std::vector< std::string > | questFiles () const |
const std::map< std::string, std::set< const quest_definition * > > & | questOrigins () const |
int | recipeMaxIngredients () const |
QStringList | recipes (int count) const |
void | remove (treasure *tr) |
ResourcesManager () | |
void | setMapInformationManager (CREMapInformationManager *mapInformationManager) |
AssetWrapper * | wrap (Animations *anim, AssetWrapper *parent) |
ArchetypeWrapper * | wrap (archetype *arch, AssetWrapper *parent) |
AssetWrapper * | wrap (artifact *art, AssetWrapper *parent) |
AssetWrapper * | wrap (artifactlist *al, AssetWrapper *parent) |
AssetWrapper * | wrap (Face *face, AssetWrapper *parent) |
AssetWrapper * | wrap (face_sets *fs, AssetWrapper *parent) |
AssetWrapper * | wrap (GeneralMessage *message, AssetWrapper *parent) |
ObjectWrapper * | wrap (object *ob, AssetWrapper *parent) |
AssetWrapper * | wrap (quest_definition *quest, AssetWrapper *parent) |
AssetWrapper * | wrap (quest_step_definition *step, AssetWrapper *parent) |
AssetWrapper * | wrap (recipe *rc, AssetWrapper *parent) |
AssetWrapper * | wrap (recipelist *list, AssetWrapper *parent) |
AssetWrapper * | wrap (region *reg, AssetWrapper *parent) |
AssetWrapper * | wrap (treasure *tr, AssetWrapper *parent) |
AssetWrapper * | wrap (treasurelist *tr, AssetWrapper *parent) |
virtual | ~ResourcesManager () |
Static Public Member Functions | |
static void | archetypeUse (const archetype *item, CREMapInformationManager *store, AssetUseCallback callback) |
Additional Inherited Members |
Class managing all assets, tracking in which file they are, which are modified, and such.
Definition at line 80 of file ResourcesManager.h.
ResourcesManager::ResourcesManager | ( | ) |
Definition at line 44 of file ResourcesManager.cpp.
|
virtual |
Definition at line 49 of file ResourcesManager.cpp.
|
inline |
Definition at line 111 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::files(), and myArchetypes.
Referenced by ArchetypesWrapper::addArchetype().
|
slot |
Definition at line 214 of file ResourcesManager.cpp.
References archininventory::arch, ModifiedAssetsManager< T >::assetModified(), and myArchetypes.
Referenced by ArchetypesWrapper::addArchetype(), and ArchetypeWrapper::wasModified().
|
static |
Definition at line 138 of file ResourcesManager.cpp.
References archininventory::arch, AssetsManager::archetypes(), AssetsCollection< T, Key >::each(), getManager(), if(), guildoracle::list, object_get_value(), sstring, Floor::t, and AssetsManager::treasures().
Referenced by CREMainWindow::onReportArchetypes().
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 107 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myAnimations.
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 101 of file ResourcesManager.h.
References archininventory::arch, ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myArchetypes.
Referenced by ArchetypesWrapper::addArchetype(), and QuestsWrapper::addQuest().
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 105 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myArtifacts.
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 106 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myFaces.
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 104 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myGeneralMessages.
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 102 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myQuests.
|
inlineoverridevirtual |
Function called when an asset is defined in a file. It may be called multiple times with the same asset.
asset | asset which is defined. |
filename | full pathname of where the asset was defined. |
Reimplemented from AssetsTracker.
Definition at line 103 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetDefined(), npc_dialog::filename, and myTreasures.
|
slot |
Definition at line 257 of file ResourcesManager.cpp.
References ModifiedAssetsManager< T >::assetModified(), and myGeneralMessages.
Referenced by GeneralMessageWrapper::wasModified().
|
inline |
Definition at line 91 of file ResourcesManager.h.
References myMapInformationManager.
Referenced by AllAssets::AllAssets(), RegionWrapper::mapAdded(), CREMainWindow::onReportResetGroups(), and RegionWrapper::RegionWrapper().
const recipe * ResourcesManager::getRecipe | ( | int | ingredients, |
const QString & | name | ||
) | const |
Definition at line 130 of file ResourcesManager.cpp.
References myRecipes, and give::name.
|
inline |
Definition at line 122 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::hasPendingChanges(), myArchetypes, myArtifacts, myGeneralMessages, myQuests, and myTreasures.
Referenced by CREMainWindow::closeEvent().
|
inline |
Definition at line 153 of file ResourcesManager.h.
References myLicenseManager.
Referenced by CREResourcesWindow::CREResourcesWindow(), CREMainWindow::onReportLicenses(), CREMainWindow::onToolReloadAssets(), and CREFacePanel::updateItem().
void ResourcesManager::load | ( | ) |
Definition at line 57 of file ResourcesManager.cpp.
References Settings::add_hook(), add_server_collect_hooks(), Settings::assets_tracker, buf, Settings::fatal_hook, npc_dialog::filename, get_formulalist(), Settings::ignore_assets_errors, init_globals(), init_gods(), init_library(), init_readable(), castle_read::key, banquet::l, guildoracle::list, llevError, llevInfo, log_born::log, Settings::log_callback, loglevel_names, navar-midane_pickup::msg, myLicenseManager, myRecipes, onFatalInit(), LicenseManager::readLicense(), recipes(), settings, and nlohmann::detail::void().
Referenced by CREMainWindow::CREMainWindow().
|
inline |
Definition at line 110 of file ResourcesManager.h.
References archininventory::arch, myArchetypes, and ModifiedAssetsManager< T >::originOf().
Referenced by ArchetypeWrapper::setRaw(), ArtifactPanel::updateItem(), and CREFacePanel::updateItem().
|
inline |
Definition at line 120 of file ResourcesManager.h.
References myArtifacts, and ModifiedAssetsManager< T >::originOf().
|
inline |
Definition at line 119 of file ResourcesManager.h.
References myFaces, and ModifiedAssetsManager< T >::originOf().
|
inline |
Definition at line 114 of file ResourcesManager.h.
References myQuests, and ModifiedAssetsManager< T >::originOf().
|
inline |
Definition at line 109 of file ResourcesManager.h.
References myArchetypes, and ModifiedAssetsManager< T >::origins().
Referenced by saveTreasures().
|
inline |
Definition at line 115 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::files(), and myQuests.
Referenced by QuestsWrapper::addQuest().
|
slot |
Definition at line 222 of file ResourcesManager.cpp.
References ModifiedAssetsManager< T >::assetModified(), and myQuests.
Referenced by QuestsWrapper::addQuest(), and QuestWrapper::wasModified().
|
inline |
Definition at line 113 of file ResourcesManager.h.
References myQuests, and ModifiedAssetsManager< T >::origins().
int ResourcesManager::recipeMaxIngredients | ( | ) | const |
Definition at line 115 of file ResourcesManager.cpp.
References myRecipes.
Referenced by RecipesWrapper::childrenCount().
QStringList ResourcesManager::recipes | ( | int | count | ) | const |
Definition at line 120 of file ResourcesManager.cpp.
References disinfect::count, hall_of_fame::keys, and myRecipes.
Referenced by load().
|
inline |
Definition at line 151 of file ResourcesManager.h.
References myWrappedTreasures, and AssetWrapperManager< A, W >::remove().
Referenced by TreasureWrapper::doRemoveChild(), and TreasureListWrapper::removeChild().
|
slot |
Definition at line 218 of file ResourcesManager.cpp.
References myArchetypes, and ModifiedAssetsManager< T >::saveModifiedAssets().
Referenced by CREMainWindow::createMenus().
|
slot |
Definition at line 265 of file ResourcesManager.cpp.
References myArtifacts, and ModifiedAssetsManager< T >::saveModifiedAssets().
Referenced by CREMainWindow::createMenus().
|
slot |
Definition at line 261 of file ResourcesManager.cpp.
References myGeneralMessages, and ModifiedAssetsManager< T >::saveModifiedAssets().
Referenced by CREMainWindow::createMenus().
|
slot |
Definition at line 226 of file ResourcesManager.cpp.
References myQuests, and ModifiedAssetsManager< T >::saveModifiedAssets().
Referenced by CREMainWindow::onSaveQuests().
|
slot |
Definition at line 234 of file ResourcesManager.cpp.
References ModifiedAssetsManager< T >::assetDefined(), AssetOriginAndCreationDialog::DefineOrigin, ModifiedAssetsManager< T >::dirtyAssetsWithNoOrigin(), AssetOriginAndCreationDialog::file(), ModifiedAssetsManager< T >::files(), guildoracle::list, myTreasures, origins(), ModifiedAssetsManager< T >::saveModifiedAssets(), and AssetOriginAndCreationDialog::Treasure.
Referenced by CREMainWindow::createMenus().
|
inline |
Definition at line 88 of file ResourcesManager.h.
References myMapInformationManager.
Referenced by CREMainWindow::CREMainWindow().
|
slot |
Definition at line 230 of file ResourcesManager.cpp.
References ModifiedAssetsManager< T >::assetModified(), and myTreasures.
Referenced by TreasureListWrapper::wasModified().
|
inline |
Definition at line 135 of file ResourcesManager.h.
References animate::anim, myWrappedAnimations, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 132 of file ResourcesManager.h.
References archininventory::arch, myWrappedArchetypes, and AssetWrapperManager< A, W >::wrap().
Referenced by ArchetypesWrapper::addArchetype(), QuestsWrapper::addQuest(), AssetsCollectionWrapper< Animations >::AssetsCollectionWrapper(), RecipeListWrapper::child(), ArtifactsWrapper::child(), RecipesWrapper::child(), ArtifactListWrapper::child(), ArchetypeWrapper::child(), TreasureListWrapper::child(), QuestWrapper::child(), RecipeListWrapper::childIndex(), RecipesWrapper::childIndex(), ArtifactsWrapper::childIndex(), ArtifactListWrapper::childIndex(), ArchetypeWrapper::childIndex(), TreasureListWrapper::childIndex(), QuestWrapper::childIndex(), CREMainWindow::mapAdded(), RegionsWrapper::RegionsWrapper(), and TreasureYesNo::TreasureYesNo().
|
inline |
Definition at line 144 of file ResourcesManager.h.
References ModifiedAssetsManager< T >::assetModified(), AssetWrapper::modified(), myArtifacts, myWrappedArtifacts, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 143 of file ResourcesManager.h.
References myWrappedArtifactLists, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 134 of file ResourcesManager.h.
References myWrappedFaces, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 139 of file ResourcesManager.h.
References myWrappedFacesets, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 140 of file ResourcesManager.h.
References diamondslots::message, myWrappedMessages, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 133 of file ResourcesManager.h.
References myWrappedObjects, guildjoin::ob, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 141 of file ResourcesManager.h.
References myWrappedQuests, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 142 of file ResourcesManager.h.
References myWrappedQuestSteps, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 150 of file ResourcesManager.h.
References myWrappedRecipes, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 149 of file ResourcesManager.h.
References guildoracle::list, myWrappedRecipeLists, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 138 of file ResourcesManager.h.
References myWrappedRegions, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 137 of file ResourcesManager.h.
References myWrappedTreasures, and AssetWrapperManager< A, W >::wrap().
|
inline |
Definition at line 136 of file ResourcesManager.h.
References myWrappedTreasureLists, and AssetWrapperManager< A, W >::wrap().
|
protected |
Definition at line 175 of file ResourcesManager.h.
Referenced by assetDefined().
|
protected |
Definition at line 169 of file ResourcesManager.h.
Referenced by archetypeFiles(), archetypeModified(), assetDefined(), hasPendingChanges(), originOf(), origins(), and saveArchetypes().
|
protected |
Definition at line 173 of file ResourcesManager.h.
Referenced by assetDefined(), hasPendingChanges(), originOf(), saveArtifacts(), and wrap().
|
protected |
Definition at line 174 of file ResourcesManager.h.
Referenced by assetDefined(), and originOf().
|
protected |
Definition at line 172 of file ResourcesManager.h.
Referenced by assetDefined(), generalMessageModified(), hasPendingChanges(), and saveGeneralMessages().
|
protected |
Definition at line 191 of file ResourcesManager.h.
Referenced by licenseManager(), and load().
|
protected |
Definition at line 167 of file ResourcesManager.h.
Referenced by getMapInformationManager(), and setMapInformationManager().
|
protected |
Definition at line 170 of file ResourcesManager.h.
Referenced by assetDefined(), hasPendingChanges(), originOfQuest(), questFiles(), questModified(), questOrigins(), and saveQuests().
|
protected |
Definition at line 168 of file ResourcesManager.h.
Referenced by getRecipe(), load(), recipeMaxIngredients(), and recipes().
|
protected |
Definition at line 171 of file ResourcesManager.h.
Referenced by assetDefined(), hasPendingChanges(), saveTreasures(), and treasureModified().
|
protected |
Definition at line 179 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 176 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 187 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 188 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 178 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 183 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 184 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 177 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 185 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 186 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 189 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 190 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 182 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 180 of file ResourcesManager.h.
Referenced by wrap().
|
protected |
Definition at line 181 of file ResourcesManager.h.