Endworm attacks working, itemlabel text saving bugfix, deconstructors & fabricators need power, engine sprite, disable wire node dragging in character mode, only hit with one meleeweapon at a time, fixrequirement text overflow fix, mapentities can hace multiple categories, Gap.FindHull fix, Waypoint ladder & gap saving, stuff

This commit is contained in:
Regalis
2016-01-18 20:09:38 +02:00
parent 5f1cb194ab
commit 1a5b3fa66a
39 changed files with 206 additions and 152 deletions
@@ -8,7 +8,7 @@ using System.Xml.Linq;
namespace Barotrauma.Items.Components
{
class Deconstructor : ItemComponent
class Deconstructor : Powered
{
GUIProgressBar progressBar;
GUIButton activateButton;
@@ -39,7 +39,12 @@ namespace Barotrauma.Items.Components
return;
}
progressTimer += deltaTime;
if (voltage < minVoltage) return;
if (powerConsumption == 0.0f) voltage = 1.0f;
progressTimer += deltaTime*voltage;
Voltage -= deltaTime * 10.0f;
var targetItem = container.Inventory.Items.FirstOrDefault(i => i != null);
progressBar.BarSize = Math.Min(progressTimer / targetItem.Prefab.DeconstructTime, 1.0f);
@@ -83,6 +88,8 @@ namespace Barotrauma.Items.Components
{
SetActive(!IsActive);
currPowerConsumption = IsActive ? powerConsumption : 0.0f;
item.NewComponentEvent(this, true, true);
return true;