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
@@ -0,0 +1,48 @@
#nullable enable
using Microsoft.Xna.Framework;
using System.Collections.Generic;
using System.Linq;
namespace Barotrauma;
partial class HighlightAction : EventAction
{
partial void SetHighlightProjSpecific(Entity entity, IEnumerable<Character>? targetCharacters)
{
if (targetCharacters != null && !targetCharacters.Contains(Character.Controlled))
{
return;
}
if (entity is Item i)
{
SetItemHighlight(i);
}
else if (entity is Structure s)
{
SetStructureHighlight(s);
}
else if (entity is Character c)
{
SetCharacterHighlight(c);
}
}
private void SetItemHighlight(Item item)
{
if (item.ExternalHighlight == State) { return; }
item.HighlightColor = State ? highlightColor : null;
item.ExternalHighlight = State;
}
private void SetStructureHighlight(Structure structure)
{
structure.SpriteColor = State ? highlightColor : Color.White;
structure.ExternalHighlight = State;
}
private void SetCharacterHighlight(Character character)
{
character.ExternalHighlight = State;
}
}