// Ryzom - MMORPG Framework // Copyright (C) 2010 Winch Gate Property Limited // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU Affero General Public License as // published by the Free Software Foundation, either version 3 of the // License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU Affero General Public License for more details. // // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . #ifndef RY_OUTPOST_BUILDING_H #define RY_OUTPOST_BUILDING_H #include "entity_sheet.h" /** * Outpost building definition for client side management (buy building upgrades ...) * * \author Matthieu 'Trap' Besson * \author Nevrax France * \date October 2005 */ class COutpostBuildingSheet : public CEntitySheet { public: enum TOBType { OB_Empty, OB_TownHall, OB_Driller }; static TOBType fromString( const std::string & str ); static std::string toString( TOBType type ); /// The type of the building TOBType OBType; /// cost of the building or upgrade in time (seconds) uint32 CostTime; /// cost in dapper uint32 CostDapper; /// Raw Material Level that has the highest extraction rate for the driller uint32 MPLevelOfHighestExtractRate; /// Mps generated by the driller std::vector Mps; /// To display a building in lists (like in a CItemSheet) /// icon file name for race type NLMISC::TSStringId IdIconBack; /// icon file name for main icon type NLMISC::TSStringId IdIconMain; /// icon file name for overlay NLMISC::TSStringId IdIconOver; /// icon Special Text (raw materials) NLMISC::TSStringId IdIconText; public: // ctor COutpostBuildingSheet(); /// From CEntitySheet virtual void build(const NLGEORGES::UFormElm &item); /// From CEntitySheet : serialize sheet into binary data file. virtual void serial(class NLMISC::IStream &f) throw(NLMISC::EStream); std::string getIconBack() const { return ClientSheetsStrings.get(IdIconBack); } std::string getIconMain() const { return ClientSheetsStrings.get(IdIconMain); } std::string getIconOver() const { return ClientSheetsStrings.get(IdIconOver); } std::string getIconText() const { return ClientSheetsStrings.get(IdIconText); } }; #endif