Skip to content

fix: chain building_impl base call in senet house on_place_checks - #587

Closed
dalerank wants to merge 3 commits into
masterfrom
fix/senet-house-place-checks-chain-base
Closed

fix: chain building_impl base call in senet house on_place_checks#587
dalerank wants to merge 3 commits into
masterfrom
fix/senet-house-place-checks-chain-base

Conversation

@dalerank

Copy link
Copy Markdown
Owner

@
building_senet_house::on_place_checks() built its own placement warnings without ever calling the base building_impl::on_place_checks(). As a result it silently skipped the standard #needs_road_access / #city_needs_more_workers warnings and the JS on_place_checks event dispatch that every other building gets through the base implementation.

Fix: call building_impl::on_place_checks() as the first statement, matching the established pattern used by the other building types (same fix as #585 mortuary and #586 scribal school).

No behaviour change beyond restoring the missing base warnings/event; builds cleanly (win-msvc-relwithdebinfo-vs2022).
@

s.kushnirenko added 2 commits June 10, 2026 12:59
Integral tests run with --no-resource, so advisor icon lookups can return
null and crash stonemason guild info window init. Skip the image assign
when get_image fails instead of dereferencing .tid.
@github-actions

Copy link
Copy Markdown

Code formatting issues found

Please format the code locally (see instructions in CONTRIBUTING.md) to fix these issues.

diff --git a/src/window/editor/requests.cpp b/src/window/editor/requests.cpp
index 7e7ec49bc..5ca88fa46 100644
--- a/src/window/editor/requests.cpp
+++ b/src/window/editor/requests.cpp
@@ -65,7 +65,7 @@ static void draw_foreground(int) {
         scenario_editor_request_get(i, &request);
         if (request.resource) {
             text_draw_number(request.year, '+', " ", x + 20, y + 6, FONT_NORMAL_BLACK_ON_LIGHT);
-            lang_text_draw_year(g_scenario.start_year + request.year, x + 80, + 6, FONT_NORMAL_BLACK_ON_LIGHT);
+            lang_text_draw_year(g_scenario.start_year + request.year, x + 80, +6, FONT_NORMAL_BLACK_ON_LIGHT);
             int width = text_draw_number(request.amount, '@', " ", x + 180, y + 6, FONT_NORMAL_BLACK_ON_LIGHT);
             int offset = request.resource + resource_image_offset(request.resource, RESOURCE_IMAGE_ICON);
             ctx.img_generic(image_id_from_group(GROUP_EDITOR_RESOURCE_ICONS) + offset, vec2i{x + 190 + width, y + 3});

@dalerank
dalerank deleted the fix/senet-house-place-checks-chain-base branch June 10, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant