diff --git a/objects/obj_star_select/Draw_64.gml b/objects/obj_star_select/Draw_64.gml index 8e3cbfdf32..1301369f14 100644 --- a/objects/obj_star_select/Draw_64.gml +++ b/objects/obj_star_select/Draw_64.gml @@ -37,6 +37,9 @@ if (loading=1){ if (target.space_hulk=1) then exit; } } +if (obj_controller.selecting_planet>target.planets){ + obj_controller.selecting_planet = 0; +} var click_accepted = (!obj_controller.menu) and (!obj_controller.zoomed) and (!instance_exists(obj_bomb_select)) and (!instance_exists(obj_drop_select)); if (click_accepted) { if (scr_click_left(0)) { @@ -296,11 +299,11 @@ if (obj_controller.selecting_planet!=0){ var bar_start_point = xx+349; var bar_percent_length = (bar_width/100); var current_bar_percent = 0; - with (target){ - var hidden_cult = false; - if (planet_feature_bool(p_feature[current_planet],P_features.Gene_Stealer_Cult)){ - hidden_cult = return_planet_features(p_feature[current_planet],P_features.Gene_Stealer_Cult)[0].hiding; - } + var hidden_cult = false; + if (planet_data.has_feature(P_features.Gene_Stealer_Cult)){ + hidden_cult = planet_data.get_features(P_features.Gene_Stealer_Cult)[0].hiding; + } + with (target){ for (var i=1;i<13;i++){ if (p_influence[current_planet][i]>0){ draw_set_color(global.star_name_colors[i]); diff --git a/scripts/scr_buttons/scr_buttons.gml b/scripts/scr_buttons/scr_buttons.gml index d686a18fe3..641e4caa06 100644 --- a/scripts/scr_buttons/scr_buttons.gml +++ b/scripts/scr_buttons/scr_buttons.gml @@ -65,9 +65,10 @@ function UnitButtonObject() constructor{ tooltip = ""; static update = function(data){ - updaters = struct_get_names(data); - for (var i=0;i