feat(control): spawn session NPCs and resize tokens in preview
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -55,6 +55,18 @@ function applyEvent(
|
||||
},
|
||||
};
|
||||
}
|
||||
if (event.kind === 'setSize') {
|
||||
const prevPlacement = prev.byPlayerId[event.playerId];
|
||||
if (!prevPlacement) return prev;
|
||||
return {
|
||||
...prev,
|
||||
revision: prev.revision + 1,
|
||||
byPlayerId: {
|
||||
...prev.byPlayerId,
|
||||
[event.playerId]: { ...prevPlacement, sizeN: event.sizeN },
|
||||
},
|
||||
};
|
||||
}
|
||||
return prev;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user