MCPcopy Create free account
hub / github.com/Hopson97/HopsonCraft / parseLine

Method parseLine

Source/World/Generators/Biome.cpp:60–91  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60bool Biome::parseLine(const std::string& line, std::ifstream& inFile)
61{
62 if (areStringsSame(line, "Noise"))
63 {
64 loadNoise(inFile);
65 }
66 else if (areStringsSame(line, "Surface"))
67 {
68 loadIntoBlockList(inFile, m_surfaceBlocks);
69 }
70 else if (areStringsSame(line, "Flora"))
71 {
72 loadIntoBlockList(inFile, m_floraBlocks);
73 }
74 else if (areStringsSame(line, "Tree"))
75 {
76 loadTree(inFile);
77 }
78 else if (areStringsSame(line, "Flora Freq"))
79 {
80 inFile >> m_floraFreq;
81 }
82 else if (areStringsSame(line, "Tree Freq"))
83 {
84 inFile >> m_treeFreq;
85 }
86 else
87 {
88 return false;
89 }
90 return true;
91}
92
93void Biome::loadNoise(std::ifstream& inFile)
94{

Callers

nothing calls this directly

Calls 1

areStringsSameFunction · 0.85

Tested by

no test coverage detected