Add sunrise Threads automation and improve capture and character interactions

This commit is contained in:
2026-11-02 03:28:58 +09:00
parent ff86bdb5b5
commit 850ac84ef7
34 changed files with 900 additions and 34 deletions
+7 -2
View File
@@ -4,6 +4,7 @@ export type RainGearItem = 'umbrella' | 'raincoat' | 'hood';
export function createRainGearState() {
const worn = { umbrella: false, raincoat: false, hood: false };
let available = false;
let awaitingArrivalWeather = true;
return {
get available() { return available; },
get umbrella() { return worn.umbrella; },
@@ -14,8 +15,12 @@ export function createRainGearState() {
worn.raincoat = state.raincoat;
worn.hood = state.raincoat && state.hood;
},
updateWeather(rain: number, snowfall: number) {
available = rain > 0 || snowfall > 0;
updateWeather(rain: number | null, snowfall: number | null) {
available = (rain ?? 0) > 0 || (snowfall ?? 0) > 0;
if (awaitingArrivalWeather && rain !== null) {
if (rain > 0) { worn.raincoat = true; worn.hood = true; }
awaitingArrivalWeather = false;
}
if (!available) { worn.umbrella = false; worn.raincoat = false; worn.hood = false; }
},
toggle(item: RainGearItem) {