Commit Graph

2 Commits

Author SHA1 Message Date
Ludovic Marie d271176f23 Tools and harnesses start the game in scratch folders, not a player's
The game logs into HORIZON_HOME and falls back to the player's own game folder when it is unset. Harnesses
that set only HORIZON_NO_AUDIO (and test_native_client, which set nothing) wrote logs, and on a world run
advancements, into ~/Library/Application Support/horizon.

lab.game_env gives every game a fresh HORIZON_HOME, HORIZON_LAUNCHER_HOME, XDG_DATA_HOME and XDG_CONFIG_HOME,
no audio and no launcher self-update; a folder the caller passes is kept. Every launcher of the game uses it,
parity.py gives each harness its own HORIZON_HOME, and tests/test_game_home.py fails for a script in tools/
that starts the game without it.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-24 18:34:32 +02:00
Ludovic Marie 0d3628a035 Composters take compostable items by hand, from hoppers and from droppers
Right-clicking a composter with wheat (or any compostable item) did
nothing: ComposterBlock.useItemOn wasn't implemented, only emptying a
full composter. Hoppers and droppers didn't see the composter as a
container either, and a hopper under one sucked items through it.

- useItemOn: below level 7 a compostable item adds a layer with the
  chance of its compostable component's provider (evaluated in the
  block-interaction loot context, drawing from the level random), then
  level event 1500, the used statistic and one item consumed (none in
  creative); level 7 still consumes the action; a full composter falls
  through to useWithoutItem and empties.
- Level event 1500 (handleFill): composter.fill(_success) and ten
  composter particles above the compost.
- getContainer: the input container takes one compostable item from
  above (hoppers, droppers, crafters), the output container gives a
  hopper below the bone meal of a full composter, emptying it twice as
  vanilla's setChanged calls do (and losing it when the hopper is full);
  levels 7 and other faces refuse.

tools/test_composter_parity.py runs right-clicks, hoppers above and
below, and droppers into composters at every level through
VanillaDispenserOracle (new "use" and "hopper" actions) and the game's
dispense fixture.

Fixes #70

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 15:00:41 +02:00