-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update Aftershock dead survivor loot item group #62236
Conversation
It should spawn correctly in game though, this 393f630 fixed the error when loading the game at least. Maybe we need to do somethign similar for the test run? |
Item group consistency check also calls |
So you mean it doesn't actually work in game? |
I'm not 100% sure how these item groups with corpses work. But as far as I understand they're supposed to create corpses that "wear" stuff with the worn stuff containing other items spawned in the group. Not sure if this fix will still produce that result or if it will spawn a corpse next to some other items. If it's the latter, then the real issue is more like #59873: some item group doesn't have appropriate container items to contain all the additional things it spawns. |
Okay so I don't know where I messed up my test. Still I think it would be better to find a c++ fix so that the items are still put into corpses as if they were wearing it rather than droping it next to them. Plus in vanilla the mapgened corpse can revive and they'll keep their loot if they have it inside the pocket |
Looking into it a bit more, the issue seems to be even still different: Cataclysm-DDA/src/item_group.cpp Lines 126 to 128 in d1f765d
item::can_contain will also check all nested pockets of the container, however item::put_in can only put things directly in the container. That's why it sometimes tries to insert things into a corpse the normal way instead of forcing it in or putting it into an appropriate container. So that needs to be sorted out one way or the other.
|
Summary
None
Purpose of change
#61575 forbids corpses containing items. This change breaks an item group defined in the Aftershock mod. This is causing errors in basic build test in almost all recent pull requests.
Describe the solution
Update the broken item group to spawn the corpse alongside with the loot items.
Describe alternatives you've considered
Testing
./tests/cata_test --mods=dda,aftershock "~*"
no longer errors.Additional context