Added large charter type with scale parameter, reworked wide charter layout#26
Open
UvulaBob wants to merge 2 commits into
Open
Added large charter type with scale parameter, reworked wide charter layout#26UvulaBob wants to merge 2 commits into
UvulaBob wants to merge 2 commits into
Conversation
…layout Added large_charter (resizable, one per page) charter type and reworked wide_charter token layout. Introduced a scale parameter on draw_embed and draw_clone for canvas scaling of embedded tiles and cloned elements, enabling enlarged company logos on large charters and eliminating the need for separate size-variant shape definitions.
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.
Summary
Added large_charter (resizable, one per page) charter type and reworked wide_charter token layout. Introduced a
scaleparameter ondraw_embedanddraw_clonefor canvas scaling of embedded tiles and cloned elements, enabling enlarged company logos on large charters and eliminating the need for separate size-variant shape definitions.Changes
Python (1 file, 6 lines added)
tile.py— Added optionalscaleparameter todraw_embedanddraw_clone. When set to a value other than 1, appliescanvas.scale()before rendering. Both methods already run insidesaveState/restoreState, so the transform is properly scoped. Default is 1 — existing configs are unaffected.Charter types
wide_charter(existing) — Reworked token circle layout from a horizontal row to vertical columns of three.large_charter(new) — Its own tile type (large_charter_tile, 14.6cm × 20.8cm, 1 per page). Full element definitions at the larger size. Thetoken_embedusesscale: 2to render an enlarged company token in the banner strip.Config cleanup
small_hexagon_shaperenamed tohexagon_shape. Duplicatehexagon_shape/hexagon_textremoved from charter and wide charter objects files — unused by default templates, now fall through to the single definition inXXP_clips.xxp.Sample game (1828-Papers.xxp)
Updated with all three charter variants. Renamed hexagon clones to
{charter,wide_charter,large_charter}_track_cost_hex_{upper,lower,label}_clone.Per-company template overrides renamed from
TEMPLATE_*_track_hexestoTEMPLATE_*_with_track_hexesfor clarity.Large charter hexagon clones use
hexagon_shapewithscale: 2instead of separate size-variant definitions.Design rationale for
scaleThe alternative to a
scaleparameter — creating parallel "large" tile types with all coordinates re-specified — would require duplicating every absolute value across 15+ token templates and keeping them in sync. Token art uses a mix of relative coordinates (${token_interior_box/x}) and hardcoded absolute values (circle radii, stripe widths, text sizes), so a pure-config size variant can't just override the interior box dimensions. Thescaleparameter ondraw_embedanddraw_cloneis a natural extension of the existing canvas transform family (draw_rotate,draw_translate) and lets game files reuse existing element definitions at any size with zero config duplication.Backwards compatibility
No modifications to the config resolution system, the QUERIES chain, the embed/clone dispatch mechanism, or any existing tile type behavior. All existing game files render identically.