Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Fix incorrect migration

Open hexagonrecursion opened this issue 1 year ago • 4 comments
trafficstars

Summary

None

Purpose of change

Fixes #72583

#72431 removed some oter_id's, but made a couple of mistakes when writing a migration

Describe the solution

  1. "dirt_road_forest_3way_north" and 3 other rotations never existed (verified via git log -S) - I replaced it with the correct id - "dirt_road_3way_forest_north" - 3way before forest instead of after it
  2. It looks like the map I was testing this with generated "cabin_liam_driveway_north" rather than "cabin_liam_driveway" - I kept "cabin_liam_driveway" migration just in case. Note: we don't need migrations for "cabin_liam_driveway_west" and 2 other rotations because cabin_liam has "rotate": false

Testing

Loaded my save - no more errors from overmap::unserialize(const JsonObject&)] Loaded invalid oter_id

Additional context

I am still getting this error in my save:

ERROR : src/generic_factory.h:513 [int_id<T> generic_factory<T>::convert(const string_id<T>&, const int_id<T>&, bool) const [with T = oter_t]] invalid overmap terrain id "dirt_road_3way_east"

The log does contain messages about successful migrations from dirt_road_3way_east to rural_road_nsw. It appears something in C++ might be trying to read a save file before it is migrated - out of scope for this PR - will debug and report separately

hexagonrecursion avatar Mar 24 '24 18:03 hexagonrecursion

CI failed - unrelated build error: "no matching function for call to 'write_var_value'". Did someone check in and merge code that fails to build?

hexagonrecursion avatar Mar 24 '24 19:03 hexagonrecursion

It was two PRs being merged at once that didn't account for each other, it's fixed on master now if you want to rebase.

perryprog avatar Mar 24 '24 21:03 perryprog

Whoops sorry I meant to double check those before I put the PR up, writing the migration was really messing with my head

Procyonae avatar Mar 24 '24 21:03 Procyonae

Can't run tests:

item homeopathic_pills could not be put in container pillbox when spawning item group pillbox_used: not enough space. This can be resolved either by changing the container or contents to ensure that they fit, or by specifying an overflow behaviour via "on_overflow" on the item group. item antifungal could not be put in container pillbox when spawning item group pillbox_used: not enough space. This can be resolved either by changing the container or contents to ensure that they fit, or by specifying an overflow behaviour via "on_overflow" on the item group.

possibly broken by #72261. Ping: @tmqCypher

hexagonrecursion avatar Mar 25 '24 09:03 hexagonrecursion