From 9ea39d7ae0b2975595748caa2d71ee7529d3edc1 Mon Sep 17 00:00:00 2001 From: "n.savitchev" Date: Wed, 17 Jan 2024 16:50:37 +0300 Subject: [PATCH] daEditorE: renamed member 'requires' into 'reqs' --- .../daEditorE/editorCommon/entityEditor.h | 3 +-- .../daEditorE/editorCommon/entityEditor.inc.cpp | 10 ++++------ 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.h b/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.h index 8850e2ef7..8ac7fa865 100644 --- a/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.h +++ b/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.h @@ -149,8 +149,7 @@ class EntityObjEditor : public ObjectEditor, public console::ICommandProcessor struct TemplatesGroup { eastl::string name; - eastl::vector - requires; + eastl::vector reqs; eastl::vector> variants; }; eastl::vector orderedTemplatesGroups; diff --git a/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.inc.cpp b/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.inc.cpp index 0fef08c25..65c42d543 100644 --- a/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.inc.cpp +++ b/prog/gameLibs/publicInclude/daEditorE/editorCommon/entityEditor.inc.cpp @@ -1177,9 +1177,7 @@ void EntityObjEditor::addTemplatesGroupRequire(const char *group_name, const cha [&group_name](const TemplatesGroup &group) { return group.name == group_name; }); TemplatesGroup &group = (it != orderedTemplatesGroups.end()) ? *it : orderedTemplatesGroups.push_back(); group.name = group_name; - group. - requires - .push_back(require); + group.reqs.push_back(require); } void EntityObjEditor::addTemplatesGroupVariant(const char *group_name, const char *variant) @@ -1267,7 +1265,7 @@ bool EntityObjEditor::testEcsTemplateCondition(const ecs::Template &ecs_template { if (&checkgroup == &group) break; - if (checkgroup.requires.empty() && checkgroup.variants.empty()) + if (checkgroup.reqs.empty() && checkgroup.variants.empty()) continue; if (testEcsTemplateByTemplatesGroup(ecs_template, nullptr, checkgroup, 1)) { @@ -1332,7 +1330,7 @@ bool EntityObjEditor::testEcsTemplateByTemplatesGroup(const ecs::Template &ecs_t if (!ecs_template.canInstantiate()) return false; - for (auto &condition : group.requires) + for (auto &condition : group.reqs) if (!testEcsTemplateCondition(ecs_template, condition, group, depth)) return false; @@ -1388,7 +1386,7 @@ Sqrat::Array EntityObjEditor::getEcsTemplates(HSQUIRRELVM vm) templates.reserve(db.size()); bool filterNonCreatable = true; - if (pTemplatesGroup && !pTemplatesGroup->requires.empty() && pTemplatesGroup->requires[0] == "~noncreatable") + if (pTemplatesGroup && !pTemplatesGroup->reqs.empty() && pTemplatesGroup->reqs[0] == "~noncreatable") filterNonCreatable = false; eastl::vector variants;