v1.2.6.0 (Winter Update)

This commit is contained in:
Regalis11
2023-12-14 16:11:27 +02:00
parent af8cc89fce
commit b91e85559d
375 changed files with 7771 additions and 2874 deletions
@@ -27,10 +27,11 @@ partial class EventLogAction : EventAction
}
else
{
DebugConsole.AddWarning($"{target} is not a valid target for an EventLogAction. The target should be a character.");
DebugConsole.AddWarning($"{target} is not a valid target for an EventLogAction. The target should be a character.",
ParentEvent.Prefab.ContentPackage);
}
}
if (eventLog.TryAddEntry(ParentEvent.Prefab.Identifier, Id, displayText, targetClients) && ShowInServerLog)
if (eventLog!.TryAddEntry(ParentEvent.Prefab.Identifier, Id, displayText, targetClients) && ShowInServerLog)
{
Log(targetClients);
}
@@ -0,0 +1,24 @@
#nullable enable
using Barotrauma.Networking;
using System.Collections.Generic;
using System.Linq;
namespace Barotrauma;
partial class HighlightAction : EventAction
{
partial void SetHighlightProjSpecific(Entity entity, IEnumerable<Character>? targetCharacters)
{
if (entity is Item item && GameMain.Server != null)
{
IEnumerable<Client>? targetClients = null;
if (targetCharacters != null)
{
targetClients = targetCharacters
.Select(c => GameMain.Server.ConnectedClients.FirstOrDefault(client => client.Character == c))
.Where(c => c != null)!;
}
GameMain.Server?.CreateEntityEvent(item, new Item.SetHighlightEventData(State, highlightColor, targetClients));
}
}
}