Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add suit options #19

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/display.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,15 @@ const drawFeature = (svg: SVGSVGElement, face: Face, info: FeatureInfo) => {
return;
}

if (
["suit", "suit2"].includes(face.jersey.id) &&
(info.name == "accessories" || info.name == "glasses")
) {
//Don't show headband, facemask, etc if person is wearing a suit
//might be a smarter way to do that includes statement, but wanted to throw in all non-jersey clothing. Only those 2 right now
return;
}

// @ts-ignore
let featureSVGString = svgs[info.name][feature.id];
if (!featureSVGString) {
Expand Down
35 changes: 35 additions & 0 deletions svgs/jersey/suit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 41 additions & 0 deletions svgs/jersey/suit2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.