feat(players): NPC disposition types and launch-with-players session tokens
Add Hostile/Neutral/Friendly ring types with session-only inactive overrides on control, plus launch-with-players flow and live player tokens on the map. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import type { AppPlayer } from '../types';
|
||||
|
||||
/** Игроки + члены выбранных команд, без дублей. */
|
||||
export function resolveLaunchPlayerIds(
|
||||
players: readonly AppPlayer[],
|
||||
selectedPlayerIds: ReadonlySet<string>,
|
||||
selectedTeamIds: ReadonlySet<string>,
|
||||
): string[] {
|
||||
const out = new Set<string>();
|
||||
for (const id of selectedPlayerIds) out.add(id);
|
||||
for (const p of players) {
|
||||
if (p.teamId && selectedTeamIds.has(String(p.teamId))) out.add(String(p.id));
|
||||
}
|
||||
return [...out];
|
||||
}
|
||||
Reference in New Issue
Block a user