rich presence!!

This commit is contained in:
Hailey
2020-10-10 08:43:22 +10:00
parent 67abf35a28
commit 995fd7fee9
7 changed files with 311 additions and 3 deletions

View File

@@ -5,6 +5,9 @@ function GameScene:new(game_mode, ruleset)
self.game = game_mode()
self.ruleset = ruleset()
self.game:initialize(self.ruleset)
presence.details = "In game"
presence.state = game_mode.name
discordRPC.updatePresence(presence)
end
function GameScene:update()
@@ -66,7 +69,7 @@ function GameScene:onKeyPress(e)
-- fuck this, this is hacky but the way this codebase is setup prevents anything else
-- it seems like all the values that get touched in the child gamemode class
-- stop being linked to the values of the GameMode superclass because of how `mt.__index` works
-- not even sure this is the actual problem, but I don't want to have to rebuild everything about
-- not even sure this is the actual problem, but I don't want to have to rebuild everything about
-- the core organisation of everything. this hacky way will have to do until someone figures out something.
love.keypressed("escape", "escape", false)
love.keypressed("return", "return", false)

View File

@@ -22,6 +22,10 @@ function ConfigScene:new()
-- load current config
self.config = config.input
self.input_state = 1
presence.details = "In menus"
presence.state = "Changing input config"
discordRPC.updatePresence(presence)
end
function ConfigScene:update()
@@ -34,7 +38,7 @@ function ConfigScene:render()
0, 0, 0,
0.5, 0.5
)
love.graphics.setFont(font_3x5_2)
for i, input in pairs(configurable_inputs) do
if config.input[input] then

View File

@@ -47,6 +47,9 @@ function ModeSelectScene:new()
ruleset = current_ruleset,
select = "mode",
}
presence.details = "In menus"
presence.state = "Choosing a mode"
discordRPC.updatePresence(presence)
end
function ModeSelectScene:update()

View File

@@ -6,8 +6,13 @@ local main_menu_screens = {
ExitScene,
}
local mainmenuidle = {"Idle", "Twiddling their thumbs", "Admiring the main menu's BG", "Waiting for spring to come"}
function TitleScene:new()
self.main_menu_state = 1
presence.details = "In menus"
presence.state = mainmenuidle[math.random(#mainmenuidle)]
discordRPC.updatePresence(presence)
end
function TitleScene:update()