137 lines
3.6 KiB
C++
137 lines
3.6 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 <Magnum/Magnum.h>
|
|
|
|
#include "../UESaveFile/UESaveFile.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() -> std::string const&;
|
|
auto renameCompany(const std::string& new_name) -> bool;
|
|
|
|
auto activeFrameSlot() -> Int;
|
|
|
|
auto credits() -> Int;
|
|
auto setCredits(Int credits) -> bool;
|
|
|
|
auto storyProgress() -> Int;
|
|
auto setStoryProgress(Int progress) -> bool;
|
|
|
|
auto lastMissionId() -> Int;
|
|
|
|
auto verseSteel() -> Int;
|
|
auto setVerseSteel(Int amount) -> bool;
|
|
|
|
auto undinium() -> Int;
|
|
auto setUndinium(Int amount) -> bool;
|
|
|
|
auto necriumAlloy() -> Int;
|
|
auto setNecriumAlloy(Int amount) -> bool;
|
|
|
|
auto lunarite() -> Int;
|
|
auto setLunarite(Int amount) -> bool;
|
|
|
|
auto asterite() -> Int;
|
|
auto setAsterite(Int amount) -> bool;
|
|
|
|
auto ednil() -> Int;
|
|
auto setEdnil(Int amount) -> bool;
|
|
|
|
auto nuflalt() -> Int;
|
|
auto setNuflalt(Int amount) -> bool;
|
|
|
|
auto aurelene() -> Int;
|
|
auto setAurelene(Int amount) -> bool;
|
|
|
|
auto soldus() -> Int;
|
|
auto setSoldus(Int amount) -> bool;
|
|
|
|
auto synthesizedN() -> Int;
|
|
auto setSynthesizedN(Int amount) -> bool;
|
|
|
|
auto alcarbonite() -> Int;
|
|
auto setAlcarbonite(Int amount) -> bool;
|
|
|
|
auto keriphene() -> Int;
|
|
auto setKeriphene(Int amount) -> bool;
|
|
|
|
auto nitinolCM() -> Int;
|
|
auto setNitinolCM(Int amount) -> bool;
|
|
|
|
auto quarkium() -> Int;
|
|
auto setQuarkium(Int amount) -> bool;
|
|
|
|
auto alterene() -> Int;
|
|
auto setAlterene(Int amount) -> bool;
|
|
|
|
auto mixedComposition() -> Int;
|
|
auto setMixedComposition(Int amount) -> bool;
|
|
|
|
auto voidResidue() -> Int;
|
|
auto setVoidResidue(Int amount) -> bool;
|
|
|
|
auto muscularConstruction() -> Int;
|
|
auto setMuscularConstruction(Int amount) -> bool;
|
|
|
|
auto mineralExoskeletology() -> Int;
|
|
auto setMineralExoskeletology(Int amount) -> bool;
|
|
|
|
auto carbonizedSkin() -> Int;
|
|
auto setCarbonizedSkin(Int amount) -> bool;
|
|
|
|
private:
|
|
auto resource(const char* container, Int id) -> Int;
|
|
auto setResource(const char* container, Int id, Int amount) -> bool;
|
|
|
|
std::string _profileDirectory;
|
|
std::string _filename;
|
|
|
|
ProfileType _type;
|
|
|
|
UESaveFile _profile;
|
|
|
|
std::string _steamId;
|
|
|
|
bool _valid = false;
|
|
std::string _lastError;
|
|
};
|