mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-22 16:49:01 -06:00
Fixed RPC icon and included RPC lib for mac
This commit is contained in:
parent
1f78bb9e99
commit
6233ffb12d
BIN
libs/discord-rpc.dylib
Normal file
BIN
libs/discord-rpc.dylib
Normal file
Binary file not shown.
22
load/rpc.lua
22
load/rpc.lua
@ -34,15 +34,6 @@ if success then
|
|||||||
|
|
||||||
RPC.initialize(DiscordRPC.appId, true)
|
RPC.initialize(DiscordRPC.appId, true)
|
||||||
local now = os.time(os.date("*t"))
|
local now = os.time(os.date("*t"))
|
||||||
RPC.updatePresence({
|
|
||||||
startTimestamp = now,
|
|
||||||
details = "Loading game...",
|
|
||||||
state = "",
|
|
||||||
largeImageKey = "icon2",
|
|
||||||
largeImageText = "Original game by Joe Zeng",
|
|
||||||
smallImageKey = "",
|
|
||||||
smallImageText = ""
|
|
||||||
})
|
|
||||||
|
|
||||||
DiscordRPC.RPC = RPC
|
DiscordRPC.RPC = RPC
|
||||||
print("DiscordRPC successfully loaded.")
|
print("DiscordRPC successfully loaded.")
|
||||||
@ -51,6 +42,17 @@ else
|
|||||||
print(RPC)
|
print(RPC)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
DiscordRPC.presence = {
|
||||||
|
startTimestamp = now,
|
||||||
|
details = "Loading game...",
|
||||||
|
state = "",
|
||||||
|
largeImageKey = "icon2",
|
||||||
|
largeImageText = "Original game by Joe Zeng",
|
||||||
|
smallImageKey = "",
|
||||||
|
smallImageText = ""
|
||||||
|
}
|
||||||
|
|
||||||
function DiscordRPC:update(newstuff)
|
function DiscordRPC:update(newstuff)
|
||||||
if self.loaded then self.RPC.updatePresence(newstuff) end
|
for k, v in pairs(newstuff) do self.presence[k] = v end
|
||||||
|
if self.loaded then self.RPC.updatePresence(self.presence) end
|
||||||
end
|
end
|
Loading…
Reference in New Issue
Block a user