Jump to content

Welcome to the Forum!

The best place to exchange builds and ideas! Vote for the best ideas and suggestions here.

Join the Avorion Discord!

Connect with other passionate players and talk about the latest news.
Discord

DLC Avorion Into the Rift Out Now!

Now available on Steam!
Steam

[solved] shop.lua issue


ViperG
 Share

Recommended Posts

I've downloaded a few mods (mostly more subsystems in equipment docs, more turrets being sold, etc) recently but they seem to be bugged or not work. So i've been making my own based off these and I've ran into a problem.

I've been able to increase the inventory no problem, and include page left/right scrollers no problem (similar to the sell items back to the equipment doc page)

However it appears I'm doing something wrong, or there is a hardcoded limit in the engine for the visual line items that are listed on buying items.

The issue appears when you go to (equipment dock buy gui) page 2 in the listing of the sold items. While the title caption, colors, icon, price and buy button all update to the correct information, 2 items do not update, and use the information from the initially created 1st page listing, which are the item mouse hover tooltip and the actual buy information for the item. They seem to be cached/only set once they are created and do not update. 

So for example, if I scroll to the 3rd page of turrets or subsystems and I mouse over the 1st line item on page 3, it shows the tooltip information from the 1st page. The buy button is highlighted correctly (greyed out or not greyed out, based off reputation) but clicking it attempts to buy the item from the 1st page. 

So basically the gui line items element fields ALL properly update except for Tooltips and Actual Button item for purchasing. 

I'm at work so don't have any source code to provide, however all I really did was take the SELL section (which has multiple pages and shows correct tooltips on page 2 or 3 etc) and adopted it for the buy section. But the tooltips/buy item populate once, then are locked do not update from that point on (but the other items do populate correctly, like title caption color, mineral, price etc etc).

Curious if anyone has experience with this or if its a engine limitation.  I can provide code if needed when I get home. 

Perhaps I can make a clear/re-build function for the tooltips / button item buy per page change. Not sure why it works in sell mode and not in buy mode. 

[Edit] I figured it out, I had to over ride the item in both the Buttonbuy function and hover functions in the shop.lua file to have the correct item

Edited by ViperG
Link to comment
Share on other sites

  • ViperG changed the title to [solved] shop.lua issue

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...