Revert "allow alchemist skill to be toggled in manipulator"

This reverts commit fa662cafbc.
develop
myk002 2021-02-05 16:10:36 -08:00
parent fa662cafbc
commit 4d57d27d4d
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 3 additions and 14 deletions

@ -33,9 +33,6 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
# Future
## Misc Improvements
- `manipulator`: allow Alchemist skill to be toggled since `autohauler` uses it as a flag.
# 0.47.04-r5
## Fixes

@ -1700,9 +1700,7 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
UnitInfo *cur = units[input_row];
df::unit *unit = cur->unit;
df::unit_labor cur_labor = columns[input_column].labor;
// Allow Alchemist for individual selection since autohauler uses it as a flag.
if (events->count(interface_key::SELECT) && (cur->allowEdit) &&
(cur_labor == df::unit_labor::ALCHEMIST || Units::isValidLabor(unit, cur_labor)))
if (events->count(interface_key::SELECT) && (cur->allowEdit) && Units::isValidLabor(unit, cur_labor))
{
const SkillColumn &col = columns[input_column];
bool newstatus = !unit->status.labors[col.labor];
@ -1720,7 +1718,6 @@ void viewscreen_unitlaborsst::feed(set<df::interface_key> *events)
}
unit->status.labors[col.labor] = newstatus;
}
// Don't autoselect Alchemist when selecting all
if (events->count(interface_key::SELECT_ALL) && (cur->allowEdit) && Units::isValidLabor(unit, cur_labor))
{
const SkillColumn &col = columns[input_column];
@ -2092,7 +2089,6 @@ void viewscreen_unitlaborsst::render()
UnitInfo *cur = units[sel_row];
bool canToggle = false;
bool canToggleAll = false;
if (cur != NULL)
{
df::unit *unit = cur->unit;
@ -2162,11 +2158,7 @@ void viewscreen_unitlaborsst::render()
}
if (cur->allowEdit) {
df::unit_labor sel_labor = columns[sel_column].labor;
canToggleAll = Units::isValidLabor(unit, sel_labor);
canToggle = canToggleAll || sel_labor == df::unit_labor::ALCHEMIST;
}
canToggle = (cur->allowEdit) && Units::isValidLabor(unit, columns[sel_column].labor);
}
int x = 2, y = dim.y - 4;
@ -2174,7 +2166,7 @@ void viewscreen_unitlaborsst::render()
OutputString(canToggle ? 15 : 8, x, y, ": Toggle labor, ");
OutputString(10, x, y, Screen::getKeyDisplay(interface_key::SELECT_ALL));
OutputString(canToggleAll ? 15 : 8, x, y, ": Toggle Group, ");
OutputString(canToggle ? 15 : 8, x, y, ": Toggle Group, ");
OutputString(10, x, y, Screen::getKeyDisplay(interface_key::UNITJOB_VIEW_UNIT));
OutputString(15, x, y, ": ViewCre, ");