логика выделена в отдельный набор классов
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import type { Inventory, RabbitState, ResourceDrop, ResourceNode, Vec2 } from './types';
|
||||
import type { Inventory, RabbitData, ResourceDropData, ResourceNodeData, Vec2 } from './types';
|
||||
import type { UpgradeId } from './upgrades';
|
||||
|
||||
const STORAGE_KEY = 'forest-save-v1';
|
||||
@@ -10,10 +10,10 @@ export interface SaveData {
|
||||
/** World state (character/nodes/drops) is optional so older saves without it still load fine —
|
||||
* progress is restored either way, just with a freshly spawned world. */
|
||||
character?: Vec2;
|
||||
nodes?: ResourceNode[];
|
||||
resourceDrops?: ResourceDrop[];
|
||||
nodes?: ResourceNodeData[];
|
||||
resourceDrops?: ResourceDropData[];
|
||||
/** Absent on saves from before rabbits existed, which get a freshly spawned batch instead. */
|
||||
rabbits?: RabbitState[];
|
||||
rabbits?: RabbitData[];
|
||||
/** Absent on older saves, which are treated as day 1. */
|
||||
day?: number;
|
||||
/** In-game clock hour (0-24). Absent on older saves, which are treated as noon. */
|
||||
|
||||
Reference in New Issue
Block a user