luminol_data/shared/
move_route.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/>.
17use crate::helpers::ParameterType;
18
19#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, PartialEq)]
20#[derive(alox_48::Deserialize, alox_48::Serialize)]
21#[marshal(class = "RPG::MoveRoute")]
22pub struct MoveRoute {
23    pub repeat: bool,
24    pub skippable: bool,
25    pub list: Vec<MoveCommand>,
26}
27
28#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, PartialEq)]
29#[derive(alox_48::Deserialize, alox_48::Serialize)]
30#[marshal(class = "RPG::MoveCommand")]
31#[allow(missing_docs)]
32pub struct MoveCommand {
33    pub code: u16,
34    pub parameters: Vec<ParameterType>,
35
36    #[marshal(default = "rand::random")]
37    #[marshal(skip)]
38    #[serde(default = "rand::random")]
39    #[serde(skip)]
40    pub guid: u16,
41}