|
|
|
@ -40,6 +40,7 @@
|
|
|
|
|
#include "df/plant_raw.h"
|
|
|
|
|
#include "df/inorganic_raw.h"
|
|
|
|
|
#include "df/builtin_mats.h"
|
|
|
|
|
#include "df/vehicle.h"
|
|
|
|
|
|
|
|
|
|
using std::vector;
|
|
|
|
|
using std::string;
|
|
|
|
@ -994,6 +995,15 @@ static bool itemInRealJob(df::item *item)
|
|
|
|
|
!= job_type_class::Hauling;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static bool isRouteVehicle(df::item *item)
|
|
|
|
|
{
|
|
|
|
|
int id = item->getVehicleID();
|
|
|
|
|
if (id < 0) return false;
|
|
|
|
|
|
|
|
|
|
auto vehicle = df::vehicle::find(id);
|
|
|
|
|
return vehicle && vehicle->route_id >= 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void map_job_items(color_ostream &out)
|
|
|
|
|
{
|
|
|
|
|
for (size_t i = 0; i < constraints.size(); i++)
|
|
|
|
@ -1103,6 +1113,7 @@ static void map_job_items(color_ostream &out)
|
|
|
|
|
item->flags.bits.owned ||
|
|
|
|
|
item->flags.bits.in_chest ||
|
|
|
|
|
item->isAssignedToStockpile() ||
|
|
|
|
|
isRouteVehicle(item) ||
|
|
|
|
|
itemInRealJob(item) ||
|
|
|
|
|
itemBusy(item))
|
|
|
|
|
{
|
|
|
|
|