OpenXcom  1.0
Open-source clone of the original X-Com
RuleCommendations.h
1 #pragma once
2 /*
3  * Copyright 2010-2016 OpenXcom Developers.
4  *
5  * This file is part of OpenXcom.
6  *
7  * OpenXcom is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * OpenXcom is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with OpenXcom. If not, see <http://www.gnu.org/licenses/>.
19  */
20 #include <yaml-cpp/yaml.h>
21 
22 namespace OpenXcom
23 {
24 
32 {
33 private:
34  std::map<std::string, std::vector<int> > _criteria;
35  std::vector<std::vector<std::pair<int, std::vector<std::string> > > > _killCriteria;
36  std::string _description;
37  int _sprite;
38 public:
44  void load(const YAML::Node& node);
46  std::string getDescription() const;
48  std::map<std::string, std::vector<int> > *getCriteria();
50  std::vector<std::vector<std::pair<int, std::vector<std::string> > > > *getKillCriteria();
52  int getSprite() const;
53 
54 };
55 
56 }
int getSprite() const
Get the commendation&#39;s sprite.
Definition: RuleCommendations.cpp:82
std::map< std::string, std::vector< int > > * getCriteria()
Get the commendation&#39;s award criteria.
Definition: RuleCommendations.cpp:64
RuleCommendations()
Creates a blank commendation ruleset.
Definition: RuleCommendations.cpp:28
std::string getDescription() const
Get the commendation&#39;s description.
Definition: RuleCommendations.cpp:55
Represents a specific type of commendation.
Definition: RuleCommendations.h:31
~RuleCommendations()
Cleans up the commendation ruleset.
Definition: RuleCommendations.cpp:35
std::vector< std::vector< std::pair< int, std::vector< std::string > > > > * getKillCriteria()
Get the commendation&#39;s award kill related criteria.
Definition: RuleCommendations.cpp:73
void load(const YAML::Node &node)
Loads commendation data from YAML.
Definition: RuleCommendations.cpp:43
Definition: BaseInfoState.cpp:40