diff --git a/libdiscord-rpc.so b/libdiscord-rpc.so new file mode 100644 index 0000000..188d4e8 Binary files /dev/null and b/libdiscord-rpc.so differ diff --git a/main.lua b/main.lua index 956a870..42c2e8a 100644 --- a/main.lua +++ b/main.lua @@ -2,10 +2,12 @@ require "src/dependencies" -local content = love.filesystem.read("src/libdiscord-rpc.so") -print(content) -love.filesystem.write("libdiscord-rpc.so", content) +--local content = love.filesystem.read("src/libdiscord-rpc.so") +--print(content) +--love.filesystem.write("libdiscord-rpc.so", content) +if not isAndroid then local discordRPC = require("src/discordRPC") +end local appId = require("applicationId") --CANCELLED ATTEMPETED SHADING (NOT WORKING) @@ -946,6 +948,7 @@ function love.load() smallfont = love.graphics.newFont("font.ttf", 25) scorefont = love.graphics.newFont("font.ttf", 60) love.graphics.setFont(smallfont) + if not isAndroid then discordRPC.initialize(appId, true) local now = os.time(os.date("*t")) presence = { @@ -954,6 +957,7 @@ function love.load() largeImageKey = "pongnew", largeImageText = "Nuclear Pong", } +end nextPresenceUpdate = 0 --push:setupScreen(VIRTUAL_WIDTH, VIRTUAL_HEIGHT, WINDOW_WIDTH, WINDOW_HEIGHT, { @@ -1051,11 +1055,14 @@ function love.update(dt) globalMessage = "none" end end + if not isAndroid then if nextPresenceUpdate < love.timer.getTime() then + discordRPC.updatePresence(presence) nextPresenceUpdate = love.timer.getTime() + 2.0 end discordRPC.runCallbacks() +end if not lowcpu then if (love.timer.getFPS() < 50 and gameState ~= "animation") then countinglowcpu = countinglowcpu + 1 diff --git a/readme.md b/readme.md index 12f4ce6..8e9d94c 100644 --- a/readme.md +++ b/readme.md @@ -18,7 +18,7 @@ To play the game on Linux, just launch the ./debuggame.sh and enjoy the game! To play on Linux like a normie, you can Download the latest release (may be outdated compared to the source version), or you can download the LOVE file from the releases tab. To play on Windows, download a Windows executable from the releases tab! # Changes -

0.8 is here! Changelog: +

0.9 is here! Changelog: