---
url: https://cri-middleware.github.io/SSPlayerForWeb/api/@spritestudio/ssplayer-pixi-ui/classes/SSPartOverrideStore.md
---
# Class: SSPartOverrideStore

Defined in: packages/ssplayer-core/dist/index.d.ts:2909

Keeps the stored override list and the live runtime in step: both change
together, including when an animation change makes the runtime drop overrides.
Out of step, an override survives in a save but not on screen, or the reverse.
The methods here are named for the *intent* so the choice that actually
matters is explicit:

* the author asked for a different animation → [pruneForNewAnimation](#prunefornewanimation),
  because the runtime discarded all but the Permanent overrides and the stored
  list must not resurrect them;
* something swapped the animation transiently, without the author asking (a
  lip-sync talk/idle swap) → [reapply](#reapply), because the author's overrides
  were collateral damage and should go straight back.

The wrong one either resurrects overrides the runtime dropped or loses ones
the author set.

## Constructors

### Constructor

> **new SSPartOverrideStore**(`access`): `SSPartOverrideStore`

Defined in: packages/ssplayer-core/dist/index.d.ts:2911

#### Parameters

##### access

[`SSPartOverrideStoreAccess`](../interfaces/SSPartOverrideStoreAccess.md)

#### Returns

`SSPartOverrideStore`

## Methods

### clear()

> **clear**(`part?`): `void`

Defined in: packages/ssplayer-core/dist/index.d.ts:2920

Drop the overrides on `part`, or all of them when `part` is omitted.

#### Parameters

##### part?

`string`

#### Returns

`void`

***

### list()

> **list**(): [`SSPartOverride`](../type-aliases/SSPartOverride.md)\[]

Defined in: packages/ssplayer-core/dist/index.d.ts:2913

The stored list (never null, so callers can serialise it directly).

#### Returns

[`SSPartOverride`](../type-aliases/SSPartOverride.md)\[]

***

### pruneForNewAnimation()

> **pruneForNewAnimation**(): `void`

Defined in: packages/ssplayer-core/dist/index.d.ts:2926

Bring the stored list in line with what the runtime keeps across an
animation setup the author asked for. The runtime has already done its
half; this stops a later restore from resurrecting the rest.

#### Returns

`void`

***

### reapply()

> **reapply**(): `void`

Defined in: packages/ssplayer-core/dist/index.d.ts:2933

Put the whole stored list back onto the player — after a rebuild (a fresh
WASM context starts with an empty override table), or after an animation
swap the author never asked for. Call once the animation is set up: before
that, part names cannot resolve.

#### Returns

`void`

***

### set()

> **set**(`entry`): `void`

Defined in: packages/ssplayer-core/dist/index.d.ts:2918

Set one override: store it and apply it now. A player that is not mounted
yet is not an error — the stored copy is what a mount replays.

#### Parameters

##### entry

[`SSPartOverride`](../type-aliases/SSPartOverride.md)

#### Returns

`void`
