Fix autogems typedefs for MSVC and log errors to stderr

develop
lethosor 2016-01-16 11:45:04 -05:00
parent 514ae890be
commit a7b2d5e38f
1 changed files with 36 additions and 36 deletions

@ -31,8 +31,8 @@ DFHACK_PLUGIN_IS_ENABLED(enabled);
REQUIRE_GLOBAL(ui);
REQUIRE_GLOBAL(world);
typedef decltype(df::item::id) item_id;
typedef decltype(df::job_item::mat_index) mat_index;
typedef int32_t item_id;
typedef int32_t mat_index;
typedef std::map<mat_index, int> gem_map;
bool running = false;
@ -57,7 +57,7 @@ void add_task(mat_index gem_type, df::building_workshopst *workshop) {
auto ref = df::allocate<df::general_ref_building_holderst>();
if (!ref) {
//Core::printerr("Could not allocate general_ref_building_holderst\n");
std::cerr << "Could not allocate general_ref_building_holderst" << std::endl;
return;
}
@ -65,7 +65,7 @@ void add_task(mat_index gem_type, df::building_workshopst *workshop) {
auto item = new df::job_item();
if (!item) {
//Core::printerr("Could not allocate job_item\n");
std::cerr << "Could not allocate job_item" << std::endl;
return;
}
@ -77,7 +77,7 @@ void add_task(mat_index gem_type, df::building_workshopst *workshop) {
auto job = new df::job();
if (!job) {
//Core::printerr("Could not allocate job\n");
std::cerr << "Could not allocate job" << std::endl;
return;
}