fix: chain building_impl base call in senet house on_place_checks - #587
Closed
dalerank wants to merge 3 commits into
Closed
fix: chain building_impl base call in senet house on_place_checks#587dalerank wants to merge 3 commits into
dalerank wants to merge 3 commits into
Conversation
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.
Code formatting issues foundPlease 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}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@
building_senet_house::on_place_checks()built its own placement warnings without ever calling the basebuilding_impl::on_place_checks(). As a result it silently skipped the standard#needs_road_access/#city_needs_more_workerswarnings and the JSon_place_checksevent 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).@