View Single Post
11/05/20, 04:56 AM   #3
votan
 
votan's Avatar
AddOn Author - Click to view addons
Join Date: Oct 2014
Posts: 577
Originally Posted by GRascm View Post
To show the inventory menu, i use simple code:
Lua Code:
  1. SCENE_MANAGER:Show(menuEntryData.scene)

And the main problem is, that if i hit an "I" button to open inventory first, and than try to open it from my menu (pressing "start" on gamepad), everything works perfectly fine.
If the inventory scene gets initialized from custom code(=addon) everything is tainted. (insecure)
The build-in code is not written to take care of CallSecureProtected, because it normally doesn't need to.

Add the inventory fragment to the base scene at startup (built-in code will initialize it immediately)
And remove the fragment on EVENT_PLAYER_ACTIVATED. And beware, it could cause side-effects with other addons not expecting this to happen that early.

Last edited by votan : 11/05/20 at 05:26 AM.
  Reply With Quote