-
Notifications
You must be signed in to change notification settings - Fork 72
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 implant icons #679
add implant icons #679
Conversation
You can get the type name by following the type relation on the implant model, and then getting the name from the InvType model: https://github.com/eveseat/eveapi/blob/master/src/Models/Clones/CharacterImplant.php#L43-L47 $implant->type->typeName Also thanks for the contribution! |
Hey, thanks for the quick feedback! Sadly the jumpclones come via character->jump_clones I'll see if I can extend the model here without breaking anything and will update the PR in a bit |
Sorry, I did take a closer look. It does indeed look like seat does a weird thing with jump clone implants so that there can't be relations. The best way would probably be either Also, please confirm that you're really targeting seat 4? The master branch is still seat 4, for seat 5, target the 5.0.x branch |
I would prefer if the link to the typeName come from the model as opposed to the controller. The reason is that we can then use eager loading in order to reduce the number of sequential DB calls. I will post an example of how this is done tomorrow so you can have a look :) |
I tend to agree, but that would require some refactoring in eveapi. Implants are of a jump clone not stored as a column in a tables, but as a json array in a column of the jump clone: https://github.com/eveseat/eveapi/blob/5.0.x/src/database/migrations/2018_01_07_112709_create_character_jump_clones_table.php#L44 I do agree that this is a unconventional way and that implants of jump clones probablly deserve their own table so we can add relations, but the changes required for this are probably not trivial for a first-time contributor like zmsMarc. On the other hand, being worried about the performance of character sheets is justified, as this is viewed quite often. Lastly, if we go down the route of redesigning eveapi, we have to ask if this will be a breaking change to eveapi. While I'm generally not worried about making a small breaking change, we at least should look if it could break anything else. |
It would certainly be nice to have a proper relationship, but for now we could make the existing implementation in this PR a bit more efficient. Instead of this:
Something like this should reduce DB queries significantly:
|
small QoL change to see which of your jumpclones have implants
Could use a mouseover to show the name of a given implant, but I could not find how to map the ID to text