using System; using System.Collections.Generic; using Barotrauma.LuaCs.Events; using Barotrauma.LuaCs.Services.Compatibility; namespace Barotrauma.LuaCs.Services.Safe; public interface ILuaSafeEventService : ILuaService, ILuaCsHook { void Subscribe(string interfaceName, string identifier, IDictionary callbacks); /// /// Removes a subscriber from an event that subscribed under the given identifier. /// /// /// void Remove(string eventName, string identifier); /// /// Send an event to all subscribers to an interface. /// /// Name of the interface (must be registered with Lua). /// Execution runner, the subscriber is provided as the first argument in the lua runner. /// void PublishLuaEvent(string interfaceName, LuaCsFunc runner); } public interface ILuaEventService : ILuaSafeEventService { public FluentResults.Result RegisterSafeEvent() where T : IEvent; public FluentResults.Result UnregisterSafeEvent() where T : IEvent; }