(5a377a8ee) Unstable v0.9.1000.0

This commit is contained in:
Juan Pablo Arce
2020-05-13 12:55:42 -03:00
parent b143329701
commit a1ca41aa5d
426 changed files with 14384 additions and 5708 deletions
@@ -39,8 +39,6 @@ namespace Barotrauma.Items.Components
private Item focusTarget;
private float targetRotation;
private bool state;
public Vector2 UserPos
{
get { return userPos; }
@@ -61,6 +59,18 @@ namespace Barotrauma.Items.Components
set;
}
[Editable, Serialize(false, false, description: "Whether the item is toggled on/off. Only valid if IsToggle is set to true.")]
public bool State
{
get;
set;
}
public bool ControlCharacterPose
{
get { return limbPositions.Count > 0; }
}
public Controller(Item item, XElement element)
: base(item, element)
{
@@ -99,7 +109,7 @@ namespace Barotrauma.Items.Components
if (IsToggle)
{
item.SendSignal(0, state ? "1" : "0", "signal_out", sender: null);
item.SendSignal(0, State ? "1" : "0", "signal_out", sender: null);
}
if (user == null
@@ -272,7 +282,7 @@ namespace Barotrauma.Items.Components
return true;
}
private Item GetFocusTarget()
public Item GetFocusTarget()
{
item.SendSignal(0, MathHelper.ToDegrees(targetRotation).ToString("G", CultureInfo.InvariantCulture), "position_out", user);
@@ -294,7 +304,7 @@ namespace Barotrauma.Items.Components
{
if (GameMain.NetworkMember == null || GameMain.NetworkMember.IsServer)
{
state = !state;
State = !State;
#if SERVER
item.CreateServerEvent(this);
#endif