diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index d94dc52c6..9c3716314 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -108,7 +108,7 @@ if (BUILD_SUPPORTED) DFHACK_PLUGIN(deramp deramp.cpp) DFHACK_PLUGIN(dig dig.cpp) DFHACK_PLUGIN(digFlood digFlood.cpp) - # add_subdirectory(diggingInvaders) + add_subdirectory(diggingInvaders) DFHACK_PLUGIN(dwarfvet dwarfvet.cpp) DFHACK_PLUGIN(dwarfmonitor dwarfmonitor.cpp LINK_LIBRARIES lua) DFHACK_PLUGIN(embark-tools embark-tools.cpp) diff --git a/plugins/diggingInvaders/assignJob.cpp b/plugins/diggingInvaders/assignJob.cpp index 6e3874cbf..cdd3e6fc5 100644 --- a/plugins/diggingInvaders/assignJob.cpp +++ b/plugins/diggingInvaders/assignJob.cpp @@ -20,6 +20,7 @@ #include "df/item_type.h" #include "df/item_weaponst.h" #include "df/job.h" +#include "df/job_list_link.h" #include "df/job_skill.h" #include "df/job_type.h" #include "df/reaction_product_itemst.h" @@ -27,8 +28,11 @@ #include "df/ui.h" #include "df/unit.h" #include "df/unit_inventory_item.h" +#include "df/world.h" #include "df/world_site.h" +using namespace DFHack; + void getRidOfOldJob(df::unit* unit) { if ( unit->job.current_job == NULL ) { return; diff --git a/plugins/diggingInvaders/assignJob.h b/plugins/diggingInvaders/assignJob.h index 0ad6419d6..1e5750c03 100644 --- a/plugins/diggingInvaders/assignJob.h +++ b/plugins/diggingInvaders/assignJob.h @@ -2,6 +2,7 @@ #include "edgeCost.h" +#include "ColorText.h" #include "modules/MapCache.h" #include @@ -9,5 +10,5 @@ using namespace std; -int32_t assignJob(color_ostream& out, Edge firstImportantEdge, unordered_map parentMap, unordered_map& costMap, vector& invaders, unordered_set& requiresZNeg, unordered_set& requiresZPos, MapExtras::MapCache& cache, DigAbilities& abilities); +int32_t assignJob(DFHack::color_ostream& out, Edge firstImportantEdge, unordered_map parentMap, unordered_map& costMap, vector& invaders, unordered_set& requiresZNeg, unordered_set& requiresZPos, MapExtras::MapCache& cache, DigAbilities& abilities); diff --git a/plugins/diggingInvaders/edgeCost.cpp b/plugins/diggingInvaders/edgeCost.cpp index c9e83fa14..b08227d94 100644 --- a/plugins/diggingInvaders/edgeCost.cpp +++ b/plugins/diggingInvaders/edgeCost.cpp @@ -19,6 +19,8 @@ #include +using namespace DFHack; + /* cost_t costWeight[] = { //Distance diff --git a/plugins/diggingInvaders/edgeCost.h b/plugins/diggingInvaders/edgeCost.h index 560fec109..ef4cb3168 100644 --- a/plugins/diggingInvaders/edgeCost.h +++ b/plugins/diggingInvaders/edgeCost.h @@ -93,6 +93,6 @@ struct PointHash { } }; -cost_t getEdgeCost(color_ostream& out, df::coord pt1, df::coord pt2, DigAbilities& abilities); -std::vector* getEdgeSet(color_ostream &out, df::coord point, MapExtras::MapCache& cache, int32_t xMax, int32_t yMax, int32_t zMax, DigAbilities& abilities); +cost_t getEdgeCost(DFHack::color_ostream& out, df::coord pt1, df::coord pt2, DigAbilities& abilities); +std::vector* getEdgeSet(DFHack::color_ostream &out, df::coord point, MapExtras::MapCache& cache, int32_t xMax, int32_t yMax, int32_t zMax, DigAbilities& abilities);