MassBuilderSaveTool/src/Profile/Profile.h

210 lines
5.9 KiB
C++

#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 <https://www.gnu.org/licenses/>.
#include <string>
#include <Corrade/Containers/Array.h>
#include <Magnum/Magnum.h>
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<Int>;
auto gearInventory() -> Containers::ArrayView<Int>;
void getEngineUnlocks();
auto osInventory() -> Containers::ArrayView<Int>;
auto moduleInventory() -> Containers::ArrayView<Int>;
void getOsUnlocks();
auto archInventory() -> Containers::ArrayView<Int>;
auto techInventory() -> Containers::ArrayView<Int>;
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<Int> _engineInventory;
Containers::Array<Int> _gearInventory;
Containers::Array<Int> _osInventory;
Containers::Array<Int> _moduleInventory;
Containers::Array<Int> _archInventory;
Containers::Array<Int> _techInventory;
};