forked from phenom/healer-man
Release Healer Man 0.1.22
This commit is contained in:
1 parent
f6f2375145
commit
7f6001723a
144 files changed
+54107
-690
No files matched your search
@@ -70,6 +70,8 @@ export interface GameState {
|
||||
setAssetStatus: (status: AssetStatus, message?: string | null) => void;
|
||||
updatePlayerSnapshot: (snapshot: PlayerSnapshot) => void;
|
||||
relocatePlayer: (spawn: WorldSpawn, makeActiveSpawn?: boolean) => void;
|
||||
/** Returns the party to its saved run spawn without requesting a full dungeon reset. */
|
||||
resetAfterDefeat: () => void;
|
||||
resetAtActiveSpawn: () => void;
|
||||
resetAtEntrance: () => void;
|
||||
}
|
||||
@@ -227,6 +229,25 @@ export const useGameStore = create<GameState>((set) => ({
|
||||
relocationRevision: state.relocationRevision + 1,
|
||||
};
|
||||
}),
|
||||
resetAfterDefeat: () => set((state) => {
|
||||
const definition = requireDungeonDefinition(state.activeDungeonId);
|
||||
return {
|
||||
overlay: null,
|
||||
paused: false,
|
||||
mapOpen: false,
|
||||
cameraLookActive: false,
|
||||
playerPosition: state.activeSpawn.footPosition,
|
||||
playerNavigationPosition: state.activeSpawn.footPosition,
|
||||
playerGrounded: true,
|
||||
cameraYaw: state.activeSpawn.yaw,
|
||||
areaName: resolveAreaNameForDungeon(definition, state.activeSpawn.footPosition),
|
||||
distanceTravelled: 0,
|
||||
hasMoved: false,
|
||||
actionLayer: "primary",
|
||||
resetRevision: state.resetRevision + 1,
|
||||
relocationRevision: state.relocationRevision + 1,
|
||||
};
|
||||
}),
|
||||
resetAtActiveSpawn: () => set((state) => {
|
||||
const definition = requireDungeonDefinition(state.activeDungeonId);
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user