Author: sapient
Date: Thu Apr 12 01:42:26 2007
New Revision: 16774

URL: http://svn.gna.org/viewcvs/wesnoth?rev=16774&view=rev
Log:
new value "portrait" for apply_to= in [effect]

Modified:
    trunk/changelog
    trunk/src/unit.cpp

Modified: trunk/changelog
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=16774&r1=16773&r2=16774&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Thu Apr 12 01:42:26 2007
@@ -73,6 +73,7 @@
    * use complex variable substitution almost everywhere
    * new key for [set_variable], literal=, to avoid variable substitution
    * [effect] can now toggle the zoc
+   * [effect] can now apply new portrait images
    * new key for [variable], boolean_equals=, to test boolean equality
    * remove some old backward compatibility support
    * set_name in attack modification [effect] no longer change the weapon's

Modified: trunk/src/unit.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit.cpp?rev=16774&r1=16773&r2=16774&view=diff
==============================================================================
--- trunk/src/unit.cpp (original)
+++ trunk/src/unit.cpp Thu Apr 12 01:42:26 2007
@@ -2403,6 +2403,8 @@
                        wassert(gamedata_ != NULL);
                        const game_data::unit_type_map::const_iterator var = 
gamedata_->unit_types.find(id());
                        advance_to(&var->second.get_variation(variation_));
+               } else if(apply_to == "portrait") {
+                       cfg_["profile"] = (**i.first)["image"];
                } else if(apply_to == "new_attack") {
                        
attacks_.push_back(attack_type(**i.first,id(),image_fighting((**i.first)["range"]=="ranged"
 ? attack_type::LONG_RANGE : attack_type::SHORT_RANGE)));
                } else if(apply_to == "remove_attacks") {


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

Reply via email to