Skip to content

Commit

Permalink
PEGASUS: Resolve a couple AI TODO's
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Hoops committed Oct 1, 2011
1 parent 9718b8e commit 05c774b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions engines/pegasus/ai/ai_condition.cpp
Expand Up @@ -27,6 +27,7 @@

#include "pegasus/energymonitor.h"
#include "pegasus/gamestate.h"
#include "pegasus/pegasus.h"
#include "pegasus/ai/ai_condition.h"
#include "pegasus/items/itemlist.h"
#include "pegasus/items/biochips/biochipitem.h"
Expand Down Expand Up @@ -230,9 +231,7 @@ AICurrentItemCondition::AICurrentItemCondition(const tItemID item) {
}

bool AICurrentItemCondition::fireCondition() {
// TODO
//InventoryItem *item = ((PegasusEngine *)g_engine)->getCurrentInventoryItem();
InventoryItem *item = 0;
InventoryItem *item = ((PegasusEngine *)g_engine)->getCurrentInventoryItem();

if (_item == kNoItemID)
return item == 0;
Expand All @@ -245,9 +244,7 @@ AICurrentBiochipCondition::AICurrentBiochipCondition(const tItemID biochip) {
}

bool AICurrentBiochipCondition::fireCondition() {
// TODO
///BiochipItem *biochip = ((PegasusEngine *)g_engine)->getCurrentBiochip();
BiochipItem *biochip = 0;
BiochipItem *biochip = ((PegasusEngine *)g_engine)->getCurrentBiochip();

if (_biochip == kNoItemID)
return biochip == 0;
Expand Down Expand Up @@ -278,8 +275,7 @@ AILastExtraCondition::AILastExtraCondition(const tExtraID lastExtra) {
}

bool AILastExtraCondition::fireCondition() {
// TODO
return false;
return g_neighborhood && (tExtraID)g_neighborhood->getLastExtra() == _lastExtra;
}

AICondition *makeLocationAndDoesntHaveItemCondition(const tRoomID room, const tDirectionConstant direction, const tItemID item) {
Expand Down

0 comments on commit 05c774b

Please sign in to comment.