Exemplo n.º 1
0
    static bool TagFaceBlend(BaseKagManager baseKagManager, KagTagSupport tag_data)
    {
        Maid maidAndMan = GetMaidAndMan(tag_data);

        if (maidAndMan == null)
        {
            return(false);
        }
        if (ExSaveData.GetBool(maidAndMan, PluginName, "FACEBLEND_OFF", false))
        {
            // Helper.Log("FACEBLEND_OFF() -> match");
            return(false);
        }

        baseKagManager.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[] { "name" });

        string oldName = tag_data.GetTagProperty("name").AsString();

        if (oldName == "なし")
        {
            oldName = "無し";
        }
        string newName = FaceScriptTemplates.ProcFaceBlendName(maidAndMan, PluginName, oldName);

        // Helper.Log("TagFaceBlend({0})->({1})", oldName, newName);

        maidAndMan.FaceBlend(newName);
        return(false);
    }
    static bool TagFaceBlend(BaseKagManager baseKagManager, KagTagSupport tag_data)
    {
        Maid maidAndMan = baseKagManager.GetMaidAndMan(tag_data);

        if (maidAndMan == null)
        {
            return(false);
        }
        if (ExSaveData.GetBool(maidAndMan, PluginName, "FACEBLEND_OFF", false))
        {
            Trace.WriteLine("FACEBLEND_OFF() -> match");
            return(false);
        }

        baseKagManager.CheckAbsolutelyNecessaryTag(tag_data, "faceblend", new string[] { "name" });

        string oldName = tag_data.GetTagProperty("name").AsString();

        if (oldName == "なし")
        {
            oldName = "無し";
        }

        string newName = FaceScriptTemplates.ProcFaceBlendName(maidAndMan, PluginName, oldName);

        Trace.WriteLine(string.Format("TagFaceBlend({0})->({1})", oldName, newName));

        if (UnityEngine.SceneManagement.SceneManager.GetActiveScene().name == "ScenePhotoMode")
        {
            newName = "オリジナル";
        }

        maidAndMan.FaceBlend(newName);
        return(false);
    }