Skip to content

Conversation

@Chryssie
Copy link

@Chryssie Chryssie commented Mar 4, 2025

This should fix the right-click menu issue. It appears that OnlineGetUserItems() returns nil in some cases causing the not onlineitems[ware] check in menu_interactmenu.lua on line 5097 (of the core game, not the mod) to throw. Not sure if this is an Egosoft bug or something downstream of delaying the render/draw but this does fix the issue. May be possible to fix it differently though in a better way.

This just explictly adds onlineitems == nil or check to guard against that case.

@Chryssie Chryssie force-pushed the fix-interact-menu-bug branch from ad7807f to a9312cc Compare March 6, 2025 12:44
@Chryssie
Copy link
Author

Chryssie commented Mar 6, 2025

Due note, I can't figure out how to get the the plugins working locally with this setup so I can't test it as-is. However, I have been able to test it with the addition of #26 which I can get working locally and both the new (a9312cc) and the previous change (ad7807f) resolve the issue, although the new change doesn't require duplicating a bunch of Egosoft code.

@Chryssie Chryssie marked this pull request as draft March 7, 2025 13:09
@Chryssie
Copy link
Author

Chryssie commented Mar 7, 2025

Unfortunately overriding the function causes an error, may need to revert to ad7807f.

[=ERROR=] 15.29 D:/SteamLibrary/steamapps/common/X4 Foundations/extensions/sn_mod_support_apis/ui/OnlineGetUs...(6): (from presentation 'ui/widget/presentations/widget_fullscreen/widget_fullscreen.bgf') Restricted function OnlineGetUserItems() called from non-verified source 'extensions/sn_mod_support_apis/ui/OnlineGetUserItemsPatch.lua'! Aborting call!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant