chore: remove effects leftovers, dead SyncedState.set, add modules/resources skill refs
This commit is contained in:
@@ -76,8 +76,8 @@ export class SyncedState<T> {
|
||||
if (this.listeners.size === 0 && this.snapshot.status === 'idle') return;
|
||||
this.invalidateScheduled = true;
|
||||
queueMicrotask(() => {
|
||||
// A reset() or set() between scheduling and flushing cancels the reload
|
||||
// (fresh data arrived, or the entity was dropped on logout).
|
||||
// A reset() between scheduling and flushing cancels the reload
|
||||
// (the entity was dropped on logout).
|
||||
if (!this.invalidateScheduled) return;
|
||||
this.invalidateScheduled = false;
|
||||
if (this.listeners.size === 0 && this.snapshot.status === 'idle') return;
|
||||
@@ -85,18 +85,6 @@ export class SyncedState<T> {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Applies externally-provided data (e.g. scenario config patches).
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
set(data: T): void {
|
||||
this.generation++;
|
||||
this.pending = undefined;
|
||||
this.invalidateScheduled = false;
|
||||
this.setSnapshot({ status: 'ready', data });
|
||||
}
|
||||
|
||||
/**
|
||||
* Drops all state back to idle (logout).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user