Skip to content

Commit

Permalink
Prevent clicking Play this nation without one selected
Browse files Browse the repository at this point in the history
  • Loading branch information
RhueOfL committed Apr 10, 2019
1 parent a8da702 commit 971d5ad
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions freeciv-web/src/main/webapp/javascript/pregame.js
Original file line number Diff line number Diff line change
Expand Up @@ -334,9 +334,11 @@ function pick_nation(player_id)
+ "<div id='nation_legend'></div><div id='select_nation_flag'></div>";


var buttons = { "1" : { id: "play", text:"Play this nation!", click: function() { $("#pick_nation_dialog").dialog('close');
if (!is_ongoing_longturn()) submit_nation_choice();
else submit_nation_choice_ongoing_longturn(); } },
var buttons = { "1" : { id: "play", text:"Play this nation!", click: function() { if (chosen_nation != -1) {
$("#pick_nation_dialog").dialog('close');
if (!is_ongoing_longturn()) submit_nation_choice();
else submit_nation_choice_ongoing_longturn(); }
} },
"2" : { id: "customize", text:"Customize this nation", click: function() {show_customize_nation_dialog(player_id);} }
}

Expand Down

0 comments on commit 971d5ad

Please sign in to comment.