#pragma once // MassBuilderSaveTool // Copyright (C) 2021 Guillaume Jacquemin // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU 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 General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . #include #include #include using namespace Magnum; enum class ProfileType : UnsignedByte { Demo, FullGame }; class Profile { public: explicit Profile(const std::string& path); auto valid() const -> bool; auto lastError() const -> std::string const&; auto filename() const -> std::string const&; auto type() const -> ProfileType; auto steamId() const -> std::string const&; void refreshValues(); auto companyName() const -> std::string const&; auto getCompanyName() -> std::string const&; auto renameCompany(const std::string& new_name) -> bool; auto activeFrameSlot() const -> Int; auto getActiveFrameSlot() -> Int; auto credits() const -> Int; auto getCredits() -> Int; auto setCredits(Int credits) -> bool; auto storyProgress() const -> Int; auto getStoryProgress() -> Int; auto setStoryProgress(Int progress) -> bool; auto lastMissionId() const -> Int; auto getLastMissionId() -> Int; auto verseSteel() const -> Int; auto getVerseSteel() -> Int; auto setVerseSteel(Int amount) -> bool; auto undinium() const -> Int; auto getUndinium() -> Int; auto setUndinium(Int amount) -> bool; auto necriumAlloy() const -> Int; auto getNecriumAlloy() -> Int; auto setNecriumAlloy(Int amount) -> bool; auto lunarite() const -> Int; auto getLunarite() -> Int; auto setLunarite(Int amount) -> bool; auto asterite() const -> Int; auto getAsterite() -> Int; auto setAsterite(Int amount) -> bool; auto ednil() const -> Int; auto getEdnil() -> Int; auto setEdnil(Int amount) -> bool; auto nuflalt() const -> Int; auto getNuflalt() -> Int; auto setNuflalt(Int amount) -> bool; auto aurelene() const -> Int; auto getAurelene() -> Int; auto setAurelene(Int amount) -> bool; auto soldus() const -> Int; auto getSoldus() -> Int; auto setSoldus(Int amount) -> bool; auto synthesizedN() const -> Int; auto getSynthesizedN() -> Int; auto setSynthesizedN(Int amount) -> bool; auto alcarbonite() const -> Int; auto getAlcarbonite() -> Int; auto setAlcarbonite(Int amount) -> bool; auto keriphene() const -> Int; auto getKeriphene() -> Int; auto setKeriphene(Int amount) -> bool; auto nitinolCM() const -> Int; auto getNitinolCM() -> Int; auto setNitinolCM(Int amount) -> bool; auto quarkium() const -> Int; auto getQuarkium() -> Int; auto setQuarkium(Int amount) -> bool; auto alterene() const -> Int; auto getAlterene() -> Int; auto setAlterene(Int amount) -> bool; auto mixedComposition() const -> Int; auto getMixedComposition() -> Int; auto setMixedComposition(Int amount) -> bool; auto voidResidue() const -> Int; auto getVoidResidue() -> Int; auto setVoidResidue(Int amount) -> bool; auto muscularConstruction() const -> Int; auto getMuscularConstruction() -> Int; auto setMuscularConstruction(Int amount) -> bool; auto mineralExoskeletology() const -> Int; auto getMineralExoskeletology() -> Int; auto setMineralExoskeletology(Int amount) -> bool; auto carbonizedSkin() const -> Int; auto getCarbonizedSkin() -> Int; auto setCarbonizedSkin(Int amount) -> bool; auto engineInventory() -> Containers::ArrayView; auto gearInventory() -> Containers::ArrayView; void getEngineUnlocks(); auto osInventory() -> Containers::ArrayView; auto moduleInventory() -> Containers::ArrayView; void getOsUnlocks(); auto archInventory() -> Containers::ArrayView; auto techInventory() -> Containers::ArrayView; void getArchUnlocks(); private: std::string _profileDirectory; std::string _filename; ProfileType _type; std::string _steamId; bool _valid = false; std::string _lastError; std::string _companyName; Int _activeFrameSlot = 0; Int _credits; Int _storyProgress; Int _lastMissionId; Int _verseSteel; Int _undinium; Int _necriumAlloy; Int _lunarite; Int _asterite; Int _ednil; Int _nuflalt; Int _aurelene; Int _soldus; Int _synthesizedN; Int _alcarbonite; Int _keriphene; Int _nitinolCM; Int _quarkium; Int _alterene; Int _mixedComposition; Int _voidResidue; Int _muscularConstruction; Int _mineralExoskeletology; Int _carbonizedSkin; Containers::Array _engineInventory; Containers::Array _gearInventory; Containers::Array _osInventory; Containers::Array _moduleInventory; Containers::Array _archInventory; Containers::Array _techInventory; };