Hotfix 1.1.18.1 (real this time)
This commit is contained in:
+13
-10
@@ -1,19 +1,22 @@
|
||||
#nullable enable
|
||||
using Microsoft.Xna.Framework;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Barotrauma;
|
||||
|
||||
partial class HighlightAction : EventAction
|
||||
partial class TutorialHighlightAction : EventAction
|
||||
{
|
||||
partial void SetHighlightProjSpecific(Entity entity, IEnumerable<Character>? targetCharacters)
|
||||
{
|
||||
if (targetCharacters != null && !targetCharacters.Contains(Character.Controlled))
|
||||
{
|
||||
return;
|
||||
}
|
||||
private static readonly Color highlightColor = Color.Orange;
|
||||
|
||||
partial void UpdateProjSpecific()
|
||||
{
|
||||
if (GameMain.GameSession?.GameMode is not TutorialMode) { return; }
|
||||
foreach (var target in ParentEvent.GetTargets(TargetTag))
|
||||
{
|
||||
SetHighlight(target);
|
||||
}
|
||||
}
|
||||
|
||||
private void SetHighlight(Entity entity)
|
||||
{
|
||||
if (entity is Item i)
|
||||
{
|
||||
SetItemHighlight(i);
|
||||
@@ -1540,23 +1540,6 @@ namespace Barotrauma
|
||||
RemoveFromDroppedStack(allowClientExecute: true);
|
||||
}
|
||||
break;
|
||||
case EventType.SetHighlight:
|
||||
bool isTargetedForThisClient = msg.ReadBoolean();
|
||||
if (isTargetedForThisClient)
|
||||
{
|
||||
bool highlight = msg.ReadBoolean();
|
||||
ExternalHighlight = highlight;
|
||||
if (highlight)
|
||||
{
|
||||
Color highlightColor = msg.ReadColorR8G8B8A8();
|
||||
HighlightColor = highlightColor;
|
||||
}
|
||||
else
|
||||
{
|
||||
HighlightColor = null;
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
throw new Exception($"Malformed incoming item event: unsupported event type {eventType}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user