Skip to content

Commit

Permalink
Merge branch 'develop' into feature/change-server-list
Browse files Browse the repository at this point in the history
  • Loading branch information
KayMD committed Dec 7, 2020
2 parents 9d9f3a4 + 82858f2 commit 3b68c60
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 20 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ allprojects {
}

if (branch == 'master') {
if (indexOfSeparator > -1) {
throw new RuntimeException("Can't build snapshot in master branch.")
if (indexOfSeparator > (-1)) {
throw new RuntimeException("Can't build snapshot in master branch: " + gitVersion)
}
} else {
mainVersion += '-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ public void onStartScreen() {
Music illarionTheme = SongFactory.getInstance().getSong(2, engine.getAssets().getSoundsManager());
audioPlayer.setLastMusic(illarionTheme);
if (IllaClient.getCfg().getBoolean("musicOn")) {
if (illarionTheme != null) {
if (illarionTheme != null) { // may be null in case OpenAL is not working
if (!audioPlayer.isCurrentMusic(illarionTheme)) {
// may be null in case OpenAL is not working
audioPlayer.playMusic(illarionTheme);
}
}
Expand Down Expand Up @@ -260,7 +259,6 @@ public void onLoginButtonClicked(String topic, ButtonClickedEvent event) {
* This function triggers the login process. It will request the character list of the player from the server.
*/
private void login() {
nifty.showPopup(screen, popupReceiveChars.getId(), null);
Login login = Login.getInstance();
login.setLoginData(nameTxt.getRealText(), passwordTxt.getRealText());

Expand All @@ -273,11 +271,14 @@ private void login() {
login.storeData(savePassword.isChecked());

if (login.isCharacterListRequired()) {
String receiveCharsPopupId = popupReceiveChars.getId();

nifty.showPopup(screen, receiveCharsPopupId, null);

login.requestCharacterList(errorCode -> {
lastErrorCode = errorCode;
receivedLoginResponse = true;

nifty.closePopup(popupReceiveChars.getId());
nifty.closePopup(receiveCharsPopupId);
});
} else {
engine.getSounds().stopMusic(15);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void storeResource(@Nonnull IdWrapper<String> resource) {
int clipID = resource.getId();
String music = resource.getObject();

songsBuilder.put(clipID, music);
songsBuilder.put(clipID, SONG_DIR + music);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,30 @@ private void scheduleTask(@Nonnull MoveAnimatorTask task) {

void scheduleEarlyMove(@Nonnull CharMovementMode mode, @Nonnull ServerCoordinate target, int duration) {
if (uncomfirmedMoveTask != null) {
log.warn(marker, "Scheduling another early move is not possible as there is already one set.");
log.warn(marker,
"Scheduling another early move is not possible as there is already one set. Scheduled Move: {}, NewTarget: {}. Try repairing by canceling all pending moves.",
uncomfirmedMoveTask,
target);

boolean hasRequestedTurn = lastRequestedTurn != null;

int lastTurnId = 0;
if (hasRequestedTurn) {
lastTurnId = lastRequestedTurn.getServerId();
}

cancelAll();

if (hasRequestedTurn) {
scheduleTurn(Direction.fromServerId(lastTurnId));
}
} else {
log.debug(marker, "Scheduling a early move. Mode: {}, Target: {}, Duration: {}ms", mode,
target, duration);
MovingTask task = new MovingTask(this, mode, target, duration);
uncomfirmedMoveTask = task;
scheduleTask(task);
log.debug(marker, "Scheduling an early move. Mode: {}, Target: {}, Duration: {}ms", mode, target, duration);
}

MovingTask task = new MovingTask(this, mode, target, duration);
uncomfirmedMoveTask = task;
scheduleTask(task);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
<screen id="login" controller="illarion.client.gui.controller.LoginScreenController">
<layer childLayout="vertical" visibleToMouse="false">
<effect>
<onStartScreen name="fade" start="#00" end="#ff" length="500" inherit="true"/>
<onEndScreen name="fade" start="#ff" end="#00" length="500" inherit="true"/>
<onStartScreen name="fade" start="#00" end="#ff" length="200" inherit="true"/>
<onEndScreen name="fade" start="#ff" end="#00" length="200" inherit="true"/>
</effect>

<panel height="422px" width="*" backgroundImage="gui/window_background.png"
Expand All @@ -30,8 +30,8 @@

<layer id="layer" childLayout="center">
<effect>
<onStartScreen name="fade" start="#00" end="#ff" inherit="true"/>
<onEndScreen name="fade" start="#ff" end="#00" length="500" inherit="true"/>
<onStartScreen name="fade" start="#00" end="#ff" length="200" inherit="true"/>
<onEndScreen name="fade" start="#ff" end="#00" length="200" inherit="true"/>
</effect>

<panel width="400px" childLayout="vertical">
Expand Down
1 change: 0 additions & 1 deletion illaclient/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
<pattern>%-5p - %d{ISO8601} - [%t]: %m%n</pattern>
</encoder>
</appender>
<logger name="illarion.client.world.movement" level="debug" />
<root level="warn">
<appender-ref ref="CONSOLE"/>
</root>
Expand Down
2 changes: 1 addition & 1 deletion versions.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ ext {
slf4jVersion = '1.7.25'
logbackVersion = '1.2.2'
janinoVersion = '3.0.7'
illarionResourcesVersion = '2.1.25.13-SNAPSHOT'
illarionResourcesVersion = '2.1.26-SNAPSHOT'
niftyGuiVersion = '1.4.2'
insubstantialVersion = '7.3'
}

0 comments on commit 3b68c60

Please sign in to comment.