wip(0.S2): migrate - a var nothing writes becomes a let; a state is keyed by its module, directory or program, so every program's plan agrees; paths normalized; program states named SceneDemoState / scene_demo_st; the LSP reads state, mut and entry/handler parameters
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3eda72e8c2
commit
5ffe50ed02
463 changed files with 72045 additions and 67421 deletions
|
|
@ -1,38 +1,38 @@
|
|||
# queries.ludic - what the world asks the sky
|
||||
export function weather_state(weather_st: WeatherState) -> int { return weather_st.wx_state }
|
||||
export function weather_next(weather_st: WeatherState) -> int { return weather_st.wx_next }
|
||||
export function weather_left(weather_st: WeatherState) -> float { return weather_st.wx_left }
|
||||
export function weather_amount(weather_st: WeatherState) -> float { return weather_st.wx_amount }
|
||||
export function weather_forecast(weather_st: WeatherState) -> int { return weather_st.wx_forecast }
|
||||
export function weather_forced(weather_st: WeatherState) -> bool { return weather_st.wx_forced }
|
||||
export function weather_wind(weather_st: WeatherState) -> float { return weather_st.wx_wind }
|
||||
export function weather_dir(weather_st: WeatherState) -> float { return weather_st.wx_dir }
|
||||
export function weather_ground_wet(weather_st: WeatherState) -> float { return weather_st.wx_ground }
|
||||
export function weather_flash(weather_st: WeatherState) -> float { return weather_st.wx_flash }
|
||||
export function weather_state() -> int { return wx_state }
|
||||
export function weather_next() -> int { return wx_next }
|
||||
export function weather_left() -> float { return wx_left }
|
||||
export function weather_amount() -> float { return wx_amount }
|
||||
export function weather_forecast() -> int { return wx_forecast }
|
||||
export function weather_forced() -> bool { return wx_forced }
|
||||
export function weather_wind() -> float { return wx_wind }
|
||||
export function weather_dir() -> float { return wx_dir }
|
||||
export function weather_ground_wet() -> float { return wx_ground }
|
||||
export function weather_flash() -> float { return wx_flash }
|
||||
|
||||
# rain or snow is falling, and more than a spit of it
|
||||
export function weather_wet(weather_st: WeatherState) -> bool {
|
||||
if weather_kind_count(weather_st) == 0 { return false }
|
||||
return weather_st.wx_kinds[weather_st.wx_state].wet and weather_st.wx_amount > 0.3
|
||||
export function weather_wet() -> bool {
|
||||
if weather_kind_count() == 0 { return false }
|
||||
return wx_kinds[wx_state].wet and wx_amount > 0.3
|
||||
}
|
||||
|
||||
export function weather_overcast(weather_st: WeatherState) -> float {
|
||||
if weather_kind_count(weather_st) == 0 { return 0.0 }
|
||||
return weather_st.wx_kinds[weather_st.wx_state].overcast * weather_st.wx_amount
|
||||
export function weather_overcast() -> float {
|
||||
if weather_kind_count() == 0 { return 0.0 }
|
||||
return wx_kinds[wx_state].overcast * wx_amount
|
||||
}
|
||||
|
||||
export function weather_cold(weather_st: WeatherState) -> float {
|
||||
if weather_kind_count(weather_st) == 0 { return 0.0 }
|
||||
return weather_st.wx_kinds[weather_st.wx_state].cold * weather_st.wx_amount
|
||||
export function weather_cold() -> float {
|
||||
if weather_kind_count() == 0 { return 0.0 }
|
||||
return wx_kinds[wx_state].cold * wx_amount
|
||||
}
|
||||
|
||||
export function weather_name(weather_st: WeatherState, k: int) -> string {
|
||||
if k < 0 or k >= weather_kind_count(weather_st) { return "" }
|
||||
return weather_st.wx_kinds[k].name
|
||||
export function weather_name(k: int) -> string {
|
||||
if k < 0 or k >= weather_kind_count() { return "" }
|
||||
return wx_kinds[k].name
|
||||
}
|
||||
|
||||
# the half hour after a front goes through, when the air is glass-clear
|
||||
export function weather_after_front(weather_st: WeatherState) -> bool { return weather_st.wx_clear_t > 0.0 }
|
||||
export function weather_after_front() -> bool { return wx_clear_t > 0.0 }
|
||||
|
||||
# yesterday had rain or snow in it (the valley's fog pools after a wet day)
|
||||
export function weather_wet_yesterday(weather_st: WeatherState) -> bool { return weather_st.wx_wet_yesterday }
|
||||
export function weather_wet_yesterday() -> bool { return wx_wet_yesterday }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue