Merge remote-tracking branch 'PatrikLundell/embark-assistant' into develop

develop
lethosor 2018-06-21 15:54:03 -04:00
commit 46e31305a1
6 changed files with 330 additions and 81 deletions

@ -58,9 +58,15 @@ namespace embark_assist {
int16_t biome_index[10]; // Indexed through biome_offset; -1 = null, Index of region, [0] not used
int16_t biome[10]; // Indexed through biome_offset; -1 = null, df::biome_type, [0] not used
uint8_t biome_count;
bool evil_weather[10];
bool evil_weather_possible;
bool evil_weather_full;
bool blood_rain[10];
bool blood_rain_possible;
bool blood_rain_full;
bool permanent_syndrome_rain[10];
bool permanent_syndrome_rain_possible;
bool permanent_syndrome_rain_full;
bool temporary_syndrome_rain[10];
bool temporary_syndrome_rain_possible;
bool temporary_syndrome_rain_full;
bool reanimating[10];
bool reanimating_possible;
bool reanimating_full;
@ -204,6 +210,25 @@ namespace embark_assist {
Very_Deep
};
enum class syndrome_rain_ranges : int8_t {
NA = -1,
Any,
Permanent,
Temporary,
Not_Permanent,
None
};
enum class reanimation_ranges : int8_t {
NA = -1,
Both,
Any,
Thralling,
Reanimation,
Not_Thralling,
None
};
/* // Future possible enhancement
enum class freezing_ranges : int8_t {
NA = -1,
@ -232,9 +257,9 @@ namespace embark_assist {
all_present_ranges soil_min_everywhere;
soil_ranges soil_max;
/*freezing_ranges freezing;*/
yes_no_ranges evil_weather; // Will probably blow up with the magic release arcs...
yes_no_ranges reanimation;
yes_no_ranges thralling;
yes_no_ranges blood_rain; // Will probably blow up with the magic release arcs...
syndrome_rain_ranges syndrome_rain;
reanimation_ranges reanimation;
int8_t spire_count_min; // N/A(-1), 0-9
int8_t spire_count_max; // N/A(-1), 0-9
magma_ranges magma_min;

@ -259,7 +259,9 @@ command_result embark_assistant(color_ostream &out, std::vector <std::string> &
for (uint8_t l = 1; l < 10; l++) {
embark_assist::main::state->survey_results[i][k].biome_index[l] = -1;
embark_assist::main::state->survey_results[i][k].biome[l] = -1;
embark_assist::main::state->survey_results[i][k].evil_weather[l] = false;
embark_assist::main::state->survey_results[i][k].blood_rain[l] = false;
embark_assist::main::state->survey_results[i][k].permanent_syndrome_rain[l] = false;
embark_assist::main::state->survey_results[i][k].temporary_syndrome_rain[l] = false;
embark_assist::main::state->survey_results[i][k].reanimating[l] = false;
embark_assist::main::state->survey_results[i][k].thralling[l] = false;
}

@ -46,9 +46,9 @@ namespace embark_assist {
soil_min,
soil_min_everywhere,
soil_max,
evil_weather,
blood_rain,
syndrome_rain,
reanimation,
thralling,
spire_count_min,
spire_count_max,
magma_min,
@ -451,9 +451,7 @@ namespace embark_assist {
case fields::waterfall:
case fields::flat:
case fields::evil_weather:
case fields::reanimation:
case fields::thralling:
case fields::blood_rain:
{
embark_assist::defs::yes_no_ranges k = embark_assist::defs::yes_no_ranges::NA;
while (true) {
@ -576,6 +574,91 @@ namespace embark_assist {
break;
case fields::syndrome_rain:
{
embark_assist::defs::syndrome_rain_ranges k = embark_assist::defs::syndrome_rain_ranges::NA;
while (true) {
switch (k) {
case embark_assist::defs::syndrome_rain_ranges::NA:
element->list.push_back({ "N/A", static_cast<int8_t>(k) });
break;
case embark_assist::defs::syndrome_rain_ranges::Any:
element->list.push_back({ "Any Syndrome", static_cast<int8_t>(k) });
break;
case embark_assist::defs::syndrome_rain_ranges::Permanent:
element->list.push_back({ "Permanent Syndrome", static_cast<int8_t>(k) });
break;
case embark_assist::defs::syndrome_rain_ranges::Temporary:
element->list.push_back({ "Temporary Syndrome", static_cast<int8_t>(k) });
break;
case embark_assist::defs::syndrome_rain_ranges::Not_Permanent:
element->list.push_back({ "Not Permanent Syndrome", static_cast<int8_t>(k) });
break;
case embark_assist::defs::syndrome_rain_ranges::None:
element->list.push_back({ "No Syndrome", static_cast<int8_t>(k) });
break;
}
if (k == embark_assist::defs::syndrome_rain_ranges::None) {
break;
}
k = static_cast <embark_assist::defs::syndrome_rain_ranges>(static_cast<int8_t>(k) + 1);
}
}
break;
case fields::reanimation:
{
embark_assist::defs::reanimation_ranges k = embark_assist::defs::reanimation_ranges::NA;
while (true) {
switch (k) {
case embark_assist::defs::reanimation_ranges::NA:
element->list.push_back({ "N/A", static_cast<int8_t>(k) });
break;
case embark_assist::defs::reanimation_ranges::Both:
element->list.push_back({ "Reanimation & Thralling", static_cast<int8_t>(k) });
break;
case embark_assist::defs::reanimation_ranges::Any:
element->list.push_back({ "Reanimation or Thralling", static_cast<int8_t>(k) });
break;
case embark_assist::defs::reanimation_ranges::Thralling:
element->list.push_back({ "Thralling", static_cast<int8_t>(k) });
break;
case embark_assist::defs::reanimation_ranges::Reanimation:
element->list.push_back({ "Reanimation", static_cast<int8_t>(k) });
break;
case embark_assist::defs::reanimation_ranges::Not_Thralling:
element->list.push_back({ "Not Thralling", static_cast<int8_t>(k) });
break;
case embark_assist::defs::reanimation_ranges::None:
element->list.push_back({ "None", static_cast<int8_t>(k) });
break;
}
if (k == embark_assist::defs::reanimation_ranges::None) {
break;
}
k = static_cast <embark_assist::defs::reanimation_ranges>(static_cast<int8_t>(k) + 1);
}
}
break;
case fields::spire_count_min:
case fields::spire_count_max:
for (int16_t k = -1; k <= 9; k++) {
@ -834,16 +917,16 @@ namespace embark_assist {
state->finder_list.push_back({ "Min Soil Everywhere", static_cast<int8_t>(i) });
break;
case fields::evil_weather:
state->finder_list.push_back({ "Evil Weather", static_cast<int8_t>(i) });
case fields::blood_rain:
state->finder_list.push_back({ "Blood Rain", static_cast<int8_t>(i) });
break;
case fields::reanimation:
state->finder_list.push_back({ "Reanimation", static_cast<int8_t>(i) });
case fields::syndrome_rain:
state->finder_list.push_back({ "Syndrome Rain", static_cast<int8_t>(i) });
break;
case fields::thralling:
state->finder_list.push_back({ "Thralling", static_cast<int8_t>(i) });
case fields::reanimation:
state->finder_list.push_back({ "Reanimation", static_cast<int8_t>(i) });
break;
case fields::clay:
@ -1058,19 +1141,19 @@ namespace embark_assist {
static_cast<embark_assist::defs::all_present_ranges>(state->ui[static_cast<uint8_t>(i)]->current_value);
break;
case fields::evil_weather:
finder.evil_weather =
case fields::blood_rain:
finder.blood_rain =
static_cast<embark_assist::defs::yes_no_ranges>(state->ui[static_cast<uint8_t>(i)]->current_value);
break;
case fields::reanimation:
finder.reanimation =
static_cast<embark_assist::defs::yes_no_ranges>(state->ui[static_cast<uint8_t>(i)]->current_value);
case fields::syndrome_rain:
finder.syndrome_rain =
static_cast<embark_assist::defs::syndrome_rain_ranges>(state->ui[static_cast<uint8_t>(i)]->current_value);
break;
case fields::thralling:
finder.thralling =
static_cast<embark_assist::defs::yes_no_ranges>(state->ui[static_cast<uint8_t>(i)]->current_value);
case fields::reanimation:
finder.reanimation =
static_cast<embark_assist::defs::reanimation_ranges>(state->ui[static_cast<uint8_t>(i)]->current_value);
break;
case fields::clay:

@ -209,6 +209,11 @@ namespace embark_assist{
help_text.push_back("Min/Max soil uses the same terminology as DF for 1-4. The Min Soil");
help_text.push_back("Everywhere toggles the Min Soil parameter between acting as All and");
help_text.push_back("and Present.");
help_text.push_back("Syndrome Rain allows you to search for Permanent and Temporary syndromes,");
help_text.push_back("where Permanent allows for Temporary ones as well, but not the reverse, as");
help_text.push_back("Not Permanent matches everything except Permanent syndromes.");
help_text.push_back("Reanimation packages thralling and reanimation into a single search");
help_text.push_back("criterion. Not Tralling means nothing and just reanimation is matched.");
help_text.push_back("The parameters for biomes, regions, etc. all require that the required");
help_text.push_back("feature is Present in the embark, and entering the same value multiple");
help_text.push_back("times does nothing (the first match ticks all requirements off). It can be");
@ -254,9 +259,9 @@ namespace embark_assist{
help_text.push_back(" emulate the sizing logic exactly.");
help_text.push_back("- There's currently a DF bug (#0010267) that causes adamantine spires");
help_text.push_back(" reaching caverns that have been removed at world gen to fail to be");
help_text.push_back(" generated. It's likely this bug also affects magma pools.");
help_text.push_back(" generated at all. It's likely this bug also affects magma pools.");
help_text.push_back(" This plugin does not address this but scripts can correct it.");
help_text.push_back("Version 0.3 2018-02-26");
help_text.push_back("Version 0.4 2018-06-21");
break;
}

@ -48,7 +48,9 @@ namespace embark_assist {
bool flux_found = false;
uint8_t max_soil = 0;
bool uneven = false;
bool evil_weather_found = false;
bool blood_rain_found = false;
bool permanent_syndrome_rain_found = false;
bool temporary_syndrome_rain_found = false;
bool reanimation_found = false;
bool thralling_found = false;
uint8_t spire_count = 0;
@ -183,21 +185,39 @@ namespace embark_assist {
if (finder->soil_max != embark_assist::defs::soil_ranges::NA &&
mlt->at(i).at(k).soil_depth > static_cast<uint16_t>(finder->soil_max)) return false;
// Evil Weather
if (survey_results->at(x).at(y).evil_weather[mlt->at(i).at(k).biome_offset]) {
if (finder->evil_weather == embark_assist::defs::yes_no_ranges::No) return false;
evil_weather_found = true;
// Blood Rain
if (survey_results->at(x).at(y).blood_rain[mlt->at(i).at(k).biome_offset]) {
if (finder->blood_rain == embark_assist::defs::yes_no_ranges::No) return false;
blood_rain_found = true;
}
// Syndrome Rain, Permanent
if (survey_results->at(x).at(y).permanent_syndrome_rain[mlt->at(i).at(k).biome_offset]) {
if (finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::Temporary ||
finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::Not_Permanent ||
finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::None) return false;
permanent_syndrome_rain_found = true;
}
// Syndrome Rain, Temporary
if (survey_results->at(x).at(y).temporary_syndrome_rain[mlt->at(i).at(k).biome_offset]) {
if (finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::Permanent ||
finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::None) return false;
temporary_syndrome_rain_found = true;
}
// Reanmation
if (survey_results->at(x).at(y).reanimating[mlt->at(i).at(k).biome_offset]) {
if (finder->reanimation == embark_assist::defs::yes_no_ranges::No) return false;
if (finder->reanimation == embark_assist::defs::reanimation_ranges::Thralling ||
finder->reanimation == embark_assist::defs::reanimation_ranges::None) return false;
reanimation_found = true;
}
// Thralling
if (survey_results->at(x).at(y).thralling[mlt->at(i).at(k).biome_offset]) {
if (finder->thralling == embark_assist::defs::yes_no_ranges::No) return false;
if (finder->reanimation == embark_assist::defs::reanimation_ranges::Reanimation ||
finder->reanimation == embark_assist::defs::reanimation_ranges::Not_Thralling ||
finder->reanimation == embark_assist::defs::reanimation_ranges::None) return false;
thralling_found = true;
}
@ -303,14 +323,19 @@ namespace embark_assist {
finder->soil_min_everywhere == embark_assist::defs::all_present_ranges::Present &&
max_soil < static_cast<uint8_t>(finder->soil_min)) return false;
// Evil Weather
if (finder->evil_weather == embark_assist::defs::yes_no_ranges::Yes && !evil_weather_found) return false;
// Blood Rain
if (finder->blood_rain == embark_assist::defs::yes_no_ranges::Yes && !blood_rain_found) return false;
// Reanimation
if (finder->reanimation == embark_assist::defs::yes_no_ranges::Yes && !reanimation_found) return false;
// Syndrome Rain
if (finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::Any && !permanent_syndrome_rain_found && !temporary_syndrome_rain_found) return false;
if (finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::Permanent && !permanent_syndrome_rain_found) return false;
if (finder->syndrome_rain == embark_assist::defs::syndrome_rain_ranges::Temporary && !temporary_syndrome_rain_found) return false;
// Thralling
if (finder->thralling == embark_assist::defs::yes_no_ranges::Yes && !thralling_found) return false;
// Reanimation
if (finder->reanimation == embark_assist::defs::reanimation_ranges::Both && !(reanimation_found && thralling_found)) return false;
if (finder->reanimation == embark_assist::defs::reanimation_ranges::Any && !reanimation_found && !thralling_found) return false;
if (finder->reanimation == embark_assist::defs::reanimation_ranges::Thralling && !thralling_found) return false;
if (finder->reanimation == embark_assist::defs::reanimation_ranges::Reanimation && !reanimation_found) return false;
// Spires
if (finder->spire_count_min != -1 && finder->spire_count_min > spire_count) return false;
@ -597,46 +622,74 @@ namespace embark_assist {
break;
}
// Evil Weather
switch (finder->evil_weather) {
// Blood Rain
switch (finder->blood_rain) {
case embark_assist::defs::yes_no_ranges::NA:
break; // No restriction
case embark_assist::defs::yes_no_ranges::Yes:
if (!tile->evil_weather_possible) return false;
if (!tile->blood_rain_possible) return false;
break;
case embark_assist::defs::yes_no_ranges::No:
if (tile->evil_weather_full) return false;
if (tile->blood_rain_full) return false;
break;
}
// Reanimating
switch (finder->reanimation) {
case embark_assist::defs::yes_no_ranges::NA:
// Syndrome Rain
switch (finder->syndrome_rain) {
case embark_assist::defs::syndrome_rain_ranges::NA:
break; // No restriction
case embark_assist::defs::yes_no_ranges::Yes:
if (!tile->reanimating_possible) return false;
case embark_assist::defs::syndrome_rain_ranges::Any:
if (!tile->permanent_syndrome_rain_possible && !tile->temporary_syndrome_rain_possible) return false;
break;
case embark_assist::defs::yes_no_ranges::No:
if (tile->reanimating_full) return false;
case embark_assist::defs::syndrome_rain_ranges::Permanent:
if (!tile->permanent_syndrome_rain_possible) return false;
break;
case embark_assist::defs::syndrome_rain_ranges::Temporary:
if (!tile->temporary_syndrome_rain_possible) return false;
break;
case embark_assist::defs::syndrome_rain_ranges::Not_Permanent:
if (tile->permanent_syndrome_rain_full) return false;
break;
case embark_assist::defs::syndrome_rain_ranges::None:
if (tile->permanent_syndrome_rain_full || tile->temporary_syndrome_rain_full) return false;
break;
}
// Thralling
switch (finder->thralling) {
case embark_assist::defs::yes_no_ranges::NA:
// Reanimating
switch (finder->reanimation) {
case embark_assist::defs::reanimation_ranges::NA:
break; // No restriction
case embark_assist::defs::yes_no_ranges::Yes:
case embark_assist::defs::reanimation_ranges::Both:
if (!tile->reanimating_possible || !tile->thralling_possible) return false;
break;
case embark_assist::defs::reanimation_ranges::Any:
if (!tile->reanimating_possible && !tile->thralling_possible) return false;
break;
case embark_assist::defs::reanimation_ranges::Thralling:
if (!tile->thralling_possible) return false;
break;
case embark_assist::defs::yes_no_ranges::No:
case embark_assist::defs::reanimation_ranges::Reanimation:
if (!tile->reanimating_possible) return false;
break;
case embark_assist::defs::reanimation_ranges::Not_Thralling:
if (tile->thralling_full) return false;
break;
case embark_assist::defs::reanimation_ranges::None:
if (tile->reanimating_full || tile->thralling_full) return false;
break;
}
// Spire Count Min/Max
@ -950,46 +1003,74 @@ namespace embark_assist {
// Soil Max
// Can't say anything as the preliminary data isn't reliable
// Evil Weather
switch (finder->evil_weather) {
// Blood Rain
switch (finder->blood_rain) {
case embark_assist::defs::yes_no_ranges::NA:
break; // No restriction
case embark_assist::defs::yes_no_ranges::Yes:
if (!tile->evil_weather_possible) return false;
if (!tile->blood_rain_possible) return false;
break;
case embark_assist::defs::yes_no_ranges::No:
if (tile->evil_weather_full) return false;
if (tile->blood_rain_full) return false;
break;
}
// Reanimating
switch (finder->reanimation) {
case embark_assist::defs::yes_no_ranges::NA:
// Syndrome Rain
switch (finder->syndrome_rain) {
case embark_assist::defs::syndrome_rain_ranges::NA:
break; // No restriction
case embark_assist::defs::yes_no_ranges::Yes:
if (!tile->reanimating_possible) return false;
case embark_assist::defs::syndrome_rain_ranges::Any:
if (!tile->permanent_syndrome_rain_possible && !tile->temporary_syndrome_rain_possible) return false;
break;
case embark_assist::defs::yes_no_ranges::No:
if (tile->reanimating_full) return false;
case embark_assist::defs::syndrome_rain_ranges::Permanent:
if (!tile->permanent_syndrome_rain_possible) return false;
break;
case embark_assist::defs::syndrome_rain_ranges::Temporary:
if (!tile->temporary_syndrome_rain_possible) return false;
break;
case embark_assist::defs::syndrome_rain_ranges::Not_Permanent:
if (tile->permanent_syndrome_rain_full) return false;
break;
case embark_assist::defs::syndrome_rain_ranges::None:
if (tile->permanent_syndrome_rain_full || tile->temporary_syndrome_rain_full) return false;
break;
}
// Thralling
switch (finder->thralling) {
case embark_assist::defs::yes_no_ranges::NA:
// Reanimating
switch (finder->reanimation) {
case embark_assist::defs::reanimation_ranges::NA:
break; // No restriction
case embark_assist::defs::yes_no_ranges::Yes:
case embark_assist::defs::reanimation_ranges::Both:
if (!tile->reanimating_possible || !tile->thralling_possible) return false;
break;
case embark_assist::defs::reanimation_ranges::Any:
if (!tile->reanimating_possible && !tile->thralling_possible) return false;
break;
case embark_assist::defs::reanimation_ranges::Thralling:
if (!tile->thralling_possible) return false;
break;
case embark_assist::defs::yes_no_ranges::No:
case embark_assist::defs::reanimation_ranges::Reanimation:
if (!tile->reanimating_possible) return false;
break;
case embark_assist::defs::reanimation_ranges::Not_Thralling:
if (tile->thralling_full) return false;
break;
case embark_assist::defs::reanimation_ranges::None:
if (tile->reanimating_full || tile->thralling_full) return false;
break;
}
// Spire Count Min/Max

@ -265,6 +265,9 @@ namespace embark_assist {
for (uint16_t i = 0; i < world->interaction_instances.all.size(); i++) {
auto interaction = world->raws.interactions[world->interaction_instances.all[i]->interaction_id];
uint16_t region_index = world->interaction_instances.all[i]->region_index;
bool blood_rain = false;
bool permanent_syndrome_rain = false;
bool temporary_syndrome_rain = false;
bool thralling = false;
bool reanimating = false;
@ -289,15 +292,45 @@ namespace embark_assist {
// display symbol, flash symbol, phys att change and one more.
thralling = true;
}
else if (world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::PAIN ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::SWELLING ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::OOZING ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::BRUISING ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::BLISTERS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::NUMBNESS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::PARALYSIS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::FEVER ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::BLEEDING ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::COUGH_BLOOD ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::VOMIT_BLOOD ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::NAUSEA ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::UNCONSCIOUSNESS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::NECROSIS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::IMPAIR_FUNCTION ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::DROWSINESS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::DIZZINESS ||
world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->getType() == df::creature_interaction_effect_type::ERRATIC_BEHAVIOR) { // Doubtful if possible for region.
if (world->raws.inorganics[material->mat_index]->material.syndrome[l]->ce[m]->end == -1) {
permanent_syndrome_rain = true;
}
else {
temporary_syndrome_rain = true;
}
}
}
}
}
else { // If not inorganic it's always blood, as far as known.
blood_rain = true;
}
}
}
}
for (uint16_t k = 0; k < world_data->regions[region_index]->region_coords.size(); k++) {
survey_results->at(world_data->regions[region_index]->region_coords[k].x).at(world_data->regions[region_index]->region_coords[k].y).evil_weather[5] = true;
survey_results->at(world_data->regions[region_index]->region_coords[k].x).at(world_data->regions[region_index]->region_coords[k].y).blood_rain[5] = blood_rain;
survey_results->at(world_data->regions[region_index]->region_coords[k].x).at(world_data->regions[region_index]->region_coords[k].y).permanent_syndrome_rain[5] = permanent_syndrome_rain;
survey_results->at(world_data->regions[region_index]->region_coords[k].x).at(world_data->regions[region_index]->region_coords[k].y).temporary_syndrome_rain[5] = temporary_syndrome_rain;
survey_results->at(world_data->regions[region_index]->region_coords[k].x).at(world_data->regions[region_index]->region_coords[k].y).reanimating[5] = reanimating;
survey_results->at(world_data->regions[region_index]->region_coords[k].x).at(world_data->regions[region_index]->region_coords[k].y).thralling[5] = thralling;
}
@ -305,25 +338,45 @@ namespace embark_assist {
for (uint16_t i = 0; i < world->worldgen.worldgen_parms.dim_x; i++) {
for (uint16_t k = 0; k < world->worldgen.worldgen_parms.dim_y; k++) {
survey_results->at(i).at(k).evil_weather_possible = false;
survey_results->at(i).at(k).blood_rain_possible = false;
survey_results->at(i).at(k).permanent_syndrome_rain_possible = false;
survey_results->at(i).at(k).temporary_syndrome_rain_possible = false;
survey_results->at(i).at(k).reanimating_possible = false;
survey_results->at(i).at(k).thralling_possible = false;
survey_results->at(i).at(k).evil_weather_full = true;
survey_results->at(i).at(k).blood_rain_full = true;
survey_results->at(i).at(k).permanent_syndrome_rain_full = true;
survey_results->at(i).at(k).temporary_syndrome_rain_full = true;
survey_results->at(i).at(k).reanimating_full = true;
survey_results->at(i).at(k).thralling_full = true;
for (uint8_t l = 1; l < 10; l++) {
if (survey_results->at(i).at(k).biome_index[l] != -1) {
df::coord2d adjusted = apply_offset(i, k, l);
survey_results->at(i).at(k).evil_weather[l] = survey_results->at(adjusted.x).at(adjusted.y).evil_weather[5];
survey_results->at(i).at(k).blood_rain[l] = survey_results->at(adjusted.x).at(adjusted.y).blood_rain[5];
survey_results->at(i).at(k).permanent_syndrome_rain[l] = survey_results->at(adjusted.x).at(adjusted.y).permanent_syndrome_rain[5];
survey_results->at(i).at(k).temporary_syndrome_rain[l] = survey_results->at(adjusted.x).at(adjusted.y).temporary_syndrome_rain[5];
survey_results->at(i).at(k).reanimating[l] = survey_results->at(adjusted.x).at(adjusted.y).reanimating[5];
survey_results->at(i).at(k).thralling[l] = survey_results->at(adjusted.x).at(adjusted.y).thralling[5];
if (survey_results->at(i).at(k).evil_weather[l]) {
survey_results->at(i).at(k).evil_weather_possible = true;
if (survey_results->at(i).at(k).blood_rain[l]) {
survey_results->at(i).at(k).blood_rain_possible = true;
}
else {
survey_results->at(i).at(k).blood_rain_full = false;
}
if (survey_results->at(i).at(k).permanent_syndrome_rain[l]) {
survey_results->at(i).at(k).permanent_syndrome_rain_possible = true;
}
else {
survey_results->at(i).at(k).permanent_syndrome_rain_full = false;
}
if (survey_results->at(i).at(k).temporary_syndrome_rain[l]) {
survey_results->at(i).at(k).temporary_syndrome_rain_possible = true;
}
else {
survey_results->at(i).at(k).evil_weather_full = false;
survey_results->at(i).at(k).temporary_syndrome_rain_full = false;
}
if (survey_results->at(i).at(k).reanimating[l]) {