1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Merged mageLevel.txt into buildings.json.

This commit is contained in:
Frank Zago
2011-08-26 04:12:46 +00:00
parent e997b25583
commit 74620dc685
3 changed files with 36 additions and 24 deletions

View File

@@ -33,7 +33,6 @@ CTownHandler::~CTownHandler()
}
void CTownHandler::loadStructures()
{
int si, itr;
char bufname[75];
int townID;
@@ -125,6 +124,11 @@ void CTownHandler::loadStructures()
level ++;
}
// Misc.
towns[townID].mageLevel = town_node["mage_guild"].Float();
towns[townID].primaryRes = town_node["primary_ressource"].Float();
towns[townID].warMachine = town_node["war_machine"].Float();
townID ++;
}
@@ -172,15 +176,6 @@ void CTownHandler::loadStructures()
std::ifstream of;
of.open(DATA_DIR "/config/mageLevel.txt");
of >> si;
for(itr=0; itr<si; itr++)
{
of >> towns[itr].mageLevel >> towns[itr].primaryRes >> towns[itr].warMachine;
}
of.close();
of.clear();
of.open(DATA_DIR "/config/requirements.txt");
requirements.resize(F_NUMBER);
while(!of.eof())