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
+15
View File
@@ -0,0 +1,15 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { calculateSun, sunriseAzimuth } from '../src/astronomy/sunCalculator.ts';
import { observer } from '../src/config/observer.ts';
test('arrival faces the selected day’s sunrise, even when entering in the afternoon', () => {
for (const month of ['01', '06', '11']) {
const date = new Date(`2026-${month}-02T15:00:00+09:00`);
const state = calculateSun(date, observer);
const heading = sunriseAzimuth(date, observer);
assert.equal(heading, calculateSun(state.sunrise!, observer).azimuth);
assert.ok(heading > 45 && heading < 135);
assert.ok(Math.abs(heading - state.azimuth) > 60);
}
});