piero-la-lune / FSE-Planner

FSEconomy map vizualisation application
MIT License
40 stars 15 forks source link

Features: Job expiration and trip only options in Route Finder #94

Closed jsilva74 closed 1 year ago

jsilva74 commented 2 years ago

This PR adds 3 features and 1 small fix to Route Finder that allows user to:

Motivation

Finder could build a very profitable route with jobs expiring too soon. The user, being able to enter a minimum job expire deadline, adds a useful mechanism of route refining. Also, since FSE doesn't allow mix VIP and Non-VIP jobs or add VIP jobs to a group, introducing these, allow Finder to return routes with jobs entirelly compatible, asuring it's continuity.

piero-la-lune commented 2 years ago

Sorry for the late reply, and thanks a lot for your contribution.

Regarding the first feature (expiration time), I am not in favor of integrating it into FSE Planner for a very dumb reason. I perfectly understand why this would be very useful. However, for this to work, you need to save the expiration time of each individual job, which is stored into the browser Local Storage. The issue is that there is a limit on the amount of data a browser allow a website to store into Local Storage. When loading large areas, I have seen users reach this limit (and had to optimize the data to stay bellow this limit). Storing more data will unfortunately be an issue for those issues.

What could be done instead is to introduce a new global setting 'Expiration time'. The app would simply discard all jobs that expires before XXX when loading them from FSE. This way, no need to store the expiration date, the app does not even store those jobs (it means they will not be shown on the map of available jobs either). What do you think of that?

For the other features, could you split them into different merge requests? It would be easier to review them.

I made some changes in the code, you might have to deal with conflicts, sorry :(