mirror of
https://codeberg.org/demostf/frontend.git
synced 2026-06-03 18:24:12 +02:00
This commit is contained in:
parent
d33a8df45d
commit
7af264a85b
4 changed files with 27 additions and 8 deletions
|
|
@ -42,7 +42,17 @@ export function MapRender(props: MapRenderProps) {
|
|||
</pattern>
|
||||
<pattern id="diagonalHatchBlue" patternUnits="userSpaceOnUse" width="8" height="8"
|
||||
patternTransform="rotate(45 0 0)">
|
||||
<line x1="0" y1="0" x2="0" y2="10" style="stroke:#5b818f; stroke-width:8"/>
|
||||
<line x1="0" y1="0" x2="0" y2="10" style="stroke:#5b818f; stroke-width:10"/>
|
||||
</pattern>
|
||||
<pattern id="diagonalHatchRedBlue" patternUnits="userSpaceOnUse" width="8" height="8"
|
||||
patternTransform="rotate(45 0 0)">
|
||||
<line x1="0" y1="0" x2="0" y2="10" style="stroke:#a75d50; stroke-width:12"/>
|
||||
<line x1="8" y1="0" x2="8" y2="10" style="stroke:#5b818f; stroke-width:4"/>
|
||||
</pattern>
|
||||
<pattern id="diagonalHatchBlueRed" patternUnits="userSpaceOnUse" width="8" height="8"
|
||||
patternTransform="rotate(45 0 0)">
|
||||
<line x1="0" y1="0" x2="0" y2="10" style="stroke:#5b818f; stroke-width:12"/>
|
||||
<line x1="8" y1="0" x2="8" y2="10" style="stroke:#a75d50; stroke-width:4"/>
|
||||
</pattern>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue