mail[Wesnoth-commits] r44561 - /trunk/src/scripting/lua.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 22, 2010 - 22:06:
Author: silene
Date: Thu Jul 22 22:06:07 2010
New Revision: 44561

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44561&view=rev
Log:
Added game_config accessor to last turn number.

Modified:
    trunk/src/scripting/lua.cpp

Modified: trunk/src/scripting/lua.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/scripting/lua.cpp?rev=44561&r1=44560&r2=44561&view=diff
==============================================================================
--- trunk/src/scripting/lua.cpp (original)
+++ trunk/src/scripting/lua.cpp Thu Jul 22 22:06:07 2010
@@ -1336,6 +1336,7 @@
        return_int_attrib("rest_heal_amount", game_config::rest_heal_amount);
        return_int_attrib("recall_cost", game_config::recall_cost);
        return_int_attrib("kill_experience", game_config::kill_experience);
+       return_int_attrib("last_turn", 
resources::tod_manager->number_of_turns());
        return_string_attrib("version", game_config::version);
        return_bool_attrib("debug", game_config::debug);
        return 0;
@@ -1363,6 +1364,7 @@
        modify_int_attrib("rest_heal_amount", game_config::rest_heal_amount = 
value);
        modify_int_attrib("recall_cost", game_config::recall_cost = value);
        modify_int_attrib("kill_experience", game_config::kill_experience = 
value);
+       modify_int_attrib("last_turn", 
resources::tod_manager->set_number_of_turns(value));
        return luaL_argerror(L, 2, "unknown modifiable property");
 }
 




Related Messages


Powered by MHonArc, Updated Thu Jul 22 22:20:13 2010