(3dc4135ce) v0.9.5.1

This commit is contained in:
Regalis
2019-11-21 18:22:25 +01:00
parent b39922a074
commit 5c95c53118
287 changed files with 12655 additions and 5048 deletions
@@ -34,6 +34,7 @@ namespace Barotrauma.Items.Components
public override void OnItemLoaded()
{
base.OnItemLoaded();
var containers = item.GetComponents<ItemContainer>().ToList();
if (containers.Count < 2)
{
@@ -59,7 +60,7 @@ namespace Barotrauma.Items.Components
return;
}
hasPower = voltage >= minVoltage;
hasPower = Voltage >= MinVoltage;
if (!hasPower) { return; }
var repairable = item.GetComponent<Repairable>();
@@ -70,10 +71,8 @@ namespace Barotrauma.Items.Components
ApplyStatusEffects(ActionType.OnActive, deltaTime, null);
if (powerConsumption == 0.0f) { voltage = 1.0f; }
progressTimer += deltaTime * voltage;
Voltage -= deltaTime * 10.0f;
if (powerConsumption <= 0.0f) { Voltage = 1.0f; }
progressTimer += deltaTime * Voltage;
var targetItem = inputContainer.Inventory.Items.LastOrDefault(i => i != null);
if (targetItem == null) { return; }
@@ -99,7 +98,7 @@ namespace Barotrauma.Items.Components
float condition = deconstructProduct.CopyCondition ?
percentageHealth * itemPrefab.Health :
itemPrefab.Health * deconstructProduct.OutCondition;
//container full, drop the items outside the deconstructor
if (emptySlots <= 0)
{
@@ -111,7 +110,7 @@ namespace Barotrauma.Items.Components
emptySlots--;
}
}
if (GameMain.NetworkMember == null || GameMain.NetworkMember.IsServer)
{
if (targetItem.Prefab.DeconstructItems.Any())
@@ -149,8 +148,6 @@ namespace Barotrauma.Items.Components
progressState = 0.0f;
}
}
voltage -= deltaTime * 10.0f;
}
private void PutItemsToLinkedContainer()