mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-05-13 20:21:25 -05:00
rich presence!!
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user