Unstable 0.1400.0.0

This commit is contained in:
Markus Isberg
2021-05-11 15:47:47 +03:00
parent 3f324b14e8
commit 92f0264af2
247 changed files with 8238 additions and 1911 deletions
@@ -0,0 +1,20 @@
using Barotrauma.Items.Components;
namespace Barotrauma
{
class ShipIssueWorkerSteer : ShipIssueWorkerItem
{
// The AI could be set to steer automatically through a specialized job or autonomous objectives
// but the logic involved doesn't really allow that without some annoyingly specific changes
// hence the AI will command itself to steer if steering is not being taken care of or the target location is wrong
public ShipIssueWorkerSteer(ShipCommandManager shipCommandManager, Order order, Item targetItem, ItemComponent targetItemComponent, string option) : base(shipCommandManager, order, targetItem, targetItemComponent, option) { }
public override void CalculateImportanceSpecific()
{
if (shipCommandManager.NavigationState == ShipCommandManager.NavigationStates.Inactive) { return; }
if (TargetItemComponent is Powered powered && powered.Voltage <= powered.MinVoltage) { return; }
if (TargetItem.Condition <= 0f) { return; }
Importance = 70f;
}
}
}