luminol_data/rmxp/
actor.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::{
18    id_alox, id_serde, optional_id_alox, optional_id_serde, optional_path_alox,
19    optional_path_serde, Path, Table2,
20};
21
22#[derive(Default, Debug, serde::Deserialize, serde::Serialize)]
23#[derive(alox_48::Deserialize, alox_48::Serialize)]
24#[marshal(class = "RPG::Actor")]
25pub struct Actor {
26    #[serde(with = "id_serde")]
27    #[marshal(with = "id_alox")]
28    pub id: usize,
29    pub name: String,
30    #[serde(with = "id_serde")]
31    #[marshal(with = "id_alox")]
32    pub class_id: usize,
33    pub initial_level: i32,
34    pub final_level: i32,
35    pub exp_basis: i32,
36    pub exp_inflation: i32,
37    #[serde(with = "optional_path_serde")]
38    #[marshal(with = "optional_path_alox")]
39    pub character_name: Path,
40    pub character_hue: i32,
41    #[serde(with = "optional_path_serde")]
42    #[marshal(with = "optional_path_alox")]
43    pub battler_name: Path,
44    pub battler_hue: i32,
45    pub parameters: Table2,
46    #[serde(with = "optional_id_serde")]
47    #[marshal(with = "optional_id_alox")]
48    pub weapon_id: Option<usize>,
49    #[serde(with = "optional_id_serde")]
50    #[marshal(with = "optional_id_alox")]
51    pub armor1_id: Option<usize>,
52    #[serde(with = "optional_id_serde")]
53    #[marshal(with = "optional_id_alox")]
54    pub armor2_id: Option<usize>,
55    #[serde(with = "optional_id_serde")]
56    #[marshal(with = "optional_id_alox")]
57    pub armor3_id: Option<usize>,
58    #[serde(with = "optional_id_serde")]
59    #[marshal(with = "optional_id_alox")]
60    pub armor4_id: Option<usize>,
61    pub weapon_fix: bool,
62    pub armor1_fix: bool,
63    pub armor2_fix: bool,
64    pub armor3_fix: bool,
65    pub armor4_fix: bool,
66}