-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'inventory' always blank during the 'Location' event #2622
Comments
I apologize but I am unable to replicate the issue by injecting
at either the start or end of the default Perhaps your personality is overwriting the For the default personality I do see some scripts which
|
Hmm, OK. I tried it with a copy of the default EDDI personality (yeah, I know, I should have done that first. It was late, I was tired. 😅 ) and yep it worked. So I looked into my version of the Location script, adding that code snippet at the very start, and it worked. Well, to cut a long story short as they say, I traced it to a call in 'Location' to my 'System Exploration Report' script, and from there I traced it to the 'System material report'. In that script is a line setting 'inventory' to an inline function! I have gone through my personality and changed all instances of Thank you for pointing me in the right direction! I don't think I would have traced it so easily otherwise. 😄 |
Nice sleuthing! :-) |
…inventory` map used for tracking cargo. Resolves EDCD#2622.
…inventory` map used for tracking cargo. Resolves EDCD#2622.
…inventory` map used for tracking cargo. Resolves EDCD#2622.
What's Wrong (please be as specific as possible)
Expected
The 'inventory' object to always be populated when you are carrying cargo.
Observed
When used within the 'Location' event, either while playing the game, or clicking the test button, 'inventory' is empty, even when you have cargo on board.
Steps to reproduce
Configuration
My Investigation
Investigation Notes
I first noticed this when looking into adding some functionality that CMDR Yianniv provided to me regarding corrosive cargo, using v4.0.4-b1. I wanted to add a call to the code at the end of the 'Location' event script, but I was getting odd results, like I had no cargo, even though I had a few Thargoid items on board.
I narrowed it down to 'inventory' being empty during the 'Location' event (although 'cargoCarried' is correct). As 'Location' comes straight after 'Commander continued' when starting a game, I added the call to the 'Commander continued' script, and it worked as expected there, but not in 'Location'. As a workaround, I've set it to a State() variable in 'Commander continued' which I then use at the end of the 'Location' script.
I've tried going back to v4.0.3, but that is the same.
EDDI Logs
I'm not seeing any entries in the log for this.
Player journals
N/A
The text was updated successfully, but these errors were encountered: