Show weapons when looking
18
app/components/WeaponImage.tsx
Normal file
@@ -0,0 +1,18 @@
|
||||
interface WeaponImageProps
|
||||
extends React.ButtonHTMLAttributes<HTMLImageElement> {
|
||||
weapon: string;
|
||||
}
|
||||
|
||||
export function WeaponImage(props: WeaponImageProps) {
|
||||
return (
|
||||
<img
|
||||
src={`/img/weapons/${encodeURIComponent(
|
||||
props.weapon.replaceAll(".", "")
|
||||
)}.webp`}
|
||||
alt={props.weapon}
|
||||
title={props.weapon}
|
||||
loading="lazy"
|
||||
{...props}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import type { LookingLoaderDataGroup } from "~/routes/play/looking";
|
||||
import { layoutIcon } from "~/utils";
|
||||
import { Avatar } from "../Avatar";
|
||||
import { WeaponImage } from "../WeaponImage";
|
||||
|
||||
export function GroupMembers({
|
||||
members,
|
||||
@@ -65,6 +66,17 @@ function Contents({ members }: { members: LookingLoaderDataGroup["members"] }) {
|
||||
{member.peakLP}
|
||||
</div>
|
||||
)}
|
||||
{member.weapons && (
|
||||
<div className="play-looking__member-weapons">
|
||||
{member.weapons.map((wpn) => (
|
||||
<WeaponImage
|
||||
className="play-looking__member-weapon"
|
||||
key={wpn}
|
||||
weapon={wpn}
|
||||
/>
|
||||
))}{" "}
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
||||
@@ -27,7 +27,7 @@ export function addInfoFromOldSendouInk(
|
||||
const playerInfos = infos[member.discordId];
|
||||
return {
|
||||
...member,
|
||||
weapons: playerInfos?.weapons,
|
||||
weapons: playerInfos?.weapons?.slice(0, 3),
|
||||
peakXP: type === "SOLO" ? playerInfos?.peakXP : undefined,
|
||||
peakLP: type === "LEAGUE" ? playerInfos?.peakLP : undefined,
|
||||
};
|
||||
|
||||
@@ -154,6 +154,16 @@
|
||||
gap: var(--s-1);
|
||||
}
|
||||
|
||||
.play-looking__member-weapons {
|
||||
display: flex;
|
||||
gap: var(--s-1);
|
||||
}
|
||||
|
||||
.play-looking__member-weapon {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
.play-looking__member-power.league {
|
||||
filter: hue-rotate(180deg);
|
||||
}
|
||||
|
||||
BIN
public/img/weapons/52 Gal Deco.webp
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
public/img/weapons/52 Gal.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/img/weapons/96 Gal Deco.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/img/weapons/96 Gal.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/img/weapons/Aerospray MG.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/img/weapons/Aerospray PG.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/img/weapons/Aerospray RG.webp
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/img/weapons/Ballpoint Splatling Nouveau.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/img/weapons/Ballpoint Splatling.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/img/weapons/Bamboozler 14 Mk I.webp
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/img/weapons/Bamboozler 14 Mk II.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/img/weapons/Bamboozler 14 Mk III.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/img/weapons/Blaster.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/img/weapons/Bloblobber Deco.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
public/img/weapons/Bloblobber.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/img/weapons/Carbon Roller Deco.webp
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/img/weapons/Carbon Roller.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/img/weapons/Cherry H-3 Nozzlenose.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/img/weapons/Clash Blaster Neo.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/img/weapons/Clash Blaster.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/img/weapons/Classic Squiffer.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/img/weapons/Clear Dapple Dualies.webp
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
public/img/weapons/Custom Blaster.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/img/weapons/Custom Dualie Squelchers.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/img/weapons/Custom E-liter 4K Scope.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/img/weapons/Custom E-liter 4K.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/img/weapons/Custom Explosher.webp
Normal file
|
After Width: | Height: | Size: 4.8 KiB |
BIN
public/img/weapons/Custom Goo Tuber.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/img/weapons/Custom Hydra Splatling.webp
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/img/weapons/Custom Jet Squelcher.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/img/weapons/Custom Range Blaster.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/img/weapons/Custom Splattershot Jr.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/img/weapons/Dapple Dualies Nouveau.webp
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/img/weapons/Dapple Dualies.webp
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/img/weapons/Dark Tetra Dualies.webp
Normal file
|
After Width: | Height: | Size: 4.6 KiB |
BIN
public/img/weapons/Dualie Squelchers.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/img/weapons/Dynamo Roller.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
public/img/weapons/E-liter 4K Scope.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/img/weapons/E-liter 4K.webp
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
public/img/weapons/Enperry Splat Dualies.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/img/weapons/Explosher.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/img/weapons/Firefin Splat Charger.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/img/weapons/Firefin Splatterscope.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/img/weapons/Flingza Roller.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/img/weapons/Foil Flingza Roller.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/img/weapons/Foil Squeezer.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/img/weapons/Forge Splattershot Pro.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/img/weapons/Fresh Squiffer.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/img/weapons/Glooga Dualies Deco.webp
Normal file
|
After Width: | Height: | Size: 5.4 KiB |
BIN
public/img/weapons/Glooga Dualies.webp
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
BIN
public/img/weapons/Gold Dynamo Roller.webp
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/img/weapons/Goo Tuber.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/img/weapons/Grim Range Blaster.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/img/weapons/Grizzco Blaster.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/img/weapons/Grizzco Brella.webp
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
public/img/weapons/Grizzco Charger.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
public/img/weapons/Grizzco Slosher.webp
Normal file
|
After Width: | Height: | Size: 4.3 KiB |
BIN
public/img/weapons/H-3 Nozzlenose D.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/img/weapons/H-3 Nozzlenose.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/img/weapons/Heavy Splatling Deco.webp
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/img/weapons/Heavy Splatling Remix.webp
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
public/img/weapons/Heavy Splatling.webp
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
public/img/weapons/Hero Blaster Replica.webp
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
public/img/weapons/Hero Brella Replica.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/img/weapons/Hero Charger Replica.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
public/img/weapons/Hero Dualie Replicas.webp
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
public/img/weapons/Hero Roller Replica.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/img/weapons/Hero Shot Replica.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/img/weapons/Hero Slosher Replica.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/img/weapons/Hero Splatling Replica.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/img/weapons/Herobrush Replica.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/img/weapons/Hydra Splatling.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
public/img/weapons/Inkbrush Nouveau.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/img/weapons/Inkbrush.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
public/img/weapons/Jet Squelcher.webp
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
public/img/weapons/Kensa 52 Gal.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/img/weapons/Kensa Charger.webp
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
public/img/weapons/Kensa Dynamo Roller.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/img/weapons/Kensa Glooga Dualies.webp
Normal file
|
After Width: | Height: | Size: 5.5 KiB |
BIN
public/img/weapons/Kensa L-3 Nozzlenose.webp
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
public/img/weapons/Kensa Luna Blaster.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/img/weapons/Kensa Mini Splatling.webp
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
public/img/weapons/Kensa Octobrush.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/img/weapons/Kensa Rapid Blaster.webp
Normal file
|
After Width: | Height: | Size: 2.9 KiB |
BIN
public/img/weapons/Kensa Sloshing Machine.webp
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
BIN
public/img/weapons/Kensa Splat Dualies.webp
Normal file
|
After Width: | Height: | Size: 4.5 KiB |
BIN
public/img/weapons/Kensa Splat Roller.webp
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
public/img/weapons/Kensa Splatterscope.webp
Normal file
|
After Width: | Height: | Size: 2.6 KiB |
BIN
public/img/weapons/Kensa Splattershot Jr.webp
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
public/img/weapons/Kensa Splattershot Pro.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/img/weapons/Kensa Splattershot.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/img/weapons/Kensa Undercover Brella.webp
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
public/img/weapons/Krak-On Splat Roller.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/img/weapons/L-3 Nozzlenose D.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
public/img/weapons/L-3 Nozzlenose.webp
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
public/img/weapons/Light Tetra Dualies.webp
Normal file
|
After Width: | Height: | Size: 5.0 KiB |