- Timestamp:
- 11/11/2010 02:20:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AgentMind/branches/FAtiMA-Modular/FAtiMA.culture/src/FAtiMA/culture/CultureLoaderHandler.java
r694 r696 43 43 import FAtiMA.Core.conditions.RecentEventCondition; 44 44 import FAtiMA.Core.deliberativeLayer.DeliberativeProcess; 45 import FAtiMA.Core.deliberativeLayer.goals.Goal; 45 46 import FAtiMA.Core.exceptions.ContextParsingException; 46 47 import FAtiMA.Core.exceptions.DuplicateSymbolTranslatorEntry; … … 67 68 private AgentModel _am; 68 69 private CulturalDimensionsComponent _culturalComponent; 70 private String _currentGoalKey; 69 71 70 72 ReactiveProcess _reactiveLayer; … … 81 83 _am = aM; 82 84 _culturalComponent = cDM; 85 86 _currentGoalKey = null; 83 87 } 84 88 … … 146 150 _rituals.add(_ritual); 147 151 _conditionType = "PreConditions"; 152 _currentGoalKey = null; 148 153 } 149 154 … … 178 183 public void ActivePursuitGoal(Attributes attributes) 179 184 { 180 AgentLogger.GetInstance().logAndPrint("ERROR! Culture file has an 'ActivePursuitGoal' defined in it."); 181 System.exit(-1); 185 _currentGoalKey = attributes.getValue("name"); 182 186 } 183 187 … … 253 257 { 254 258 _ritual.AddCondition(_conditionType, cond); 259 }else if (_currentGoalKey != null){ 260 Goal g = _deliberativeLayer.getGoalLibrary().GetGoal(Name.ParseName(_currentGoalKey)); 261 g.AddCondition(_conditionType, cond); 255 262 } 256 263 }
Note: See TracChangeset
for help on using the changeset viewer.