disguise team
All checks were successful
CI / checks (push) Successful in 56s

This commit is contained in:
Robin Appelman 2025-06-29 14:38:26 +02:00
commit 7af264a85b
4 changed files with 27 additions and 8 deletions

View file

@ -63,8 +63,17 @@ export function Player(props: PlayerProp) {
return "none";
}
}
const teamHatch = () => (props.player.team === Team.Red) ? `url(#diagonalHatchRed)` : `url(#diagonalHatchBlue)`
const fill = () => props.player.cloaked ? teamHatch() : teamColor();
const teamHatch = () => (props.player.team === Team.Red) ? `url(#diagonalHatchRed)` : `url(#diagonalHatchBlue)`;
const teamDisguiseHatch = () => (props.player.team === Team.Red) ? `url(#diagonalHatchRedBlue)` : `url(#diagonalHatchBlueRed)`;
const fill = () => {
if (props.player.cloaked) {
return teamHatch();
}
if (props.player.playerClass === Class.Spy && (props.player.class_data as SpyState).disguise_team !== props.player.team && (props.player.class_data as SpyState).disguise_class > 0) {
return teamDisguiseHatch();
}
return teamColor();
};
return (
<g