Skip to content

Commit

Permalink
fix: migration of acid anthills (#3661)
Browse files Browse the repository at this point in the history
Fixed migration of acid anthills
  • Loading branch information
Vollch authored Nov 13, 2023
1 parent f9d7b2b commit 33db1d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion data/json/obsoletion/terrains.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@
"ants_larvae",
"ants_larvae_acid",
"ants_queen",
"ants_queen_acid"
"ants_queen_acid",
"ants_larvae_acid_north",
"ants_queen_acid_north"
]
}
]
13 changes: 11 additions & 2 deletions src/savegame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,13 +389,22 @@ void overmap::convert_terrain(
old == "fema_3_1" || old == "fema_3_2" || old == "fema_3_3" ||
old == "mine_entrance" || old == "underground_sub_station" ||
old == "sewer_sub_station" || old == "anthill" || old == "acid_anthill" ||
old == "ants_larvae" || old == "ants_larvae_acid" || old == "ants_queen" ||
old == "ants_queen_acid" || old == "ants_food" ) {
old == "ants_larvae" || old == "ants_queen" || old == "ants_food" ) {
ter_set( pos, oter_id( old + "_north" ) );
} else if( old.compare( 0, 10, "mass_grave" ) == 0 ) {
ter_set( pos, oter_id( "field" ) );
} else if( old == "mine_shaft" ) {
ter_set( pos, oter_id( "mine_shaft_middle_north" ) );
} else if( old == "ants_larvae_acid" ) {
ter_set( pos, oter_id( "acid_ants_larvae_north" ) );
} else if( old == "ants_queen_acid" ) {
ter_set( pos, oter_id( "acid_ants_queen_north" ) );
} else if( old == "ants_larvae_acid_north" ) {
// Fix for saves affected by messed migration, remove me in a while
ter_set( pos, oter_id( "acid_ants_larvae_north" ) );
} else if( old == "ants_queen_acid_north" ) {
// Fix for saves affected by messed migration, remove me in a while
ter_set( pos, oter_id( "acid_ants_queen_north" ) );
}

for( const auto &conv : nearby ) {
Expand Down

0 comments on commit 33db1d8

Please sign in to comment.