Monkestation / Monkestation2.0

A monkestation rebase to TG code
https://monkestation.com/
GNU Affero General Public License v3.0
47 stars 247 forks source link

Pka modules being used more than once #597

Closed RandomDudeFromTheRim closed 6 months ago

RandomDudeFromTheRim commented 12 months ago

Round ID:

2579

Testmerges:

489

Reproduction:

  1. Get any proto-kinetic accelerator variant
  2. Get a pile of modules
  3. Click with the gun at the pile as fast as you can
  4. Waste 3 modules, get 5 in your gun
  5. Try to remove some of the modules by hand and realize its near impossible
DexeeXI commented 12 months ago

505 #537 #549 #578 #489 are the active TMs.

Using instructions provided above, it is confirmed that modules are being added and it does not pick up what is on the floor. Image provided shows 9 of 10 modules taken from the modkit debug box (10 of everything + set of trophies for crushers) remains on the floor with 3 installed on the PKA itself:

image image

Viewing the Variables of the PKA used for testing in this case, it appears that there is only one reference in the contents list of the PKA:

image

And on the modkits list, it shows 3 refs to the same modkit.

image

It looks like there is some sort of reference stacking that is causing the underlying issue as one can take each modkit by hand and place it into the PKA and works as intended. But the side function of being able to use the PKA in hand on a modkit to install a modkit is what is the root cause of the issue, though not the function itself.