Fixes
It compiles now, but it's probably really broken.
This commit is contained in:
@@ -95,9 +95,7 @@ namespace Barotrauma.Items.Components
|
||||
SetActive(!IsActive);
|
||||
|
||||
currPowerConsumption = IsActive ? powerConsumption : 0.0f;
|
||||
|
||||
item.NewComponentEvent(this, true, true);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -53,8 +53,7 @@ namespace Barotrauma.Items.Components
|
||||
button.OnClicked = (GUIButton btn, object obj) =>
|
||||
{
|
||||
targetForce -= 1.0f;
|
||||
item.NewComponentEvent(this, true, false);
|
||||
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -62,8 +61,7 @@ namespace Barotrauma.Items.Components
|
||||
button.OnClicked = (GUIButton btn, object obj) =>
|
||||
{
|
||||
targetForce += 1.0f;
|
||||
item.NewComponentEvent(this, true, false);
|
||||
|
||||
|
||||
return true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -240,14 +240,10 @@ namespace Barotrauma.Items.Components
|
||||
if (fabricatedItem == null)
|
||||
{
|
||||
StartFabricating(obj as FabricableItem);
|
||||
|
||||
item.NewComponentEvent(this, true, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
CancelFabricating();
|
||||
|
||||
item.NewComponentEvent(this, true, true);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -74,7 +74,6 @@ namespace Barotrauma.Items.Components
|
||||
targetLevel = null;
|
||||
IsActive = !IsActive;
|
||||
if (!IsActive) currPowerConsumption = 0.0f;
|
||||
item.NewComponentEvent(this, true, true);
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -83,7 +82,6 @@ namespace Barotrauma.Items.Components
|
||||
button.OnClicked = (GUIButton btn, object obj) =>
|
||||
{
|
||||
FlowPercentage -= 10.0f;
|
||||
item.NewComponentEvent(this, true, true);
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -92,7 +90,6 @@ namespace Barotrauma.Items.Components
|
||||
button.OnClicked = (GUIButton btn, object obj) =>
|
||||
{
|
||||
FlowPercentage += 10.0f;
|
||||
item.NewComponentEvent(this, true, true);
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -60,7 +60,6 @@ namespace Barotrauma.Items.Components
|
||||
isActiveTickBox.OnSelected = (GUITickBox box) =>
|
||||
{
|
||||
IsActive = box.Selected;
|
||||
item.NewComponentEvent(this, true, false);
|
||||
|
||||
return true;
|
||||
};
|
||||
@@ -117,12 +116,7 @@ namespace Barotrauma.Items.Components
|
||||
int radius = GuiFrame.Rect.Height / 2 - 30;
|
||||
DrawRadar(spriteBatch, new Rectangle((int)GuiFrame.Center.X - radius, (int)GuiFrame.Center.Y - radius, radius * 2, radius * 2));
|
||||
}
|
||||
|
||||
public override void UpdateHUD(Character character)
|
||||
{
|
||||
GuiFrame.Update(1.0f / 60.0f);
|
||||
}
|
||||
|
||||
|
||||
private void DrawRadar(SpriteBatch spriteBatch, Rectangle rect)
|
||||
{
|
||||
Vector2 center = new Vector2(rect.X + rect.Width*0.5f, rect.Center.Y);
|
||||
|
||||
@@ -324,7 +324,6 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
if (unsentChanges && sendUpdateTimer<= 0.0f)
|
||||
{
|
||||
item.NewComponentEvent(this, true, true);
|
||||
sendUpdateTimer = NetworkUpdateInterval;
|
||||
unsentChanges = false;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,6 @@ namespace Barotrauma.Items.Components
|
||||
networkUpdateTimer -= deltaTime;
|
||||
if (networkUpdateTimer <= 0.0f)
|
||||
{
|
||||
item.NewComponentEvent(this, true, false);
|
||||
networkUpdateTimer = 0.5f;
|
||||
valueChanged = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user