|
|
@ -11,6 +11,7 @@
|
|
|
|
#include "modules/Gui.h"
|
|
|
|
#include "modules/Gui.h"
|
|
|
|
#include "modules/Items.h"
|
|
|
|
#include "modules/Items.h"
|
|
|
|
#include "modules/Materials.h"
|
|
|
|
#include "modules/Materials.h"
|
|
|
|
|
|
|
|
#include "modules/World.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "DataDefs.h"
|
|
|
|
#include "DataDefs.h"
|
|
|
|
#include "df/game_type.h"
|
|
|
|
#include "df/game_type.h"
|
|
|
@ -84,7 +85,7 @@ bool makeItem (df::reaction_product_itemst *prod, df::unit *unit, bool second_it
|
|
|
|
|
|
|
|
|
|
|
|
prod->produce(unit, &out_items, &in_reag, &in_items, 1, job_skill::NONE,
|
|
|
|
prod->produce(unit, &out_items, &in_reag, &in_items, 1, job_skill::NONE,
|
|
|
|
df::historical_entity::find(unit->civ_id),
|
|
|
|
df::historical_entity::find(unit->civ_id),
|
|
|
|
((*gametype == game_type::DWARF_MAIN) || (*gametype == game_type::DWARF_RECLAIM)) ? df::world_site::find(ui->site_id) : NULL);
|
|
|
|
(World::isFortressMode()) ? df::world_site::find(ui->site_id) : NULL);
|
|
|
|
if (!out_items.size())
|
|
|
|
if (!out_items.size())
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
// if we asked to make shoes and we got twice as many as we asked, then we're okay
|
|
|
|
// if we asked to make shoes and we got twice as many as we asked, then we're okay
|
|
|
@ -348,7 +349,7 @@ command_result df_createitem (color_ostream &out, vector <string> & parameters)
|
|
|
|
df::unit *unit = Gui::getSelectedUnit(out, true);
|
|
|
|
df::unit *unit = Gui::getSelectedUnit(out, true);
|
|
|
|
if (!unit)
|
|
|
|
if (!unit)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (*gametype == game_type::ADVENTURE_ARENA || *gametype == game_type::ADVENTURE_MAIN)
|
|
|
|
if (*gametype == game_type::ADVENTURE_ARENA || World::isAdventureMode())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Use the adventurer unit
|
|
|
|
// Use the adventurer unit
|
|
|
|
unit = world->units.active[0];
|
|
|
|
unit = world->units.active[0];
|
|
|
|