mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
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:
@@ -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
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user