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:
parent
f4062010e9
commit
63e29f024c
31 changed files with 130 additions and 149 deletions
|
|
@ -46,6 +46,16 @@ program WeatherTest {
|
|||
return k
|
||||
}
|
||||
|
||||
bind WeatherWorld {
|
||||
owns_world: fn fake_owns
|
||||
hours: fn fake_hours
|
||||
is_night: fn fake_night
|
||||
bias: fn fake_bias
|
||||
seed: fn fake_seed
|
||||
odds: fn fake_odds
|
||||
front_hours: fn fake_front_hours
|
||||
}
|
||||
|
||||
# clear, rain and storm: clear always goes to rain, rain to storm, storm to clear
|
||||
function fresh() -> void {
|
||||
owns = true
|
||||
|
|
@ -57,15 +67,6 @@ program WeatherTest {
|
|||
push(ks, kind("rain", true, false, odds3(0.0, 0.0, 1.0)))
|
||||
push(ks, kind("storm", true, true, odds3(1.0, 0.0, 0.0)))
|
||||
weather_kinds(ks)
|
||||
let w = new WeatherWorld
|
||||
w.owns_world = fn fake_owns
|
||||
w.hours = fn fake_hours
|
||||
w.is_night = fn fake_night
|
||||
w.bias = fn fake_bias
|
||||
w.seed = fn fake_seed
|
||||
w.odds = fn fake_odds
|
||||
w.front_hours = fn fake_front_hours
|
||||
weather_bind(w)
|
||||
weather_config_wind(0.5, 2.5, 10.0, 19.0)
|
||||
weather_reset()
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue