Author: dhains
Date: Tue Mar 25 04:44:25 2008
New Revision: 25094

URL: http://svn.gna.org/viewcvs/wesnoth?rev=25094&view=rev
Log:
Cleaned up formula AI script file reads to use {script.fai} WML syntax.

Modified:
    trunk/data/scenario-formula.cfg
    trunk/src/formula_ai.cpp

Modified: trunk/data/scenario-formula.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/data/scenario-formula.cfg?rev=25094&r1=25093&r2=25094&view=diff
==============================================================================
--- trunk/data/scenario-formula.cfg (original)
+++ trunk/data/scenario-formula.cfg Tue Mar 25 04:44:25 2008
@@ -72,7 +72,7 @@
         ai_algorithm=formula_ai
         [ai]
                        [team_formula]
-                               rulebase=opening
+                               rulebase="{opening.fai}"
                        [/team_formula]
         [/ai]
     [/side]

Modified: trunk/src/formula_ai.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/formula_ai.cpp?rev=25094&r1=25093&r2=25094&view=diff
==============================================================================
--- trunk/src/formula_ai.cpp (original)
+++ trunk/src/formula_ai.cpp Tue Mar 25 04:44:25 2008
@@ -19,7 +19,6 @@
 #include "formula_callable.hpp"
 #include "formula_function.hpp"
 #include "pathutils.hpp"
-#include "filesystem.hpp"
 
 namespace {
 using namespace game_logic;
@@ -553,8 +552,7 @@
        const config& ai_param = current_team().ai_parameters();
        config::const_child_itors team_formula = 
ai_param.child_range("team_formula");
        if(team_formula.first != team_formula.second) {
-               std::string rulebase = (**team_formula.first)["rulebase"];
-               const t_string& formula_string = read_file(std::string("data/") 
+ rulebase + std::string(".fai"));
+               std::string formula_string = (**team_formula.first)["rulebase"];
                move_formula_ = 
game_logic::formula::create_optional_formula(formula_string, &function_table);
        } else {
        config::const_child_itors functions = ai_param.child_range("function");


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to