From 4a8f1371f4dfe244c6eed75b33aeb7d379c55465 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 1 Oct 2023 00:47:44 +0300 Subject: [PATCH 44/44] Ruledit: Allow add/remove building in standard build See osdn #48765 Signed-off-by: Marko Lindqvist --- server/rssanity.c | 20 ++++++++++---------- tools/ruledit/tab_building.cpp | 2 -- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/server/rssanity.c b/server/rssanity.c index 1ca196d82c..edfa20413f 100644 --- a/server/rssanity.c +++ b/server/rssanity.c @@ -747,11 +747,11 @@ static bool rs_common_units(rs_conversion_logger logger) static bool rs_buildings(rs_conversion_logger logger) { /* Special Genus */ - improvement_iterate(pimprove) { + improvement_re_active_iterate(pimprove) { if (improvement_has_flag(pimprove, IF_GOLD) && pimprove->genus != IG_CONVERT) { ruleset_error(logger, LOG_ERROR, - "Gold producing improvement %s with genus other than \"Convert\"", + _("Gold producing improvement %s with genus other than \"Convert\""), improvement_rule_name(pimprove)); return FALSE; @@ -759,7 +759,7 @@ static bool rs_buildings(rs_conversion_logger logger) if (improvement_has_flag(pimprove, IF_DISASTER_PROOF) && pimprove->genus != IG_IMPROVEMENT) { ruleset_error(logger, LOG_ERROR, - "Disasterproof improvement %s with genus other than \"Improvement\"", + _("Disasterproof improvement %s with genus other than \"Improvement\""), improvement_rule_name(pimprove)); return FALSE; @@ -772,18 +772,18 @@ static bool rs_buildings(rs_conversion_logger logger) || get_potential_improvement_bonus(pimprove, NULL, EFT_SS_MODULE, RPT_POSSIBLE, FALSE))) { ruleset_error(logger, LOG_ERROR, - "Space part %s with genus other than \"Special\"", + _("Space part %s with genus other than \"Special\""), improvement_rule_name(pimprove)); return FALSE; } if (!is_building_sellable(pimprove) && pimprove->upkeep != 0) { ruleset_error(logger, LOG_ERROR, - "%s is a nonsellable building with a nonzero upkeep value", + _("%s is a nonsellable building with a nonzero upkeep value"), improvement_rule_name(pimprove)); return FALSE; } - } improvement_iterate_end; + } improvement_re_active_iterate_end; return TRUE; } @@ -1143,20 +1143,20 @@ bool sanity_check_ruleset_data(struct rscompat_info *compat) } goods_type_iterate_end; /* Buildings */ - improvement_iterate(pimprove) { + improvement_re_active_iterate(pimprove) { if (!sanity_check_req_vec(logger, &pimprove->reqs, TRUE, -1, improvement_rule_name(pimprove))) { ruleset_error(logger, LOG_ERROR, - "Buildings have conflicting or invalid requirements!"); + _("Buildings have conflicting or invalid requirements!")); ok = FALSE; } if (!sanity_check_req_vec(logger, &pimprove->obsolete_by, FALSE, -1, improvement_rule_name(pimprove))) { ruleset_error(logger, LOG_ERROR, - "Buildings have conflicting or invalid obsolescence req!"); + _("Buildings have conflicting or invalid obsolescence req!")); ok = FALSE; } - } improvement_iterate_end; + } improvement_re_active_iterate_end; /* Governments */ governments_iterate(pgov) { diff --git a/tools/ruledit/tab_building.cpp b/tools/ruledit/tab_building.cpp index b5f13301d7..74cc5ac81f 100644 --- a/tools/ruledit/tab_building.cpp +++ b/tools/ruledit/tab_building.cpp @@ -98,12 +98,10 @@ tab_building::tab_building(ruledit_gui *ui_in) : QWidget() add_button = new QPushButton(QString::fromUtf8(R__("Add Building")), this); connect(add_button, SIGNAL(pressed()), this, SLOT(add_now2())); bldg_layout->addWidget(add_button, 5, 0); - show_experimental(add_button); delete_button = new QPushButton(QString::fromUtf8(R__("Remove this Building")), this); connect(delete_button, SIGNAL(pressed()), this, SLOT(delete_now())); bldg_layout->addWidget(delete_button, 5, 2); - show_experimental(delete_button); refresh(); update_bldg_info(nullptr); -- 2.40.1