Crew commands
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using System;
|
||||
using Barotrauma.Items.Components;
|
||||
using Microsoft.Xna.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -7,9 +9,9 @@ namespace Barotrauma
|
||||
{
|
||||
class AIObjectiveOperateItem : AIObjective
|
||||
{
|
||||
private Item targetItem;
|
||||
private ItemComponent targetItem;
|
||||
|
||||
public AIObjectiveOperateItem(Item item, Character character)
|
||||
public AIObjectiveOperateItem(ItemComponent item, Character character)
|
||||
:base (character)
|
||||
{
|
||||
targetItem = item;
|
||||
@@ -17,7 +19,13 @@ namespace Barotrauma
|
||||
|
||||
protected override void Act(float deltaTime)
|
||||
{
|
||||
//item.AIOperate(float deltaTime, Character character) or something
|
||||
if (Vector2.Distance(character.SimPosition, targetItem.Item.SimPosition) < targetItem.Item.PickDistance)
|
||||
{
|
||||
//targetItem.Pick(character, false, true);
|
||||
return;
|
||||
}
|
||||
|
||||
subObjectives.Add(new AIObjectiveGoTo(targetItem.Item.SimPosition, character));
|
||||
}
|
||||
|
||||
public override bool IsDuplicate(AIObjective otherObjective)
|
||||
|
||||
Reference in New Issue
Block a user