On init, plugins are no longer marked as dummies.

A check for record count in plugins' TES4 headers could tell us if they
are or not without requiring the whole plugin to be read.
This commit is contained in:
WrinklyNinja
2014-07-16 12:00:08 +01:00
parent 2ae7f64aa1
commit 52e831e4b1
2 changed files with 2 additions and 1 deletions
+1
View File
@@ -61,6 +61,7 @@ namespace loot {
boost::replace_all(json, ": \"true\"", ": true");
boost::replace_all(json, ": \"false\"", ": false");
boost::replace_all(json, ": \"null\"", ": null");
//boost::replace_all(json, ": ~", ": null");
// Using the definition at <http://www.json.org/>.
std::regex numbers(": \"(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)\"", std::regex::ECMAScript);
+1 -1
View File
@@ -220,7 +220,7 @@ namespace loot {
YAML::Node pluginNode;
pluginNode["name"] = plugin.second.Name();
pluginNode["isActive"] = g_app_state.CurrentGame().IsActive(plugin.first);
pluginNode["isDummy"] = (plugin.second.FormIDs().size() == 0);
pluginNode["isDummy"] = false; // Set to false for now because null is a bit iffy and we just don't know yet. Although, we could read the record count from the TES4 header... Usual check is (plugin.second.FormIDs().size() == 0);
pluginNode["loadsBSA"] = plugin.second.LoadsBSA(g_app_state.CurrentGame());
pluginNode["crc"] = IntToHexString(plugin.second.Crc());
pluginNode["version"] = plugin.second.Version();