Remove the editor option to assign a recruit list to a unit.

The UI implementation of this is bad enough that I consider its presence to actively a detriment to anyone trying to use the editor.
This commit is contained in:
Pentarctagon 2020-12-15 16:27:44 -06:00 committed by Pentarctagon
parent cc052ed5a5
commit c8666a8a41
5 changed files with 1 additions and 15 deletions

View file

@ -36,7 +36,7 @@
[menu]
id=menu-editor-paste-context
is_context_menu=true
items=describeterrain,menu-unit-facing,editor-unit-toggle-loyal,editor-change-unitid,editor-unit-recruit,renameunit,describeunit,editor-deleteunit,editor-toggle-renameable,editor-toggle-canrecruit,editor-cut,editor-copy,editor-paste,editor-tool-select,editor-select-all,editor-select-inverse,editor-select-none,editor-clipboard-rotate-cw,editor-clipboard-rotate-ccw,editor-clipboard-flip-horizontal,editor-clipboard-flip-vertical,editor-selection-fill,editor-selection-rotate,editor-selection-flip,editor-selection-randomize,editor-save-area
items=describeterrain,menu-unit-facing,editor-unit-toggle-loyal,editor-change-unitid,renameunit,describeunit,editor-deleteunit,editor-toggle-renameable,editor-toggle-canrecruit,editor-cut,editor-copy,editor-paste,editor-tool-select,editor-select-all,editor-select-inverse,editor-select-none,editor-clipboard-rotate-cw,editor-clipboard-rotate-ccw,editor-clipboard-flip-horizontal,editor-clipboard-flip-vertical,editor-selection-fill,editor-selection-rotate,editor-selection-flip,editor-selection-randomize,editor-save-area
[/menu]
####### Menu Bar

View file

@ -305,7 +305,6 @@ bool editor_controller::can_execute_command(const hotkey::hotkey_command& cmd, i
case HOTKEY_EDITOR_UNIT_TOGGLE_CANRECRUIT:
case HOTKEY_EDITOR_UNIT_TOGGLE_RENAMEABLE:
case HOTKEY_EDITOR_UNIT_TOGGLE_LOYAL:
case HOTKEY_EDITOR_UNIT_RECRUIT_ASSIGN:
case HOTKEY_EDITOR_UNIT_FACING:
case HOTKEY_UNIT_DESCRIPTION:
{
@ -763,14 +762,6 @@ bool editor_controller::do_execute_command(const hotkey::hotkey_command& cmd, in
change_unit_id();
return true;
case HOTKEY_EDITOR_UNIT_RECRUIT_ASSIGN:
{
map_location loc = gui_->mouseover_hex();
const unit_map::unit_iterator un = get_current_map_context().units().find(loc);
const std::set<std::string>& recruit_set = toolkit_->get_palette_manager()->unit_palette_->get_selected_bg_items();
std::vector<std::string> recruits(recruit_set.begin(), recruit_set.end());
un->set_recruits(recruits);
}
return true;
case HOTKEY_EDITOR_UNIT_TOGGLE_RENAMEABLE:
{

View file

@ -200,7 +200,6 @@ std::array<hotkey_command_temp, HOTKEY_NULL - 1> master_hotkey_list {{
{ HOTKEY_EDITOR_UNIT_TOGGLE_CANRECRUIT, "editor-toggle-canrecruit", N_("Can Recruit"), false, scope_editor, HKCAT_TOOLS, N_("Toggle the recruit attribute of a unit.") },
{ HOTKEY_EDITOR_UNIT_TOGGLE_RENAMEABLE, "editor-toggle-renameable", N_("Can be Renamed"), false, scope_editor, HKCAT_TOOLS, N_("Toggle the unit being renameable.") },
{ HOTKEY_EDITOR_UNIT_RECRUIT_ASSIGN, "editor-unit-recruit", N_("Assign Recruit List"), false, scope_editor, HKCAT_TOOLS, N_("Assign the selected unit set as recruit list to the unit.") },
{ HOTKEY_EDITOR_UNIT_CHANGE_ID, "editor-change-unitid", N_("Change Unit ID"), false, scope_editor, HKCAT_TOOLS, "" },
{ HOTKEY_EDITOR_UNIT_TOGGLE_LOYAL, "editor-unit-toggle-loyal", N_("Loyal"), false, scope_editor, HKCAT_TOOLS, "" },

View file

@ -126,7 +126,6 @@ enum HOTKEY_COMMAND {
// Unit
HOTKEY_EDITOR_UNIT_TOGGLE_CANRECRUIT, HOTKEY_EDITOR_UNIT_TOGGLE_RENAMEABLE,
HOTKEY_EDITOR_UNIT_CHANGE_ID, HOTKEY_EDITOR_UNIT_TOGGLE_LOYAL,
HOTKEY_EDITOR_UNIT_RECRUIT_ASSIGN,
// Brushes
HOTKEY_EDITOR_BRUSH_NEXT, HOTKEY_EDITOR_BRUSH_DEFAULT,

View file

@ -1152,9 +1152,6 @@ void unit::set_recruits(const std::vector<std::string>& recruits)
{
unit_types.check_types(recruits);
recruit_list_ = recruits;
//TODO crab
//info_.minimum_recruit_price = 0;
//ai::manager::get_singleton().raise_recruit_list_changed();
}
const std::vector<std::string> unit::advances_to_translated() const