2021-06-11 19:24:52 +02:00
|
|
|
#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>
|
|
|
|
|
2021-07-21 11:30:41 +02:00
|
|
|
#include <Corrade/Containers/Array.h>
|
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
#include <Magnum/Magnum.h>
|
|
|
|
|
|
|
|
using namespace Magnum;
|
|
|
|
|
|
|
|
enum class ProfileType : UnsignedByte {
|
2021-06-11 19:24:52 +02:00
|
|
|
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;
|
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto activeFrameSlot() const -> Int;
|
|
|
|
auto getActiveFrameSlot() -> Int;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto credits() const -> Int;
|
|
|
|
auto getCredits() -> Int;
|
|
|
|
auto setCredits(Int credits) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto storyProgress() const -> Int;
|
|
|
|
auto getStoryProgress() -> Int;
|
|
|
|
auto setStoryProgress(Int progress) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto lastMissionId() const -> Int;
|
|
|
|
auto getLastMissionId() -> Int;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto verseSteel() const -> Int;
|
|
|
|
auto getVerseSteel() -> Int;
|
|
|
|
auto setVerseSteel(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto undinium() const -> Int;
|
|
|
|
auto getUndinium() -> Int;
|
|
|
|
auto setUndinium(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto necriumAlloy() const -> Int;
|
|
|
|
auto getNecriumAlloy() -> Int;
|
|
|
|
auto setNecriumAlloy(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto lunarite() const -> Int;
|
|
|
|
auto getLunarite() -> Int;
|
|
|
|
auto setLunarite(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto asterite() const -> Int;
|
|
|
|
auto getAsterite() -> Int;
|
|
|
|
auto setAsterite(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto ednil() const -> Int;
|
|
|
|
auto getEdnil() -> Int;
|
|
|
|
auto setEdnil(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto nuflalt() const -> Int;
|
|
|
|
auto getNuflalt() -> Int;
|
|
|
|
auto setNuflalt(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto aurelene() const -> Int;
|
|
|
|
auto getAurelene() -> Int;
|
|
|
|
auto setAurelene(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto soldus() const -> Int;
|
|
|
|
auto getSoldus() -> Int;
|
|
|
|
auto setSoldus(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto synthesizedN() const -> Int;
|
|
|
|
auto getSynthesizedN() -> Int;
|
|
|
|
auto setSynthesizedN(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto alcarbonite() const -> Int;
|
|
|
|
auto getAlcarbonite() -> Int;
|
|
|
|
auto setAlcarbonite(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto keriphene() const -> Int;
|
|
|
|
auto getKeriphene() -> Int;
|
|
|
|
auto setKeriphene(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto nitinolCM() const -> Int;
|
|
|
|
auto getNitinolCM() -> Int;
|
|
|
|
auto setNitinolCM(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto quarkium() const -> Int;
|
|
|
|
auto getQuarkium() -> Int;
|
|
|
|
auto setQuarkium(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto alterene() const -> Int;
|
|
|
|
auto getAlterene() -> Int;
|
|
|
|
auto setAlterene(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto mixedComposition() const -> Int;
|
|
|
|
auto getMixedComposition() -> Int;
|
|
|
|
auto setMixedComposition(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto voidResidue() const -> Int;
|
|
|
|
auto getVoidResidue() -> Int;
|
|
|
|
auto setVoidResidue(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto muscularConstruction() const -> Int;
|
|
|
|
auto getMuscularConstruction() -> Int;
|
|
|
|
auto setMuscularConstruction(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto mineralExoskeletology() const -> Int;
|
|
|
|
auto getMineralExoskeletology() -> Int;
|
|
|
|
auto setMineralExoskeletology(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
auto carbonizedSkin() const -> Int;
|
|
|
|
auto getCarbonizedSkin() -> Int;
|
|
|
|
auto setCarbonizedSkin(Int amount) -> bool;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
2021-07-21 11:30:41 +02:00
|
|
|
auto engineInventory() -> Containers::ArrayView<Int>;
|
|
|
|
auto gearInventory() -> Containers::ArrayView<Int>;
|
|
|
|
void getEngineUnlocks();
|
|
|
|
|
2021-07-30 15:23:19 +02:00
|
|
|
auto osInventory() -> Containers::ArrayView<Int>;
|
|
|
|
auto moduleInventory() -> Containers::ArrayView<Int>;
|
|
|
|
void getOsUnlocks();
|
|
|
|
|
2021-07-30 15:39:11 +02:00
|
|
|
auto archInventory() -> Containers::ArrayView<Int>;
|
|
|
|
auto techInventory() -> Containers::ArrayView<Int>;
|
|
|
|
void getArchUnlocks();
|
|
|
|
|
2021-06-11 19:24:52 +02:00
|
|
|
private:
|
|
|
|
std::string _profileDirectory;
|
|
|
|
std::string _filename;
|
|
|
|
|
|
|
|
ProfileType _type;
|
|
|
|
|
|
|
|
std::string _steamId;
|
|
|
|
|
|
|
|
bool _valid = false;
|
2021-07-10 16:43:34 +02:00
|
|
|
std::string _lastError;
|
2021-06-11 19:24:52 +02:00
|
|
|
|
|
|
|
std::string _companyName;
|
|
|
|
|
2021-06-20 14:07:43 +02:00
|
|
|
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;
|
2021-07-21 11:30:41 +02:00
|
|
|
|
|
|
|
Containers::Array<Int> _engineInventory;
|
|
|
|
Containers::Array<Int> _gearInventory;
|
|
|
|
|
|
|
|
Containers::Array<Int> _osInventory;
|
|
|
|
Containers::Array<Int> _moduleInventory;
|
|
|
|
|
|
|
|
Containers::Array<Int> _archInventory;
|
|
|
|
Containers::Array<Int> _techInventory;
|
2021-06-11 19:24:52 +02:00
|
|
|
};
|