allow a [unit] tag to contain [trait] tags

specifying traits that may only be applicable for this unit type
This commit is contained in:
Dave White 2005-02-28 04:27:54 +00:00
parent c0d61780d0
commit c4f5919894

View file

@ -589,6 +589,10 @@ unit_type::unit_type(const config& cfg, const movement_type_map& mv_types,
race_ = &dummy_race;
}
//insert any traits that are just for this unit type
const config::child_list& unit_traits = cfg.get_children("trait");
possibleTraits_.insert(possibleTraits_.end(),traits.begin(),traits.end());
abilities_ = utils::split(cfg_["ability"]);
//if the string was empty, split will give us one empty string in the list,