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
{
///
/// Subscribes lua scripts via for the given interface.
///
///
///
/// A 'method name'=='signature action' dictionary matching the interface method list.
void Subscribe(string identifier, IDictionary callbacks) where T : IEvent;
///
/// 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.
///
/// Interface type.
/// Execution runner, the subscriber is provided as the first argument in the lua runner.
///
void PublishLuaEvent(LuaCsFunc subscriberRunner) where T : IEvent;
///
/// Defines the target method name for legacy to target on new
/// interfaces.
///
/// The legacy event name.
/// .
/// The event interface type.
/// Operation success.
/// The is null or empty.
public FluentResults.Result RegisterLuaEventAlias(string luaEventName, string targetMethod) where T : IEvent;
}
public interface ILuaEventService : ILuaSafeEventService
{
}