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

Show vehicle part location (and search?) #133

Open
narc0tiq opened this issue Apr 28, 2023 · 2 comments
Open

Show vehicle part location (and search?) #133

narc0tiq opened this issue Apr 28, 2023 · 2 comments

Comments

@narc0tiq
Copy link

Vehicle parts have an install "location" within their vehicle tile (e.g., "location": "center" in the raw JSON on vehicle_part/animal_compartment). These define exclusion groups: no two vehicle parts with the same location can be installed in the same tile.

As far as I know, the locations themselves are completely freeform strings, but it would still be nice to be able to see the opportunity cost of installing, say, a 60L tank (in location fuel_source: it blocks, among other things, a large storage battery from being in the same tile).

nornagon added a commit that referenced this issue Apr 28, 2023
@nornagon
Copy link
Owner

nornagon commented Apr 28, 2023

showing the location is pretty straightforward, so i did that. listing out parts by their location is a little more difficult, as "vehicle_part_location" isn't really a "kind of thing" in the JSON; it's just a string. I could pretend that it was a kind of thing and make /vehicle_part_location/center show a list of all vehicle parts with the location "center", but I'm not sure I really want to do that. The main vehicle part list categorizes by "categories", and there's no obvious way to show multiple axes here (category then location? location then category? a toggle? all could work, none is clearly best).

Perhaps someday vehicle part locations will become real things in the JSON (e.g. it would be useful to store their Z-order in! right now that's a hard-coded table). For now, well, at least you can see the location on the part page? :)

@narc0tiq
Copy link
Author

it's just a string

Yep, you'd have to build up your own index in some kind of preprocessing step. I'm not sure it's worth doing, but maybe something to keep in mind in some future when you have a bunch of time?

no obvious way to show multiple axes

Honestly, the easy answer is not to do it, of course! Otherwise, a dropdown or set of radio buttons could allow the user to choose between different view options, but that would make it a very unusual listing from all the others. Eh... who knows, maybe you could find a use for this dropdown capability in the other listings? Sort item types by, uh... volume? Monsters by evolution depth*? Dunno, I feel there's potentially something there but also clearly not something necessary, if you know what I mean.

at least you can see the location on the part page

Yes! That honestly goes a long way towards being able to decide what should go where, but also to diagnose why something can't go somewhere. As an example of the latter, I was very shocked (pun not intended) to find that shock absorbers are mutually exclusive with armor plating.


  • I'm not very good at graphviz, but I wonder how horrible it would be to make a diagram with the graph of zombie evolutions. I have a suspicion it would look really cool, but probably not nicely broken down into "tiers", if you know what I mean.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants