Skip to content

Commit

Permalink
Typos and make legacy read silent
Browse files Browse the repository at this point in the history
  • Loading branch information
Procyonae committed Jun 12, 2024
1 parent 8e071e1 commit 535d3c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions doc/OBSOLETION_AND_MIGRATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Move multiple ids that don't need to be unique any more to a single id

# Field migration

Field migration replaces the provided id as submaps are loaded. You can use `fd_null` with `to_field` to remove furniture entirely without creating errors.
Field migration replaces the provided id as submaps are loaded. You can use `fd_null` with `to_field` to remove the field entirely without creating errors.

```json
{
Expand All @@ -172,7 +172,7 @@ Field migration replaces the provided id as submaps are loaded. You can use `fd_
},
```

## Example
## Examples

Migrate an id

Expand Down
2 changes: 1 addition & 1 deletion src/init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ void DynamicDataLoader::check_consistency( loading_ui &ui )
},
{ _( "Monster groups" ), &MonsterGroupManager::check_group_definitions },
{ _( "Furniture and terrain" ), &check_furniture_and_terrain },
{ _( "Furniture amd terrain migrations" ), &ter_furn_migrations::check },
{ _( "Furniture and terrain migrations" ), &ter_furn_migrations::check },
{ _( "Constructions" ), &check_constructions },
{ _( "Crafting recipes" ), &recipe_dictionary::check_consistency },
{ _( "Professions" ), &profession::check_definitions },
Expand Down
7 changes: 3 additions & 4 deletions src/savegame_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5046,10 +5046,9 @@ void submap::load( const JsonValue &jv, const std::string &member_name, int vers
m->fld[i][j].add_field( ft.id(), intensity, time_duration::from_turns( age ) ) ) {
field_count++;
}
} else {
field_json.throw_error( "field type relying on ancient legacy int method" );
field_json.next_value(); // skip intensity
field_json.next_value(); // skip age
} else { // Handle removed int enum method
field_json.next_value(); // Skip intensity
field_json.next_value(); // Skip age
}
}
}
Expand Down

0 comments on commit 535d3c0

Please sign in to comment.