|
|
@ -75,12 +75,12 @@ struct block_labors_hook : df::viewscreen_dwarfmodest {
|
|
|
|
DEFINE_VMETHOD_INTERPOSE(void, feed, (std::set<df::interface_key> *input))
|
|
|
|
DEFINE_VMETHOD_INTERPOSE(void, feed, (std::set<df::interface_key> *input))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
using namespace df::enums::interface_key;
|
|
|
|
using namespace df::enums::interface_key;
|
|
|
|
if (valid_mode())
|
|
|
|
df::unit *unit = Gui::getAnyUnit(this);
|
|
|
|
{
|
|
|
|
df::unit_labor labor = vector_get(unit_labors_sidemenu, *ui_look_cursor, df::unit_labor::NONE);
|
|
|
|
df::unit *unit = Gui::getAnyUnit(this);
|
|
|
|
df::unit_labor_category cat = df::unit_labor_category(labor);
|
|
|
|
df::unit_labor labor = unit_labors_sidemenu[*ui_look_cursor];
|
|
|
|
|
|
|
|
df::unit_labor_category cat = df::unit_labor_category(labor);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (valid_mode() && labor != df::unit_labor::NONE)
|
|
|
|
|
|
|
|
{
|
|
|
|
if ((input->count(SELECT) || input->count(SELECT_ALL)) && forbidden_labor(unit, labor))
|
|
|
|
if ((input->count(SELECT) || input->count(SELECT_ALL)) && forbidden_labor(unit, labor))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
unit->status.labors[labor] = false;
|
|
|
|
unit->status.labors[labor] = false;
|
|
|
|