OpenXcom  1.0
Open-source clone of the original X-Com
AlienBase.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 "../Mod/AlienDeployment.h"
23 #include <yaml-cpp/yaml.h>
24 
25 namespace OpenXcom
26 {
27 
31 class AlienBase : public Target
32 {
33 private:
34  int _id;
35  std::string _race;
36  bool _inBattlescape, _discovered;
37  AlienDeployment *_deployment;
38 public:
40  AlienBase(AlienDeployment *deployment);
42  ~AlienBase();
44  void load(const YAML::Node& node);
46  YAML::Node save() const;
48  YAML::Node saveId() const;
50  int getId() const;
52  void setId(int id);
54  std::wstring getDefaultName(Language *lang) const;
56  int getMarker() const;
58  std::string getAlienRace() const;
60  void setAlienRace(const std::string &race);
62  void setInBattlescape(bool inbattle);
64  bool isInBattlescape() const;
66  bool isDiscovered() const;
68  void setDiscovered(bool discovered);
69 
70  AlienDeployment *getDeployment() const;
71 
72 };
73 
74 }
void load(const YAML::Node &node)
Loads the alien base from YAML.
Definition: AlienBase.cpp:43
std::wstring getDefaultName(Language *lang) const
Gets the alien base&#39;s default name.
Definition: AlienBase.cpp:104
Represents an alien base on the world.
Definition: AlienBase.h:31
YAML::Node saveId() const
Saves the alien base&#39;s ID to YAML.
Definition: AlienBase.cpp:73
void setAlienRace(const std::string &race)
Sets the alien base&#39;s alien race.
Definition: AlienBase.cpp:133
~AlienBase()
Cleans up the alien base.
Definition: AlienBase.cpp:35
void setInBattlescape(bool inbattle)
Sets the alien base&#39;s battlescape status.
Definition: AlienBase.cpp:151
Contains strings used throughout the game for localization.
Definition: Language.h:39
void setDiscovered(bool discovered)
Sets the alien base&#39;s discovered status.
Definition: AlienBase.cpp:169
int getMarker() const
Gets the alien base&#39;s marker.
Definition: AlienBase.cpp:113
bool isDiscovered() const
Gets the alien base&#39;s discovered status.
Definition: AlienBase.cpp:160
void setId(int id)
Sets the alien base&#39;s ID.
Definition: AlienBase.cpp:94
int getId() const
Gets the alien base&#39;s ID.
Definition: AlienBase.cpp:85
bool isInBattlescape() const
Gets the alien base&#39;s battlescape status.
Definition: AlienBase.cpp:142
std::string getAlienRace() const
Gets the alien base&#39;s amount of active hours..
Definition: AlienBase.cpp:124
YAML::Node save() const
Saves the alien base to YAML.
Definition: AlienBase.cpp:56
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
AlienBase(AlienDeployment *deployment)
Creates an alien base.
Definition: AlienBase.cpp:28
Definition: BaseInfoState.cpp:40