OpenXcom  1.0
Open-source clone of the original X-Com
MissionSite.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 "Target.h"
21 #include <string>
22 #include <yaml-cpp/yaml.h>
23 
24 namespace OpenXcom
25 {
26 
27 class RuleAlienMission;
28 class AlienDeployment;
29 
33 class MissionSite : public Target
34 {
35 private:
36  const RuleAlienMission *_rules;
37  const AlienDeployment *_deployment;
38  int _texture;
39  size_t _secondsRemaining;
40  std::string _race, _city;
41  bool _inBattlescape, _detected;
42 public:
44  MissionSite(const RuleAlienMission *rules, const AlienDeployment *deployment);
46  ~MissionSite();
48  void load(const YAML::Node& node);
50  YAML::Node save() const;
52  std::string getType() const;
54  const RuleAlienMission *getRules() const;
56  const AlienDeployment *getDeployment() const;
58  std::string getMarkerName() const;
60  int getMarker() const;
62  size_t getSecondsRemaining() const;
64  void setSecondsRemaining(size_t seconds);
66  std::string getAlienRace() const;
68  void setAlienRace(const std::string &race);
70  void setInBattlescape(bool inbattle);
72  bool isInBattlescape() const;
74  int getTexture() const;
76  void setTexture(int texture);
78  std::string getCity() const;
80  void setCity(const std::string &city);
82  bool getDetected() const;
84  void setDetected(bool detected);
85 };
86 
87 }
void setAlienRace(const std::string &race)
Sets the mission site&#39;s alien race.
Definition: MissionSite.cpp:155
void setTexture(int texture)
Sets the mission site&#39;s texture.
Definition: MissionSite.cpp:191
const AlienDeployment * getDeployment() const
Gets the mission site&#39;s deployment.
Definition: MissionSite.cpp:97
MissionSite(const RuleAlienMission *rules, const AlienDeployment *deployment)
Creates a mission site.
Definition: MissionSite.cpp:30
std::string getAlienRace() const
Gets the mission site&#39;s alien race.
Definition: MissionSite.cpp:146
Represents an alien mission site on the world.
Definition: MissionSite.h:33
bool getDetected() const
Gets the mission site&#39;s detection state.
Definition: MissionSite.cpp:219
size_t getSecondsRemaining() const
Gets the seconds until this mission site expires.
Definition: MissionSite.cpp:128
void setCity(const std::string &city)
Sets the mission site&#39;s city.
Definition: MissionSite.cpp:209
const RuleAlienMission * getRules() const
Gets the mission site&#39;s ruleset.
Definition: MissionSite.cpp:88
~MissionSite()
Cleans up the mission site.
Definition: MissionSite.cpp:37
void setDetected(bool detected)
Sets the mission site&#39;s detection state.
Definition: MissionSite.cpp:228
std::string getCity() const
Gets the mission site&#39;s city.
Definition: MissionSite.cpp:200
int getMarker() const
Gets the mission site&#39;s marker sprite.
Definition: MissionSite.cpp:115
void setInBattlescape(bool inbattle)
Sets the mission site&#39;s battlescape status.
Definition: MissionSite.cpp:173
void setSecondsRemaining(size_t seconds)
Sets the seconds until this mission site expires.
Definition: MissionSite.cpp:137
bool isInBattlescape() const
Gets if the mission site is in battlescape.
Definition: MissionSite.cpp:164
std::string getType() const
Gets the waypoint&#39;s type.
Definition: MissionSite.cpp:79
void load(const YAML::Node &node)
Loads the mission site from YAML.
Definition: MissionSite.cpp:45
int getTexture() const
Gets the mission site&#39;s texture.
Definition: MissionSite.cpp:182
Stores fixed information about a mission type.
Definition: RuleAlienMission.h:67
std::string getMarkerName() const
Gets the mission site&#39;s marker name.
Definition: MissionSite.cpp:106
YAML::Node save() const
Saves the mission site to YAML.
Definition: MissionSite.cpp:59
Represents a specific type of Alien Deployment.
Definition: AlienDeployment.h:63
Base class for targets on the globe with a set of radian coordinates.
Definition: Target.h:35
Definition: BaseInfoState.cpp:40