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 _id, _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  YAML::Node saveId() const;
54  const RuleAlienMission *getRules() const;
56  const AlienDeployment *getDeployment() const;
58  int getId() const;
60  void setId(int id);
62  std::wstring getDefaultName(Language *lang) const;
64  int getMarker() const;
66  size_t getSecondsRemaining() const;
68  void setSecondsRemaining(size_t seconds);
70  std::string getAlienRace() const;
72  void setAlienRace(const std::string &race);
74  void setInBattlescape(bool inbattle);
76  bool isInBattlescape() const;
78  int getTexture() const;
80  void setTexture(int texture);
82  std::string getCity() const;
84  void setCity(const std::string &city);
86  bool getDetected() const;
88  void setDetected(bool detected);
89 };
90 
91 }
void setAlienRace(const std::string &race)
Sets the mission site&#39;s alien race.
Definition: MissionSite.cpp:178
void setTexture(int texture)
Sets the mission site&#39;s texture.
Definition: MissionSite.cpp:214
const AlienDeployment * getDeployment() const
Gets the mission site&#39;s deployment.
Definition: MissionSite.cpp:101
MissionSite(const RuleAlienMission *rules, const AlienDeployment *deployment)
Creates a mission site.
Definition: MissionSite.cpp:30
void setId(int id)
Sets the mission site&#39;s ID.
Definition: MissionSite.cpp:119
std::wstring getDefaultName(Language *lang) const
Gets the mission site&#39;s default name.
Definition: MissionSite.cpp:129
std::string getAlienRace() const
Gets the mission site&#39;s alien race.
Definition: MissionSite.cpp:169
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:242
size_t getSecondsRemaining() const
Gets the seconds until this mission site expires.
Definition: MissionSite.cpp:151
void setCity(const std::string &city)
Sets the mission site&#39;s city.
Definition: MissionSite.cpp:232
const RuleAlienMission * getRules() const
Gets the mission site&#39;s ruleset.
Definition: MissionSite.cpp:92
~MissionSite()
Cleans up the mission site.
Definition: MissionSite.cpp:37
Contains strings used throughout the game for localization.
Definition: Language.h:39
void setDetected(bool detected)
Sets the mission site&#39;s detection state.
Definition: MissionSite.cpp:251
std::string getCity() const
Gets the mission site&#39;s city.
Definition: MissionSite.cpp:223
int getMarker() const
Gets the mission site&#39;s marker.
Definition: MissionSite.cpp:138
void setInBattlescape(bool inbattle)
Sets the mission site&#39;s battlescape status.
Definition: MissionSite.cpp:196
void setSecondsRemaining(size_t seconds)
Sets the seconds until this mission site expires.
Definition: MissionSite.cpp:160
bool isInBattlescape() const
Gets if the mission site is in battlescape.
Definition: MissionSite.cpp:187
int getId() const
Gets the mission site&#39;s ID.
Definition: MissionSite.cpp:110
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:205
Stores fixed information about a mission type.
Definition: RuleAlienMission.h:67
YAML::Node save() const
Saves the mission site to YAML.
Definition: MissionSite.cpp:60
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:33
YAML::Node saveId() const
Saves the mission site&#39;s ID to YAML.
Definition: MissionSite.cpp:80
Definition: BaseInfoState.cpp:40