Freelancer-Sirius-Revival / FLSR

The main mod files of Freelancer: Sirius Revival for the game "Freelancer".
https://fl-sr.eu
4 stars 2 forks source link

Buying a launcher that includes an ammunition purchase takes away more credits than intended if the cargo hold is full #882

Open Caenen opened 1 month ago

Caenen commented 1 month ago

Noticed this on the Starkiller torpedo, which also buys a torpedo alongside the purchase (bumping the nominal cost to 575k credits);

I got curious and checked what happens when you purchase the item while your cargo cannot accomodate for the ammunition because of the volume plugin, and sure enough, you spend the full 575k credits but only get the launcher worth 500k.

I have not yet tested if the same bug exists in vanilla when purchasing a launcher while already stocking 50 of its ammunition.

A workaround to this bug would be to not make any equipment come with ammunition that costs cargo volume, however the bug itself is unimportant enough that it's likely a WNF, until we add something that forces us to tackle it in the future.

erikroe commented 1 month ago

I'd simply remove any free ammo that comes with launchers. Fixing this actual bug wont be worth it.

Caenen commented 1 month ago

I have not yet tested if the same bug exists in vanilla when purchasing a launcher while already stocking 50 of its ammunition.

It appears that this works correctly in vanilla; if the free ammo would exceed the particular ammo's cap it gets adjusted appropriately.

I think the convenience of getting a little bit of ammo with the purchase of launchers outweights the occasional little bit of money lost to the player to this bug, so I am not going to remove free ammo from any of the laucher with cargo volume cost either right now.

erikroe commented 1 month ago

Since most ammo uses cargo volume I think it would be worth discussing this decision further.