v0.2: iteminventory sync bugfix, meleeweapon "reload time", spears can be picked even if they're stuck inside a wall, tutorial bugfixes, "submarine godmode", removed round duration, drag character sync, reliable structure damage messages, job assignment bugfixes, some extra sounds
This commit is contained in:
@@ -20,15 +20,15 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
float powerPerForce;
|
||||
|
||||
[Editable, HasDefaultValue(1.0f, true)]
|
||||
public float PowerPerForce
|
||||
{
|
||||
get { return powerPerForce; }
|
||||
set
|
||||
{
|
||||
powerPerForce = Math.Max(0.0f, value);
|
||||
}
|
||||
}
|
||||
//[Editable, HasDefaultValue(1.0f, true)]
|
||||
//public float PowerPerForce
|
||||
//{
|
||||
// get { return powerPerForce; }
|
||||
// set
|
||||
// {
|
||||
// powerPerForce = Math.Max(0.0f, value);
|
||||
// }
|
||||
//}
|
||||
|
||||
[Editable, HasDefaultValue(2000.0f, true)]
|
||||
public float MaxForce
|
||||
@@ -61,7 +61,7 @@ namespace Barotrauma.Items.Components
|
||||
{
|
||||
base.Update(deltaTime, cam);
|
||||
|
||||
currPowerConsumption = Math.Abs(targetForce) * powerPerForce;
|
||||
currPowerConsumption = Math.Abs(targetForce)/100.0f * powerConsumption;
|
||||
|
||||
Force = MathHelper.Lerp(force, (voltage < minVoltage) ? 0.0f : targetForce, 0.1f);
|
||||
if (Force != 0.0f)
|
||||
|
||||
@@ -14,10 +14,14 @@ namespace Barotrauma.Items.Components
|
||||
IsActive = true;
|
||||
}
|
||||
|
||||
bool hasPower;
|
||||
|
||||
public override void Update(float deltaTime, Camera cam)
|
||||
{
|
||||
currPowerConsumption = powerConsumption;
|
||||
|
||||
|
||||
hasPower = voltage > minVoltage;
|
||||
|
||||
voltage = 0.0f;
|
||||
}
|
||||
|
||||
@@ -38,6 +42,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
GuiFrame.Draw(spriteBatch);
|
||||
|
||||
if (!hasPower) return;
|
||||
|
||||
//GUI.DrawRectangle(spriteBatch, new Rectangle(x,y,width,height), Color.Black, true);
|
||||
|
||||
Rectangle miniMap = new Rectangle(x + 20, y + 40, width - 40, height - 60);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Xml.Linq;
|
||||
|
||||
@@ -12,6 +13,8 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
bool running;
|
||||
|
||||
private float generatedAmount;
|
||||
|
||||
List<Vent> ventList;
|
||||
|
||||
public bool IsRunning()
|
||||
@@ -25,6 +28,13 @@ namespace Barotrauma.Items.Components
|
||||
private set;
|
||||
}
|
||||
|
||||
[Editable, HasDefaultValue(100.0f, true)]
|
||||
public float GeneratedAmount
|
||||
{
|
||||
get { return generatedAmount; }
|
||||
set { generatedAmount = MathHelper.Clamp(value, -10000.0f, 10000.0f); }
|
||||
}
|
||||
|
||||
public OxygenGenerator(Item item, XElement element)
|
||||
: base(item, element)
|
||||
{
|
||||
@@ -64,7 +74,7 @@ namespace Barotrauma.Items.Components
|
||||
|
||||
running = true;
|
||||
|
||||
CurrFlow = Math.Min(voltage, 1.0f) * 50000.0f;
|
||||
CurrFlow = Math.Min(voltage, 1.0f) * generatedAmount * 1000.0f;
|
||||
item.CurrentHull.Oxygen += CurrFlow * deltaTime;
|
||||
|
||||
UpdateVents(CurrFlow);
|
||||
|
||||
Reference in New Issue
Block a user