set prop default state

This commit is contained in:
amizing25
2024-04-10 00:49:17 +07:00
parent a56d3e768f
commit 46ae86cacf
2 changed files with 22 additions and 17 deletions
+16
View File
@@ -62,11 +62,21 @@ pub struct LevelProp {
pub anchor_group_id: Option<u32>,
#[serde(rename = "MappingInfoID")]
pub mapping_info_id: Option<u32>,
#[serde(default)]
#[serde(rename = "State")]
pub state: PropState,
#[serde(default)]
pub prop_state_list: Vec<PropState>,
#[serde(default)]
pub group_id: u32,
#[serde(rename = "IsDelete")]
#[serde(default)]
pub is_delete: bool,
#[serde(rename = "IsClientOnly")]
#[serde(default)]
pub client_only: bool,
}
#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
@@ -250,6 +260,12 @@ pub enum PropState {
CustomState09 = 109,
}
impl Default for PropState {
fn default() -> Self {
PropState::Closed
}
}
pub type IntMap<T> = HashMap<u32, T>;
pub type StringMap<T> = HashMap<String, T>;