diff --git a/objects/obj_controller/Create_0.gml b/objects/obj_controller/Create_0.gml index d5fd000869..9fc7d50265 100644 --- a/objects/obj_controller/Create_0.gml +++ b/objects/obj_controller/Create_0.gml @@ -1787,109 +1787,3 @@ remov=string_length(string(temp[65])+string(temp[66])+string(temp[67])+string(te action_set_alarm(2, 0); instance_create(0,0,obj_tooltip ); - -get_command_slots_data = function(){ - var _command_slots_data = [ - { - search_params: {}, - role_group_params: { - group: "captain_candidates", - location: "", - opposite: false - }, - purpose: $"{int_to_roman(managing)} Company Captain Candidates", - purpose_code: "captain_promote", - button_text: "New Captain Required", - unit_check: "captain" - }, - { - search_params: { - stat: [["weapon_skill", 44, "more"]], - companies: managing - }, - role_group_params: { - group: [SPECIALISTS_STANDARD, true, true], - location: "", - opposite: true - }, - purpose: $"{int_to_roman(managing)} Company Champion Candidates", - purpose_code: "champion_promote", - button_text: "Champion Required", - unit_check: "champion" - }, - { - search_params: { - companies: managing - }, - role_group_params: { - group: [SPECIALISTS_STANDARD, true, true], - location: "", - opposite: true - }, - purpose: $"{int_to_roman(managing)} Company Ancient Candidates", - purpose_code: "ancient_promote", - button_text: "Ancient Required", - unit_check: "ancient" - }, - { - search_params: { - companies: [managing, 0] - }, - role_group_params: { - group: [SPECIALISTS_CHAPLAINS, false, false], - location: "", - opposite: false - }, - purpose: $"{int_to_roman(managing)} Company Chaplain Candidates", - purpose_code: "chaplain_promote", - button_text: "Chaplain Required", - unit_check: "chaplain" - }, - { - search_params: { - companies: [managing, 0] - }, - role_group_params: { - group: [SPECIALISTS_APOTHECARIES, false, false], - location: "", - opposite: false - }, - purpose: $"{int_to_roman(managing)} Company Apothecary Candidates", - purpose_code: "apothecary_promote", - button_text: "Apothecary Required", - unit_check: "apothecary" - }, - { - search_params: { - companies: [managing, 0] - }, - role_group_params: { - group: [SPECIALISTS_TECHS, false, false], - location: "", - opposite: false - }, - purpose: $"{int_to_roman(managing)} Company Tech Marine Candidates", - purpose_code: "tech_marine_promote", - button_text: "Tech Marine Required", - unit_check: "tech_marine" - }, - { - search_params: { - companies: [managing, 0] - }, - role_group_params: { - group: [SPECIALISTS_LIBRARIANS, false, false], - location: "", - opposite: false - }, - purpose: $"{int_to_roman(managing)} Company Librarian Candidates", - purpose_code: "librarian_promote", - button_text: "Librarian Required", - unit_check: "lib" - } - ]; - - return _command_slots_data; -} - -command_slots_count=array_length(get_command_slots_data()); diff --git a/scripts/macros/macros.gml b/scripts/macros/macros.gml index 4f78660f37..b37510db43 100644 --- a/scripts/macros/macros.gml +++ b/scripts/macros/macros.gml @@ -9,7 +9,7 @@ #macro CM_GREEN_COLOR #34bc75 #macro CM_RED_COLOR #bf4040 #macro MANAGE_MAN_SEE 34 -#macro MANAGE_MAN_MAX array_length(obj_controller.display_unit) + obj_controller.command_slots_count +#macro MANAGE_MAN_MAX array_length(obj_controller.display_unit) + 7 enum luck { bad = -1, diff --git a/scripts/scr_ui_manage/scr_ui_manage.gml b/scripts/scr_ui_manage/scr_ui_manage.gml index a62a119ba5..9edd6ac72c 100644 --- a/scripts/scr_ui_manage/scr_ui_manage.gml +++ b/scripts/scr_ui_manage/scr_ui_manage.gml @@ -687,6 +687,110 @@ function scr_ui_manage() { //tooltip text to tell you if a unit is eligible for special roles + get_command_slots_data = function(){ + var _command_slots_data = [ + { + search_params: {}, + role_group_params: { + group: "captain_candidates", + location: "", + opposite: false + }, + purpose: $"{int_to_roman(managing)} Company Captain Candidates", + purpose_code: "captain_promote", + button_text: "New Captain Required", + unit_check: "captain" + }, + { + search_params: { + stat: [["weapon_skill", 44, "more"]], + companies: managing + }, + role_group_params: { + group: [SPECIALISTS_STANDARD, true, true], + location: "", + opposite: true + }, + purpose: $"{int_to_roman(managing)} Company Champion Candidates", + purpose_code: "champion_promote", + button_text: "Champion Required", + unit_check: "champion" + }, + { + search_params: { + companies: managing + }, + role_group_params: { + group: [SPECIALISTS_STANDARD, true, true], + location: "", + opposite: true + }, + purpose: $"{int_to_roman(managing)} Company Ancient Candidates", + purpose_code: "ancient_promote", + button_text: "Ancient Required", + unit_check: "ancient" + }, + { + search_params: { + companies: [managing, 0] + }, + role_group_params: { + group: [SPECIALISTS_CHAPLAINS, false, false], + location: "", + opposite: false + }, + purpose: $"{int_to_roman(managing)} Company Chaplain Candidates", + purpose_code: "chaplain_promote", + button_text: "Chaplain Required", + unit_check: "chaplain" + }, + { + search_params: { + companies: [managing, 0] + }, + role_group_params: { + group: [SPECIALISTS_APOTHECARIES, false, false], + location: "", + opposite: false + }, + purpose: $"{int_to_roman(managing)} Company Apothecary Candidates", + purpose_code: "apothecary_promote", + button_text: "Apothecary Required", + unit_check: "apothecary" + }, + { + search_params: { + companies: [managing, 0] + }, + role_group_params: { + group: [SPECIALISTS_TECHS, false, false], + location: "", + opposite: false + }, + purpose: $"{int_to_roman(managing)} Company Tech Marine Candidates", + purpose_code: "tech_marine_promote", + button_text: "Tech Marine Required", + unit_check: "tech_marine" + }, + { + search_params: { + companies: [managing, 0] + }, + role_group_params: { + group: [SPECIALISTS_LIBRARIANS, false, false], + location: "", + opposite: false + }, + purpose: $"{int_to_roman(managing)} Company Librarian Candidates", + purpose_code: "librarian_promote", + button_text: "Librarian Required", + unit_check: "lib" + } + ]; + + return _command_slots_data; + } + if (!obj_controller.view_squad) { var repetitions = min(man_max, MANAGE_MAN_SEE); man_count = 0;