2022-02-09 13:36:33 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
// MassBuilderSaveTool
|
|
|
|
// Copyright (C) 2021-2022 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 <Corrade/Containers/Array.h>
|
|
|
|
#include <Corrade/Containers/StaticArray.h>
|
2022-03-04 21:18:55 +01:00
|
|
|
#include <Corrade/Containers/String.h>
|
2022-02-09 13:36:33 +01:00
|
|
|
|
|
|
|
#include <Magnum/Magnum.h>
|
|
|
|
#include <Magnum/Math/Color.h>
|
|
|
|
|
|
|
|
#include "WeaponPart.h"
|
|
|
|
#include "CustomStyle.h"
|
|
|
|
|
|
|
|
using namespace Corrade;
|
|
|
|
using namespace Magnum;
|
|
|
|
|
|
|
|
enum class WeaponType {
|
2022-02-09 18:12:11 +01:00
|
|
|
Melee = 0,
|
|
|
|
Shield = 5,
|
|
|
|
BulletShooter = 1,
|
|
|
|
EnergyShooter = 2,
|
2022-02-09 13:36:33 +01:00
|
|
|
BulletLauncher = 3,
|
|
|
|
EnergyLauncher = 4,
|
|
|
|
};
|
|
|
|
|
2022-02-09 14:17:05 +01:00
|
|
|
enum class DamageType {
|
|
|
|
Physical = 0,
|
|
|
|
Piercing = 1,
|
|
|
|
Plasma = 5,
|
|
|
|
Heat = 2,
|
|
|
|
Freeze = 3,
|
|
|
|
Shock = 4,
|
|
|
|
};
|
|
|
|
|
2022-02-17 20:22:33 +01:00
|
|
|
enum class EffectColourMode {
|
|
|
|
Default = 0,
|
|
|
|
Custom = 1,
|
|
|
|
};
|
|
|
|
|
2022-02-09 13:36:33 +01:00
|
|
|
struct Weapon {
|
|
|
|
Weapon() = default;
|
|
|
|
|
|
|
|
Weapon(const Weapon& other);
|
|
|
|
Weapon& operator=(const Weapon& other);
|
|
|
|
|
|
|
|
Weapon(Weapon&& other) = default;
|
|
|
|
Weapon& operator=(Weapon&& other) = default;
|
|
|
|
|
2022-03-04 21:18:55 +01:00
|
|
|
Containers::String name;
|
2022-02-09 13:36:33 +01:00
|
|
|
WeaponType type = WeaponType::Melee;
|
|
|
|
Containers::Array<WeaponPart> parts;
|
|
|
|
Containers::StaticArray<16, CustomStyle> customStyles{ValueInit};
|
|
|
|
bool attached = false;
|
2022-02-09 14:17:05 +01:00
|
|
|
DamageType damageType = DamageType::Physical;
|
2022-02-09 13:36:33 +01:00
|
|
|
bool dualWield = false;
|
2022-02-17 20:22:33 +01:00
|
|
|
EffectColourMode effectColourMode = EffectColourMode::Default;
|
2022-02-09 13:36:33 +01:00
|
|
|
Color4 effectColour{0.0f};
|
|
|
|
};
|