Skip to content

Commit

Permalink
Merge branch 'groovy' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomis committed Aug 23, 2015
2 parents 2749dd5 + ea68e38 commit 62aa86a
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
15 changes: 13 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,19 @@ task copyResources(type: Copy) {
from('extra-resources')
into("$project.buildDir/libs")
include('server.properties.example')
include('decks/Cyborg-Chronicles/Balanced.deck')
include('decks/Cyborg-Chronicles/Defensive.deck')
for (File mod : new File('extra-resources/decks').listFiles()) {
println 'Checking mod ' + mod.getName()
for (File deck : mod.listFiles()) {
def modName = mod.getName()
def deckName = deck.getName()
if (Character.isUpperCase(deck.getName().charAt(0))) {
println("Include decks/${modName}/${deckName}")
include("decks/${modName}/${deckName}")
} else {
println("Deck name does not start with capital letter, skipping: decks/${modName}/${deckName}")
}
}
}
include('mods/**')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,16 @@ public void clearAIButtons() {

public void setAI(String aiName) {
this.aiChoice = this.aiChoices.get(aiName);
this.localGameButton.setDisable(false);
this.checkLocalGameButtonEnable();
}

private void localGameStart(ActionEvent event) {

private void checkLocalGameButtonEnable() {
boolean aiSelected = this.aiChoice != null;
boolean modChosen = this.modChoice.getSelectionModel().getSelectedItem() != null;
this.localGameButton.setDisable(!aiSelected || !modChosen);
}

private void localGameStart(ActionEvent event) {
String modName = modChoice.getValue();
ECSMod mod = mods.getModFor(modName);
ScheduledExecutorService executor = Executors.newScheduledThreadPool(1);
Expand Down

0 comments on commit 62aa86a

Please sign in to comment.