added transformation item

This commit is contained in:
2026-10-25 22:08:09 +01:00
parent 0fb223cdee
commit 6184cdba0a
27 changed files with 307 additions and 52 deletions
@@ -1,7 +1,7 @@
import { memo } from 'react';
import type { PlayerState } from '../net/types';
import type { ItemFlash } from '../net/useGameConnection';
import { BlackoutTimer } from './BlackoutTimer';
import { EffectTimers } from './EffectTimers';
import { BoardCanvas } from './BoardCanvas';
import { ItemBar } from './ItemBar';
import { ItemFlashOverlay } from './ItemFlashOverlay';
@@ -30,7 +30,15 @@ export const MiniBoard = memo(function MiniBoard({ state, width, height, slot, s
</div>
<BoardCanvas state={state} width={width} height={height} cell={cell} highlighted={selected}>
<ItemFlashOverlay flashes={flashes} small />
<BlackoutTimer remaining={state.alive ? state.invisibleRemaining : 0} small />
{state.alive && (
<EffectTimers
effects={[
['blind', state.invisibleRemaining],
['transform', state.transformedRemaining],
]}
small
/>
)}
</BoardCanvas>
<div className={styles.items} style={{ width: width * cell + 6 }}>
<ItemBar items={state.inventory} size={Math.max(10, cell)} />