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
|
|
@ -32,25 +32,13 @@ function wx_first_wet() -> int {
|
|||
return 0
|
||||
}
|
||||
|
||||
function wx_owns() -> bool {
|
||||
if wx_world == null or wx_world.owns_world == null { return true }
|
||||
return wx_world.owns_world()
|
||||
}
|
||||
function wx_owns() -> bool { return WeatherWorld.owns_world() }
|
||||
|
||||
function wx_hours() -> float {
|
||||
if wx_world == null or wx_world.hours == null { return 12.0 }
|
||||
return wx_world.hours()
|
||||
}
|
||||
function wx_hours() -> float { return WeatherWorld.hours() }
|
||||
|
||||
function wx_night() -> bool {
|
||||
if wx_world == null or wx_world.is_night == null { return false }
|
||||
return wx_world.is_night()
|
||||
}
|
||||
function wx_night() -> bool { return WeatherWorld.is_night() }
|
||||
|
||||
function wx_bias() -> int {
|
||||
if wx_world == null or wx_world.bias == null { return WEATHER_NO_BIAS }
|
||||
return wx_world.bias()
|
||||
}
|
||||
function wx_bias() -> int { return WeatherWorld.bias() }
|
||||
|
||||
function wx_wrap(a: float) -> float {
|
||||
var d = a
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue