add support for plugin generated pages (interactions). add disallow vpn command

This commit is contained in:
RaidMax
2022-10-17 09:17:43 -05:00
parent 3295315339
commit 3367c5c22f
17 changed files with 311 additions and 45 deletions

View File

@ -8,6 +8,8 @@ namespace SharedLibraryCore.Interfaces;
public interface IInteractionData
{
int? EntityId { get; }
string InteractionId { get; }
InteractionType InteractionType { get; }
bool Enabled { get; }
string Name { get; }
string Description { get; }
@ -22,3 +24,10 @@ public interface IInteractionData
InteractionCallback Action { get; }
Delegate ScriptAction { get; }
}
public enum InteractionType
{
ActionButton,
RawContent,
TemplateContent
}

View File

@ -11,7 +11,7 @@ public interface IInteractionRegistration
void RegisterScriptInteraction(string interactionName, string source, Delegate interactionRegistration);
void RegisterInteraction(string interactionName, Func<int?, Reference.Game?, CancellationToken, Task<IInteractionData>> interactionRegistration);
void UnregisterInteraction(string interactionName);
Task<IEnumerable<IInteractionData>> GetInteractions(int? clientId = null,
Task<IEnumerable<IInteractionData>> GetInteractions(string interactionPrefix = null, int? clientId = null,
Reference.Game? game = null, CancellationToken token = default);
Task<string> ProcessInteraction(string interactionId, int originId, int? targetId = null, Reference.Game? game = null, IDictionary<string, string> meta = null, CancellationToken token = default);
}

View File

@ -105,5 +105,6 @@ namespace SharedLibraryCore.Interfaces
event EventHandler<GameEvent> OnGameEventExecuted;
IAlertManager AlertManager { get; }
IInteractionRegistration InteractionRegistration { get; }
}
}