refactor(packages): the mechanic packages use ludic_base only, and ask through ports

ludic.clock, .effects, .inventory, .wallet, .weather and .tracks say
'uses ludic_base' (ludic.base uses nothing). ClockWorld, PackRules,
WeatherWorld and TracksWorld are export ports whose defaults are the old
fallbacks; clock_bind, inv_bind, weather_bind and tracks_bind are gone,
and the tests bind their fakes. The base README's toy does the same.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 05:36:11 +03:00
parent f4062010e9
commit 63e29f024c
31 changed files with 130 additions and 149 deletions

View file

@ -11,14 +11,11 @@ program ClockTest {
function fake_rest() -> float { return rest }
function fake_seed() -> int { return 42 }
bind ClockWorld { owns_world: fn fake_owns, rest_scale: fn fake_rest, seed: fn fake_seed }
function fresh() -> void {
owns = true
rest = 1.0
let w = new ClockWorld
w.owns_world = fn fake_owns
w.rest_scale = fn fake_rest
w.seed = fn fake_seed
clock_bind(w)
clock_config(8.0, 20.0, 6.0)
clock_config_moon(29.5, 0.2, 0.8)
clock_set_scale(60.0)