Client LuaCsForBarotrauma
ShipIssueWorkerSteer.cs
1
using
Barotrauma
.
Items
.
Components
;
2
3
namespace
Barotrauma
4
{
5
class
ShipIssueWorkerSteer
:
ShipIssueWorkerItem
6
{
7
// The AI could be set to steer automatically through a specialized job or autonomous objectives
8
// but the logic involved doesn't really allow that without some annoyingly specific changes
9
// hence the AI will command itself to steer if steering is not being taken care of or the target location is wrong
10
public
ShipIssueWorkerSteer
(
ShipCommandManager
shipCommandManager
,
Order
order) : base(
shipCommandManager
, order) { }
11
public
override
void
CalculateImportanceSpecific
()
12
{
13
if
(
shipCommandManager
.
NavigationState
==
ShipCommandManager
.
NavigationStates
.Inactive) {
return
; }
14
if
(
TargetItemComponent
is
Powered
{ HasPower:
false
}) {
return
; }
15
if
(
TargetItem
.
Condition
<= 0f) {
return
; }
16
17
Importance
= 70f;
18
}
19
}
20
}
Barotrauma.Item.Condition
float Condition
Definition:
BarotraumaShared/SharedSource/Items/Item.cs:734
Barotrauma.Items.Components.Powered
Definition:
BarotraumaShared/SharedSource/Items/Components/Power/Powered.cs:59
Barotrauma.Order
Definition:
Order.cs:476
Barotrauma.ShipCommandManager
Definition:
ShipCommandManager.cs:10
Barotrauma.ShipCommandManager.NavigationStates
NavigationStates
Definition:
ShipCommandManager.cs:39
Barotrauma.ShipCommandManager.NavigationState
NavigationStates NavigationState
Definition:
ShipCommandManager.cs:45
Barotrauma.ShipIssueWorker.TargetItem
Item TargetItem
Definition:
ShipIssueWorker.cs:32
Barotrauma.ShipIssueWorker.TargetItemComponent
ItemComponent TargetItemComponent
Definition:
ShipIssueWorker.cs:31
Barotrauma.ShipIssueWorker.Importance
float Importance
Definition:
ShipIssueWorker.cs:15
Barotrauma.ShipIssueWorker.shipCommandManager
readonly ShipCommandManager shipCommandManager
Definition:
ShipIssueWorker.cs:27
Barotrauma.ShipIssueWorkerItem
Definition:
ShipIssueWorkerItem.cs:6
Barotrauma.ShipIssueWorkerSteer
Definition:
ShipIssueWorkerSteer.cs:6
Barotrauma.ShipIssueWorkerSteer.ShipIssueWorkerSteer
ShipIssueWorkerSteer(ShipCommandManager shipCommandManager, Order order)
Definition:
ShipIssueWorkerSteer.cs:10
Barotrauma.ShipIssueWorkerSteer.CalculateImportanceSpecific
override void CalculateImportanceSpecific()
Definition:
ShipIssueWorkerSteer.cs:11
Barotrauma.Items.Components
Definition:
BarotraumaShared/SharedSource/Items/Components/DockingPort.cs:15
Barotrauma.Items
Definition:
BarotraumaShared/SharedSource/Items/Components/DockingPort.cs:15
Barotrauma
Definition:
AchievementManager.cs:12
Barotrauma
BarotraumaShared
SharedSource
Characters
AI
ShipCommand
ShipIssueWorkerSteer.cs
Generated by
1.9.1