wip(0.S3): packages and examples migrated again from their pre-0.S sources in one run

ludic migrate state packages <every example program> packages/ludic.lab/example/plate.ludic
  1804 vars into 126 states, 64 into lets; 23498 edits in 460 files

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-09-25 15:31:34 +03:00
parent 5ffe50ed02
commit 19fcf60599
459 changed files with 17862 additions and 17603 deletions

View file

@ -1,34 +1,30 @@
# config.ludic - the kinds the game hands in, the wind's daily turn, and the port's defaults
var wx_down_dir: float = 0.0 # the wind overnight and into the morning
var wx_up_dir: float = 3.1415927 # the wind while the slopes are warm
var wx_up_from: float = 10.0
var wx_up_to: float = 19.0
# the kinds, in the game's order; the first `clear` one is where a new trip starts
export function weather_kinds(kinds: []WeatherKind) -> void { wx_kinds = kinds }
export function weather_kinds(weather_st: mut WeatherState, kinds: []WeatherKind) -> void { weather_st.wx_kinds = kinds }
export function weather_kind_count() -> int {
if wx_kinds == null { return 0 }
return len(wx_kinds)
export function weather_kind_count(weather_st: WeatherState) -> int {
if weather_st.wx_kinds == null { return 0 }
return len(weather_st.wx_kinds)
}
export function weather_kind(k: int) -> WeatherKind { return wx_kinds[k] }
export function weather_kind(weather_st: WeatherState, k: int) -> WeatherKind { return weather_st.wx_kinds[k] }
# a valley's wind: down it by night, up it from `up_from` to `up_to` while the slopes are warm
export function weather_config_wind(down_dir: float, up_dir: float, up_from: float, up_to: float) -> void {
wx_down_dir = down_dir
wx_up_dir = up_dir
wx_up_from = up_from
wx_up_to = up_to
export function weather_config_wind(weather_st: mut WeatherState, down_dir: float, up_dir: float, up_from: float, up_to: float) -> void {
weather_st.wx_down_dir = down_dir
weather_st.wx_up_dir = up_dir
weather_st.wx_up_from = up_from
weather_st.wx_up_to = up_to
}
function wx_clear_kind() -> int {
for k in 0 .. weather_kind_count() { if wx_kinds[k].clear { return k } }
function wx_clear_kind(weather_st: WeatherState) -> int {
for k in 0 .. weather_kind_count(weather_st) { if weather_st.wx_kinds[k].clear { return k } }
return 0
}
function wx_first_wet() -> int {
for k in 0 .. weather_kind_count() { if wx_kinds[k].wet { return k } }
function wx_first_wet(weather_st: WeatherState) -> int {
for k in 0 .. weather_kind_count(weather_st) { if weather_st.wx_kinds[k].wet { return k } }
return 0
}