Release Healer Man 0.1.37
This commit is contained in:
1 parent
03a4e3f51c
commit
361734bc41
41 files changed
+1714
-110
No files matched your search
@@ -3,6 +3,29 @@ export type MutablePartyWorldPosition = [x: number, y: number, z: number];
|
||||
|
||||
const positions = new Map<string, MutablePartyWorldPosition>();
|
||||
const targetVisibility = new Map<string, { targetId: string | null; visible: boolean }>();
|
||||
const rejoins = new Map<string, { position: PartyWorldPosition; pending: boolean }>();
|
||||
|
||||
/** A one-shot scene relocation followed by an individual return-to-player task. */
|
||||
export function beginPartyRuntimeRejoin(id: string, position: PartyWorldPosition): void {
|
||||
rejoins.set(id, { position: [...position], pending: true });
|
||||
updatePartyRuntimePosition(id, position[0], position[1], position[2]);
|
||||
targetVisibility.delete(id);
|
||||
}
|
||||
|
||||
export function consumePartyRuntimeRejoin(id: string): PartyWorldPosition | null {
|
||||
const rejoin = rejoins.get(id);
|
||||
if (!rejoin?.pending) return null;
|
||||
rejoin.pending = false;
|
||||
return [...rejoin.position];
|
||||
}
|
||||
|
||||
export function partyRuntimeIsRejoining(id: string): boolean {
|
||||
return rejoins.has(id);
|
||||
}
|
||||
|
||||
export function finishPartyRuntimeRejoin(id: string): void {
|
||||
rejoins.delete(id);
|
||||
}
|
||||
let attackCorridor: {
|
||||
readonly origin: MutablePartyWorldPosition;
|
||||
readonly waypoints: readonly PartyWorldPosition[];
|
||||
@@ -21,6 +44,7 @@ export function registerPartyRuntimePosition(
|
||||
return () => {
|
||||
positions.delete(id);
|
||||
targetVisibility.delete(id);
|
||||
rejoins.delete(id);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -111,6 +135,7 @@ export function updatePartyRuntimePosition(
|
||||
export function removePartyRuntimePosition(id: string): void {
|
||||
positions.delete(id);
|
||||
targetVisibility.delete(id);
|
||||
rejoins.delete(id);
|
||||
}
|
||||
|
||||
export function getPartyRuntimePosition(id: string): PartyWorldPosition | null {
|
||||
@@ -166,5 +191,6 @@ export function partyRuntimeCenter(
|
||||
export function clearPartyRuntimeRegistry(): void {
|
||||
positions.clear();
|
||||
targetVisibility.clear();
|
||||
rejoins.clear();
|
||||
attackCorridor = null;
|
||||
}
|
||||
Reference in new issue
Block a user