Skip to content

Commit

Permalink
Update to gdx 1.10.
Browse files Browse the repository at this point in the history
  • Loading branch information
crykn committed Apr 29, 2023
1 parent 11cc481 commit dd06c39
Show file tree
Hide file tree
Showing 31 changed files with 436 additions and 428 deletions.
16 changes: 9 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ allprojects {
version = "0.1.0"
ext {
appName = "Projekt GG"
aiVersion = "1.8.1"
//aiVersion = "1.8.1"
concurrentUnitVersion = "0.4.6"
discordIPCVersion = "0.4"
gdxVersion = "1.9.12"
gsonVersion = "2.8.6"
guavaVersion = "30.0-jre"
gdxVersion = "1.10.0"
gsonVersion = "2.10.1"
guavaVersion = "31.1-jre"
junitVersion = "5.6.0"
kryonetVersion = "2.22.6"
kryonetVersion = "2.22.8"
mockitoVersion = "3.4.4"
pancakeVersion = "0.1.1"
quakemonkeyVersion = "master-SNAPSHOT"
pancakeVersion = "master-SNAPSHOT"
//quakemonkeyVersion = "master-SNAPSHOT"
vfxVersion = "0.6.1"
}

repositories {
Expand Down Expand Up @@ -82,6 +83,7 @@ project(":game") {
dependencies {
compile project(":engine")
compile "com.google.guava:guava:$guavaVersion"
compile "com.github.crykn.gdx-vfx:gdx-vfx-effects:$vfxVersion"
//compile "com.github.crykn:quakemonkey:$quakemonkeyVersion"

//testCompile project(':engine').sourceSets.test.output
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,19 +1,25 @@
package de.gg.engine.misc;

import java.time.OffsetDateTime;
import java.util.function.Consumer;

import org.lwjgl.system.Callback;
import org.lwjgl.system.CallbackI;

import com.jagrosh.discordipc.IPCClient;
import com.jagrosh.discordipc.IPCListener;
import com.jagrosh.discordipc.entities.RichPresence;
import com.jagrosh.discordipc.exceptions.NoDiscordClientException;

import de.damios.guacamole.ISimpleCallback;
import de.damios.guacamole.Preconditions;
import de.damios.guacamole.concurrent.ThreadHandler;
import de.damios.guacamole.gdx.Log;
import de.damios.guacamole.gdx.log.Logger;
import de.damios.guacamole.gdx.log.LoggerService;

public abstract class DiscordRichPresenceHandler {

private static final Logger LOG = LoggerService
.getLogger(DiscordRichPresenceHandler.class);
/**
* Whether the handler is enabled.
*/
Expand Down Expand Up @@ -45,12 +51,12 @@ protected void setPresence(RichPresence presence) {
if (connected)
client.sendRichPresence(presence);
else
connect((Object) -> {
connect(() -> {
client.sendRichPresence(presence);
});
}

protected void connect(ISimpleCallback callback) {
protected void connect(Runnable onCompletion) {
if (!enabled)
return;

Expand All @@ -63,14 +69,13 @@ protected void connect(ISimpleCallback callback) {
@Override
public void onReady(IPCClient client) {
connected = true;
callback.call(null);
Log.info("Discord",
"Connection to the ipc established");
onCompletion.run();
LOG.info("[DISCORD] Connection to the ipc established");
}
});
client.connect();
} catch (NoDiscordClientException e) {
Log.error("Discord", "Couldn't connect to the ipc: %s", e);
LOG.error("[DISCORD] Couldn't connect to the ipc: %s", e);
}
});
}
Expand Down
Loading

0 comments on commit dd06c39

Please sign in to comment.