2020-11-03 21:11:10 +00:00
|
|
|
|
using OWML.Common;
|
2020-11-03 17:56:48 +00:00
|
|
|
|
using QSB.Animation.Events;
|
|
|
|
|
using QSB.ConversationSync.Events;
|
|
|
|
|
using QSB.DeathSync.Events;
|
|
|
|
|
using QSB.ElevatorSync.Events;
|
|
|
|
|
using QSB.GeyserSync.Events;
|
2020-12-19 10:56:25 +00:00
|
|
|
|
using QSB.LogSync.Events;
|
2020-11-03 17:56:48 +00:00
|
|
|
|
using QSB.OrbSync.Events;
|
2020-11-03 21:33:48 +00:00
|
|
|
|
using QSB.Player.Events;
|
2020-12-22 21:39:53 +00:00
|
|
|
|
using QSB.QuantumSync.Events;
|
2020-11-03 17:56:48 +00:00
|
|
|
|
using QSB.TimeSync.Events;
|
|
|
|
|
using QSB.Tools.Events;
|
2020-11-03 21:11:10 +00:00
|
|
|
|
using QSB.Utility;
|
2020-08-15 20:32:58 +01:00
|
|
|
|
using System.Collections.Generic;
|
2020-08-12 21:58:29 +02:00
|
|
|
|
|
2020-12-14 16:24:52 +00:00
|
|
|
|
namespace QSB.Events
|
2020-08-08 00:08:44 +01:00
|
|
|
|
{
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public static class QSBEventManager
|
|
|
|
|
{
|
|
|
|
|
public static bool Ready { get; private set; }
|
2020-08-09 14:26:33 +01:00
|
|
|
|
|
2020-12-02 21:23:01 +00:00
|
|
|
|
private static List<IQSBEvent> _eventList = new List<IQSBEvent>();
|
2020-08-15 20:32:58 +01:00
|
|
|
|
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public static void Init()
|
|
|
|
|
{
|
|
|
|
|
_eventList = new List<IQSBEvent>
|
|
|
|
|
{
|
2020-12-23 11:26:47 +00:00
|
|
|
|
// Player
|
2020-12-02 21:23:01 +00:00
|
|
|
|
new PlayerReadyEvent(),
|
|
|
|
|
new PlayerJoinEvent(),
|
|
|
|
|
new PlayerSuitEvent(),
|
|
|
|
|
new PlayerFlashlightEvent(),
|
|
|
|
|
new PlayerSignalscopeEvent(),
|
|
|
|
|
new PlayerTranslatorEvent(),
|
|
|
|
|
new PlayerProbeLauncherEvent(),
|
|
|
|
|
new PlayerProbeEvent(),
|
|
|
|
|
new PlayerSectorEvent(),
|
|
|
|
|
new PlayerDeathEvent(),
|
|
|
|
|
new PlayerStatesRequestEvent(),
|
2020-12-23 11:26:47 +00:00
|
|
|
|
new ServerSendPlayerStatesEvent(),
|
|
|
|
|
new ChangeAnimTypeEvent(),
|
|
|
|
|
new CrouchEvent(),
|
|
|
|
|
new ServerTimeEvent(),
|
|
|
|
|
// World Objects
|
2020-12-02 21:23:01 +00:00
|
|
|
|
new ElevatorEvent(),
|
|
|
|
|
new GeyserEvent(),
|
|
|
|
|
new OrbSlotEvent(),
|
|
|
|
|
new OrbUserEvent(),
|
2020-12-23 11:26:47 +00:00
|
|
|
|
new SocketStateChangeEvent(),
|
|
|
|
|
new MultiStateChangeEvent(),
|
|
|
|
|
// Conversation/dialogue
|
2020-12-02 21:23:01 +00:00
|
|
|
|
new ConversationEvent(),
|
|
|
|
|
new ConversationStartEndEvent(),
|
2020-12-19 10:56:25 +00:00
|
|
|
|
new DialogueConditionEvent(),
|
2020-12-23 11:26:47 +00:00
|
|
|
|
new RevealFactEvent()
|
2020-12-02 21:23:01 +00:00
|
|
|
|
};
|
2020-08-15 20:32:58 +01:00
|
|
|
|
|
2020-12-02 21:23:01 +00:00
|
|
|
|
_eventList.ForEach(ev => ev.SetupListener());
|
2020-08-18 20:47:17 +02:00
|
|
|
|
|
2020-12-02 21:23:01 +00:00
|
|
|
|
Ready = true;
|
2020-11-03 21:11:10 +00:00
|
|
|
|
|
2020-12-02 21:23:01 +00:00
|
|
|
|
DebugLog.DebugWrite("Event Manager ready.", MessageType.Success);
|
|
|
|
|
}
|
2020-08-15 20:32:58 +01:00
|
|
|
|
|
2020-12-02 21:23:01 +00:00
|
|
|
|
public static void Reset()
|
|
|
|
|
{
|
|
|
|
|
Ready = false;
|
|
|
|
|
_eventList.ForEach(ev => ev.CloseListener());
|
|
|
|
|
_eventList = new List<IQSBEvent>();
|
|
|
|
|
}
|
|
|
|
|
}
|
2020-12-03 08:28:05 +00:00
|
|
|
|
}
|