Skip to content

KoMahjong Solitaire v1.34

Latest

Choose a tag to compare

@github-actions github-actions released this 29 Nov 12:17

Automated release for commit 841a031.

v1.34: typography, overlay lifecycle and install fixes

A full review pass over the plugin, its test suite and the install tooling.
No gameplay rules or saved-game formats changed; existing saves load as before.

Fixed

  • High-DPI typography no longer scales twice. KOReader's Font:getFace
    already applies Screen:scaleBySize, so pre-scaled sizes rendered text up to
    ~2x too large on 1072px/1448px canvases. Every font size is now raw, layout
    dimensions stay scaled, font sizes derived from a scaled dimension go through
    the new MahjongUI.scaledToRaw(), and help-tile icons use the same path
    (the old /Screen:scaleBySize(1) un-scale rounded the factor up).
  • A dead-board shuffle can no longer corrupt a replaced board. The
    candidate search is bound to the board it started on; New Game, a layout
    change and close cancel it, and board-mutating input (taps, undo, hint,
    auto-solve) is ignored while it runs.
  • Floating overlays can no longer outlive a restart. The layout picker,
    help, settings, stats, win summary and Home-key exit card are tracked on the
    owner and dismissed on relaunch/close. Open methods are idempotent (no
    stacked pickers or cards), owner close hooks fire exactly once, and a
    framework-driven settings close resumes the clock/Awake it paused.
  • Third-party layouts no longer leak layout.<id>. The picker, the stats
    card and the win summary fall back to the layout's registered name when no
    catalog entry exists.
  • Board geometry cache now follows a re-registered layout (the bounds were
    stale after registerLayout on an existing id).
  • Help close hook ran twice (dialog close plus CloseWidget); it now runs
    once.

Tests and CI

  • Regression coverage added for the stale shuffle, overlay lifecycle (including
    the exit card), raw font requests, the fitTextFace shrink loop, custom
    layout labels, bounds-cache invalidation, and icon scaling on a rounding
    canvas.
  • The test mock's Font:getFace now mirrors KOReader: it scales once and
    exposes orig_size, so a call site that pre-scales a font fails the suite.
  • New Tests workflow (pushes to main and pull requests). release.yml now
    runs the suite before publishing and serialises releases.
  • Removed the committed preview.png; extended .gitignore.

Install tooling

  • install_plugin.sh auto-detects the Kindle's Windows drive letter (it is not
    always D:), supports --drive E:, KINDLE_DRIVE and KINDLE_MOUNT,
    reuses an existing mount, cleans up a mount it created when the copy fails,
    and no longer mounts an unrelated D:.

Docs

  • Corrected chain-scoring rules (only identical faces chain, plus any two
    flowers / any two seasons), Spanish support, the 24-id layout registry and
    picker ordering, and marked US-51/US-52 complete.

Installation

  1. Download the mahjong.koplugin-v1.34.zip asset from this release.
  2. Extract the ZIP file directly into KOReader's plugins/ directory. The archive already contains the complete mahjong.koplugin/ folder, so it should create plugins/mahjong.koplugin/.
  3. Do not copy only the Lua files; keep the entire plugin folder and its icons/ directory intact.
  4. Fully restart KOReader, because plugins are loaded during startup.
  5. Open Tools -> Mahjong Solitaire from the KOReader menu.