Comments (3)
Currently I believe it uses the URL if present, and the face otherwise. No need to change that here unless that behavior is a problem. Cause if real player photos is Record<string, string | Face>
then it's only one of the two that will be added - but if it's a Face
you would need to delete any existing imgURL so it doesn't get overridden.
from zengm.
It's a good idea.
Player photos is currently (in TypeScript terms) Record<string, string>
but instead it could be Record<string, string | Face>
, to support either URLs or face objects, or even both mixed together. typeof x === "string"
can distinguish if it's a URL (string) or a face (object).
I think basically the only part of code that'd need to change is
zengm/src/worker/core/league/processPlayerNewLeague.ts
Lines 29 to 41 in aa859e9
p.imgURL
and p.face
.
Please feel free to give it a shot!
from zengm.
Cool, I'll take a look.
Do you have an opinion on the scenario: if a player has both photo URL & and face JSON present in player profile, which to use? In the game currently, users can decide in player profiles, just wanted to see if you would prefer a default.
from zengm.
Related Issues (20)
- Export player as a trading card image HOT 10
- one sided trades
- Separate overtime wins and regulation wins in hockey HOT 1
- Add levels to luxury tax multiplier in NBA
- Playoffs Not Working HOT 4
- Scheduled Events Stadium Capacity Not Updating HOT 1
- Annual performance evaluation HOT 1
- Hockey: show if a goal was scored with an extra attacker by "EA"
- Player Development Investigation HOT 1
- Colleges Baseball HOT 1
- Organizing repo structure with sub-directories HOT 1
- Trade Filters by position HOT 2
- Frivolity for oldest teams and youngest teams to win championships HOT 3
- Why are source maps not working right in dev mode? HOT 19
- Loading URL via VPN HOT 4
- [Idea] Force Retire HOT 3
- Deploy website onto GitHub pages? HOT 1
- [Idea] Soccer GM HOT 3
- Displaying Ties and OTL in Records HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zengm.