Skip to content
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

Fix items inside items carried by player being processed multiple times per turn #40875

Merged
merged 5 commits into from
May 26, 2020

Conversation

Hirmuolio
Copy link
Contributor

@Hirmuolio Hirmuolio commented May 26, 2020

Summary

SUMMARY: Bugfixes "Fix items inside items carried by player getting processed too many times"

Purpose of change

Fixes #40868
When combined with #40869 fixes #40193

Describe the solution

Processing of items carried by player began by processing all items the player had, including items inside items.
Additionally when each item was processed the items inside it were also processed.
This resulted in items inside items being processed multiple times.

Solution is to process all top level items the player has (=worn and held items). Items inside these items are processed when the container is processed.

There was also an extra processing done on all worn items. This is removed in "I do not think this does anything" commit. I do not think it did anything and one guess was that it was old code from when things like headlamps were processed separately. If anyone has certain knowledge on what it does please say what it did.

Describe alternatives you've considered

Testing

Items inside items carrioed by player are processed only once.
Tested with water in thermos in pocket with some debugging messages.

Grenades no longer blow up after one second if they are activated in pocket.

Additional context

@Hirmuolio Hirmuolio mentioned this pull request May 26, 2020
@ZhilkinSerg ZhilkinSerg merged commit 9fb35dd into CleverRaven:master May 26, 2020
@Hirmuolio Hirmuolio deleted the pockets branch May 28, 2020 15:46
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.

Items inside items carried by player are processed multiple times per turn Item insulation does not work
2 participants