Repository navigation
Conversation
Building window of a farm, lumber camp, mine or mill now shows where its production comes from: base, honour, each kind of bonus tile next to it, and each technology or spell (procBonusses can report its steps). The rows add up to the real income. The mill explains its share of the farms and what another mill or farm level would add. The Build window passes a placement preview (tiles near the village that raise the building's resource) to the engine's new Game.map.placementPreview. Text fixes: Mill description, rock tiles named as rocks, 20% stated. The mill upgrade preview counts the extra mill level; dead income_increase removed. Income rules are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpWbfBTo645HCwsC28PTm7
|
Preview: https://pr-96.preview.dolumar.com/preview-login.php Deployed eba0caf. Log in as one of the seeded Tester players, or create a new player to test race selection. The preview and its database are removed when this pull request closes. |
Also brings engine #32 (hide 'Load older messages' when there are none). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WpWbfBTo645HCwsC28PTm7
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.
Requested by Thijs · project thread
Display options D1 to D4 from the options write-up (
resource-bonuses/01-resource-bonus-options.mdin the project files). The income rules are unchanged.Building window (D1)
Farms, lumber camps and mines show where their hourly production comes from, in a small number table (
table.ui-breakdown, added toui.cssand the style guide):The rows add up to the real income.
Village::procBonussestakes an optional&$stepsarray to report each technology or effect. Its result does not change.Producing::calculateIncomeis now built oncalculateIncomeSteps, using the same formula and rounding.The mill shows its share of the farms (farm levels, mill levels) and what another mill level or another farm level would add through the mills.
While placing (D2, D3)
The Build window passes a placement preview for farms, lumber camps and mines: every tile within the building radius + 1 that raises that resource (
Dolumar_Map_Map::getBonusTilesAround, generated fresh: about 30 ms at radius 26, cached per request). It needs engine PR CatLabInteractive/dolumar-engine#33, which marks those tiles, outlines the 3x3 area under the pointer and shows "+40% wood / Forest (2)". With the current engine the extra argument is ignored, so this PR can be merged first. After engine #33 merges,composer.lockneeds a bump.Map tiles are not clickable for an explanation. Instead, the tiles are named and marked while placing and shown with their image in the building window.
Text fixes (D4)
income_increasevalue is removed (it was always 0).Screenshots
In the project files under
resource-bonuses/:desktop-farm-window.png,mobile-mill-window.png,mobile-lumber-window.png,desktop-placing-lumber.png,mobile-placing-lumber.png.Tests
tests/Buildings/ResourceBonusTest.php(unit): mill formula, mill upgrade preview, mill breakdown, bonus tiles around a point compared with the generator, bonus keys.tests/Integration/IncomeBreakdownTest.php: lumber camp on a forest tile; the breakdown adds up togetIncome()and the preview lists the tile.tools/smoke.sh: one failure,/signs/x.php forbidden. That check needs the.htaccessrules, which the localphp -Srouter does not apply, and it fails without this change too.Generated by Claude Code