Skip to content

Commit

Permalink
Changed parsing item type for special fn in add_modify_obj_patches.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
UltiNaruto committed Oct 5, 2024
1 parent e966bd5 commit 8ff90f5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/add_modify_obj_patches.rs
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,15 @@ pub fn patch_add_special_fn(
let default_unknown0 = "".to_string();
let unknown0 = config.unknown1.as_ref().unwrap_or(&default_unknown0);
let unknown0 = string_to_cstr(unknown0.clone());
let default_item_id = "Power Beam".to_string();
let item_id = config.item_id.as_ref().unwrap_or(&default_item_id);
let item_id = PickupType::from_str(&item_id[..]) as u32;
let pickup_type = match config.item_id.as_ref() {
Some(item_id) => {
PickupType::from_str(item_id)
},
None => {
PickupType::PowerBeam
},
};
let item_id = pickup_type as u32;

macro_rules! new {
() => {
Expand Down

0 comments on commit 8ff90f5

Please sign in to comment.