From c4f59198946c3de5fb28c92afc1973c10a68c8dc Mon Sep 17 00:00:00 2001 From: Dave White Date: Mon, 28 Feb 2005 04:27:54 +0000 Subject: [PATCH] allow a [unit] tag to contain [trait] tags specifying traits that may only be applicable for this unit type --- src/unit_types.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/unit_types.cpp b/src/unit_types.cpp index bb335cc01bf..ba70d1f5fd1 100644 --- a/src/unit_types.cpp +++ b/src/unit_types.cpp @@ -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,