Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions objects/obj_controller/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ map_scale = 1;
scale_mod = 1;
unit_manage_constants = {};
unit_manage_constants.current_data = [-1,-1];
management_buttons = false;


diplomacy_pathway = "";
Expand Down
36 changes: 16 additions & 20 deletions objects/obj_controller/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -4,35 +4,31 @@ try{
scr_ui_manage();
} catch(_exception){
handle_exception(_exception);
manage = 0;
menu = 0;

main_map_defaults();
}

try{
scr_ui_advisors();
} catch(_exception){
handle_exception(_exception);
manage = 0;
menu = 0;
main_map_defaults();
}
try{
/*if (audience > 0 && instance_exists(obj_turn_end)){
menu = 20;
}*/
if (menu == MENU.Diplomacy){
if (menu == MENU.Diplomacy){
try{
/*if (audience > 0 && instance_exists(obj_turn_end)){
menu = 20;
}*/

scr_ui_diplomacy();
}
} catch(_exception){
handle_exception(_exception);
manage = 0;
menu = 0;
}
} catch(_exception){
handle_exception(_exception);
main_map_defaults();
}
}
try{
scr_ui_settings();
scr_ui_popup();
} catch(_exception){
handle_exception(_exception);
manage = 0;
menu = 0;
main_map_defaults();
}

scr_ui_popup();
5 changes: 2 additions & 3 deletions objects/obj_event_log/Draw_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ if (__b__) {
if (point_and_click(draw_unit_buttons([xx + 1400, yy + 120 + (p * 26)], "View", [1, 1], c_green, , fnt_40k_14b, 1,true))) {
var view_star = star_by_name(cur_event.event_target);
if (view_star != "none") {
obj_controller.menu = 0;
obj_controller.hide_banner = 0;
main_map_defaults();
obj_controller.x = view_star.x;
obj_controller.y = view_star.y;
}
Expand Down Expand Up @@ -86,7 +85,7 @@ if (__b__) {
draw_sprite(spr_help_exit, 1, xx + 1104, yy + 72);
if (scr_click_left()) {
with(obj_controller) {
menu = 0;
main_map_defaults();
onceh = 1;
click = 1;
hide_banner = 0;
Expand Down
3 changes: 3 additions & 0 deletions objects/obj_star_select/Create_0.gml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ tau=0;
chaos=0;
p_data = new PlanetData(0, target);
has_player_forces = array_sum(target.p_player);

manage_units_button = new UnitButtonObject({x1 :115, y1:200, style : "pixel", label:"Manage Units"});

torpedo = scr_item_count("Cyclonic Torpedo");

feature= "";
Expand Down
8 changes: 6 additions & 2 deletions objects/obj_star_select/Draw_64.gml
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ if (global.cheat_debug && obj_controller.selecting_planet && !loading)
}
}

if (obj_controller.menu == 0) {
if (has_player_forces && point_and_click(draw_unit_buttons([125, 200], "Manage Units",[1,1],c_blue))) {

if (obj_controller.menu == 0){
if (manage_units_button.draw(has_player_forces)){
var _viewer = obj_controller.location_viewer
_viewer.update_garrison_log();
var _unit_dispersement = _viewer.garrison_log;
Expand All @@ -142,10 +143,13 @@ if (obj_controller.menu == 0) {
planet : 0,
selections : []
});
instance_destroy();
exit;
}
}
}


if (loading!=0){
draw_set_font(fnt_40k_14);
draw_set_color(CM_GREEN_COLOR);
Expand Down
8 changes: 1 addition & 7 deletions scripts/is_specialist/is_specialist.gml
Original file line number Diff line number Diff line change
Expand Up @@ -370,12 +370,6 @@ function group_selection(group, selection_data={}) {
} else {
basic_manage_settings();
}
with(obj_fleet_select) {
instance_destroy();
}
with(obj_star_select) {
instance_destroy();
}

exit_button = new ShutterButton();
proceed_button = new ShutterButton();
Expand Down Expand Up @@ -428,7 +422,7 @@ function group_selection(group, selection_data={}) {
managing = -1;
}
}
obj_controller.menu = MENU.Manage;
show_debug_message($"manage_success {obj_controller.menu}");
} catch (_exception) {
//handle and send player back to map
handle_exception(_exception);
Expand Down
22 changes: 13 additions & 9 deletions scripts/scr_controller_helpers/scr_controller_helpers.gml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ function scr_menu_clear_up(specific_area_function) {
}
}
}
if (instance_exists(obj_star_select)) {
exit;
}
if (instance_exists(obj_bomb_select)) {
exit;
}
Expand Down Expand Up @@ -100,7 +97,7 @@ function scr_change_menu(wanted_menu, specific_area_function=false) {

function main_map_defaults(){
with (obj_controller){
menu = 0;
menu = MENU.Default;
hide_banner = 0;
location_viewer.update_garrison_log();
managing = 0;
Expand Down Expand Up @@ -146,11 +143,18 @@ function scr_in_game_menu() {
}

function basic_manage_settings() {
menu = MENU.Manage;
popup = 0;
selected = 0;
diplomacy = 0;
allow_shortcuts = true;
with (obj_controller){
menu = MENU.Manage;
popup = 0;
selected = 0;
diplomacy = 0;
allow_shortcuts = true;

init_manage_buttons();
}
}

function init_manage_buttons(){
management_buttons = {
squad_toggle: new UnitButtonObject({
style: "pixel",
Expand Down
4 changes: 4 additions & 0 deletions scripts/scr_ui_manage/scr_ui_manage.gml
Original file line number Diff line number Diff line change
Expand Up @@ -501,6 +501,10 @@ function company_specific_management(){
}

function alternative_manage_views(x1, y1) {
//for some reason management_buttons keeps dying so hopefully this will solve the issue until something better can be found
if (!is_struct(management_buttons)){
init_manage_buttons();
}
var _squad_button = management_buttons.squad_toggle;
_squad_button.update({
x1: x1 + 5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,6 @@ function exit_adhoc_manage(){
if (struct_exists(location_viewer.garrison_log, selection_data.system.name)){
var sys_name = selection_data.system.name;
group_selection(location_viewer.garrison_log[$sys_name].units,selection_data);
new_company_struct();
} else {
exit_adhoc_manage();
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 6 additions & 2 deletions sprites/mk7_chest_variants/mk7_chest_variants.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion sprites/spr_da_mk6_helm_crests/spr_da_mk6_helm_crests.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion sprites/spr_fur_tail_topknot/spr_fur_tail_topknot.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion sprites/spr_gladiator_crest/spr_gladiator_crest.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 17 additions & 7 deletions sprites/spr_mk7_chest_variants/spr_mk7_chest_variants.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion sprites/spr_special_helm/spr_special_helm.yy

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading