MCPcopy Create free account
hub / github.com/DFHack/dfhack / process_embark_incursion

Function process_embark_incursion

plugins/embark-assistant/survey.cpp:445–492  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443 //=================================================================================
444
445 void process_embark_incursion(embark_assist::defs::site_infos *site_info,
446 embark_assist::defs::world_tile_data *survey_results,
447 embark_assist::defs::mid_level_tile_incursion_base *mlt, // Note this is a single tile, as opposed to most usages of this variable name.
448 int16_t elevation,
449 uint16_t x,
450 uint16_t y) {
451 site_info->aquifer |= mlt->aquifer;
452
453 if (mlt->soil_depth < site_info->min_soil) {
454 site_info->min_soil = mlt->soil_depth;
455 }
456
457 if (mlt->soil_depth > site_info->max_soil) {
458 site_info->max_soil = mlt->soil_depth;
459 }
460
461 if (elevation != mlt->elevation) {
462 site_info->flat = false;
463 }
464
465 if (mlt->clay) {
466 site_info->clay = true;
467 }
468
469 if (mlt->sand) {
470 site_info->sand = true;
471 }
472
473 if (survey_results->at(x).at(y).blood_rain [mlt->biome_offset]) {
474 site_info->blood_rain = true;
475 }
476
477 if (survey_results->at(x).at(y).permanent_syndrome_rain[mlt->biome_offset]) {
478 site_info->permanent_syndrome_rain = true;
479 }
480
481 if (survey_results->at(x).at(y).temporary_syndrome_rain[mlt->biome_offset]) {
482 site_info->temporary_syndrome_rain = true;
483 }
484
485 if (survey_results->at(x).at(y).reanimating[mlt->biome_offset]) {
486 site_info->reanimating = true;
487 }
488
489 if (survey_results->at(x).at(y).thralling[mlt->biome_offset]) {
490 site_info->thralling = true;
491 }
492 }
493
494 //=================================================================================
495

Calls

no outgoing calls

Tested by

no test coverage detected