The great event move

This commit is contained in:
Evil Factory
2026-02-20 18:45:41 -03:00
parent c28a08a713
commit f52617deab
22 changed files with 508 additions and 112 deletions
@@ -4,6 +4,7 @@ using System.Xml.Linq;
using System;
using Barotrauma.Extensions;
using Microsoft.Xna.Framework;
using Barotrauma.LuaCs.Events;
namespace Barotrauma
{
@@ -343,7 +344,7 @@ namespace Barotrauma
if (client != null)
{
GameMain.Server.SetClientCharacter(client, husk);
GameMain.LuaCs.Hook.Call("husk.clientControlHusk", new object[] { client, husk });
GameMain.LuaCs.EventService.PublishEvent<IEventClientControlHusk>(x => x.OnClientControlHusk(client, husk));
}
#else
if (!character.IsRemotelyControlled && character == Character.Controlled)