|
1234567891011121314151617181920212223242526272829 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
-
- using GamecraftModdingAPI.Events;
- using Svelto.ECS;
- using RobocraftX.Common;
-
- namespace GamecraftRPC.Events
- {
- class SimulatePresenceHandler : SimpleEventHandlerEngine
- {
- public static readonly string HandlerName = "GamecraftRPCSimulatePresenceEventHandler";
-
- //private Discord.Discord discordRPC = null;
-
- public static void OnAdd(Discord.Discord discordRPC)
- {
- Plugin.SetDiscordActivity(discordRPC, state: "In-Game", details: $"Playing {GameMode.SaveGameDetails.Name}", start: PresenceUtility.LastGameStart, matchSecret: PresenceUtility.GameSecret, joinSecret: PresenceUtility.GameSecret);
- }
-
- public SimulatePresenceHandler(Discord.Discord _discordRPC) : base((db) => { OnAdd(_discordRPC); }, (db) => { }, EventType.SimulationSwitchedTo, HandlerName)
- {
- //this.discordRPC = _discordRPC;
- }
- }
- }
|