1.4 KiB
1.4 KiB
Code map
Use this as the first lookup table before opening large files.
| Need | File / symbol |
|---|---|
| Script order / DOM shell | index.html |
| Global config, sprites, object metrics | js/data.js / CONFIG, SPRITES, IMAGE_METRICS |
| Lazy image loading | js/assets.js / loadInitialImages, loadDeferredImages, getRenderableImage |
| UI Japanese text catalog | js/text_catalog.js / TEXT_CATALOG |
| Core agent state | js/tarinai.js / class Tarinai constructor |
| Agent AI target choice | js/tarinai.js / resolveNeeds, target helpers |
| Disease state transitions | js/tarinai.js / infect*, recover*, update*Disease* |
| Damage/death cause rules | js/health.js / HEALTH |
| Item creation/lifecycle/draw | js/items.js / class Item |
| Cleaning, rain, placement | js/world.js / placement/update interaction helpers |
| Fence collision | js/world.js / resolveFenceCollision |
| Logs/archive | js/world.js |
| Main renderer | js/render.js / render helpers |
| Agent drawing | js/tarinai.js / draw |
| Input/tools/dialogs | js/ui.js |
| Statistics UI | js/ui_charts.js |
| Family tree UI | js/ui_family.js |
Refactor guidance: extract isolated rule sets into small helper files, then delegate from Tarinai/World. Keep shared domain terms centralized (HEALTH, TEXT_CATALOG, CONFIG) to reduce repeated prompt context.