Adjusted to int-> enum defs, fixed bug

develop
PatrikLundell 2020-02-07 20:49:56 +01:00 committed by Ben Lubar
parent 8122b95144
commit 1a695621c3
No known key found for this signature in database
GPG Key ID: 92939677AB59EDA4
1 changed files with 33 additions and 21 deletions

@ -1909,12 +1909,12 @@ uint8_t embark_assist::survey::translate_ew_edge(embark_assist::defs::world_tile
df::world_region_type east_region_type; df::world_region_type east_region_type;
if (own_edge) { if (own_edge) {
effective_edge = world_data->region_details[0]->edges.biome_x[i][k]; effective_edge = world_data->region_details[0]->edges.biome_y[i][k];
east_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i, k); east_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i, k);
west_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i - 1, k); west_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i - 1, k);
} }
else { else {
effective_edge = world_data->region_details[0]->edges.biome_x[i + 1][k]; effective_edge = world_data->region_details[0]->edges.biome_y[i + 1][k];
west_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i, k); west_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i, k);
east_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i + 1, k); east_region_type = embark_assist::survey::region_type_of(survey_results, x, y, i + 1, k);
} }
@ -1995,14 +1995,18 @@ void embark_assist::survey::survey_region_sites(embark_assist::defs::site_lists
break; break;
case df::world_site_type::Monument: case df::world_site_type::Monument:
if (site->subtype_info->lair_type != -1 || switch (site->subtype_info->monument_type) {
site->subtype_info->is_monument == 0) { // Not Tomb, which is visible already case df::monument_type::NONE:
} case df::monument_type::TOMB:
else if (site->subtype_info->lair_type == -1) { break; // NONE shouldn't appear, and Tombs are visible already
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'V' }); // Vault
} case df::monument_type::VAULT:
else { site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'V' });
break;
default:
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'M' }); // Any other Monument type. Pyramid? site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'M' }); // Any other Monument type. Pyramid?
break;
} }
break; break;
@ -2011,19 +2015,27 @@ void embark_assist::survey::survey_region_sites(embark_assist::defs::site_lists
break; break;
case df::world_site_type::LairShrine: case df::world_site_type::LairShrine:
if (site->subtype_info->lair_type == 0 || switch (site->subtype_info->lair_type) {
site->subtype_info->lair_type == 1 || case df::lair_type::NONE:
site->subtype_info->lair_type == 4) { // Only Rocs seen. Mountain lair? break;
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'l' }); // Lair
} case df::lair_type::SIMPLE_MOUND:
else if (site->subtype_info->lair_type == 2) { case df::lair_type::SIMPLE_BURROW:
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'L' }); // Labyrinth case df::lair_type::WILDERNESS_LOCATION:
} site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'l' });
else if (site->subtype_info->lair_type == 3) { break;
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'S' }); // Shrine
} case df::lair_type::LABYRINTH:
else { site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'L' });
break;
case df::lair_type::SHRINE:
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, 'S' });
break;
default:
site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, '?' }); // Can these exist? site_list->push_back({ (uint8_t)site->rgn_min_x , (uint8_t)site->rgn_min_y, '?' }); // Can these exist?
break;
} }
break; break;