MassBuilderSaveTool/src/Mass/Weapon.h

75 lines
1.9 KiB
C++

#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 <string>
#include <Corrade/Containers/Array.h>
#include <Corrade/Containers/StaticArray.h>
#include <Magnum/Magnum.h>
#include <Magnum/Math/Color.h>
#include "WeaponPart.h"
#include "CustomStyle.h"
using namespace Corrade;
using namespace Magnum;
enum class WeaponType {
Melee = 0,
Shield = 5,
BulletShooter = 1,
EnergyShooter = 2,
BulletLauncher = 3,
EnergyLauncher = 4,
};
enum class DamageType {
Physical = 0,
Piercing = 1,
Plasma = 5,
Heat = 2,
Freeze = 3,
Shock = 4,
};
enum class EffectColourMode {
Default = 0,
Custom = 1,
};
struct Weapon {
Weapon() = default;
Weapon(const Weapon& other);
Weapon& operator=(const Weapon& other);
Weapon(Weapon&& other) = default;
Weapon& operator=(Weapon&& other) = default;
std::string name;
WeaponType type = WeaponType::Melee;
Containers::Array<WeaponPart> parts;
Containers::StaticArray<16, CustomStyle> customStyles{ValueInit};
bool attached = false;
DamageType damageType = DamageType::Physical;
bool dualWield = false;
EffectColourMode effectColourMode = EffectColourMode::Default;
Color4 effectColour{0.0f};
};