From 149ae73f9721d2e92a85c4a247a10de8e9c2d401 Mon Sep 17 00:00:00 2001 From: MrMiguel211 <60329473+MrMiguel211@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:22:35 -0700 Subject: [PATCH] add missing updates --- src/add_modify_obj_patches.rs | 3 +++ src/patch_config.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/add_modify_obj_patches.rs b/src/add_modify_obj_patches.rs index a614b6cc..76717f9c 100644 --- a/src/add_modify_obj_patches.rs +++ b/src/add_modify_obj_patches.rs @@ -1335,6 +1335,9 @@ pub fn patch_add_controller_action<'r>( macro_rules! update { ($obj:expr) => { let property_data = $obj.property_data.as_controller_action_mut().unwrap(); + + property_data.action = config.action as u32; + if let Some(active ) = config.active {property_data.active = active as u8 } if let Some(one_shot ) = config.one_shot {property_data.one_shot = one_shot as u8 } }; diff --git a/src/patch_config.rs b/src/patch_config.rs index 7c416839..9f1dcfef 100644 --- a/src/patch_config.rs +++ b/src/patch_config.rs @@ -693,6 +693,7 @@ pub enum EnviornmentalEffect { } #[derive(Serialize, Deserialize, Debug, Copy, Clone, Eq, PartialEq)] +#[serde(deny_unknown_fields)] pub enum ControllerActionType { Forward = 0, Backward, @@ -766,6 +767,7 @@ pub enum ControllerActionType { } #[derive(Serialize, Deserialize, Debug, Clone)] +#[serde(rename_all = "camelCase", deny_unknown_fields)] pub struct ControllerActionConfig { pub id: u32,