The great event move
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using Barotrauma.Items.Components;
|
||||
using Barotrauma.LuaCs.Data;
|
||||
using Barotrauma.Networking;
|
||||
using FarseerPhysics.Dynamics;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Steamworks.Ugc;
|
||||
using System;
|
||||
@@ -136,6 +137,408 @@ internal interface IEventCharacterCreated : IEvent<IEventCharacterCreated>
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventHumanCPRSuccess : IEvent<IEventHumanCPRSuccess>
|
||||
{
|
||||
void OnCharacterCPRSuccess(HumanoidAnimController animController);
|
||||
|
||||
static IEventHumanCPRSuccess IEvent<IEventHumanCPRSuccess>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventHumanCPRSuccess
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnCharacterCPRSuccess(HumanoidAnimController animController)
|
||||
{
|
||||
LuaFuncs[nameof(OnCharacterCPRSuccess)](animController);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventHumanCPRFailed : IEvent<IEventHumanCPRFailed>
|
||||
{
|
||||
void OnCharacterCPRFailed(HumanoidAnimController animController);
|
||||
|
||||
static IEventHumanCPRFailed IEvent<IEventHumanCPRFailed>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventHumanCPRFailed
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnCharacterCPRFailed(HumanoidAnimController animController)
|
||||
{
|
||||
LuaFuncs[nameof(OnCharacterCPRFailed)](animController);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventClientControlHusk : IEvent<IEventClientControlHusk>
|
||||
{
|
||||
void OnClientControlHusk(Client client, Character husk);
|
||||
|
||||
static IEventClientControlHusk IEvent<IEventClientControlHusk>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventClientControlHusk
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnClientControlHusk(Client client, Character husk)
|
||||
{
|
||||
LuaFuncs[nameof(OnClientControlHusk)](client, husk);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventMeleeWeaponHandleImpact : IEvent<IEventMeleeWeaponHandleImpact>
|
||||
{
|
||||
void OnMeleeWeaponHandleImpact(MeleeWeapon meleeWeapon, Body target);
|
||||
|
||||
static IEventMeleeWeaponHandleImpact IEvent<IEventMeleeWeaponHandleImpact>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventMeleeWeaponHandleImpact
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnMeleeWeaponHandleImpact(MeleeWeapon meleeWeapon, Body target)
|
||||
{
|
||||
LuaFuncs[nameof(OnMeleeWeaponHandleImpact)](meleeWeapon, target);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventServerLog : IEvent<IEventServerLog>
|
||||
{
|
||||
void OnServerLog(string line, ServerLog.MessageType messageType);
|
||||
|
||||
static IEventServerLog IEvent<IEventServerLog>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventServerLog
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public void OnServerLog(string line, ServerLog.MessageType messageType)
|
||||
{
|
||||
LuaFuncs[nameof(OnServerLog)](line, messageType);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventChatMessage : IEvent<IEventChatMessage>
|
||||
{
|
||||
bool? OnChatMessage(string messageText, Client sender, ChatMessageType type, ChatMessage message);
|
||||
|
||||
static IEventChatMessage IEvent<IEventChatMessage>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventChatMessage
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnChatMessage(string messageText, Client sender, ChatMessageType type, ChatMessage message)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnChatMessage)](messageText, sender, type, message);
|
||||
if (result is bool b && b)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventTryClientChangeName : IEvent<IEventTryClientChangeName>
|
||||
{
|
||||
bool? OnTryClienChangeName(Client client, string newName, Identifier newJob, CharacterTeamType newTeam);
|
||||
|
||||
static IEventTryClientChangeName IEvent<IEventTryClientChangeName>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventTryClientChangeName
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnTryClienChangeName(Client client, string newName, Identifier newJob, CharacterTeamType newTeam)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnTryClienChangeName)](client, newName, newJob, newTeam);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventChangeFallDamage : IEvent<IEventChangeFallDamage>
|
||||
{
|
||||
float? OnChangeFallDamage(float impactDamage, Character character, Vector2 impactPos, Vector2 velocity);
|
||||
|
||||
static IEventChangeFallDamage IEvent<IEventChangeFallDamage>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventChangeFallDamage
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public float? OnChangeFallDamage(float impactDamage, Character character, Vector2 impactPos, Vector2 velocity)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnChangeFallDamage)](impactDamage, character, impactPos, velocity);
|
||||
if (result is float f)
|
||||
{
|
||||
return f;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventGapOxygenUpdate : IEvent<IEventGapOxygenUpdate>
|
||||
{
|
||||
bool? OnGapOxygenUpdate(Gap gap, Hull hull1, Hull hull2);
|
||||
|
||||
static IEventGapOxygenUpdate IEvent<IEventGapOxygenUpdate>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventGapOxygenUpdate
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnGapOxygenUpdate(Gap gap, Hull hull1, Hull hull2)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnGapOxygenUpdate)](gap, hull1, hull2);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventCharacterApplyDamage : IEvent<IEventCharacterApplyDamage>
|
||||
{
|
||||
bool? OnCharacterApplyDamage(CharacterHealth characterHealth, AttackResult attackResult, Limb hitLimb, bool allowStacking);
|
||||
|
||||
static IEventCharacterApplyDamage IEvent<IEventCharacterApplyDamage>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventCharacterApplyDamage
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnCharacterApplyDamage(CharacterHealth characterHealth, AttackResult attackResult, Limb hitLimb, bool allowStacking)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnCharacterApplyDamage)](characterHealth, attackResult, hitLimb, allowStacking);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventCharacterApplyAffliction : IEvent<IEventCharacterApplyAffliction>
|
||||
{
|
||||
bool? OnCharacterApplyAffliction(CharacterHealth characterHealth, CharacterHealth.LimbHealth limbHealth, Affliction newAffliction, bool allowStacking);
|
||||
|
||||
static IEventCharacterApplyAffliction IEvent<IEventCharacterApplyAffliction>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventCharacterApplyAffliction
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnCharacterApplyAffliction(CharacterHealth characterHealth, CharacterHealth.LimbHealth limbHealth, Affliction newAffliction, bool allowStacking)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnCharacterApplyAffliction)](characterHealth, limbHealth, newAffliction, allowStacking);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventItemReadPropertyChange : IEvent<IEventItemReadPropertyChange>
|
||||
{
|
||||
bool? OnItemReadPropertyChange(Item item, SerializableProperty property, object parentObject, bool allowEditing, Client sender);
|
||||
|
||||
static IEventItemReadPropertyChange IEvent<IEventItemReadPropertyChange>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventItemReadPropertyChange
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnItemReadPropertyChange(Item item, SerializableProperty property, object parentObject, bool allowEditing, Client sender)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnItemReadPropertyChange)](item, property, parentObject, allowEditing, sender);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventCanUseVoiceRadio : IEvent<IEventCanUseVoiceRadio>
|
||||
{
|
||||
bool? OnCanUseVoiceRadio(Client sender, Client recipient);
|
||||
|
||||
static IEventCanUseVoiceRadio IEvent<IEventCanUseVoiceRadio>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventCanUseVoiceRadio
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnCanUseVoiceRadio(Client sender, Client recipient)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnCanUseVoiceRadio)](sender, recipient);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventChangeLocalVoiceRange : IEvent<IEventChangeLocalVoiceRange>
|
||||
{
|
||||
float? OnChangeLocalVoiceRange(Client sender, Client recipient);
|
||||
|
||||
static IEventChangeLocalVoiceRange IEvent<IEventChangeLocalVoiceRange>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventChangeLocalVoiceRange
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public float? OnChangeLocalVoiceRange(Client sender, Client recipient)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnChangeLocalVoiceRange)](sender, recipient);
|
||||
if (result is float f)
|
||||
{
|
||||
return f;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventItemDeconstructed : IEvent<IEventItemDeconstructed>
|
||||
{
|
||||
bool? OnItemDeconstructed(Item item, Deconstructor deconstructor, Character user, bool allowRemove);
|
||||
|
||||
static IEventItemDeconstructed IEvent<IEventItemDeconstructed>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventItemDeconstructed
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnItemDeconstructed(Item item, Deconstructor deconstructor, Character user, bool allowRemove)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnItemDeconstructed)](item, deconstructor, user, allowRemove);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: harmony-fy
|
||||
internal interface IEventWifiSignalTransmitted : IEvent<IEventWifiSignalTransmitted>
|
||||
{
|
||||
bool? OnWifiSignalTransmitted(WifiComponent wifiComponent, Signal signal, bool sentFromChat);
|
||||
|
||||
static IEventWifiSignalTransmitted IEvent<IEventWifiSignalTransmitted>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc)
|
||||
=> new LuaWrapper(luaFunc);
|
||||
|
||||
public sealed class LuaWrapper : LuaWrapperBase, IEventWifiSignalTransmitted
|
||||
{
|
||||
public LuaWrapper(IDictionary<string, LuaCsFunc> luaFuncs) : base(luaFuncs)
|
||||
{
|
||||
}
|
||||
|
||||
public bool? OnWifiSignalTransmitted(WifiComponent wifiComponent, Signal signal, bool sentFromChat)
|
||||
{
|
||||
var result = LuaFuncs[nameof(OnWifiSignalTransmitted)](wifiComponent, signal, sentFromChat);
|
||||
if (result is bool b)
|
||||
{
|
||||
return b;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
internal interface IEventCharacterDeath : IEvent<IEventCharacterDeath>
|
||||
{
|
||||
void OnCharacterDeath(Character character, Affliction causeOfDeathAffliction, CauseOfDeathType causeOfDeathType);
|
||||
@@ -156,29 +559,6 @@ internal interface IEventCharacterDeath : IEvent<IEventCharacterDeath>
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
internal interface IEventHumanCPRFailed : IEvent<IEventHumanCPRFailed>
|
||||
{
|
||||
void OnHumanCPRFailed(Character character);
|
||||
static IEventHumanCPRFailed IEvent<IEventHumanCPRFailed>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc) => new
|
||||
{
|
||||
IsLuaRunner = Return<bool>.Arguments(() => true),
|
||||
OnHumanCPRFailed = ReturnVoid.Arguments((Character character) => luaFunc[nameof(OnHumanCPRFailed)](character))
|
||||
}.ActLike<IEventHumanCPRFailed>();
|
||||
}
|
||||
|
||||
|
||||
internal interface IEventHumanCPRSuccess : IEvent<IEventHumanCPRSuccess>
|
||||
{
|
||||
void OnHumanCPRSuccess(Character character);
|
||||
static IEventHumanCPRSuccess IEvent<IEventHumanCPRSuccess>.GetLuaRunner(IDictionary<string, LuaCsFunc> luaFunc) => new
|
||||
{
|
||||
IsLuaRunner = Return<bool>.Arguments(() => true),
|
||||
OnHumanCPRSuccess = ReturnVoid.Arguments((Character character) => luaFunc[nameof(OnHumanCPRSuccess)](character))
|
||||
}.ActLike<IEventHumanCPRSuccess>();
|
||||
}
|
||||
*/
|
||||
|
||||
public interface IEventKeyUpdate : IEvent<IEventKeyUpdate>
|
||||
{
|
||||
void OnKeyUpdate(double deltaTime);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using Barotrauma.Networking;
|
||||
using Barotrauma.LuaCs.Events;
|
||||
using Barotrauma.Networking;
|
||||
using FluentResults;
|
||||
using HarmonyLib;
|
||||
using Microsoft.Xna.Framework;
|
||||
@@ -59,7 +60,7 @@ public partial class LoggerService : ILoggerService
|
||||
if (!_isInsideLogCall)
|
||||
{
|
||||
_isInsideLogCall = true;
|
||||
GameMain.LuaCs?.Hook?.Call("serverLog", logMessage, log.MessageType);
|
||||
GameMain.LuaCs?.EventService.PublishEvent<IEventServerLog>(x => x.OnServerLog(logMessage, log.MessageType));
|
||||
_isInsideLogCall = false;
|
||||
}
|
||||
}
|
||||
|
||||
+21
@@ -179,6 +179,25 @@ class LuaScriptManagementService : ILuaScriptManagementService, ILuaDataService
|
||||
_eventService.RegisterLuaEventAlias<IEventCharacterDeath>("character.death", nameof(IEventCharacterDeath.OnCharacterDeath));
|
||||
_eventService.RegisterLuaEventAlias<IEventCharacterDamageLimb>("character.damageLimb", nameof(IEventCharacterDamageLimb.OnCharacterDamageLimb));
|
||||
_eventService.RegisterLuaEventAlias<IEventGiveCharacterJobItems>("character.giveJobItems", nameof(IEventGiveCharacterJobItems.OnGiveCharacterJobItems));
|
||||
_eventService.RegisterLuaEventAlias<IEventHumanCPRSuccess>("character.CPRSuccess", nameof(IEventHumanCPRSuccess.OnCharacterCPRSuccess));
|
||||
_eventService.RegisterLuaEventAlias<IEventHumanCPRFailed>("character.CPRFailed", nameof(IEventHumanCPRFailed.OnCharacterCPRFailed));
|
||||
_eventService.RegisterLuaEventAlias<IEventCharacterApplyDamage>("character.applyDamage", nameof(IEventCharacterApplyDamage.OnCharacterApplyDamage));
|
||||
_eventService.RegisterLuaEventAlias<IEventCharacterApplyAffliction>("character.applyAffliction", nameof(IEventCharacterApplyAffliction.OnCharacterApplyAffliction));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventGapOxygenUpdate>("gapOxygenUpdate", nameof(IEventGapOxygenUpdate.OnGapOxygenUpdate));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventClientControlHusk>("husk.clientControlHusk", nameof(IEventClientControlHusk.OnClientControlHusk));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventMeleeWeaponHandleImpact>("meleeWeapon.handleImpact", nameof(IEventMeleeWeaponHandleImpact.OnMeleeWeaponHandleImpact));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventServerLog>("serverLog", nameof(IEventServerLog.OnServerLog));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventTryClientChangeName>("tryChangeClientName", nameof(IEventTryClientChangeName.OnTryClienChangeName));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventChangeFallDamage>("changeFallDamage", nameof(IEventChangeFallDamage.OnChangeFallDamage));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventCanUseVoiceRadio>("canUseVoiceRadio", nameof(IEventCanUseVoiceRadio.OnCanUseVoiceRadio));
|
||||
_eventService.RegisterLuaEventAlias<IEventChangeLocalVoiceRange>("changeLocalVoiceRange", nameof(IEventChangeLocalVoiceRange.OnChangeLocalVoiceRange));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventRoundStarted>("roundStart", nameof(IEventRoundStarted.OnRoundStart));
|
||||
_eventService.RegisterLuaEventAlias<IEventRoundEnded>("roundEnd", nameof(IEventRoundEnded.OnRoundEnd));
|
||||
@@ -190,6 +209,8 @@ class LuaScriptManagementService : ILuaScriptManagementService, ILuaDataService
|
||||
_eventService.RegisterLuaEventAlias<IEventItemRemoved>("item.removed", nameof(IEventItemRemoved.OnItemRemoved));
|
||||
_eventService.RegisterLuaEventAlias<IEventItemUse>("item.use", nameof(IEventItemUse.OnItemUsed));
|
||||
_eventService.RegisterLuaEventAlias<IEventItemSecondaryUse>("item.secondaryUse", nameof(IEventItemSecondaryUse.OnItemSecondaryUsed));
|
||||
_eventService.RegisterLuaEventAlias<IEventItemReadPropertyChange>("item.readPropertyChange", nameof(IEventItemReadPropertyChange.OnItemReadPropertyChange));
|
||||
_eventService.RegisterLuaEventAlias<IEventItemDeconstructed>("item.deconstructed", nameof(IEventItemDeconstructed.OnItemDeconstructed));
|
||||
|
||||
_eventService.RegisterLuaEventAlias<IEventInventoryPutItem>("inventoryPutItem", nameof(IEventInventoryPutItem.OnInventoryPutItem));
|
||||
_eventService.RegisterLuaEventAlias<IEventInventoryItemSwap>("inventoryItemSwap", nameof(IEventInventoryItemSwap.OnInventoryItemSwap));
|
||||
|
||||
Reference in New Issue
Block a user