diff options
| author | Petr Mrázek | 2011-11-03 20:16:37 +0100 |
|---|---|---|
| committer | Petr Mrázek | 2011-11-03 20:16:37 +0100 |
| commit | b1b1414ab7b46d9c408c9bdb1c561ee3684d86ed (patch) | |
| tree | ffc2ba66bbcb29aba2d7bc0b76de08c1b51f74f7 /ContentLoader.cpp | |
| parent | afea122f225b309f1c7052766ff491c213cc421a (diff) | |
| download | stonesense-b1b1414ab7b46d9c408c9bdb1c561ee3684d86ed.tar.gz stonesense-b1b1414ab7b46d9c408c9bdb1c561ee3684d86ed.tar.bz2 stonesense-b1b1414ab7b46d9c408c9bdb1c561ee3684d86ed.tar.xz | |
Fix stonesense (changes in materials module)
Diffstat (limited to 'ContentLoader.cpp')
| -rw-r--r-- | ContentLoader.cpp | 44 |
1 files changed, 5 insertions, 39 deletions
diff --git a/ContentLoader.cpp b/ContentLoader.cpp index f891211..6493928 100644 --- a/ContentLoader.cpp +++ b/ContentLoader.cpp @@ -112,54 +112,22 @@ bool ContentLoader::Load( DFHack::Core& DF){ }
if(!config.skipInorganicMats)
{
- try
- {
- Mats->ReadInorganicMaterials();
- }
- catch(exception &e)
+ if(!Mats->CopyInorganicMaterials(this->inorganic))
{
- WriteErr("DFhack exeption: %s\n", e.what());
+ WriteErr("Missing inorganic materials!\n");
config.skipInorganicMats = true;
}
}
if(!config.skipOrganicMats)
{
- try
- {
- Mats->ReadOrganicMaterials();
- }
- catch(exception &e)
+ if(!Mats->CopyOrganicMaterials(this->organic))
{
- WriteErr("DFhack exeption: %s\n", e.what());
+ WriteErr("Missing organic materials!\n");
config.skipOrganicMats = true;
}
}
try
{
- Mats->ReadOthers();
- }
- catch(exception &e)
- {
- WriteErr("DFhack exeption: %s\n", e.what());
- }
- try
- {
- Mats->ReadPlantMaterials();
- }
- catch(exception &e)
- {
- WriteErr("DFhack exeption: %s\n", e.what());
- }
- try
- {
- Mats->ReadWoodMaterials();
- }
- catch(exception &e)
- {
- WriteErr("DFhack exeption: %s\n", e.what());
- }
- try
- {
Bld = DF.getBuildings();
}
catch(exception &e)
@@ -221,9 +189,7 @@ bool ContentLoader::Load( DFHack::Core& DF){ //DF.Resume();
- //time to copy all the junk from mats to contentloader.
- this->organic = Mats->organic;
- this->inorganic = Mats->inorganic;
+ //Find what is obsidian
contentLoader->obsidian = lookupMaterialIndex(INORGANIC, "OBSIDIAN");
loadGraphicsFromDisk(); //these get destroyed when flushImgFiles is called.
|
