-
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
Preserve ammo linkage on zone unload #62543
Conversation
6686d54
to
4a116aa
Compare
4a116aa
to
b903400
Compare
After I got the test setup somewhat properly it didn't fail a single time locally but of course it fails in CI and I can't replicate the failure. It seems like after
the items are not always available on the map right away, so it can fail. Not sure what the best fix is for that but it's probably real simple. I gotta sleep but this gets this issue most of the way there, I think! |
4bb75a9
to
0dba352
Compare
The test is still passing 100% of the time locally and failing 100% of the time on the "GCC 9, Curses, LTO" check (I assume my latest commit won't change this). I don't understand 🙃. Otherwise, everything seems to be working as described in the testing steps. I'll probably have to leave this as is, I'm out of ideas for now. Please feel free to ping me here or on the discord if anyone has any suggestions to fix the test, or drop it or whatever works best for stable release 🚀 |
f8af4bc
to
ab71d4a
Compare
ab71d4a
to
6a71a8d
Compare
Current failure is from an unrelated test, I think this is probably good to go. |
Summary
Bugfixes "Preserve ammo belt linkages when unloading with zones"
Purpose of change
Fixes #60310
Describe the solution
As a quick fix for stable, and as suggested by @RenechCDDA, copies the code that is responsible for preserving ammo belt linkages from
unload_activity_actor::unload
(the player manually unloading) to other code that is responsible for unloading using zones so that the linkages will also be preserved there. An ideal fix would be more DRY.The copied code is from:
Cataclysm-DDA/src/activity_actor.cpp
Lines 2929 to 2936 in 57c865e
I made some small modifications to spawn the linkages on the tile the unloaded item is on and not show the disassembly message so it doesn't spam them if many belts get unloaded back to back.
Describe alternatives you've considered
Testing
Additional context