luminol_data/shared/
mod.rs

1// Copyright (C) 2024 Melody Madeline Lyons
2//
3// This file is part of Luminol.
4//
5// Luminol is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// Luminol is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with Luminol.  If not, see <http://www.gnu.org/licenses/>.
17
18mod audio_file;
19mod event;
20mod mapinfo;
21mod move_route;
22mod script;
23
24pub use audio_file::*;
25pub use event::*;
26pub use mapinfo::*;
27pub use move_route::*;
28pub use script::*;
29
30#[derive(Clone, Copy, Debug, Eq, PartialEq, PartialOrd, Ord, Default, Hash)]
31#[derive(
32    num_enum::TryFromPrimitive,
33    num_enum::IntoPrimitive,
34    strum::Display,
35    strum::EnumIter
36)]
37#[derive(serde::Deserialize, serde::Serialize)]
38#[derive(alox_48::Deserialize, alox_48::Serialize)]
39#[repr(u8)]
40#[serde(into = "u8")]
41#[serde(try_from = "u8")]
42#[marshal(into = "u8")]
43#[marshal(try_from = "u8")]
44pub enum BlendMode {
45    #[default]
46    Normal = 0,
47    Add = 1,
48    Subtract = 2,
49}
50
51#[derive(Clone, Copy, Debug, Eq, PartialEq, Default)]
52#[derive(
53    num_enum::TryFromPrimitive,
54    num_enum::IntoPrimitive,
55    strum::Display,
56    strum::EnumIter
57)]
58#[derive(serde::Deserialize, serde::Serialize)]
59#[derive(alox_48::Deserialize, alox_48::Serialize)]
60#[repr(u8)]
61#[serde(into = "u8")]
62#[serde(try_from = "u8")]
63#[marshal(into = "u8")]
64#[marshal(try_from = "u8")]
65pub enum Scope {
66    #[default]
67    None = 0,
68    #[strum(to_string = "One Enemy")]
69    OneEnemy = 1,
70    #[strum(to_string = "All Enemies")]
71    AllEnemies = 2,
72    #[strum(to_string = "One Ally")]
73    OneAlly = 3,
74    #[strum(to_string = "All Allies")]
75    AllAllies = 4,
76    #[strum(to_string = "One Ally (HP 0)")]
77    OneAllyHP0 = 5,
78    #[strum(to_string = "All Allies (HP 0)")]
79    AllAlliesHP0 = 6,
80    #[strum(to_string = "The User")]
81    User = 7,
82}
83
84#[derive(Clone, Copy, Debug, Eq, PartialEq, Default)]
85#[derive(
86    num_enum::TryFromPrimitive,
87    num_enum::IntoPrimitive,
88    strum::Display,
89    strum::EnumIter
90)]
91#[derive(serde::Deserialize, serde::Serialize)]
92#[derive(alox_48::Deserialize, alox_48::Serialize)]
93#[repr(u8)]
94#[serde(into = "u8")]
95#[serde(try_from = "u8")]
96#[marshal(into = "u8")]
97#[marshal(try_from = "u8")]
98pub enum Occasion {
99    #[default]
100    Always = 0,
101    #[strum(to_string = "Only in battle")]
102    OnlyBattle = 1,
103    #[strum(to_string = "Only from the menu")]
104    OnlyMenu = 2,
105    Never = 3,
106}