Repositories (2)

rpfm_test_updater
5 snippets stored for this repo
// If we just have one `PackFile`, just read it. No fancy logic needed. If you're an asshole and tried to break this
        // by passing it no paths, enjoy the error.
// The creation time is a bit of an asshole. Depending on the PackFile Version/Id/Preamble, it uses a type, another or it doesn't exists.
        // Keep in mind that we store his raw value. If you want his legible value, you have to convert it yourself. PFH0 doesn't have it.
let contextual_menu_rename = SlotOfBool::new(move |_| {

                // Get the currently selected items, and check how many of them are valid before trying to rewrite them.
                // Why? Because I'm sure there is an asshole out there that it's going to try to give the files duplicated
                // names, and if that happen, we have to stop right there that criminal scum.
                let selected_items = <MutPtr<QTreeView> as PackTree>::get_item_types_from_main_treeview_selection(&pack_file_contents_ui);
                if let Some(rewrite_sequence) = PackFileContentsUI::create_rename_dialog(&mut app_ui, &selected_items) {
None => "three_kingdoms".to_owned(),
    };

    // By default, print the game selected we're using, just in case some asshole starts complaining about broken PackFiles.
    if verbosity_level > 0 {
        info!("Game Selected: {}", game_selected);
        info!("Verbosity level: {}", verbosity_level);
}
    }

    /// This function creates a new `RawPackedFile` from a another's `RawPackedFile`'s data, and some extra data. What an asshole.
    pub fn read_from_data(
        path: Vec<String>,
        packfile_name: String,
rpfm
3 snippets stored for this repo
// First, identify if we have a windows or linux build (mac only exists in your dreams.....).
            // Can't be both because they have different exe names. Unless you're retarded and you merge both, in which case, fuck you.
            let is_windows = install_type_by_exe.iter().any(|install_type| install_type == &&InstallType::WinSteam || install_type == &&InstallType::WinEpic || install_type == &&InstallType::WinWargaming);
// Yes, this is ugly. But I'm not the retarded idiot that decided to put the file that sets the language used inside a folder specific of the language used.
            let path = base_path.join(BRAZILIAN);
} else { None }
                                                    }) {

                                                        // No fucking clue if ANY reference is to a multikey table, but if is, we'll use the first key as ref key, and the rest as lookups.
                                                        let primary_keys = remote_def.fields.iter().filter(|x| x.primary_key == "1" || x.name == "key").collect::<Vec<_>>();
                                                        if !primary_keys.is_empty() {
                                                            for field in &mut new_def.fields {