123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- using ExIni;
- namespace CM3D2.MultipleMaids.Plugin
- {
- public partial class MultipleMaids
- {
- public void Preference()
- {
- if (isPref)
- {
- return;
- }
- isPref = true;
- if (Preferences["config"]["hair_setting"].Value == "true")
- {
- isKamiyure = true;
- IniKey iniKey1 = Preferences["config"]["hair_radius"];
- IniKey iniKey2 = Preferences["config"]["hair_elasticity"];
- kamiyure2 = float.Parse(Preferences["config"]["hair_damping"].Value);
- kamiyure3 = float.Parse(iniKey2.Value);
- kamiyure4 = float.Parse(iniKey1.Value);
- }
- else
- {
- isKamiyure = false;
- kamiyure2 = 0.6f;
- kamiyure3 = 1f;
- kamiyure4 = 0.02f;
- }
- if (Preferences["config"]["skirt_setting"].Value == "true")
- {
- isSkirtyure = true;
- IniKey iniKey1 = Preferences["config"]["skirt_radius"];
- IniKey iniKey2 = Preferences["config"]["skirt_elasticity"];
- skirtyure2 = float.Parse(Preferences["config"]["skirt_damping"].Value);
- skirtyure3 = float.Parse(iniKey2.Value);
- skirtyure4 = float.Parse(iniKey1.Value);
- }
- else
- {
- isSkirtyure = false;
- skirtyure2 = 0.1f;
- skirtyure3 = 0.05f;
- skirtyure4 = 0.1f;
- }
- IniKey iniKey3 = Preferences["config"]["vr_scroll"];
- if (iniKey3.Value == "false")
- {
- isVRScroll = false;
- }
- else if (iniKey3.Value != "true")
- {
- Preferences["config"]["vr_scroll"].Value = "true";
- SaveConfig();
- }
- if (Preferences["config"]["shift_f7"].Value == "true")
- {
- isF7S = true;
- }
- if (Preferences["config"]["shift_f8"].Value == "false")
- {
- isVR2 = false;
- }
- IniKey iniKey4 = Preferences["config"]["ik_all"];
- if (iniKey4.Value == "true")
- {
- isIKAll = true;
- for (int index = 0; index < maxMaidCnt; ++index)
- {
- isIK[index] = true;
- }
- }
- else if (iniKey4.Value != "false")
- {
- Preferences["config"]["ik_all"].Value = "true";
- SaveConfig();
- isIKAll = true;
- for (int index = 0; index < maxMaidCnt; ++index)
- {
- isIK[index] = true;
- }
- }
- IniKey modsOnlyKey = Preferences["config"]["mods_only"];
- if (modsOnlyKey.Value == "true")
- {
- modItemsOnly = true;
- modItemsToggle = true;
- }
- else if (modsOnlyKey.Value != "false")
- {
- Preferences["config"]["mods_only"].Value = "false";
- SaveConfig();
- modItemsOnly = false;
- }
- if (!int.TryParse(Preferences["config"]["scene_max"].Value, out maxPage))
- {
- maxPage = 100;
- Preferences["config"]["scene_max"].Value = "100";
- SaveConfig();
- }
- if (!int.TryParse(Preferences["config"]["kankyo_max"].Value, out kankyoMax))
- {
- kankyoMax = 20;
- Preferences["config"]["kankyo_max"].Value = "20";
- SaveConfig();
- }
- for (int index = 0; index < kankyoMax; ++index)
- {
- IniKey iniKey1 = Preferences["kankyo"]["kankyo" + (index + 1)];
- if (iniKey1.Value == null || iniKey1.Value == "")
- {
- Preferences["kankyo"]["kankyo" + (index + 1)].Value = "環境" + (index + 1);
- SaveConfig();
- }
- }
- maxPage /= 10;
- }
- }
- }
|