(9c93ed664) Fixed fabricators and deconstructors deteriorating when they're powered (not just when fabricating/deconstructing) something
This commit is contained in:
@@ -276,9 +276,6 @@ namespace Barotrauma
|
|||||||
characterInfos.Add(characterInfo);
|
characterInfos.Add(characterInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
characterInfos.Add(characterInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Remove the character from the crew (and crew menus).
|
/// Remove the character from the crew (and crew menus).
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -198,7 +198,12 @@ namespace Barotrauma.Items.Components
|
|||||||
if (LastActiveTime > Timing.TotalTime) { return true; }
|
if (LastActiveTime > Timing.TotalTime) { return true; }
|
||||||
foreach (ItemComponent ic in item.Components)
|
foreach (ItemComponent ic in item.Components)
|
||||||
{
|
{
|
||||||
if (ic is PowerTransfer pt)
|
if (ic is Fabricator || ic is Deconstructor)
|
||||||
|
{
|
||||||
|
//fabricators and deconstructors rely on LastActiveTime
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else if (ic is PowerTransfer pt)
|
||||||
{
|
{
|
||||||
//power transfer items (junction boxes, relays) don't deteriorate if they're no carrying any power
|
//power transfer items (junction boxes, relays) don't deteriorate if they're no carrying any power
|
||||||
if (Math.Abs(pt.CurrPowerConsumption) > 0.1f) { return true; }
|
if (Math.Abs(pt.CurrPowerConsumption) > 0.1f) { return true; }
|
||||||
|
|||||||
@@ -153,6 +153,21 @@ namespace Barotrauma
|
|||||||
get { return binding; }
|
get { return binding; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SetState()
|
||||||
|
{
|
||||||
|
hit = binding.IsHit();
|
||||||
|
if (hit) hitQueue = true;
|
||||||
|
|
||||||
|
held = binding.IsDown();
|
||||||
|
if (held) heldQueue = true;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public KeyOrMouse State
|
||||||
|
{
|
||||||
|
get { return binding; }
|
||||||
|
}
|
||||||
|
|
||||||
public void SetState()
|
public void SetState()
|
||||||
{
|
{
|
||||||
hit = binding.IsHit();
|
hit = binding.IsHit();
|
||||||
|
|||||||
Reference in New Issue
Block a user