From 0df72316bced7abd406fd6fc03d7836f68b99ff7 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 1 Oct 2023 00:59:07 +0300 Subject: [PATCH 45/45] Ruledit: Clear flags of newly initialized objects See osdn #48767 Signed-off-by: Marko Lindqvist --- tools/ruledit/tab_building.cpp | 2 ++ tools/ruledit/tab_extras.cpp | 1 + tools/ruledit/tab_good.cpp | 1 + tools/ruledit/tab_tech.cpp | 1 + tools/ruledit/tab_terrains.cpp | 1 + tools/ruledit/tab_unit.cpp | 2 ++ 6 files changed, 8 insertions(+) diff --git a/tools/ruledit/tab_building.cpp b/tools/ruledit/tab_building.cpp index 74cc5ac81f..460914baf7 100644 --- a/tools/ruledit/tab_building.cpp +++ b/tools/ruledit/tab_building.cpp @@ -235,6 +235,8 @@ bool tab_building::initialize_new_bldg(struct impr_type *pimpr) } name_set(&(pimpr->name), 0, "New Building"); + BV_CLR_ALL(pimpr->flags); + return true; } diff --git a/tools/ruledit/tab_extras.cpp b/tools/ruledit/tab_extras.cpp index ca93dd43b5..f1d9e22687 100644 --- a/tools/ruledit/tab_extras.cpp +++ b/tools/ruledit/tab_extras.cpp @@ -238,6 +238,7 @@ bool tab_extras::initialize_new_extra(struct extra_type *pextra) } name_set(&(pextra->name), 0, "New Extra"); + BV_CLR_ALL(pextra->flags); return true; } diff --git a/tools/ruledit/tab_good.cpp b/tools/ruledit/tab_good.cpp index 2ce115376a..d1bf2bddc3 100644 --- a/tools/ruledit/tab_good.cpp +++ b/tools/ruledit/tab_good.cpp @@ -228,6 +228,7 @@ bool tab_good::initialize_new_good(struct goods_type *pgood) } name_set(&(pgood->name), 0, "New Good"); + BV_CLR_ALL(pgood->flags); return true; } diff --git a/tools/ruledit/tab_tech.cpp b/tools/ruledit/tab_tech.cpp index b49598b39c..2b600eeeba 100644 --- a/tools/ruledit/tab_tech.cpp +++ b/tools/ruledit/tab_tech.cpp @@ -405,6 +405,7 @@ bool tab_tech::initialize_new_tech(struct advance *padv) padv->require[AR_TWO] = none; padv->require[AR_ROOT] = none; name_set(&(padv->name), 0, "New Tech"); + BV_CLR_ALL(padv->flags); return true; } diff --git a/tools/ruledit/tab_terrains.cpp b/tools/ruledit/tab_terrains.cpp index ef65c38cdd..7c4522f724 100644 --- a/tools/ruledit/tab_terrains.cpp +++ b/tools/ruledit/tab_terrains.cpp @@ -234,6 +234,7 @@ bool tab_terrains::initialize_new_terrain(struct terrain *pterr) } name_set(&(pterr->name), 0, "New Terrain"); + BV_CLR_ALL(pterr->flags); return true; } diff --git a/tools/ruledit/tab_unit.cpp b/tools/ruledit/tab_unit.cpp index 6193257f80..47a3f8dff9 100644 --- a/tools/ruledit/tab_unit.cpp +++ b/tools/ruledit/tab_unit.cpp @@ -251,6 +251,8 @@ bool tab_unit::initialize_new_utype(struct unit_type *ptype) } name_set(&(ptype->name), 0, "New Unit"); + BV_CLR_ALL(ptype->flags); + return true; } -- 2.40.1