1 // _________ __ __ 2 // / _____// |_____________ _/ |______ ____ __ __ ______ 3 // \_____ \\ __\_ __ \__ \\ __\__ \ / ___\| | \/ ___/ 4 // / \| | | | \// __ \| | / __ \_/ /_/ > | /\___ | 5 // /_______ /|__| |__| (____ /__| (____ /\___ /|____//____ > 6 // \/ \/ \//_____/ \/ 7 // ______________________ ______________________ 8 // T H E W A R B E G I N S 9 // Stratagus - A free fantasy real time strategy game engine 10 // 11 /**@name plane.h - The plane header file. */ 12 // 13 // (c) Copyright 2016-2019 by Andrettin 14 // 15 // This program is free software; you can redistribute it and/or modify 16 // it under the terms of the GNU General Public License as published by 17 // the Free Software Foundation; only version 2 of the License. 18 // 19 // This program is distributed in the hope that it will be useful, 20 // but WITHOUT ANY WARRANTY; without even the implied warranty of 21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 // GNU General Public License for more details. 23 // 24 // You should have received a copy of the GNU General Public License 25 // along with this program; if not, write to the Free Software 26 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 27 // 02111-1307, USA. 28 // 29 30 #ifndef __PLANE_H__ 31 #define __PLANE_H__ 32 33 //@{ 34 35 /*---------------------------------------------------------------------------- 36 -- Includes 37 ----------------------------------------------------------------------------*/ 38 39 #include "data_type.h" 40 41 #include <map> 42 #include <string> 43 #include <vector> 44 45 /*---------------------------------------------------------------------------- 46 -- Declarations 47 ----------------------------------------------------------------------------*/ 48 49 class CDeityDomain; 50 class CSchoolOfMagic; 51 class CSeasonSchedule; 52 class CSpecies; 53 class CTimeOfDaySchedule; 54 55 class CPlane : public CDataType 56 { 57 public: CPlane()58 CPlane() : 59 ID(-1), TimeOfDaySchedule(nullptr), SeasonSchedule(nullptr) 60 { 61 } 62 63 static CPlane *GetPlane(const std::string &ident, const bool should_find = true); 64 static CPlane *GetOrAddPlane(const std::string &ident); 65 static void ClearPlanes(); 66 67 static std::vector<CPlane *> Planes; /// Planes 68 static std::map<std::string, CPlane *> PlanesByIdent; 69 70 virtual void ProcessConfigData(const CConfigData *config_data) override; 71 72 int ID; /// ID of this plane 73 std::string Ident; 74 std::string Name; 75 std::string Description; 76 std::string Background; 77 std::string Quote; 78 CTimeOfDaySchedule *TimeOfDaySchedule; /// this plane's time of day schedule 79 CSeasonSchedule *SeasonSchedule; /// this plane's season schedule 80 std::vector<CDeityDomain *> EmpoweredDeityDomains; /// Deity domains empowered in this plane 81 std::vector<CSchoolOfMagic *> EmpoweredSchoolsOfMagic; /// Schools of magic empowered in this plane 82 std::vector<CSpecies *> Species; /// Species in this plane 83 }; 84 85 //@} 86 87 #endif // !__PLANE_H__ 88