Beispiel #1
0
        public void check_missing_files_status()
        {
            logger.log("started check for " + fullname);
            //foreach csp
            foreach (String csp_name in csps)
            {
                String FilePath;
                String FilePath2;
                if (dlc)
                {
                    logger.log("char is dlc | character file");
                    FilePath = dlc_csppath + csp_name + "/" + csp_name + "_" + cspfolder + "_" + slotstring + ".nut";
                    logger.log("dlc csp path : " + FilePath);
                    if (Library.get_moved_dlc_status(fullname))
                    {
                        logger.log("char is moved");
                        FilePath2 = csppath + csp_name + "/" + csp_name + "_" + cspfolder + "_" + slotstring + ".nut";
                        if (!File.Exists(FilePath2))
                        {
                            if (csp_name == "chr_10" | csp_name == "chrn_11")
                            {
                                logger.log("file doesn't exist for csp path, set missing to true");
                                Library.delete_skin_csp(fullname, slot, csp_name);
                                missing = true;
                            }
                            else
                            {
                                logger.log("file doesn't exist for csp path, set missing to true");
                                Library.set_csp_workspace_status(fullname, slot, csp_name, "missing");
                                missing = true;
                            }
                        }
                        else
                        {
                            if (csp_name == "chr_10")
                            {
                                Library.add_character_icon(fullname, slot, csp_name + "_" + cspfolder + "_" + slotstring);
                            }
                            else
                            {
                                Library.add_character_nameplate(fullname, slot, csp_name + "_" + cspfolder + "_" + slotstring);
                            }
                        }
                    }
                }
                else
                {
                    logger.log("char ins't dlc");
                    FilePath = csppath + csp_name + "/" + csp_name + "_" + cspfolder + "_" + slotstring + ".nut";
                    logger.log("csp path : " + FilePath);
                }

                if (File.Exists(FilePath))
                {
                    logger.log("file exists");
                    if (Library.get_csp_workspace_status(fullname, slot, csp_name) == "unknown")
                    {
                        logger.log("csp is unknown");
                        unknown = true;
                        logger.log("setting global to unknown");
                    }
                    else
                    {
                        logger.log("csp is known");
                        if (Library.get_csp_workspace_status(fullname, slot, csp_name) == "new")
                        {
                            logger.log("setting global to new");
                            new_files = true;
                        }
                    }
                }
                else
                {
                    logger.log("file doesn't exist");
                    Library.set_csp_workspace_status(fullname, slot, csp_name, "missing");
                    missing = true;
                    logger.log("setting global to missing");
                }
            }
            foreach (String model_name in models)
            {
                String folder_path = modelpath + model_name.Split('/')[0] + "/" + model_name.Split('/')[1].Substring(0, 1) + modelslotstring;
                if (Directory.Exists(folder_path))
                {
                    if (Library.get_model_workspace_status(fullname, slot, model_name) == "unknown")
                    {
                        unknown = true;
                    }
                    else
                    {
                        if (Library.get_model_workspace_status(fullname, slot, model_name) == "new")
                        {
                            new_files = true;
                        }
                    }
                }
                else
                {
                    Library.set_model_workspace_status(fullname, slot, model_name, "missing");
                    missing = true;
                }
            }
        }