fbl773 / point-b_ank

Forked from PCubed by the marvelous 371 team 4
Apache License 2.0
0 stars 0 forks source link

Artifact number count #14

Open Flake-bender opened 5 months ago

Flake-bender commented 5 months ago

~bug

The auto-generated number for artifacts continues to count upwards, even if the current entry is canceled before saving, and then a new one is restarted.

The first artifact I actually added to the test site is labeled as "(Site name) 3", because I had previously started to enter some, and then got carried away entering parameter categories, and wouldn't actually add the item. But the time I actually added one, the count started at 3.

Edit: and it continues to count upwards from there. The 2nd artifact I actually saved has number 4

Edit 2: when I start entering an artifact and then cancel it, now, it doesn't continue to count.

So, it only seems to erroneous run the count when there's not yet any artifacts.

fbl773 commented 5 months ago

If you cancel before saving, nothing should happen if it is making an ID - That is a bug. As for why the count continues to increase, that is because it is the "Unique ID" For that item (site, point, etc).

For example, if I add to an empty catalogue sites A, B, and C, they will get ID's 0,1,2 respectively. If I delete site C, that ID has still been spent, so the next site (or point, or xyz) will be assigned ID 3.

possible solutions: I asked for the team to include the unique ID to the Projectile point name, but we could remove it from the site name (it does not need to be there). I'm also very open to applying whatever the industry standard is for unique ID's of artifacts.

Flake-bender commented 5 months ago

A catalogue # is standard for the industry, so having them labeled as [site name] + [x] is good.

The method by which the count is done just needs a tweak so that is doesn't add unsaved items to the count.