[Aftershock] Fix Police bots (Again) #79040
Merged
+30
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Mods "[Aftershock] Fix the three police robots not dropping the correct corpse"
Purpose of change
A couple months back I noticed when implementing the Enforcer station that the police robots I had placed kept becoming lab bots after ever reload. I learned this was due to a migration on the base game. And was recommended to change the ids on the Aftershock robots to dodge the migration. Which I did. Except at the time I did not understand how "broken" robots worked and misplaced the broken prefix. Now whenever a copbot, eyebot, or riotbot dies it attempts to place a corpse item that does not exist.
Describe the solution
Once again change all the item ids on the robot corpses to use the correct placement of the broken prefix. Implement yet another migration to migrate any from the old and incorrect ids to the new and correct ones.
Describe alternatives you've considered
Leave the bug in. Not introduce a new migration since technically this bug has not made it into any stable versions.
Testing
Loaded my world where I was plagued by the bug. Game stopped throwing errors about the robot corpse id not existing. Robot corpses became the correct item.
Loaded a test world. Place the items, and the monster. Reloaded. Verified no items were replaced by vanilla migration or otherwise.
Additional context