(c45394988) Refactor and fix button interaction and access checks in the indoors steering manager.

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:40:00 +03:00
parent 704e0731c9
commit ddd84a4f9e
82 changed files with 1867 additions and 1608 deletions
@@ -43,11 +43,6 @@ namespace Barotrauma.Items.Components
set { userPos = value; }
}
public Character User
{
get { return user; }
}
public Controller(Item item, XElement element)
: base(item, element)
{
@@ -168,7 +163,7 @@ namespace Barotrauma.Items.Components
return false;
}
item.SendSignal(0, "1", "trigger_out", user);
item.SendSignal(0, "1", "trigger_out", character);
ApplyStatusEffects(ActionType.OnUse, 1.0f, activator);
@@ -238,7 +233,7 @@ namespace Barotrauma.Items.Components
private Item GetFocusTarget()
{
item.SendSignal(0, MathHelper.ToDegrees(targetRotation).ToString("G", CultureInfo.InvariantCulture), "position_out", user);
item.SendSignal(0, MathHelper.ToDegrees(targetRotation).ToString("G", CultureInfo.InvariantCulture), "position_out", character);
for (int i = item.LastSentSignalRecipients.Count - 1; i >= 0; i--)
{