Repaired items not stacking

These are old bug reports that have been closed.
Locked
The Wicked Flea
Miner
Miner
Posts: 25
Joined: Tue Jul 24, 2007 8:24 pm

In testing out my wrench codes it has become evident that if you repair items and you have multiple items of that type that the formerly damaged ones get placed into their own stack. So then you have an inventory list like:
  • 4 Damaged Laser Cannons
  • 1 Laser Cannon
  • 1 Laser Cannon
  • 1 Laser Cannon
Interestingly enough, when you jettison these items and re-loot them they all stack perfectly.

I suppose instead of repairing them I could "consume" the item and spawn a new one of that UNID into the player's inventory as a work around in the meantime.
Yugi
Fleet Officer
Fleet Officer
Posts: 1027
Joined: Sun Mar 05, 2006 8:21 am

Hunh, I thought this bug was meant to have been fixed ages ago :?

Maybe the method of repairing is having an effect - George?
The Wicked Flea
Miner
Miner
Posts: 25
Joined: Tue Jul 24, 2007 8:24 pm

Yugimotomanager wrote:Maybe the method of repairing is having an effect - George?
Well the code is based directly off the repair style of the Longzhu Sphere; so nothing is technically wrong with what I'm doing. Just a standard call to:

Code: Select all

(shpRepairItem gPlayerShip cursor)
Burzmali
Militia Commander
Militia Commander
Posts: 395
Joined: Tue Aug 15, 2006 12:14 am

Look at the code for the sphere, repairing an item struct only affects that one struct, not the rest of the ship's item structs. It would probably be better to remove and re-add the item to the ship after you are finished.
Locked