[ZoneBuilder] Check if CSV exists
This commit is contained in:
parent
5c54b864e4
commit
59d8c85640
@ -92,6 +92,12 @@ namespace Components
|
||||
|
||||
void ZoneBuilder::Zone::Zone::build()
|
||||
{
|
||||
if(!this->dataMap.isValid())
|
||||
{
|
||||
Logger::Print("Unable to load CSV for '%s'!\n", this->zoneName.data());
|
||||
return;
|
||||
}
|
||||
|
||||
this->loadFastFiles();
|
||||
|
||||
Logger::Print("Linking assets...\n");
|
||||
|
@ -3135,7 +3135,8 @@ namespace Game
|
||||
unsigned int count;
|
||||
};
|
||||
|
||||
struct __declspec(align(8)) DpvsStaticCellCmd
|
||||
#pragma pack(push, 1)
|
||||
struct DpvsStaticCellCmd
|
||||
{
|
||||
DpvsPlane *planes;
|
||||
GfxAabbTree *tree;
|
||||
@ -3143,6 +3144,7 @@ namespace Game
|
||||
char frustumPlaneCount;
|
||||
unsigned __int16 sceneViewType;
|
||||
};
|
||||
#pragma pack(pop)
|
||||
|
||||
struct GfxPortal
|
||||
{
|
||||
|
@ -4,6 +4,7 @@ namespace Utils
|
||||
{
|
||||
CSV::CSV(std::string file, bool isFile, bool allowComments)
|
||||
{
|
||||
this->valid = false;
|
||||
this->parse(file, isFile, allowComments);
|
||||
}
|
||||
|
||||
@ -72,6 +73,7 @@ namespace Utils
|
||||
{
|
||||
if (!Utils::IO::FileExists(file)) return;
|
||||
buffer = Utils::IO::ReadFile(file);
|
||||
this->valid = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -15,7 +15,10 @@ namespace Utils
|
||||
|
||||
std::string getElementAt(size_t row, size_t column);
|
||||
|
||||
bool isValid() { return this->valid; }
|
||||
|
||||
private:
|
||||
bool valid;
|
||||
std::vector<std::vector<std::string>> dataMap;
|
||||
|
||||
void parse(std::string file, bool isFile = true, bool allowComments = true);
|
||||
|
Loading…
Reference in New Issue
Block a user