denikson 5 years ago
parent
commit
69a74a68b6
63 changed files with 4006 additions and 930 deletions
  1. 5 5
      Assembly-CSharp.sln
  2. 25 17
      Assembly-CSharp/Assembly-CSharp.csproj
  3. 4 3
      Assembly-CSharp/AttributeViewer.cs
  4. 14 6
      Assembly-CSharp/BaseKagManager.cs
  5. 1 1
      Assembly-CSharp/BasePhotoCustomObject.cs
  6. 1 1
      Assembly-CSharp/BasePhotoWindowManager.cs
  7. 4 4
      Assembly-CSharp/CMSystem.cs
  8. 21 21
      Assembly-CSharp/CharacterMgr.cs
  9. 183 3
      Assembly-CSharp/CharacterSelectMain.cs
  10. 18 0
      Assembly-CSharp/CharacterSelectManager.cs
  11. 2 2
      Assembly-CSharp/ControllerShortcutSettingData.cs
  12. 0 571
      Assembly-CSharp/CreativeRoomUIPlacementMaid.cs
  13. 8 0
      Assembly-CSharp/DailyCtrl.cs
  14. 2 0
      Assembly-CSharp/DailyMgr.cs
  15. 1 1
      Assembly-CSharp/DeskManager.cs
  16. 3 3
      Assembly-CSharp/DynamicBone.cs
  17. 1 1
      Assembly-CSharp/DynamicSkirtBone.cs
  18. 1 1
      Assembly-CSharp/EditMod.cs
  19. 362 0
      Assembly-CSharp/EmpireLifeModeAPI.cs
  20. 602 0
      Assembly-CSharp/EmpireLifeModeData.cs
  21. 141 0
      Assembly-CSharp/EmpireLifeModeFacilityUI.cs
  22. 660 0
      Assembly-CSharp/EmpireLifeModeManager.cs
  23. 83 0
      Assembly-CSharp/FacilityDetailsListViewer.cs
  24. 1 1
      Assembly-CSharp/FacilityManager.cs
  25. 1 0
      Assembly-CSharp/FreeSkillSelect.cs
  26. 16 2
      Assembly-CSharp/GameMain.cs
  27. 116 0
      Assembly-CSharp/GameModeManager.cs
  28. 100 55
      Assembly-CSharp/GameUty.cs
  29. 2 2
      Assembly-CSharp/HandSignShortcut.cs
  30. 33 24
      Assembly-CSharp/I2/Loc/LanguageSource.cs
  31. 0 1
      Assembly-CSharp/I2/Loc/LocalizationManager.cs
  32. 1 1
      Assembly-CSharp/Kasizuki/KasizukiManager.cs
  33. 290 0
      Assembly-CSharp/LifeModeChangeWindow.cs
  34. 3 3
      Assembly-CSharp/Maid.cs
  35. 54 14
      Assembly-CSharp/MaidParts.cs
  36. 1 1
      Assembly-CSharp/MaidProp.cs
  37. 1 1
      Assembly-CSharp/MaidStatus/Status.cs
  38. 1 1
      Assembly-CSharp/Menu.cs
  39. 1 1
      Assembly-CSharp/Misc.cs
  40. 1 1
      Assembly-CSharp/ModCompile.cs
  41. 1 0
      Assembly-CSharp/MyRoomCustom/CreativeRoom.cs
  42. 18 4
      Assembly-CSharp/MyRoomCustom/CreativeRoomManager.cs
  43. 574 0
      Assembly-CSharp/MyRoomCustom/CreativeRoomUIPlacementMaid.cs
  44. 30 43
      Assembly-CSharp/MyRoomCustom/PlacementData.cs
  45. 25 36
      Assembly-CSharp/MyRoomCustom/TextureData.cs
  46. 2 2
      Assembly-CSharp/OvrIK.cs
  47. 1 1
      Assembly-CSharp/PhotoModeSaveAndLoad.cs
  48. 1 1
      Assembly-CSharp/PlayerStatus/Status.cs
  49. 13 1
      Assembly-CSharp/SceneCharacterSelect.cs
  50. 230 0
      Assembly-CSharp/SceneEmpireLifeMode.cs
  51. 32 1
      Assembly-CSharp/ScriptManager.cs
  52. 32 0
      Assembly-CSharp/StatusViewer.cs
  53. 1 1
      Assembly-CSharp/WindowPartsFingerPreset.cs
  54. 74 9
      Assembly-CSharp/YotogiManager.cs
  55. 8 0
      Assembly-CSharp/YotogiNullManager.cs
  56. 12 0
      Assembly-CSharp/YotogiParamBasicBar.cs
  57. 12 6
      Assembly-CSharp/YotogiParameterViewer.cs
  58. 149 68
      Assembly-CSharp/YotogiPlayManager.cs
  59. 14 6
      Assembly-CSharp/YotogiResultManager.cs
  60. 1 1
      Assembly-CSharp/YotogiSkillListManager.cs
  61. 1 1
      Assembly-CSharp/YotogiSkillSelectManager.cs
  62. 9 0
      Assembly-CSharp/YotogiStageSelectManager.cs
  63. 2 1
      Assembly-CSharp/Yotogis/Skill.cs

+ 5 - 5
Assembly-CSharp.sln

@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 15
 VisualStudioVersion = 15.0.26228.4
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{04D5FA9A-353E-4FCE-8E94-84EF4FC7322C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Assembly-CSharp", "Assembly-CSharp\Assembly-CSharp.csproj", "{E18FECE1-515B-4F53-9E15-A8D2CDDE605D}"
 EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -11,10 +11,10 @@ Global
 		Release|Any CPU = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{04D5FA9A-353E-4FCE-8E94-84EF4FC7322C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-		{04D5FA9A-353E-4FCE-8E94-84EF4FC7322C}.Debug|Any CPU.Build.0 = Debug|Any CPU
-		{04D5FA9A-353E-4FCE-8E94-84EF4FC7322C}.Release|Any CPU.ActiveCfg = Release|Any CPU
-		{04D5FA9A-353E-4FCE-8E94-84EF4FC7322C}.Release|Any CPU.Build.0 = Release|Any CPU
+		{E18FECE1-515B-4F53-9E15-A8D2CDDE605D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{E18FECE1-515B-4F53-9E15-A8D2CDDE605D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{E18FECE1-515B-4F53-9E15-A8D2CDDE605D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{E18FECE1-515B-4F53-9E15-A8D2CDDE605D}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE

+ 25 - 17
Assembly-CSharp/Assembly-CSharp.csproj

@@ -4,7 +4,7 @@
   <PropertyGroup>
     <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
     <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
-    <ProjectGuid>{04D5FA9A-353E-4FCE-8E94-84EF4FC7322C}</ProjectGuid>
+    <ProjectGuid>{E18FECE1-515B-4F53-9E15-A8D2CDDE605D}</ProjectGuid>
     <OutputType>Library</OutputType>
     <RootNamespace>Assembly-CSharp</RootNamespace>
     <AssemblyName>Assembly-CSharp</AssemblyName>
@@ -34,49 +34,49 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="Assembly-CSharp-firstpass">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="Assembly-UnityScript-firstpass">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\Assembly-UnityScript-firstpass.dll</HintPath>
     </Reference>
     <Reference Include="FoveUnityPlugin">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\FoveUnityPlugin.dll</HintPath>
     </Reference>
     <Reference Include="Ionic.Zlib">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\Ionic.Zlib.dll</HintPath>
     </Reference>
     <Reference Include="JsonFx.Json">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\JsonFx.Json.dll</HintPath>
     </Reference>
     <Reference Include="LeapCSharp.NET3.5">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\LeapCSharp.NET3.5.dll</HintPath>
     </Reference>
     <Reference Include="System">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\System.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.dll</HintPath>
     </Reference>
     <Reference Include="System.Core">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Core.dll</HintPath>
     </Reference>
     <Reference Include="System.Drawing">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Drawing.dll</HintPath>
     </Reference>
     <Reference Include="System.Windows.Forms">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Windows.Forms.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Xml.dll</HintPath>
     </Reference>
     <Reference Include="System.Xml.Linq">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\System.Xml.Linq.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\UnityEngine.dll</HintPath>
     </Reference>
     <Reference Include="UnityEngine.UI">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\UnityEngine.UI.dll</HintPath>
     </Reference>
     <Reference Include="zxing.unity">
-      <HintPath>..\..\com_diff_tmp\com3d2_up120\data\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
+      <HintPath>..\..\..\..\..\Programs\COM3D2\COM3D2\COM3D2x64_Data\Managed\zxing.unity.dll</HintPath>
     </Reference>
   </ItemGroup>
   <ItemGroup>
@@ -277,7 +277,6 @@
     <Compile Include="CostumePartsEnabledCtrl.cs" />
     <Compile Include="CostumePartsEnabledMgr.cs" />
     <Compile Include="CreateBGObjectSubWindow.cs" />
-    <Compile Include="CreativeRoomUIPlacementMaid.cs" />
     <Compile Include="CsvImporter.cs" />
     <Compile Include="DailyCtrl.cs" />
     <Compile Include="DailyMgr.cs" />
@@ -354,6 +353,10 @@
     <Compile Include="EditViewReset.cs" />
     <Compile Include="Edit\MaidProfile.cs" />
     <Compile Include="EffectWindow.cs" />
+    <Compile Include="EmpireLifeModeAPI.cs" />
+    <Compile Include="EmpireLifeModeData.cs" />
+    <Compile Include="EmpireLifeModeFacilityUI.cs" />
+    <Compile Include="EmpireLifeModeManager.cs" />
     <Compile Include="EmptyWindow.cs" />
     <Compile Include="Enabler.cs" />
     <Compile Include="EnableSwitch.cs" />
@@ -369,6 +372,7 @@
     <Compile Include="FaceWindow.cs" />
     <Compile Include="Facility.cs" />
     <Compile Include="FacilityDataTable.cs" />
+    <Compile Include="FacilityDetailsListViewer.cs" />
     <Compile Include="FacilityFlag\DataArray.cs" />
     <Compile Include="FacilityFlag\Util.cs" />
     <Compile Include="FacilityInfoUI.cs" />
@@ -406,6 +410,7 @@
     <Compile Include="GameInShop.cs" />
     <Compile Include="GameInShopMain.cs" />
     <Compile Include="GameMain.cs" />
+    <Compile Include="GameModeManager.cs" />
     <Compile Include="GameObjectExtension.cs" />
     <Compile Include="GameUty.cs" />
     <Compile Include="GazeEventArgs.cs" />
@@ -654,6 +659,7 @@
     <Compile Include="Leap\Unity\UnityQuaternionExtension.cs" />
     <Compile Include="Leap\Unity\UnityVectorExtension.cs" />
     <Compile Include="Leap\Unity\Utils.cs" />
+    <Compile Include="LifeModeChangeWindow.cs" />
     <Compile Include="LightMain.cs" />
     <Compile Include="LightWindow.cs" />
     <Compile Include="LimbControl.cs" />
@@ -744,6 +750,7 @@
     <Compile Include="MyRoomCustom\CreativeRoom.cs" />
     <Compile Include="MyRoomCustom\CreativeRoomManager.cs" />
     <Compile Include="MyRoomCustom\CreativeRoomUIObjectSettings.cs" />
+    <Compile Include="MyRoomCustom\CreativeRoomUIPlacementMaid.cs" />
     <Compile Include="MyRoomCustom\CreativeRoomUISaveLoad.cs" />
     <Compile Include="MyRoomCustom\PlacementData.cs" />
     <Compile Include="MyRoomCustom\TextureData.cs" />
@@ -1025,6 +1032,7 @@
     <Compile Include="SceneEditWindow\VoiceIconData.cs" />
     <Compile Include="SceneEditWindow\VoiceIconWindow.cs" />
     <Compile Include="SceneEditWindow\WindowManager.cs" />
+    <Compile Include="SceneEmpireLifeMode.cs" />
     <Compile Include="SceneFacilityManagement.cs" />
     <Compile Include="SceneFirst.cs" />
     <Compile Include="SceneFreeModeSelectManager.cs" />

+ 4 - 3
Assembly-CSharp/AttributeViewer.cs

@@ -29,12 +29,12 @@ public class AttributeViewer : MonoBehaviour
 	public void UpdateStatusInfo()
 	{
 		this.Awake();
-		if (this.updateStatusInfo)
+		if (this.updateStatusInfo || this.targetMaid == null)
 		{
 			return;
 		}
 		this.updateStatusInfo = true;
-		Status status = GameMain.Instance.CharacterMgr.GetMaid(0).status;
+		Status status = this.targetMaid.status;
 		List<Transform> childList = this.seiheki_table_.GetChildList();
 		for (int i = 0; i < childList.Count; i++)
 		{
@@ -57,7 +57,8 @@ public class AttributeViewer : MonoBehaviour
 		}
 	}
 
-	private Maid maid_;
+	[SerializeField]
+	public Maid targetMaid;
 
 	private UITable seiheki_table_;
 

+ 14 - 6
Assembly-CSharp/BaseKagManager.cs

@@ -169,6 +169,7 @@ public class BaseKagManager : IDisposable
 		this.kag_.AddTagCallBack("battlecutin", new KagScript.KagTagCallBack(this.TagBattleCutInStart));
 		this.kag_.AddTagCallBack("motioncheck", new KagScript.KagTagCallBack(this.TagMotionCheckStart));
 		this.kag_.AddTagCallBack("setmcskip", new KagScript.KagTagCallBack(this.TagSetMcSkip));
+		this.kag_.AddTagCallBack("totitle", new KagScript.KagTagCallBack(this.TagToTitle));
 		this.kag_.AddTagCallBack("addeventdisplay", new KagScript.KagTagCallBack(this.TagAddedEventDisplay));
 		this.kag_.AddTagCallBack("tutorialstart", new KagScript.KagTagCallBack(this.TagTutorialStart));
 		this.kag_.AddTagCallBack("loadsubtitlefile", new KagScript.KagTagCallBack(this.TagLoadSubtitleFile));
@@ -2522,7 +2523,7 @@ public class BaseKagManager : IDisposable
 		});
 		string text = tag_data.GetTagProperty("voice").AsString();
 		text = Path.ChangeExtension(text, ".ogg");
-		bool f_bLoop = tag_data.IsValid("loop");
+		bool flag = tag_data.IsValid("loop");
 		int millisecond = 0;
 		if (tag_data.IsValid("fade"))
 		{
@@ -2534,7 +2535,7 @@ public class BaseKagManager : IDisposable
 			Maid maidAndMan = this.GetMaidAndMan(tag_data);
 			if (maidAndMan != null && maidAndMan.Visible)
 			{
-				maidAndMan.AudioMan.LoadPlay(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop);
+				maidAndMan.AudioMan.LoadPlay(text, GameUty.MillisecondToSecond(millisecond), true, flag);
 				if (maidAndMan.AudioMan.isPlay() && maidAndMan.AudioMan.audiosource.clip != null)
 				{
 					num = (int)(maidAndMan.AudioMan.audiosource.clip.length * 1000f);
@@ -2546,12 +2547,12 @@ public class BaseKagManager : IDisposable
 			}
 			else
 			{
-				GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop, 50);
+				GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, flag, 50);
 			}
 		}
 		else
 		{
-			GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, f_bLoop, 50);
+			GameMain.Instance.SoundMgr.PlayDummyVoice(text, GameUty.MillisecondToSecond(millisecond), true, flag, 50);
 			if (GameMain.Instance.SoundMgr.m_AudioDummyVoice.isPlay() && GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip != null)
 			{
 				num = (int)(GameMain.Instance.SoundMgr.m_AudioDummyVoice.audiosource.clip.length * 1000f);
@@ -2561,7 +2562,7 @@ public class BaseKagManager : IDisposable
 				result = this.SetDummyVoiceWait();
 			}
 		}
-		if (!string.IsNullOrEmpty(this.subtitle_data.text) && (0 <= this.subtitle_data.displayTime || 0 < num))
+		if (!flag && !string.IsNullOrEmpty(this.subtitle_data.text) && (0 <= this.subtitle_data.displayTime || 0 < num))
 		{
 			SubtitleMovieManager globalInstance = SubtitleMovieManager.GetGlobalInstance(this.subtitle_data.casinoType);
 			globalInstance.autoDestroy = true;
@@ -4701,6 +4702,13 @@ public class BaseKagManager : IDisposable
 		return false;
 	}
 
+	public bool TagToTitle(KagTagSupport tag_data)
+	{
+		GameMain.Instance.LoadScene("SceneToTitle");
+		GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
+		return false;
+	}
+
 	public bool TagAddedEventDisplay(KagTagSupport tag_data)
 	{
 		string label = string.Empty;
@@ -5019,7 +5027,7 @@ public class BaseKagManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_KAG");
-		binary.Write(1200);
+		binary.Write(1210);
 		byte[] array = this.kag_.Serialize();
 		int value = array.Length;
 		binary.Write(value);

+ 1 - 1
Assembly-CSharp/BasePhotoCustomObject.cs

@@ -173,7 +173,7 @@ public abstract class BasePhotoCustomObject : MonoBehaviour, IComparable<BasePho
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write("COM3D2_PHOTO_CUSTOM_OBJECT");
-				binaryWriter.Write(1200);
+				binaryWriter.Write(1210);
 				binaryWriter.Write(this.type.ToString());
 				binaryWriter.Write(this.scale_);
 				binaryWriter.Write(this.enabledTextureColor_);

+ 1 - 1
Assembly-CSharp/BasePhotoWindowManager.cs

@@ -153,7 +153,7 @@ public abstract class BasePhotoWindowManager : MonoBehaviour
 			using (BinaryWriter binaryWriter = new BinaryWriter(memoryStream))
 			{
 				binaryWriter.Write(this.save_header_uidata);
-				binaryWriter.Write(1200);
+				binaryWriter.Write(1210);
 				binaryWriter.Write(this.save_data_.Count);
 				foreach (KeyValuePair<string, Dictionary<string, Dictionary<string, string>>> keyValuePair3 in this.save_data_)
 				{

+ 4 - 4
Assembly-CSharp/CMSystem.cs

@@ -808,7 +808,7 @@ public class CMSystem
 	{
 		XElement xelement = new XElement("Config", new object[]
 		{
-			new XAttribute("Version", 1200),
+			new XAttribute("Version", 1210),
 			new XElement("System", new XElement("SysButtonShowAlways", this.SysButtonShowAlways)),
 			new XElement("Screen", new object[]
 			{
@@ -1125,7 +1125,7 @@ public class CMSystem
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_SYSTEM2");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		binaryWriter.Write(this.m_dicEditColorPresetData.Count);
 		foreach (KeyValuePair<int, Dictionary<string, int>> keyValuePair in this.m_dicEditColorPresetData)
 		{
@@ -1697,7 +1697,7 @@ public class CMSystem
 
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1200;
+			this.m_nVersion = 1210;
 		}
 
 		public void OnAfterDeserialize()
@@ -1705,7 +1705,7 @@ public class CMSystem
 		}
 
 		[SerializeField]
-		private int m_nVersion = 1200;
+		private int m_nVersion = 1210;
 
 		[SerializeField]
 		private string m_strDShowFilter = "Microsoft DTV-DVD Video Decoder";

+ 21 - 21
Assembly-CSharp/CharacterMgr.cs

@@ -365,30 +365,30 @@ public class CharacterMgr : MonoBehaviour
 	{
 		GameObject[] array = (!isMan) ? this.m_objActiveMaid : this.m_objActiveMan;
 		Maid[] array2 = (!isMan) ? this.m_gcActiveMaid : this.m_gcActiveMan;
-		if (array2[slotNoA] == null || array2[slotNoB] == null)
-		{
-			Debug.LogError(string.Concat(new object[]
-			{
-				"ActiveSlot番号",
-				slotNoA,
-				"と",
-				slotNoB,
-				"を交換しようとしましたが、nullが入っています"
-			}));
-			return;
-		}
 		GameObject gameObject = array[slotNoA];
 		array[slotNoA] = array[slotNoB];
 		array[slotNoB] = gameObject;
-		string name = array2[slotNoA].gameObject.name;
-		array2[slotNoA].gameObject.name = array2[slotNoB].gameObject.name;
-		array2[slotNoB].gameObject.name = name;
+		string text = (!(array2[slotNoA] != null)) ? null : array2[slotNoA].gameObject.name;
+		if (array2[slotNoA] && array2[slotNoB] != null)
+		{
+			array2[slotNoA].gameObject.name = array2[slotNoB].gameObject.name;
+		}
+		if (array2[slotNoB] != null && text != null)
+		{
+			array2[slotNoB].gameObject.name = text;
+		}
 		Maid maid = array2[slotNoA];
 		array2[slotNoA] = array2[slotNoB];
 		array2[slotNoB] = maid;
-		int activeSlotNo = array2[slotNoA].ActiveSlotNo;
-		array2[slotNoA].ActiveSlotNo = array2[slotNoB].ActiveSlotNo;
-		array2[slotNoB].ActiveSlotNo = activeSlotNo;
+		int activeSlotNo = (!(array2[slotNoA] != null)) ? -1 : array2[slotNoA].ActiveSlotNo;
+		if (array2[slotNoA])
+		{
+			array2[slotNoA].ActiveSlotNo = ((!(array2[slotNoB] != null)) ? -1 : array2[slotNoB].ActiveSlotNo);
+		}
+		if (array2[slotNoB])
+		{
+			array2[slotNoB].ActiveSlotNo = activeSlotNo;
+		}
 	}
 
 	public void DeactivateCharaAll()
@@ -949,7 +949,7 @@ public class CharacterMgr : MonoBehaviour
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		string result = string.Empty;
 		binaryWriter.Write("CM3D2_PRESET_S");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		binaryWriter.Write((char)presset_type);
 		maid.SerializePropLowCapacity(binaryWriter);
 		maid.SerializeMultiColor(binaryWriter);
@@ -966,7 +966,7 @@ public class CharacterMgr : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_PRESET");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		binaryWriter.Write((int)f_type);
 		if (texture2D != null)
 		{
@@ -1246,7 +1246,7 @@ public class CharacterMgr : MonoBehaviour
 	public bool Serialize(BinaryWriter bwWrite)
 	{
 		bwWrite.Write("CM3D2_CHR_MGR");
-		bwWrite.Write(1200);
+		bwWrite.Write(1210);
 		this.m_PlayerStatus.Serialize(bwWrite);
 		bwWrite.Write(this.m_listStockMan.Count);
 		for (int i = 0; i < this.m_listStockMan.Count; i++)

+ 183 - 3
Assembly-CSharp/CharacterSelectMain.cs

@@ -1,5 +1,6 @@
 using System;
 using System.Collections.Generic;
+using System.Linq;
 using System.Runtime.CompilerServices;
 using com.workman.cm3d2.scene.dailyEtc;
 using I2.Loc;
@@ -7,6 +8,7 @@ using MaidStatus;
 using PlayerStatus;
 using Schedule;
 using UnityEngine;
+using wf;
 
 public class CharacterSelectMain : WfScreenChildren
 {
@@ -35,6 +37,7 @@ public class CharacterSelectMain : WfScreenChildren
 			EventDelegate.Add(keyValuePair.Value.onClick, new EventDelegate.Callback(this.OnClickButton));
 		}
 		this.chara_select_mgr_ = UTY.GetChildObject(base.root_obj, "CharacterSelectPanel", false).GetComponent<CharacterSelectManager>();
+		this.InitSelectedMaidPanelUI();
 	}
 
 	protected override void OnCall()
@@ -415,10 +418,10 @@ public class CharacterSelectMain : WfScreenChildren
 				CharacterSelectManager.DefaultMaidList(list3);
 				for (int n = 0; n < list3.Count; n++)
 				{
-					Maid maid = list3[n];
-					if (maid.status.subCharaData == null || subMaidList.Contains(maid.status.subCharaData.id))
+					Maid maid2 = list3[n];
+					if (maid2.status.subCharaData == null || subMaidList.Contains(maid2.status.subCharaData.id))
 					{
-						if (!CharacterSelectMain.compatibilityMode || maid.status.isCompatiblePersonality)
+						if (!CharacterSelectMain.compatibilityMode || maid2.status.isCompatiblePersonality)
 						{
 							draw_maid_list.Add(list3[n]);
 						}
@@ -433,6 +436,35 @@ public class CharacterSelectMain : WfScreenChildren
 				this.auto_select_ = true;
 			}
 		}
+		else if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeMode)
+		{
+			this.chara_select_mgr_.SetCallBackMaidList(delegate(List<Maid> draw_maid_list)
+			{
+				List<Maid> list3 = new List<Maid>();
+				CharacterSelectManager.DefaultMaidList(list3);
+				foreach (Maid item in EmpireLifeModeAPI.SelectionMaidList(list3))
+				{
+					draw_maid_list.Add(item);
+				}
+			});
+			this.chara_select_mgr_.big_thumbnail.isEnabled = false;
+			this.CreateSelectedMaidPanelOfLifeMode();
+			this.chara_select_mgr_.SetCallBackOnMultiSelect(new CharacterSelectManager.CallBackOnMultiSelect(this.OnMultiSelectCharaLifeMode));
+			this.chara_select_mgr_.Create(CharacterSelectManager.Type.Multiple, EmpireLifeModeAPI.GetMaxMaidCount(), false);
+			this.button_dic_["OK"].isEnabled = false;
+			foreach (Maid maid in GameMain.Instance.LifeModeMgr.lifeModeAllMaidList)
+			{
+				this.chara_select_mgr_.SetSelectStateMaid(maid, true);
+			}
+			if (this.chara_select_mgr_.maid_list_count == 1)
+			{
+				this.chara_select_mgr_.SelectAllMaid();
+				this.auto_select_ = true;
+			}
+			this.button_dic_["全選択"].gameObject.SetActive(false);
+			this.button_dic_["全解除"].gameObject.SetActive(false);
+			this.SetExplanatoryLabel("※まだ作っている途中です※");
+		}
 		CharacterMgr characterMgr = GameMain.Instance.CharacterMgr;
 		for (int m = 0; m < characterMgr.GetStockMaidCount(); m++)
 		{
@@ -559,6 +591,20 @@ public class CharacterSelectMain : WfScreenChildren
 		this.button_dic_["全解除"].isEnabled = !flag2;
 	}
 
+	private void OnMultiSelectCharaLifeMode(Maid[] maidArray)
+	{
+		this.UpdateSelectedMaidPanelOfLifeMode(maidArray);
+		this.loaded_check_maid_.Clear();
+		foreach (Maid maid in maidArray)
+		{
+			if (maid != null)
+			{
+				this.loaded_check_maid_.Add(maid);
+			}
+		}
+		this.button_dic_["OK"].isEnabled = (this.loaded_check_maid_.Count > 0);
+	}
+
 	private void OnClickButton()
 	{
 		string text = string.Empty;
@@ -685,6 +731,12 @@ public class CharacterSelectMain : WfScreenChildren
 		{
 			this.chara_mgr_.SetActiveMaid(this.select_maid_, this.scene_chara_select_.select_maid_slot);
 		}
+		if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.LifeMode)
+		{
+			NDebug.Assert(this.loaded_check_maid_.Count > 0);
+			GameMain.Instance.LifeModeMgr.SetAllMaidList(this.loaded_check_maid_);
+			this.loaded_check_maid_.Clear();
+		}
 		if (this.scene_chara_select_.select_type == SceneCharacterSelect.SelectType.NewYotogiAdditional)
 		{
 			this.loaded_check_maid_.Clear();
@@ -731,6 +783,124 @@ public class CharacterSelectMain : WfScreenChildren
 		}
 	}
 
+	private void InitSelectedMaidPanelUI()
+	{
+		this.m_SelectedMaidPanelParent = UTY.GetChildObject(base.root_obj, "SelectedMaidParent", false);
+		this.m_SelectedMaidPanelGrid = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/Grid", false).GetComponent<UIGrid>();
+		this.m_SelectedMaidPanelListViewer = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/Grid", false).GetComponent<uGUIListViewer>();
+		this.m_SelectedMaidPanelButtonAutoSelect = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/parent buttons/auto select", false).GetComponent<UIButton>();
+		this.m_SelectedMaidPanelButtonAllRelease = UTY.GetChildObject(base.root_obj, "SelectedMaidParent/parent buttons/all release", false).GetComponent<UIButton>();
+		NDebug.AssertNull(this.m_SelectedMaidPanelGrid);
+		NDebug.AssertNull(this.m_SelectedMaidPanelListViewer);
+		NDebug.AssertNull(this.m_SelectedMaidPanelButtonAutoSelect);
+		NDebug.AssertNull(this.m_SelectedMaidPanelButtonAllRelease);
+		this.m_SelectedMaidPanelParent.SetActive(false);
+	}
+
+	private void CreateSelectedMaidPanelOfLifeMode()
+	{
+		this.m_SelectedMaidPanelParent.SetActive(true);
+		GameObject gameObject = Utility.CreatePrefab(this.m_SelectedMaidPanelGrid.gameObject, "CharacterSelect/Prefab/MaidPlateSimple", true);
+		gameObject.SetActive(false);
+		this.m_SelectedMaidPanelListViewer.tempItem = gameObject;
+		this.m_SelectedMaidPanelListViewer.Show<MaidPlate>(20, delegate(int index, MaidPlate maidPlate)
+		{
+			maidPlate.gameObject.SetActive(false);
+			UIButton uibutton = UTY.GetChildObject(maidPlate.gameObject, "Button", false).AddComponent<UIButton>();
+			EventDelegate.Add(uibutton.onClick, delegate()
+			{
+				if (maidPlate.maid != null)
+				{
+					this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, false);
+				}
+			});
+		});
+		EventDelegate.Add(this.m_SelectedMaidPanelButtonAutoSelect.onClick, new EventDelegate.Callback(this.OnClickButtonMaidAutoSelect));
+		EventDelegate.Add(this.m_SelectedMaidPanelButtonAllRelease.onClick, new EventDelegate.Callback(this.chara_select_mgr_.SelectAllReleaseMaid));
+	}
+
+	private void UpdateSelectedMaidPanelOfLifeMode(Maid[] nowMaidSelectState)
+	{
+		bool flag = false;
+		int num = 0;
+		while (num < nowMaidSelectState.Length && num < this.m_SelectedMaidPanelListViewer.ItemArray.Length)
+		{
+			GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num];
+			MaidPlate component = gameObject.GetComponent<MaidPlate>();
+			Maid maid = nowMaidSelectState[num];
+			if (maid == null)
+			{
+				if (gameObject.activeSelf)
+				{
+					gameObject.SetActive(false);
+				}
+				component.SetMaidData(null);
+				flag = true;
+			}
+			else
+			{
+				if (!gameObject.activeSelf)
+				{
+					gameObject.SetActive(true);
+					component.transform.SetAsLastSibling();
+					flag = true;
+				}
+				if (maid != component.maid)
+				{
+					component.SetMaidData(maid);
+					component.transform.SetAsLastSibling();
+					flag = true;
+				}
+			}
+			num++;
+		}
+		if (flag)
+		{
+			this.m_SelectedMaidPanelGrid.Reposition();
+		}
+	}
+
+	private void OnClickButtonMaidAutoSelect()
+	{
+		int num = 0;
+		List<Maid> list = new List<Maid>();
+		List<MaidPlate> list2 = new List<MaidPlate>();
+		int num2 = 0;
+		while (num2 < this.m_SelectedMaidPanelListViewer.ItemArray.Length && num2 < this.chara_select_mgr_.select_max)
+		{
+			GameObject gameObject = this.m_SelectedMaidPanelListViewer.ItemArray[num2];
+			MaidPlate component = gameObject.GetComponent<MaidPlate>();
+			if (component.maid == null)
+			{
+				num++;
+			}
+			else
+			{
+				list.Add(component.maid);
+			}
+			num2++;
+		}
+		List<Transform> childList = this.chara_select_mgr_.MaidPlateParentGrid.GetChildList();
+		for (int i = 0; i < childList.Count; i++)
+		{
+			MaidPlate component2 = childList[i].GetComponent<MaidPlate>();
+			if (!list.Contains(component2.maid))
+			{
+				list2.Add(component2);
+			}
+		}
+		foreach (MaidPlate maidPlate in from maid in list2
+		orderby UnityEngine.Random.Range(0, 2)
+		select maid)
+		{
+			if (num-- <= 0)
+			{
+				break;
+			}
+			this.chara_select_mgr_.SetSelectStateMaid(maidPlate.maid, true);
+		}
+	}
+
 	private SceneCharacterSelect scene_chara_select_;
 
 	private Maid select_maid_;
@@ -753,6 +923,16 @@ public class CharacterSelectMain : WfScreenChildren
 
 	private FFNameDialog ovr_dance_cam_dlg_;
 
+	private GameObject m_SelectedMaidPanelParent;
+
+	private UIGrid m_SelectedMaidPanelGrid;
+
+	private uGUIListViewer m_SelectedMaidPanelListViewer;
+
+	private UIButton m_SelectedMaidPanelButtonAutoSelect;
+
+	private UIButton m_SelectedMaidPanelButtonAllRelease;
+
 	[CompilerGenerated]
 	private static CharacterSelectManager.CallBackMaidList <>f__mg$cache0;
 

+ 18 - 0
Assembly-CSharp/CharacterSelectManager.cs

@@ -310,6 +310,24 @@ public class CharacterSelectManager : MonoBehaviour
 		this.thumbnail_load_ = true;
 	}
 
+	public void SetSelectStateMaid(Maid maid, bool isSelect)
+	{
+		Transform transform = this.MaidPlateParentGrid.transform;
+		for (int i = 0; i < transform.childCount; i++)
+		{
+			MaidPlate component = transform.GetChild(i).GetComponent<MaidPlate>();
+			if (component.maid == maid)
+			{
+				UIWFSelectButton component2 = UTY.GetChildObject(component.gameObject, "Button", false).GetComponent<UIWFSelectButton>();
+				if (component2.isSelected != isSelect)
+				{
+					this.switch_panel_.Select(component2);
+				}
+				return;
+			}
+		}
+	}
+
 	public void UpdateMaidPlate(Maid maid)
 	{
 		Transform transform = this.MaidPlateParentGrid.transform;

+ 2 - 2
Assembly-CSharp/ControllerShortcutSettingData.cs

@@ -33,7 +33,7 @@ public static class ControllerShortcutSettingData
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1200;
+			this.m_nVersion = 1210;
 		}
 
 		public void OnAfterDeserialize()
@@ -261,7 +261,7 @@ public static class ControllerShortcutSettingData
 		private const string CONF_NAME = "OvrControllerShortcutConfig.json";
 
 		[SerializeField]
-		private int m_nVersion = 1200;
+		private int m_nVersion = 1210;
 
 		[SerializeField]
 		private bool IsDirectShortcutMode = true;

+ 0 - 571
Assembly-CSharp/CreativeRoomUIPlacementMaid.cs

@@ -1,571 +0,0 @@
-using System;
-using System.Collections;
-using System.Collections.Specialized;
-using UnityEngine;
-using UnityEngine.EventSystems;
-using UnityEngine.UI;
-
-public class CreativeRoomUIPlacementMaid : MonoBehaviour
-{
-	private Maid targetMaid
-	{
-		get
-		{
-			if (this.m_TargetMaid == null)
-			{
-				this.m_TargetMaid = this.GetMaid(true);
-				if (this.m_TargetMaid == null)
-				{
-					this.m_TargetMaid = this.GetMaid(false);
-				}
-				if (this.m_TargetMaid)
-				{
-					this.m_TargetMaid.body0.SetBoneHitHeightY(-1000f);
-				}
-			}
-			return this.m_TargetMaid;
-		}
-	}
-
-	private Maid GetMaid(bool searchLeader = true)
-	{
-		if (this.m_CharaMgr == null)
-		{
-			return null;
-		}
-		Maid maid = null;
-		foreach (Maid maid2 in this.m_CharaMgr.GetStockMaidList())
-		{
-			if (maid2 != null)
-			{
-				if (!searchLeader || maid2.status.leader)
-				{
-					maid = maid2;
-					break;
-				}
-			}
-		}
-		if (maid == null)
-		{
-			int maidCount = this.m_CharaMgr.GetMaidCount();
-			for (int i = 0; i < maidCount; i++)
-			{
-				Maid maid3 = this.m_CharaMgr.GetMaid(i);
-				if (maid3 != null)
-				{
-					if (!searchLeader || maid3.status.leader)
-					{
-						maid = maid3;
-						break;
-					}
-				}
-			}
-		}
-		return maid;
-	}
-
-	public float snapValuePosition
-	{
-		set
-		{
-			if (this.m_GizmoObject == null)
-			{
-				return;
-			}
-			this.m_GizmoObject.snapValuePosition = value;
-		}
-	}
-
-	private void Awake()
-	{
-		this.m_CharaMgr = GameMain.Instance.CharacterMgr;
-		GameObject gameObject;
-		if (!(gameObject = GameObject.Find("[CreativeRoomUI Placement Maid] GizmoControlObject")))
-		{
-			gameObject = new GameObject("[CreativeRoomUI Placement Maid] GizmoControlObject");
-			GizmoObject gizmoObject = gameObject.AddComponent<GizmoObject>();
-			gizmoObject.activeAxis = true;
-			gizmoObject.activeRot = false;
-			gizmoObject.snapValuePosition = 0.5f;
-			gizmoObject.snapValueAngles = 15f;
-			gizmoObject.snapValueScale = 0.1f;
-			gameObject.SetActive(false);
-		}
-		this.m_GizmoObject = gameObject.GetComponent<GizmoObject>();
-		GizmoObject gizmoObject2 = this.m_GizmoObject;
-		gizmoObject2.onChangePosition = (Action<Vector3>)Delegate.Combine(gizmoObject2.onChangePosition, new Action<Vector3>(this.OnUpdateGizmoPosition));
-		GizmoObject gizmoObject3 = this.m_GizmoObject;
-		gizmoObject3.onChangeRotation = (Action<Quaternion>)Delegate.Combine(gizmoObject3.onChangeRotation, new Action<Quaternion>(this.OnUpdateGizmoRotation));
-		GizmoObject gizmoObject4 = this.m_GizmoObject;
-		gizmoObject4.onChangeScale = (Action<Vector3>)Delegate.Combine(gizmoObject4.onChangeScale, new Action<Vector3>(this.OnUpdateGizmoScale));
-		this.SetUpUI();
-	}
-
-	private void SetUpUI()
-	{
-		this.m_CachedTransformDataDic = new StringDictionary();
-		this.m_InputFieldPosX.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldPosY.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldPosZ.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldRotX.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldRotY.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldRotZ.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldScale.contentType = InputField.ContentType.DecimalNumber;
-		this.m_InputFieldPosX.text = this.m_GizmoObject.position.x.ToString("f3");
-		this.m_InputFieldPosY.text = this.m_GizmoObject.position.y.ToString("f3");
-		this.m_InputFieldPosZ.text = this.m_GizmoObject.position.z.ToString("f3");
-		this.m_InputFieldRotX.text = this.m_GizmoObject.eulerAngles.x.ToString("f3");
-		this.m_InputFieldRotY.text = this.m_GizmoObject.eulerAngles.y.ToString("f3");
-		this.m_InputFieldRotZ.text = this.m_GizmoObject.eulerAngles.z.ToString("f3");
-		this.m_InputFieldScale.text = this.m_GizmoObject.scale.x.ToString("f3");
-		this.m_SliderScale.value = this.m_GizmoObject.scale.x;
-		Action<InputField, Action<float>, Action> action = delegate(InputField input, Action<float> act_change, Action act_end)
-		{
-			input.onValueChanged.AddListener(delegate(string str)
-			{
-				float obj;
-				if (float.TryParse(str, out obj))
-				{
-					act_change(obj);
-				}
-			});
-			input.onEndEdit.AddListener(delegate(string str)
-			{
-				act_end();
-			});
-		};
-		action(this.m_InputFieldPosX, delegate(float value)
-		{
-			Vector3 position = this.m_GizmoObject.position;
-			position.x = value;
-			this.m_GizmoObject.position = position;
-		}, delegate
-		{
-			this.m_InputFieldPosX.text = this.m_GizmoObject.position.x.ToString("f3");
-		});
-		action(this.m_InputFieldPosY, delegate(float value)
-		{
-			Vector3 position = this.m_GizmoObject.position;
-			position.y = value;
-			this.m_GizmoObject.position = position;
-		}, delegate
-		{
-			this.m_InputFieldPosY.text = this.m_GizmoObject.position.y.ToString("f3");
-		});
-		action(this.m_InputFieldPosZ, delegate(float value)
-		{
-			Vector3 position = this.m_GizmoObject.position;
-			position.z = value;
-			this.m_GizmoObject.position = position;
-		}, delegate
-		{
-			this.m_InputFieldPosZ.text = this.m_GizmoObject.position.z.ToString("f3");
-		});
-		action(this.m_InputFieldRotX, delegate(float value)
-		{
-			Vector3 eulerAngles = this.m_GizmoObject.eulerAngles;
-			eulerAngles.x = value;
-			this.m_GizmoObject.eulerAngles = eulerAngles;
-		}, delegate
-		{
-			this.m_InputFieldRotX.text = this.m_GizmoObject.eulerAngles.x.ToString("f3");
-		});
-		action(this.m_InputFieldRotY, delegate(float value)
-		{
-			Vector3 eulerAngles = this.m_GizmoObject.eulerAngles;
-			eulerAngles.y = value;
-			this.m_GizmoObject.eulerAngles = eulerAngles;
-		}, delegate
-		{
-			this.m_InputFieldRotY.text = this.m_GizmoObject.eulerAngles.y.ToString("f3");
-		});
-		action(this.m_InputFieldRotZ, delegate(float value)
-		{
-			Vector3 eulerAngles = this.m_GizmoObject.eulerAngles;
-			eulerAngles.z = value;
-			this.m_GizmoObject.eulerAngles = eulerAngles;
-		}, delegate
-		{
-			this.m_InputFieldRotZ.text = this.m_GizmoObject.eulerAngles.z.ToString("f3");
-		});
-		action(this.m_InputFieldScale, delegate(float value)
-		{
-			Vector3 scale = this.m_GizmoObject.scale;
-			value = Mathf.Clamp(value, this.m_SliderScale.minValue, this.m_SliderScale.maxValue);
-			if (Mathf.Approximately(scale.x, value))
-			{
-				return;
-			}
-			scale.x = (scale.y = (scale.z = value));
-			this.m_GizmoObject.scale = scale;
-			this.m_SliderScale.value = value;
-		}, delegate
-		{
-			this.m_InputFieldScale.text = this.m_GizmoObject.scale.x.ToString("f3");
-		});
-		this.m_SliderScale.onValueChanged.AddListener(delegate(float value)
-		{
-			if (Mathf.Approximately(this.m_GizmoObject.cachedSnapScale.x, value))
-			{
-				return;
-			}
-			this.m_GizmoObject.nonCallbackScale = Vector3.one * value;
-			float x = this.m_GizmoObject.cachedSnapScale.x;
-			this.m_SliderScale.value = x;
-			if (!this.m_InputFieldScale.isFocused)
-			{
-				this.m_InputFieldScale.text = x.ToString("f3");
-			}
-		});
-	}
-
-	private void Update()
-	{
-		if (this.targetMaid == null || !this.targetMaid.Visible)
-		{
-			this.m_GizmoObject.gameObject.SetActive(false);
-			return;
-		}
-		if (EventSystem.current != null)
-		{
-			if (NInput.GetMouseButtonDown(0))
-			{
-				GameObject currentSelectedGameObject = EventSystem.current.currentSelectedGameObject;
-				if (EventSystem.current.IsPointerOverGameObject() && currentSelectedGameObject && currentSelectedGameObject.GetComponent<RectTransform>())
-				{
-					this.m_GizmoObject.gameObject.SetActive(false);
-				}
-			}
-			else if (NInput.GetMouseButtonUp(0))
-			{
-				this.m_GizmoObject.gameObject.SetActive(true);
-			}
-		}
-	}
-
-	private void OnUpdateGizmoPosition(Vector3 position)
-	{
-		if (this.targetMaid != null)
-		{
-			this.targetMaid.transform.position = position;
-			if (!this.m_InputFieldPosX.isFocused)
-			{
-				this.m_InputFieldPosX.text = position.x.ToString("f3");
-			}
-			if (!this.m_InputFieldPosY.isFocused)
-			{
-				this.m_InputFieldPosY.text = position.y.ToString("f3");
-			}
-			if (!this.m_InputFieldPosZ.isFocused)
-			{
-				this.m_InputFieldPosZ.text = position.z.ToString("f3");
-			}
-		}
-	}
-
-	private void OnUpdateGizmoRotation(Quaternion rotation)
-	{
-		if (this.targetMaid != null)
-		{
-			this.targetMaid.transform.rotation = rotation;
-			Vector3 eulerAngles = rotation.eulerAngles;
-			if (!this.m_InputFieldRotX.isFocused)
-			{
-				this.m_InputFieldRotX.text = eulerAngles.x.ToString("f3");
-			}
-			if (!this.m_InputFieldRotY.isFocused)
-			{
-				this.m_InputFieldRotY.text = eulerAngles.y.ToString("f3");
-			}
-			if (!this.m_InputFieldRotZ.isFocused)
-			{
-				this.m_InputFieldRotZ.text = eulerAngles.z.ToString("f3");
-			}
-		}
-	}
-
-	private void OnUpdateGizmoScale(Vector3 scale)
-	{
-		if (this.targetMaid != null)
-		{
-			this.targetMaid.transform.localScale = scale;
-			if (!this.m_InputFieldScale.isFocused)
-			{
-				this.m_InputFieldScale.text = scale.x.ToString("f3");
-			}
-			this.m_SliderScale.value = scale.x;
-		}
-	}
-
-	public void ButtonEvent_GizmoEnableMove()
-	{
-		GizmoObject gizmoObject = this.m_GizmoObject;
-		gizmoObject.activeAxis = true;
-		gizmoObject.activeRot = false;
-	}
-
-	public void ButtonEvent_GizmoEnableRot()
-	{
-		GizmoObject gizmoObject = this.m_GizmoObject;
-		gizmoObject.activeAxis = false;
-		gizmoObject.activeRot = true;
-	}
-
-	public void ButtonEvent_GizmoDisable()
-	{
-		GizmoObject gizmoObject = this.m_GizmoObject;
-		gizmoObject.activeAxis = false;
-		gizmoObject.activeRot = false;
-	}
-
-	public void ButtonEvent_CopyPosition()
-	{
-		Vector3 position = this.m_GizmoObject.position;
-		string text = string.Format("{0},{1},{2}", position.x, position.y, position.z);
-		this.m_CachedTransformDataDic["position"] = text.ToString();
-	}
-
-	public void ButtonEvent_PastePosition()
-	{
-		string text = this.m_CachedTransformDataDic["position"];
-		if (string.IsNullOrEmpty(text))
-		{
-			Debug.Log("座標データはまだない");
-			return;
-		}
-		string[] array = text.Split(new char[]
-		{
-			','
-		});
-		if (array.Length != 3)
-		{
-			Debug.LogError("position の文字数が" + array.Length + "でした");
-			return;
-		}
-		this.m_GizmoObject.position = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]));
-	}
-
-	public void ButtonEvent_ResetPosition()
-	{
-		this.m_GizmoObject.position = Vector3.zero;
-	}
-
-	public void ButtonEvent_CopyRotation()
-	{
-		Quaternion rotation = this.m_GizmoObject.rotation;
-		string text = string.Format("{0},{1},{2},{3}", new object[]
-		{
-			rotation.x,
-			rotation.y,
-			rotation.z,
-			rotation.w
-		});
-		this.m_CachedTransformDataDic["rotation"] = text.ToString();
-	}
-
-	public void ButtonEvent_PasteRotation()
-	{
-		string text = this.m_CachedTransformDataDic["rotation"];
-		if (string.IsNullOrEmpty(text))
-		{
-			Debug.Log("回転データはまだない");
-			return;
-		}
-		string[] array = text.Split(new char[]
-		{
-			','
-		});
-		if (array.Length != 4)
-		{
-			Debug.LogError("rotation の文字数が" + array.Length + "でした");
-			return;
-		}
-		this.m_GizmoObject.rotation = new Quaternion(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]), float.Parse(array[3]));
-	}
-
-	public void ButtonEvent_ResetRotation()
-	{
-		this.m_GizmoObject.rotation = Quaternion.identity;
-	}
-
-	public void ButtonEvent_CopyScale()
-	{
-		Vector3 scale = this.m_GizmoObject.scale;
-		string text = string.Format("{0},{1},{2}", scale.x, scale.y, scale.z);
-		this.m_CachedTransformDataDic["scale"] = text.ToString();
-	}
-
-	public void ButtonEvent_PasteScale()
-	{
-		string text = this.m_CachedTransformDataDic["scale"];
-		if (string.IsNullOrEmpty(text))
-		{
-			Debug.Log("スケールデータはまだない");
-			return;
-		}
-		string[] array = text.Split(new char[]
-		{
-			','
-		});
-		if (array.Length != 3)
-		{
-			Debug.LogError("scale の文字数が" + array.Length + "でした");
-			return;
-		}
-		this.m_GizmoObject.scale = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]));
-	}
-
-	public void ButtonEvent_ResetScale()
-	{
-		this.m_GizmoObject.scale = Vector3.one;
-	}
-
-	public void ButtonEvent_CameraFocus()
-	{
-		Maid targetMaid = this.targetMaid;
-		if (!targetMaid)
-		{
-			return;
-		}
-		if (!targetMaid.Visible)
-		{
-			return;
-		}
-		Transform bone = targetMaid.body0.GetBone("Bip01 Head");
-		WfCameraMoveSupport wfCameraMoveSupport = base.GetComponent<WfCameraMoveSupport>();
-		if (wfCameraMoveSupport == null)
-		{
-			wfCameraMoveSupport = base.gameObject.AddComponent<WfCameraMoveSupport>();
-		}
-		Vector3 position = bone.position;
-		float distance = Mathf.Sqrt(5f) * 2f;
-		Vector2 aroundAngle = new Vector2(-135f, 45f);
-		wfCameraMoveSupport.StartCameraPosition(position, distance, aroundAngle);
-	}
-
-	public void ButtonEvent_VisibleMaid(bool isVisible)
-	{
-		if (this.m_CharaMgr.IsBusy())
-		{
-			return;
-		}
-		if (this.targetMaid == null)
-		{
-			return;
-		}
-		if (this.targetMaid.ActiveSlotNo == -1)
-		{
-			this.m_CharaMgr.SetActiveMaid(this.targetMaid, 0);
-			this.targetMaid.AllProcPropSeqStart();
-		}
-		this.targetMaid.Visible = isVisible;
-		if (isVisible && this.targetMaid.IsBusy)
-		{
-			uGUIUtility.SetActiveEventSystem(false);
-			GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
-			base.StartCoroutine(this.CorMaidLoad(this.targetMaid, new Action(this.OnMaidLoadEnd)));
-		}
-	}
-
-	public void ButtonEvent_ToggleSnap(bool isEnable)
-	{
-		if (this.m_GizmoObject)
-		{
-			if (isEnable)
-			{
-				this.m_GizmoObject.controlType = GizmoObject.ControlType.Snap;
-			}
-			else
-			{
-				this.m_GizmoObject.controlType = GizmoObject.ControlType.Default;
-			}
-		}
-	}
-
-	private IEnumerator CorMaidLoad(Maid targetMaid, Action actLoadEnd)
-	{
-		targetMaid.Visible = true;
-		while (targetMaid.IsBusy)
-		{
-			yield return null;
-		}
-		actLoadEnd();
-		yield break;
-	}
-
-	private void OnMaidLoadEnd()
-	{
-		GameMain.Instance.MainCamera.FadeIn(0.3f, false, null, true, true, default(Color));
-		this.targetMaid.CrossFade("maid_stand01.anm", false, true, false, 0.5f, 1f);
-		this.targetMaid.FaceAnime("通常", 0f, 0);
-		this.targetMaid.EyeToCamera(Maid.EyeMoveType.目と顔を向ける, 0f);
-		uGUIUtility.SetActiveEventSystem(true);
-	}
-
-	private void OnDisable()
-	{
-		if (this.m_GizmoObject)
-		{
-			this.m_GizmoObject.gameObject.SetActive(false);
-		}
-	}
-
-	private void OnEnable()
-	{
-		if (this.m_GizmoObject && this.targetMaid != null && this.targetMaid.Visible)
-		{
-			this.m_GizmoObject.gameObject.SetActive(true);
-		}
-	}
-
-	private void OnDestroy()
-	{
-		if (this.m_GizmoObject)
-		{
-			UnityEngine.Object.Destroy(this.m_GizmoObject);
-		}
-		if (this.targetMaid)
-		{
-			this.targetMaid.transform.position = Vector3.zero;
-			this.targetMaid.transform.rotation = Quaternion.identity;
-			this.targetMaid.transform.localScale = Vector3.one;
-			this.targetMaid.ResetAll();
-			this.targetMaid.Visible = false;
-		}
-	}
-
-	[Header("座標入力欄")]
-	[SerializeField]
-	private InputField m_InputFieldPosX;
-
-	[SerializeField]
-	private InputField m_InputFieldPosY;
-
-	[SerializeField]
-	private InputField m_InputFieldPosZ;
-
-	[Header("回転入力欄")]
-	[SerializeField]
-	private InputField m_InputFieldRotX;
-
-	[SerializeField]
-	private InputField m_InputFieldRotY;
-
-	[SerializeField]
-	private InputField m_InputFieldRotZ;
-
-	[Header("スケール入力欄")]
-	[SerializeField]
-	private InputField m_InputFieldScale;
-
-	[SerializeField]
-	private Slider m_SliderScale;
-
-	private CharacterMgr m_CharaMgr;
-
-	private GizmoObject m_GizmoObject;
-
-	private Maid m_TargetMaid;
-
-	private StringDictionary m_CachedTransformDataDic;
-}

+ 8 - 0
Assembly-CSharp/DailyCtrl.cs

@@ -143,6 +143,14 @@ public class DailyCtrl : MonoBehaviour
 		StatusViewer component = UTY.GetChildObject(this.m_goPanel, "StatusViewer", false).GetComponent<StatusViewer>();
 		component.isEnabledClubNameChangeButton = true;
 		component.isEnabledMainBusinessChangeButton = false;
+		if (PluginData.IsEnabled("GP001") && daily == DailyMgr.Daily.Daytime && !DailyMgr.IsLegacy)
+		{
+			component.isEnabledGameModeChangeButton = true;
+		}
+		else
+		{
+			component.isEnabledGameModeChangeButton = false;
+		}
 	}
 
 	public DailyCtrl.ButtonData GetMenuButton(DailyCtrl.ButtonType type)

+ 2 - 0
Assembly-CSharp/DailyMgr.cs

@@ -78,6 +78,7 @@ public class DailyMgr : BaseCreatePanel
 		GameMain.Instance.FacilityMgr.ClearCacheFacilityPowerUpResult();
 		Debug.Log("メイドによる施設強化のキャッシュをクリアしました。");
 		this.m_api.SetupTutorial();
+		GameMain.Instance.LifeModeMgr.OnTimeZoneChanged();
 		if (!DailyMgr.IsLegacy)
 		{
 			GameMain.Instance.CharacterMgr.status.CheckTrophyMainMenu();
@@ -93,6 +94,7 @@ public class DailyMgr : BaseCreatePanel
 		GameMain.Instance.FacilityMgr.ClearCacheFacilityPowerUpResult();
 		Debug.Log("メイドによる施設強化のキャッシュをクリアしました。");
 		this.m_api.SetupTutorial();
+		GameMain.Instance.LifeModeMgr.OnTimeZoneChanged();
 		if (!DailyMgr.IsLegacy)
 		{
 			GameMain.Instance.CharacterMgr.status.CheckTrophyMainMenu();

+ 1 - 1
Assembly-CSharp/DeskManager.cs

@@ -143,7 +143,7 @@ internal class DeskManager
 	public static void SerializeSingleSaveData(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_DeskCustomize");
-		binary.Write(1200);
+		binary.Write(1210);
 		binary.Write(DeskManager.item_inst_data_.Count);
 		for (int i = 0; i < DeskManager.item_inst_data_.Count; i++)
 		{

+ 3 - 3
Assembly-CSharp/DynamicBone.cs

@@ -30,7 +30,7 @@ public class DynamicBone : MonoBehaviour
 			return false;
 		};
 		f_bw.Write("CM3D21_PHY");
-		f_bw.Write(1200);
+		f_bw.Write(1210);
 		if (this.m_Root == null)
 		{
 			NDebug.MessageBox("エラー", "×物理ルートボーンが設定されていません。");
@@ -94,7 +94,7 @@ public class DynamicBone : MonoBehaviour
 	public bool SerializeWriteCollider(BinaryWriter f_bw, string f_strFileName)
 	{
 		f_bw.Write("CM3D21_COL");
-		f_bw.Write(1200);
+		f_bw.Write(1210);
 		if (this.m_Colliders == null || this.m_Colliders.Count == 0)
 		{
 			NDebug.MessageBox("エラー", "×物理Collidersは空です。");
@@ -110,7 +110,7 @@ public class DynamicBone : MonoBehaviour
 			else
 			{
 				f_bw.Write(this.m_Colliders[i].TypeName);
-				this.m_Colliders[i].Serialize(f_bw, 1200);
+				this.m_Colliders[i].Serialize(f_bw, 1210);
 			}
 		}
 		this.m_ColliderFileName = f_strFileName;

+ 1 - 1
Assembly-CSharp/DynamicSkirtBone.cs

@@ -18,7 +18,7 @@ public class DynamicSkirtBone : MonoBehaviour
 	public bool SerializeWrite(BinaryWriter f_bw)
 	{
 		f_bw.Write("CM3D21_PSK");
-		f_bw.Write(1200);
+		f_bw.Write(1210);
 		f_bw.Write(this.m_fPanierRadius);
 		this.SerializeWriteAnimationCurve(f_bw, this.m_PanierRadiusDistrib);
 		int num = (this.m_PanierRadiusDistribGroup == null) ? 0 : this.m_PanierRadiusDistribGroup.Length;

+ 1 - 1
Assembly-CSharp/EditMod.cs

@@ -265,7 +265,7 @@ public class EditMod : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MOD");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		binaryWriter.Write(value);
 		binaryWriter.Write(text2.ToLower());
 		binaryWriter.Write(value2);

+ 362 - 0
Assembly-CSharp/EmpireLifeModeAPI.cs

@@ -0,0 +1,362 @@
+using System;
+using System.Collections.Generic;
+using MaidStatus;
+using UnityEngine;
+using wf;
+
+public static class EmpireLifeModeAPI
+{
+	public static int GetPriorityScenarioType(EmpireLifeModeData.ScenarioType scenarioType)
+	{
+		return EmpireLifeModeAPI.m_ScenarioTypePriorityDic[scenarioType];
+	}
+
+	private static void CreateScenarioTypeIconDic()
+	{
+		if (EmpireLifeModeAPI.m_ScenarioTypeIconDic != null && EmpireLifeModeAPI.m_ScenarioTypeIconDic.Count > 0)
+		{
+			return;
+		}
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic = new Dictionary<EmpireLifeModeData.ScenarioType, Texture2D>();
+		Func<string, Texture2D> func = delegate(string strFileName)
+		{
+			if (GameUty.FileSystem.IsExistentFile(strFileName + ".tex"))
+			{
+				return ImportCM.CreateTexture(strFileName + ".tex");
+			}
+			return null;
+		};
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic.Add(EmpireLifeModeData.ScenarioType.一般, func("life_mode_event_icon_general"));
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic.Add(EmpireLifeModeData.ScenarioType.汎用, func("life_mode_event_icon_universal"));
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic.Add(EmpireLifeModeData.ScenarioType.スト\u30FCリ\u30FC, func("life_mode_event_icon_story"));
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic.Add(EmpireLifeModeData.ScenarioType.Hシ\u30FCン, func("life_mode_event_icon_hentai"));
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic.Add(EmpireLifeModeData.ScenarioType.セクハラ, func("life_mode_event_icon_sexual_harassment"));
+	}
+
+	public static Texture2D GetIconScenarioType(EmpireLifeModeData.ScenarioType scenarioType)
+	{
+		EmpireLifeModeAPI.CreateScenarioTypeIconDic();
+		return EmpireLifeModeAPI.m_ScenarioTypeIconDic[scenarioType];
+	}
+
+	public static void DestroyScenarioTypeIconDic()
+	{
+		if (EmpireLifeModeAPI.m_ScenarioTypeIconDic == null)
+		{
+			return;
+		}
+		Dictionary<EmpireLifeModeData.ScenarioType, Texture2D>.ValueCollection values = EmpireLifeModeAPI.m_ScenarioTypeIconDic.Values;
+		using (Dictionary<EmpireLifeModeData.ScenarioType, Texture2D>.ValueCollection.Enumerator enumerator = values.GetEnumerator())
+		{
+			while (enumerator.MoveNext())
+			{
+				if (enumerator.Current != null)
+				{
+					UnityEngine.Object.DestroyImmediate(enumerator.Current);
+				}
+			}
+		}
+		EmpireLifeModeAPI.m_ScenarioTypeIconDic.Clear();
+	}
+
+	public static List<string> GetEnabledFacilityUniqueNameList()
+	{
+		if (EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList == null || EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Count <= 0)
+		{
+			EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList = new List<string>();
+			foreach (EmpireLifeModeData.Data data in EmpireLifeModeData.GetAllDatas(true))
+			{
+				foreach (string item in data.dataFacilityUniqueNameArray)
+				{
+					if (!EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Contains(item))
+					{
+						EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList.Add(item);
+					}
+				}
+			}
+		}
+		return new List<string>(EmpireLifeModeAPI.m_EnabledFacilityUniqueNameList);
+	}
+
+	public static List<Facility> GetEnabledFacilityList()
+	{
+		List<string> enabledFacilityUniqueNameList = EmpireLifeModeAPI.GetEnabledFacilityUniqueNameList();
+		List<Facility> list = new List<Facility>();
+		foreach (Facility facility in GameMain.Instance.FacilityMgr.GetFacilityArray())
+		{
+			if (!(facility == null))
+			{
+				if (enabledFacilityUniqueNameList.Contains(facility.defaultData.name))
+				{
+					list.Add(facility);
+				}
+			}
+		}
+		return list;
+	}
+
+	public static int GetMaxMaidCount()
+	{
+		int num = 0;
+		int num2 = 0;
+		foreach (Facility facility in EmpireLifeModeAPI.GetEnabledFacilityList())
+		{
+			FacilityDataTable.FacilityDefaultData defaultData = facility.defaultData;
+			if (defaultData.isDefaultPlace)
+			{
+				num++;
+			}
+			else
+			{
+				num2++;
+			}
+		}
+		return num * 2 + num2 + 2 * (num2 / 5);
+	}
+
+	public static List<Maid> SelectionMaidList(IEnumerable<Maid> maidList)
+	{
+		List<Maid> list = new List<Maid>();
+		foreach (Maid maid in maidList)
+		{
+			if (!(maid == null))
+			{
+				if (maid.status.heroineType != HeroineType.Sub)
+				{
+					list.Add(maid);
+				}
+			}
+		}
+		return list;
+	}
+
+	public static int GetPriorityScenarioType(this EmpireLifeModeData.Data data)
+	{
+		return EmpireLifeModeAPI.GetPriorityScenarioType(data.dataScenarioType);
+	}
+
+	public static List<Maid> GetCorrectMaidList(this EmpireLifeModeData.Data data, IEnumerable<Maid> maidList)
+	{
+		List<Maid> list = new List<Maid>();
+		foreach (Maid maid in maidList)
+		{
+			if (data.IsCorrectMaid(maid))
+			{
+				list.Add(maid);
+			}
+		}
+		return list;
+	}
+
+	public static List<Facility> GetCorrectFacilityList(this EmpireLifeModeData.Data data)
+	{
+		List<Facility> list = new List<Facility>();
+		foreach (Facility facility in EmpireLifeModeAPI.GetEnabledFacilityList())
+		{
+			foreach (string b in data.dataFacilityUniqueNameArray)
+			{
+				if (facility.defaultData.name == b)
+				{
+					list.Add(facility);
+					break;
+				}
+			}
+		}
+		return list;
+	}
+
+	public static bool IsCorrectMaid(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		return data.IsCorrectMaidMainCharaOnly(maid) && data.IsCorrectMaidSeikeiken(maid) && data.IsCorrectMaidPersonalType(maid) && data.IsCorrectMaidFlag(maid) && data.IsCorrectMaidStatus(maid) && data.IsCorrectMaidExecuteCount(maid);
+	}
+
+	public static bool IsCorrectUniqueComparisonObject(this EmpireLifeModeData.Data data)
+	{
+		return data.IsCorrectNTRBlock() && data.IsCorrectTimeZone() && data.IsCorrectPlayerFlag();
+	}
+
+	public static bool IsCorrectScenarioType(this EmpireLifeModeData.Data data, EmpireLifeModeData.ScenarioType scenarioType)
+	{
+		return data.dataScenarioType == scenarioType;
+	}
+
+	public static bool IsCorrectScenarioAnyNumberPlay(this EmpireLifeModeData.Data data)
+	{
+		Debug.LogWarning("未実装:シナリオを再生したかどうかのフラグは、まだゲーム内で保存されない。");
+		return true;
+	}
+
+	public static bool IsCorrectNTRBlock(this EmpireLifeModeData.Data data)
+	{
+		return data.IsCorrectNTRBlock(GameMain.Instance.CharacterMgr.status.lockNTRPlay);
+	}
+
+	public static bool IsCorrectNTRBlock(this EmpireLifeModeData.Data data, bool NowNTRBlockingFlag)
+	{
+		if (data.dataNTRBlock == null)
+		{
+			return true;
+		}
+		if (NowNTRBlockingFlag)
+		{
+			return data.dataNTRBlock.Value;
+		}
+		return !data.dataNTRBlock.Value;
+	}
+
+	public static bool IsCorrectFacility(this EmpireLifeModeData.Data data, string facilityUniqueName)
+	{
+		foreach (string a in data.dataFacilityUniqueNameArray)
+		{
+			if (a == facilityUniqueName)
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public static bool IsCorrectTimeZone(this EmpireLifeModeData.Data data)
+	{
+		if (data.dataTimeZone == null)
+		{
+			return true;
+		}
+		ScheduleMgr.ScheduleTime nowTimeZone = (!GameMain.Instance.CharacterMgr.status.isDaytime) ? ScheduleMgr.ScheduleTime.Night : ScheduleMgr.ScheduleTime.DayTime;
+		return data.IsCorrectTimeZone(nowTimeZone);
+	}
+
+	public static bool IsCorrectTimeZone(this EmpireLifeModeData.Data data, ScheduleMgr.ScheduleTime nowTimeZone)
+	{
+		return data.dataTimeZone == null || nowTimeZone == data.dataTimeZone.Value;
+	}
+
+	public static bool IsCorrectPlayerFlag(this EmpireLifeModeData.Data data)
+	{
+		if (data.dataFlagPlayer == null)
+		{
+			return true;
+		}
+		foreach (KeyValuePair<string, int> keyValuePair in data.dataFlagPlayer)
+		{
+			if (GameMain.Instance.CharacterMgr.status.GetFlag(keyValuePair.Key) != keyValuePair.Value)
+			{
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public static bool IsCorrectMaidFlag(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		if (data.dataFlagMaid == null)
+		{
+			return true;
+		}
+		foreach (KeyValuePair<string, int> keyValuePair in data.dataFlagMaid)
+		{
+			if (maid.status.GetFlag(keyValuePair.Key) != keyValuePair.Value)
+			{
+				return false;
+			}
+		}
+		return true;
+	}
+
+	public static bool IsCorrectMaidPersonalType(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		foreach (KeyValuePair<int, string> keyValuePair in data.dataMaidPersonalUniqueNameAndActiveSlotDic)
+		{
+			string value = keyValuePair.Value;
+			if (value == maid.status.personal.uniqueName)
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public static bool IsCorrectMaidMainCharaOnly(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		return data.dataMaidMainCharaOnly == null || maid.status.mainChara == data.dataMaidMainCharaOnly;
+	}
+
+	public static bool IsCorrectContract(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		return data.IsCorrectContract(maid.status.contract);
+	}
+
+	public static bool IsCorrectContract(this EmpireLifeModeData.Data data, Contract contract)
+	{
+		return data.dataMaidContract == null || data.dataMaidContract == contract;
+	}
+
+	public static bool IsCorrectRelation(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		return data.IsCorrectRelation(maid.status.relation);
+	}
+
+	public static bool IsCorrectRelation(this EmpireLifeModeData.Data data, Relation relation)
+	{
+		return data.dataMaidRelation == null || data.dataMaidRelation == relation;
+	}
+
+	public static bool IsCorrectMaidStatus(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		return data.dataMaidStatus == null || data.dataMaidStatus.GreaterThanOrEqualToStatus(maid.status);
+	}
+
+	public static bool IsCorrectMaidSeikeiken(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		if (data.dataMaidSeikeiken == null)
+		{
+			return true;
+		}
+		foreach (Seikeiken seikeiken in data.dataMaidSeikeiken)
+		{
+			if (seikeiken == maid.status.seikeiken)
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+
+	public static bool IsCorrectMaidExecuteCount(this EmpireLifeModeData.Data data, Maid maid)
+	{
+		if (data.dataScenarioType != EmpireLifeModeData.ScenarioType.一般)
+		{
+			return true;
+		}
+		int maidScenarioExecuteCount = GameMain.Instance.LifeModeMgr.GetMaidScenarioExecuteCount(data.ID, maid);
+		return maidScenarioExecuteCount <= 0;
+	}
+
+	private static ReadOnlyDictionary<EmpireLifeModeData.ScenarioType, int> m_ScenarioTypePriorityDic = new ReadOnlyDictionary<EmpireLifeModeData.ScenarioType, int>(new Dictionary<EmpireLifeModeData.ScenarioType, int>
+	{
+		{
+			EmpireLifeModeData.ScenarioType.スト\u30FCリ\u30FC,
+			4
+		},
+		{
+			EmpireLifeModeData.ScenarioType.一般,
+			3
+		},
+		{
+			EmpireLifeModeData.ScenarioType.Hシ\u30FCン,
+			2
+		},
+		{
+			EmpireLifeModeData.ScenarioType.セクハラ,
+			2
+		},
+		{
+			EmpireLifeModeData.ScenarioType.汎用,
+			1
+		}
+	});
+
+	private static Dictionary<EmpireLifeModeData.ScenarioType, Texture2D> m_ScenarioTypeIconDic = null;
+
+	private static List<string> m_EnabledFacilityUniqueNameList;
+}

+ 602 - 0
Assembly-CSharp/EmpireLifeModeData.cs

@@ -0,0 +1,602 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using MaidStatus;
+using wf;
+
+public static class EmpireLifeModeData
+{
+	public static int Count
+	{
+		get
+		{
+			EmpireLifeModeData.CreateData();
+			return EmpireLifeModeData.commonIdManager.idMap.Count;
+		}
+	}
+
+	public static bool Contains(int id)
+	{
+		EmpireLifeModeData.CreateData();
+		return EmpireLifeModeData.commonIdManager.idMap.ContainsKey(id);
+	}
+
+	public static int uniqueNameToId(string name)
+	{
+		EmpireLifeModeData.CreateData();
+		NDebug.Assert(EmpireLifeModeData.commonIdManager.nameMap.ContainsKey(name), "エンパイアライフモード.csv\nユニーク名[" + name + "]をIDに変換できませんでした");
+		return EmpireLifeModeData.commonIdManager.nameMap[name];
+	}
+
+	public static string IdToUniqueName(int id)
+	{
+		EmpireLifeModeData.CreateData();
+		NDebug.Assert(EmpireLifeModeData.commonIdManager.idMap.ContainsKey(id), "エンパイアライフモード.csv\nID[" + id + "]をユニーク名に変換できませんでした");
+		return EmpireLifeModeData.commonIdManager.idMap[id].Key;
+	}
+
+	public static EmpireLifeModeData.Data GetData(int id)
+	{
+		EmpireLifeModeData.CreateData();
+		NDebug.Assert(EmpireLifeModeData.basicDatas.ContainsKey(id), "エンパイアライフモード.csv\nID[" + id + "]のデータは存在しません");
+		return EmpireLifeModeData.basicDatas[id];
+	}
+
+	public static EmpireLifeModeData.Data GetData(string uniqueName)
+	{
+		return EmpireLifeModeData.GetData(EmpireLifeModeData.uniqueNameToId(uniqueName));
+	}
+
+	public static bool IsEnabled(int id)
+	{
+		EmpireLifeModeData.CreateData();
+		return EmpireLifeModeData.commonIdManager.enabledIdList.Contains(id);
+	}
+
+	public static bool IsEnabled(string uniqueName)
+	{
+		EmpireLifeModeData.CreateData();
+		return EmpireLifeModeData.commonIdManager.enabledIdList.Contains(EmpireLifeModeData.uniqueNameToId(uniqueName));
+	}
+
+	public static List<EmpireLifeModeData.Data> GetAllDatas(bool onlyEnabled)
+	{
+		EmpireLifeModeData.CreateData();
+		List<EmpireLifeModeData.Data> list = new List<EmpireLifeModeData.Data>();
+		foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in EmpireLifeModeData.commonIdManager.idMap)
+		{
+			if (!onlyEnabled || EmpireLifeModeData.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
+			{
+				list.Add(EmpireLifeModeData.basicDatas[keyValuePair.Key]);
+			}
+		}
+		return list;
+	}
+
+	public static List<EmpireLifeModeData.Data> GetDatas(Func<EmpireLifeModeData.Data, bool> customCheckFunction, bool isOnlyEnabled = true)
+	{
+		EmpireLifeModeData.CreateData();
+		List<EmpireLifeModeData.Data> list = new List<EmpireLifeModeData.Data>();
+		foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in EmpireLifeModeData.commonIdManager.idMap)
+		{
+			if (!isOnlyEnabled || EmpireLifeModeData.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
+			{
+				EmpireLifeModeData.Data data = EmpireLifeModeData.basicDatas[keyValuePair.Key];
+				if (customCheckFunction(data))
+				{
+					list.Add(data);
+				}
+			}
+		}
+		return list;
+	}
+
+	public static void CreateData()
+	{
+		if (EmpireLifeModeData.commonIdManager != null)
+		{
+			return;
+		}
+		EmpireLifeModeData.commonIdManager = new CsvCommonIdManager("empire_life_mode", "エンパイアライフモード.csv", CsvCommonIdManager.Type.IdAndUniqueName, null);
+		EmpireLifeModeData.basicDatas = new Dictionary<int, EmpireLifeModeData.Data>();
+		string[] array = new string[]
+		{
+			"list"
+		};
+		KeyValuePair<AFileBase, CsvParser>[] array2 = new KeyValuePair<AFileBase, CsvParser>[array.Length];
+		for (int i = 0; i < array2.Length; i++)
+		{
+			string text = "empire_life_mode_" + array[i] + ".nei";
+			AFileBase afileBase = GameUty.FileSystem.FileOpen(text);
+			CsvParser csvParser = new CsvParser();
+			bool condition = csvParser.Open(afileBase);
+			NDebug.Assert(condition, text + "\nopen failed.");
+			array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
+		}
+		foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in EmpireLifeModeData.commonIdManager.idMap)
+		{
+			int key = keyValuePair.Key;
+			EmpireLifeModeData.Data value = new EmpireLifeModeData.Data(key, array2[0].Value);
+			EmpireLifeModeData.basicDatas.Add(key, value);
+		}
+		foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair2 in array2)
+		{
+			keyValuePair2.Value.Dispose();
+			keyValuePair2.Key.Dispose();
+		}
+	}
+
+	public static void Clear()
+	{
+		if (EmpireLifeModeData.commonIdManager != null)
+		{
+			EmpireLifeModeData.commonIdManager = null;
+		}
+	}
+
+	private const string csvTopCommonName = "empire_life_mode";
+
+	private const string typeNameForErrorLog = "エンパイアライフモード.csv";
+
+	private static CsvCommonIdManager commonIdManager;
+
+	private static Dictionary<int, EmpireLifeModeData.Data> basicDatas;
+
+	public enum ScenarioType
+	{
+		一般,
+		汎用,
+		スト\u30FCリ\u30FC,
+		Hシ\u30FCン,
+		セクハラ
+	}
+
+	public class Data
+	{
+		public Data(int uniqueID, CsvParser csv)
+		{
+			for (int i = 1; i < csv.max_cell_y; i++)
+			{
+				if (csv.IsCellToExistData(0, i) && csv.GetCellAsInteger(0, i) == uniqueID)
+				{
+					string text = (i + 1).ToString() + "行目";
+					int num = 1;
+					this.ID = uniqueID;
+					this.strUniqueName = csv.GetCellAsString(num++, i);
+					this.rawDataScenarioType = csv.GetCellAsString(num++, i);
+					this.rawDataScenarioAnyNumberPlay = csv.GetCellAsString(num++, i);
+					this.rawDataScenarioFileName = csv.GetCellAsString(num++, i);
+					this.rawDataScenarioFileLabel = csv.GetCellAsString(num++, i);
+					this.rawDataNTRBlock = csv.GetCellAsString(num++, i);
+					this.rawDataFacilityUniqueName = csv.GetCellAsString(num++, i);
+					this.rawDataFacilityCostumeChange = csv.GetCellAsString(num++, i);
+					this.rawDataTimeZone = csv.GetCellAsString(num++, i);
+					this.rawDataFlagPlayer = csv.GetCellAsString(num++, i);
+					this.rawDataFlagMaid = csv.GetCellAsString(num++, i);
+					this.rawDataMaidPersonalTypeSlot0 = csv.GetCellAsString(num++, i);
+					this.rawDataMaidPersonalTypeSlot1 = csv.GetCellAsString(num++, i);
+					this.rawDataMaidPersonalTypeSlot2 = csv.GetCellAsString(num++, i);
+					this.rawDataMaidMainCharaOnly = csv.GetCellAsString(num++, i);
+					this.rawDataMaidContract = csv.GetCellAsString(num++, i);
+					this.rawDataMaidRelation = csv.GetCellAsString(num++, i);
+					this.rawDataMaidStatus = csv.GetCellAsString(num++, i);
+					this.rawDataMaidSeikeikenNoNo = csv.GetCellAsString(num++, i);
+					this.rawDataMaidSeikeikenYesNo = csv.GetCellAsString(num++, i);
+					this.rawDataMaidSeikeikenNoYes = csv.GetCellAsString(num++, i);
+					this.rawDataMaidSeikeikenYesYes = csv.GetCellAsString(num++, i);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioType), "エンパイアライフモード.csv\n項目「種類」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioAnyNumberPlay), "エンパイアライフモード.csv\n項目「何度でも再生できるか」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioFileName), "エンパイアライフモード.csv\n項目「シナリオファイル」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataFacilityUniqueName), "エンパイアライフモード.csv\n項目「施設」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataFacilityCostumeChange), "エンパイアライフモード.csv\n項目「施設コスチュームの適用」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot0 + this.rawDataMaidPersonalTypeSlot1 + this.rawDataMaidPersonalTypeSlot2), "エンパイアライフモード.csv\n項目「メイド性格」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenNoNo), "エンパイアライフモード.csv\n項目「経験無し」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenYesNo), "エンパイアライフモード.csv\n項目「前穴」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenNoYes), "エンパイアライフモード.csv\n項目「後ろ穴」が指定されていません。\n\n表:" + text);
+					NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenYesYes), "エンパイアライフモード.csv\n項目「両方」が指定されていません。\n\n表:" + text);
+					try
+					{
+						this.dataScenarioType = (EmpireLifeModeData.ScenarioType)Enum.Parse(typeof(EmpireLifeModeData.ScenarioType), this.rawDataScenarioType);
+					}
+					catch (Exception ex)
+					{
+						NDebug.Assert("エンパイアライフモード.csv\n項目「種類」の変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataScenarioType, false);
+					}
+					if (this.rawDataScenarioAnyNumberPlay == "○" || this.rawDataScenarioAnyNumberPlay == "◯")
+					{
+						this.dataScenarioAnyNumberPlay = true;
+					}
+					else if (this.rawDataScenarioAnyNumberPlay == "×")
+					{
+						this.dataScenarioAnyNumberPlay = false;
+					}
+					else
+					{
+						NDebug.Assert("エンパイアライフモード.csv\n項目「何度でも再生できるか」に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataScenarioAnyNumberPlay, false);
+					}
+					this.dataScenarioFileName = Path.ChangeExtension(this.rawDataScenarioFileName, ".ks");
+					if (string.IsNullOrEmpty(this.rawDataScenarioFileLabel))
+					{
+						this.dataScenarioFileLabel = "*top";
+					}
+					else
+					{
+						this.dataScenarioFileLabel = ((this.rawDataScenarioFileLabel.IndexOf("*") >= 0) ? this.rawDataScenarioFileLabel : ("*" + this.rawDataScenarioFileLabel));
+					}
+					if (string.IsNullOrEmpty(this.rawDataNTRBlock))
+					{
+						this.dataNTRBlock = null;
+					}
+					else if (this.rawDataNTRBlock == "○" || this.rawDataNTRBlock == "◯")
+					{
+						this.dataNTRBlock = new bool?(true);
+					}
+					else if (this.rawDataNTRBlock == "×")
+					{
+						this.dataNTRBlock = new bool?(false);
+					}
+					else
+					{
+						NDebug.Assert("エンパイアライフモード.csv\n項目「NTRブロック」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataNTRBlock, false);
+					}
+					this.dataFacilityUniqueNameArray = this.rawDataFacilityUniqueName.Split(new char[]
+					{
+						','
+					});
+					for (int j = 0; j < this.dataFacilityUniqueNameArray.Length; j++)
+					{
+						string text2 = this.dataFacilityUniqueNameArray[j] = this.dataFacilityUniqueNameArray[j].Trim();
+						NDebug.Assert(FacilityDataTable.GetFacilityDefaultData(text2, true) != null, "エンパイアライフモード.csv\n項目「施設」の値「" + text2 + "」は正しくない情報です。\n\n表:" + text);
+					}
+					if (this.rawDataFacilityCostumeChange == "○" || this.rawDataFacilityCostumeChange == "◯")
+					{
+						this.dataFacilityCostumeChange = true;
+					}
+					else if (this.rawDataFacilityCostumeChange == "×")
+					{
+						this.dataFacilityCostumeChange = false;
+					}
+					else
+					{
+						NDebug.Assert("エンパイアライフモード.csv\n項目「施設コスチュームの適用」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataFacilityCostumeChange, false);
+					}
+					if (string.IsNullOrEmpty(this.rawDataTimeZone))
+					{
+						this.dataTimeZone = null;
+					}
+					else if (this.rawDataTimeZone == "昼")
+					{
+						this.dataTimeZone = new ScheduleMgr.ScheduleTime?(ScheduleMgr.ScheduleTime.DayTime);
+					}
+					else if (this.rawDataTimeZone == "夜")
+					{
+						this.dataTimeZone = new ScheduleMgr.ScheduleTime?(ScheduleMgr.ScheduleTime.Night);
+					}
+					else
+					{
+						NDebug.Assert("エンパイアライフモード.csv\n項目「時間帯」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataTimeZone, false);
+					}
+					if (string.IsNullOrEmpty(this.rawDataFlagPlayer))
+					{
+						this.dataFlagPlayer = null;
+					}
+					else
+					{
+						this.dataFlagPlayer = new Dictionary<string, int>();
+						foreach (string text3 in this.rawDataFlagPlayer.Split(new char[]
+						{
+							','
+						}))
+						{
+							string[] array2 = text3.Split(new char[]
+							{
+								':'
+							});
+							NDebug.Assert(array2.Length == 2, "エンパイアライフモード.csv\n項目「プレイヤーフラグ」の書式に問題がありました。\n\n表:" + text + "\n値:" + text3);
+							NDebug.Assert(!this.dataFlagPlayer.ContainsKey(array2[0]), "エンパイアライフモード.csv\n項目「プレイヤーフラグ」で、フラグ名が重複しました。\n\n表:" + text + "\nフラグ名:" + array2[0]);
+							int value;
+							if (!int.TryParse(array2[1], out value))
+							{
+								NDebug.Assert("エンパイアライフモード.csv\n項目「プレイヤーフラグ」で、フラグの値を整数値に変換できませんでした。\n\n表:" + text + "\n値: " + text3, false);
+							}
+							this.dataFlagPlayer.Add(array2[0], value);
+						}
+					}
+					if (string.IsNullOrEmpty(this.rawDataFlagMaid))
+					{
+						this.dataFlagMaid = null;
+					}
+					else
+					{
+						this.dataFlagMaid = new Dictionary<string, int>();
+						foreach (string text4 in this.rawDataFlagMaid.Split(new char[]
+						{
+							','
+						}))
+						{
+							string[] array4 = text4.Split(new char[]
+							{
+								':'
+							});
+							NDebug.Assert(array4.Length == 2, "エンパイアライフモード.csv\n項目「メイドフラグ」の書式に問題がありました。\n\n表:" + text + "\n値:" + text4);
+							NDebug.Assert(!this.dataFlagMaid.ContainsKey(array4[0]), "エンパイアライフモード.csv\n項目「メイドフラグ」で、フラグ名が重複しました。\n\n表:" + text + "\nフラグ名:" + array4[0]);
+							int value2;
+							if (!int.TryParse(array4[1], out value2))
+							{
+								NDebug.Assert("エンパイアライフモード.csv\n項目「メイドフラグ」で、フラグの値を整数値に変換できませんでした。\n\n表:" + text + "\n値: " + text4, false);
+							}
+							this.dataFlagMaid.Add(array4[0], value2);
+						}
+					}
+					this.dataMaidPersonalUniqueNameAndActiveSlotDic = new Dictionary<int, string>();
+					if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot0))
+					{
+						string value3;
+						if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot0, out value3))
+						{
+							NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot0, false);
+						}
+						this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(0, value3);
+					}
+					if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot1))
+					{
+						string value4;
+						if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot1, out value4))
+						{
+							NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot1, false);
+						}
+						this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(1, value4);
+					}
+					if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot2))
+					{
+						string value5;
+						if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot2, out value5))
+						{
+							NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot2, false);
+						}
+						this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(2, value5);
+					}
+					if (string.IsNullOrEmpty(this.rawDataMaidMainCharaOnly))
+					{
+						this.dataMaidMainCharaOnly = null;
+					}
+					else if (this.rawDataMaidMainCharaOnly == "○" || this.rawDataMaidMainCharaOnly == "◯")
+					{
+						this.dataMaidMainCharaOnly = new bool?(true);
+					}
+					else if (this.rawDataMaidMainCharaOnly == "×")
+					{
+						this.dataMaidMainCharaOnly = new bool?(false);
+					}
+					else
+					{
+						NDebug.Assert(string.Concat(new object[]
+						{
+							"エンパイアライフモード.csv\n項目「初期メイドフラグ」の値に、想定外の文字が入りました。\n\n表:",
+							text,
+							"\n値:",
+							this.dataMaidMainCharaOnly
+						}), false);
+					}
+					if (string.IsNullOrEmpty(this.rawDataMaidContract))
+					{
+						this.dataMaidContract = null;
+					}
+					else
+					{
+						Contract value6;
+						if (!EmpireLifeModeData.Data.contractTypeDic.TryGetValue(this.rawDataMaidContract, out value6))
+						{
+							NDebug.Assert("エンパイアライフモード.csv\n項目「契約状態」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataMaidContract, false);
+						}
+						this.dataMaidContract = new Contract?(value6);
+					}
+					if (string.IsNullOrEmpty(this.rawDataMaidRelation))
+					{
+						this.dataMaidRelation = null;
+					}
+					else
+					{
+						Relation value7;
+						if (!EmpireLifeModeData.Data.relationTypeDic.TryGetValue(this.rawDataMaidRelation, out value7))
+						{
+							NDebug.Assert("エンパイアライフモード.csv\n項目「関係状態」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataMaidRelation, false);
+						}
+						this.dataMaidRelation = new Relation?(value7);
+					}
+					if (string.IsNullOrEmpty(this.rawDataMaidStatus))
+					{
+						this.dataMaidStatus = null;
+					}
+					else
+					{
+						this.dataMaidStatus = new ParametersPack();
+						this.dataMaidStatus.Parse(this.rawDataMaidStatus.Replace(':', '='), ',');
+					}
+					List<Seikeiken> list = new List<Seikeiken>();
+					if (this.rawDataMaidSeikeikenNoNo == "○" || this.rawDataMaidSeikeikenNoNo == "◯")
+					{
+						list.Add(Seikeiken.No_No);
+					}
+					if (this.rawDataMaidSeikeikenYesNo == "○" || this.rawDataMaidSeikeikenYesNo == "◯")
+					{
+						list.Add(Seikeiken.Yes_No);
+					}
+					if (this.rawDataMaidSeikeikenNoYes == "○" || this.rawDataMaidSeikeikenNoYes == "◯")
+					{
+						list.Add(Seikeiken.No_Yes);
+					}
+					if (this.rawDataMaidSeikeikenYesYes == "○" || this.rawDataMaidSeikeikenYesYes == "◯")
+					{
+						list.Add(Seikeiken.Yes_Yes);
+					}
+					this.dataMaidSeikeiken = list.ToArray();
+					break;
+				}
+			}
+		}
+
+		private static Dictionary<string, string> personalUniqueNameDic
+		{
+			get
+			{
+				if (EmpireLifeModeData.Data.m_PersonalUniqueNameDic == null)
+				{
+					EmpireLifeModeData.Data.m_PersonalUniqueNameDic = new Dictionary<string, string>();
+					foreach (Personal.Data data in Personal.GetAllDatas(false))
+					{
+						EmpireLifeModeData.Data.m_PersonalUniqueNameDic.Add(data.drawName, data.uniqueName);
+					}
+				}
+				return EmpireLifeModeData.Data.m_PersonalUniqueNameDic;
+			}
+		}
+
+		private static Dictionary<string, Contract> contractTypeDic
+		{
+			get
+			{
+				if (EmpireLifeModeData.Data.m_ContractTypeDic == null)
+				{
+					EmpireLifeModeData.Data.m_ContractTypeDic = new Dictionary<string, Contract>();
+					IEnumerator enumerator = Enum.GetValues(typeof(Contract)).GetEnumerator();
+					try
+					{
+						while (enumerator.MoveNext())
+						{
+							object obj = enumerator.Current;
+							Contract contract = (Contract)obj;
+							string @string = EnumConvert.GetString(contract);
+							EmpireLifeModeData.Data.m_ContractTypeDic.Add(@string, contract);
+						}
+					}
+					finally
+					{
+						IDisposable disposable;
+						if ((disposable = (enumerator as IDisposable)) != null)
+						{
+							disposable.Dispose();
+						}
+					}
+				}
+				return EmpireLifeModeData.Data.m_ContractTypeDic;
+			}
+		}
+
+		private static Dictionary<string, Relation> relationTypeDic
+		{
+			get
+			{
+				if (EmpireLifeModeData.Data.m_RelationTypeDic == null)
+				{
+					EmpireLifeModeData.Data.m_RelationTypeDic = new Dictionary<string, Relation>();
+					IEnumerator enumerator = Enum.GetValues(typeof(Relation)).GetEnumerator();
+					try
+					{
+						while (enumerator.MoveNext())
+						{
+							object obj = enumerator.Current;
+							Relation relation = (Relation)obj;
+							string @string = EnumConvert.GetString(relation);
+							EmpireLifeModeData.Data.m_RelationTypeDic.Add(@string, relation);
+						}
+					}
+					finally
+					{
+						IDisposable disposable;
+						if ((disposable = (enumerator as IDisposable)) != null)
+						{
+							disposable.Dispose();
+						}
+					}
+				}
+				return EmpireLifeModeData.Data.m_RelationTypeDic;
+			}
+		}
+
+		public readonly int ID;
+
+		public readonly string strUniqueName;
+
+		public readonly string rawDataScenarioType;
+
+		public readonly string rawDataScenarioAnyNumberPlay;
+
+		public readonly string rawDataScenarioFileName;
+
+		public readonly string rawDataScenarioFileLabel;
+
+		public readonly string rawDataNTRBlock;
+
+		public readonly string rawDataFacilityUniqueName;
+
+		public readonly string rawDataFacilityCostumeChange;
+
+		public readonly string rawDataTimeZone;
+
+		public readonly string rawDataFlagPlayer;
+
+		public readonly string rawDataFlagMaid;
+
+		public readonly string rawDataMaidPersonalTypeSlot0;
+
+		public readonly string rawDataMaidPersonalTypeSlot1;
+
+		public readonly string rawDataMaidPersonalTypeSlot2;
+
+		public readonly string rawDataMaidMainCharaOnly;
+
+		public readonly string rawDataMaidContract;
+
+		public readonly string rawDataMaidRelation;
+
+		public readonly string rawDataMaidStatus;
+
+		public readonly string rawDataMaidSeikeikenNoNo;
+
+		public readonly string rawDataMaidSeikeikenYesNo;
+
+		public readonly string rawDataMaidSeikeikenNoYes;
+
+		public readonly string rawDataMaidSeikeikenYesYes;
+
+		public readonly EmpireLifeModeData.ScenarioType dataScenarioType;
+
+		public readonly bool dataScenarioAnyNumberPlay;
+
+		public readonly string dataScenarioFileName;
+
+		public readonly string dataScenarioFileLabel;
+
+		public readonly bool? dataNTRBlock;
+
+		public readonly string[] dataFacilityUniqueNameArray;
+
+		public readonly bool dataFacilityCostumeChange;
+
+		public readonly ScheduleMgr.ScheduleTime? dataTimeZone;
+
+		public readonly Dictionary<string, int> dataFlagPlayer;
+
+		public readonly Dictionary<string, int> dataFlagMaid;
+
+		public readonly Dictionary<int, string> dataMaidPersonalUniqueNameAndActiveSlotDic;
+
+		public readonly bool? dataMaidMainCharaOnly;
+
+		public readonly Contract? dataMaidContract;
+
+		public readonly Relation? dataMaidRelation;
+
+		public readonly ParametersPack dataMaidStatus;
+
+		public readonly Seikeiken[] dataMaidSeikeiken;
+
+		private static Dictionary<string, string> m_PersonalUniqueNameDic;
+
+		private static Dictionary<string, Contract> m_ContractTypeDic;
+
+		private static Dictionary<string, Relation> m_RelationTypeDic;
+	}
+}

+ 141 - 0
Assembly-CSharp/EmpireLifeModeFacilityUI.cs

@@ -0,0 +1,141 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class EmpireLifeModeFacilityUI : MonoBehaviour
+{
+	public void ShowFacilityList()
+	{
+		int facilityCountMax = GameMain.Instance.FacilityMgr.FacilityCountMax;
+		this.m_FacilityListViewer.CreateFacilityDetailsList<EmpireLifeModeFacilityUI.FacilityLifeModeViewer>(facilityCountMax, delegate(int index, EmpireLifeModeFacilityUI.FacilityLifeModeViewer info)
+		{
+			info.SetFacilityInfoOfIndex(index);
+		});
+	}
+
+	public List<EmpireLifeModeFacilityUI.FacilityLifeModeViewer> GetAllItem()
+	{
+		return this.m_FacilityListViewer.GetAllItem<EmpireLifeModeFacilityUI.FacilityLifeModeViewer>();
+	}
+
+	[SerializeField]
+	private FacilityDetailsListViewer m_FacilityListViewer;
+
+	public class FacilityLifeModeViewer : FacilityDetailsListViewer.FacilityDetailsUI
+	{
+		private GameObject changeImage
+		{
+			get
+			{
+				GameObject result;
+				if ((result = this.m_ChangeImage) == null)
+				{
+					result = (this.m_ChangeImage = base.transform.Find("Image Change").gameObject);
+				}
+				return result;
+			}
+		}
+
+		private GameObject deleteImage
+		{
+			get
+			{
+				GameObject result;
+				if ((result = this.m_DeleteImage) == null)
+				{
+					result = (this.m_DeleteImage = base.transform.Find("Image Delete").gameObject);
+				}
+				return result;
+			}
+		}
+
+		public uGUIListViewer listViewerParentMaidIcon
+		{
+			get
+			{
+				uGUIListViewer result;
+				if ((result = this.m_ListViewerParentMaidIcon) == null)
+				{
+					result = (this.m_ListViewerParentMaidIcon = base.transform.Find("parent window").GetComponent<uGUIListViewer>());
+				}
+				return result;
+			}
+		}
+
+		private void Start()
+		{
+			NDebug.Assert(base.facilityInfoUI != null, "[FacilityDetailsListViewer.cs]\n施設の詳細表示UIクラスで、コンポーネント「FacilityInfoUI」の取得に失敗しました");
+			NDebug.Assert(this.changeImage != null, "[FacilityDetailsListViewer.cs]\n施設の詳細表示UIクラスで、UI「Image Change」の取得に失敗しました");
+			NDebug.Assert(this.deleteImage != null, "[FacilityDetailsListViewer.cs]\n施設の詳細表示UIクラスで、UI「Image Delete」の取得に失敗しました");
+		}
+
+		public Facility GetNowShowingFacility()
+		{
+			return this.m_NowShowingFacility;
+		}
+
+		private void SetFacilityInfo(Facility nowFacility, Facility nextDayFacility, bool isExistNextDayData)
+		{
+			if (isExistNextDayData)
+			{
+				if (nextDayFacility == null)
+				{
+					this.m_NowShowingFacility = nowFacility;
+					base.facilityInfoUI.SetFacilityInfo(nowFacility, true);
+					this.changeImage.SetActive(false);
+					this.deleteImage.SetActive(false);
+					this.SetInfoImageVisible(nowFacility != null);
+				}
+				else
+				{
+					this.m_NowShowingFacility = nowFacility;
+					base.facilityInfoUI.SetFacilityInfo(nowFacility, true);
+					this.changeImage.SetActive(false);
+					this.deleteImage.SetActive(false);
+					this.SetInfoImageVisible(nowFacility != null);
+				}
+			}
+			else
+			{
+				this.m_NowShowingFacility = nowFacility;
+				base.facilityInfoUI.SetFacilityInfo(nowFacility, true);
+				this.changeImage.SetActive(false);
+				this.deleteImage.SetActive(false);
+				this.SetInfoImageVisible(nowFacility != null);
+			}
+		}
+
+		public void SetFacilityInfoOfIndex(int index)
+		{
+			FacilityManager facilityMgr = GameMain.Instance.FacilityMgr;
+			Facility facility = facilityMgr.GetFacility(index);
+			Facility nextDayFacility = null;
+			bool nextDayFacilityExist;
+			if (nextDayFacilityExist = facilityMgr.GetNextDayFacilityExist(index))
+			{
+				nextDayFacility = facilityMgr.GetNextDayFacility(index);
+			}
+			this.SetFacilityInfo(facility, nextDayFacility, nextDayFacilityExist);
+		}
+
+		private void SetInfoImageVisible(bool isViewImage)
+		{
+			if (!isViewImage)
+			{
+				base.facilityInfoUI.imageFacilityThumbnail.color = new Color(0f, 0f, 0f, 0.25f);
+			}
+			else
+			{
+				base.facilityInfoUI.imageFacilityThumbnail.color = new Color(1f, 1f, 1f, 1f);
+			}
+		}
+
+		private GameObject m_ChangeImage;
+
+		private GameObject m_DeleteImage;
+
+		private uGUIListViewer m_ListViewerParentMaidIcon;
+
+		private Facility m_NowShowingFacility;
+	}
+}

+ 660 - 0
Assembly-CSharp/EmpireLifeModeManager.cs

@@ -0,0 +1,660 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using FacilityFlag;
+using UnityEngine;
+
+public class EmpireLifeModeManager : MonoBehaviour
+{
+	public List<EmpireLifeModeManager.EventDataObject> nowEventList
+	{
+		get
+		{
+			return this.m_EventList;
+		}
+	}
+
+	public Dictionary<Facility, List<Maid>> nowMaidAllocationDic
+	{
+		get
+		{
+			return this.m_NowMaidAllocationDic;
+		}
+	}
+
+	public List<EmpireLifeModeManager.EventDataObject> executedEventList
+	{
+		get
+		{
+			return this.m_ExecutedEventList;
+		}
+	}
+
+	public List<Maid> lifeModeAllMaidList
+	{
+		get
+		{
+			return this.m_LifeModeAllMaidList;
+		}
+	}
+
+	public void SetAllMaidList(IEnumerable<Maid> maidCorrection)
+	{
+		this.m_LifeModeAllMaidList = new List<Maid>(maidCorrection);
+	}
+
+	public void UpdateAllMaidList()
+	{
+		this.m_LifeModeAllMaidList = new List<Maid>(from maid in this.m_LifeModeAllMaidList
+		where maid != null
+		select maid);
+	}
+
+	public List<Maid> executedMaidList
+	{
+		get
+		{
+			return this.m_ExecutedMaidList;
+		}
+	}
+
+	private void CreateAndCacheEvent(EmpireLifeModeData.Data data, Facility targetFacility, IEnumerable<Maid> targetMaidList)
+	{
+		EmpireLifeModeManager.EventDataObject eventDataObject = new EmpireLifeModeManager.EventDataObject();
+		eventDataObject.targetEvent = data;
+		eventDataObject.targetFacility = targetFacility;
+		eventDataObject.targetMaidList = new List<Maid>(targetMaidList);
+		this.nowEventList.Add(eventDataObject);
+	}
+
+	public void CreateStoryEvent()
+	{
+		if (this.nowEventList.Exists((EmpireLifeModeManager.EventDataObject d) => d.targetEvent.dataScenarioType == EmpireLifeModeData.ScenarioType.スト\u30FCリ\u30FC))
+		{
+			Debug.Log("既にストーリーイベントが存在していたので、ストーリーイベントの追加は行いません。");
+			return;
+		}
+		if (this.executedEventList.Exists((EmpireLifeModeManager.EventDataObject d) => d.targetEvent.dataScenarioType == EmpireLifeModeData.ScenarioType.スト\u30FCリ\u30FC))
+		{
+			Debug.Log("既にストーリーイベントは実行された後なので、ストーリーイベントの追加は行いません。");
+			return;
+		}
+		List<EmpireLifeModeData.Data> datas = EmpireLifeModeData.GetDatas((EmpireLifeModeData.Data d) => EmpireLifeModeData.IsEnabled(d.ID) && d.dataScenarioType == EmpireLifeModeData.ScenarioType.スト\u30FCリ\u30FC, true);
+		if (datas == null || datas.Count <= 0)
+		{
+			Debug.Log("種類が「ストーリー」であるイベントは存在しなかった。");
+			return;
+		}
+		foreach (EmpireLifeModeData.Data data in datas)
+		{
+			if (this.GetScenarioExecuteCount(data.ID) <= 0)
+			{
+				if (!data.IsCorrectUniqueComparisonObject())
+				{
+					break;
+				}
+				List<Facility> correctFacilityList = data.GetCorrectFacilityList();
+				if (correctFacilityList == null || correctFacilityList.Count <= 0)
+				{
+					break;
+				}
+				List<Maid> list;
+				if (!EmpireLifeModeManager.TryGetMaidListOfEventData(data, this.GetNotAllocatedMaidList(this.lifeModeAllMaidList), out list))
+				{
+					break;
+				}
+				Facility facility = correctFacilityList[UnityEngine.Random.Range(0, correctFacilityList.Count)];
+				this.CreateAndCacheEvent(data, facility, list);
+				if (!this.nowMaidAllocationDic.ContainsKey(facility))
+				{
+					this.nowMaidAllocationDic.Add(facility, null);
+				}
+				this.nowMaidAllocationDic[facility] = list;
+			}
+		}
+	}
+
+	public void AllMaidRandomAllocate()
+	{
+		Dictionary<Facility, int> dictionary = new Dictionary<Facility, int>();
+		foreach (Facility key in EmpireLifeModeAPI.GetEnabledFacilityList())
+		{
+			int num = 0;
+			if (!this.nowMaidAllocationDic.ContainsKey(key))
+			{
+				this.nowMaidAllocationDic.Add(key, new List<Maid>());
+			}
+			else if (this.nowMaidAllocationDic[key] != null)
+			{
+				num = this.nowMaidAllocationDic[key].Count;
+			}
+			else
+			{
+				num = 0;
+			}
+			if (num < 3)
+			{
+				if (!dictionary.ContainsKey(key))
+				{
+					dictionary.Add(key, num);
+				}
+			}
+		}
+		List<Maid> notAllocatedMaidList = this.GetNotAllocatedMaidList(this.lifeModeAllMaidList);
+		from maid in notAllocatedMaidList
+		orderby UnityEngine.Random.Range(0, 100)
+		select maid;
+		foreach (Maid item in notAllocatedMaidList)
+		{
+			List<Facility> list = new List<Facility>(dictionary.Keys);
+			List<int> list2 = new List<int>(dictionary.Values);
+			int index = UnityEngine.Random.Range(0, dictionary.Count);
+			this.nowMaidAllocationDic[list[index]].Add(item);
+			Dictionary<Facility, int> dictionary2;
+			Facility key2;
+			if (((dictionary2 = dictionary)[key2 = list[index]] = dictionary2[key2] + 1) >= 3)
+			{
+				dictionary.Remove(list[index]);
+				if (dictionary.Count <= 0)
+				{
+					break;
+				}
+			}
+		}
+	}
+
+	public void CreateEventListOfMaidAllocateData()
+	{
+		foreach (KeyValuePair<Facility, List<Maid>> keyValuePair in this.nowMaidAllocationDic)
+		{
+			Facility facility = keyValuePair.Key;
+			List<Maid> list = new List<Maid>(keyValuePair.Value);
+			List<EmpireLifeModeData.Data> datas = EmpireLifeModeData.GetDatas((EmpireLifeModeData.Data data) => data.IsCorrectUniqueComparisonObject() && data.dataScenarioType != EmpireLifeModeData.ScenarioType.スト\u30FCリ\u30FC && data.IsCorrectFacility(facility.defaultName), true);
+			IOrderedEnumerable<EmpireLifeModeData.Data> source = from d in datas
+			orderby d.dataMaidPersonalUniqueNameAndActiveSlotDic.Count descending
+			select d;
+			if (EmpireLifeModeManager.<>f__mg$cache0 == null)
+			{
+				EmpireLifeModeManager.<>f__mg$cache0 = new Func<EmpireLifeModeData.Data, int>(EmpireLifeModeAPI.GetPriorityScenarioType);
+			}
+			IOrderedEnumerable<EmpireLifeModeData.Data> orderedEnumerable = source.ThenByDescending(EmpireLifeModeManager.<>f__mg$cache0);
+			Dictionary<int, int> eventSelectCountDic = new Dictionary<int, int>();
+			foreach (EmpireLifeModeData.Data data3 in orderedEnumerable)
+			{
+				eventSelectCountDic.Add(data3.ID, 0);
+			}
+			while (list.Count > 0)
+			{
+				bool flag = false;
+				foreach (EmpireLifeModeData.Data data2 in orderedEnumerable.ThenBy((EmpireLifeModeData.Data d) => eventSelectCountDic[d.ID]).ThenBy((EmpireLifeModeData.Data d) => UnityEngine.Random.Range(0, 10)))
+				{
+					List<Maid> list2;
+					if (EmpireLifeModeManager.TryGetMaidListOfEventData(data2, list, out list2))
+					{
+						this.CreateAndCacheEvent(data2, facility, list2);
+						Dictionary<int, int> eventSelectCountDic2;
+						int id;
+						(eventSelectCountDic2 = eventSelectCountDic)[id = data2.ID] = eventSelectCountDic2[id] + 1;
+						flag = true;
+						foreach (Maid item in list2)
+						{
+							list.Remove(item);
+						}
+						if (list.Count == 0)
+						{
+							break;
+						}
+					}
+				}
+				if (!flag)
+				{
+					break;
+				}
+			}
+		}
+	}
+
+	public void DeleteNowEventList()
+	{
+		this.nowEventList.Clear();
+		this.nowMaidAllocationDic.Clear();
+	}
+
+	public void OnTimeZoneChanged()
+	{
+		this.nowEventList.Clear();
+		this.nowMaidAllocationDic.Clear();
+		this.executedEventList.Clear();
+		this.executedMaidList.Clear();
+		this.UpdateAllMaidList();
+		EmpireLifeModeAPI.DestroyScenarioTypeIconDic();
+	}
+
+	public void OnNextDay()
+	{
+		this.nowEventList.Clear();
+		this.nowMaidAllocationDic.Clear();
+		this.executedEventList.Clear();
+		this.executedMaidList.Clear();
+	}
+
+	public void SetupScenarioEvent(EmpireLifeModeManager.EventDataObject eventObj, Action OnComplete)
+	{
+		base.StartCoroutine(this.CoSetupScenarioEvent(eventObj, OnComplete));
+		GameMain.Instance.ScriptMgr.EvalScript("&tf['scenario_file_name'] = '" + eventObj.targetEvent.dataScenarioFileName + "';");
+		GameMain.Instance.ScriptMgr.EvalScript("&tf['label_name'] = '" + eventObj.targetEvent.dataScenarioFileLabel + "';");
+		this.nowEventList.Remove(eventObj);
+		this.executedEventList.Add(eventObj);
+		foreach (Maid maid in eventObj.targetMaidList)
+		{
+			this.IncrementMaidScenarioExecuteCount(eventObj.targetEvent.ID, maid);
+		}
+		foreach (Maid item in eventObj.targetMaidList)
+		{
+			this.executedMaidList.Add(item);
+		}
+	}
+
+	private IEnumerator CoSetupScenarioEvent(EmpireLifeModeManager.EventDataObject eventObj, Action OnComplete)
+	{
+		EmpireLifeModeData.Data data = eventObj.targetEvent;
+		List<Maid> targetMaidList = new List<Maid>(eventObj.targetMaidList);
+		foreach (KeyValuePair<int, string> maidPersonalSlotPair in data.dataMaidPersonalUniqueNameAndActiveSlotDic)
+		{
+			int slotNo = maidPersonalSlotPair.Key;
+			string personalUniqueName = maidPersonalSlotPair.Value;
+			Maid maid = targetMaidList.Find((Maid m) => m.status.personal.uniqueName == personalUniqueName);
+			targetMaidList.Remove(maid);
+			GameMain.Instance.CharacterMgr.SetActiveMaid(maid, slotNo);
+			maid.Visible = true;
+			maid.AllProcPropSeqStart();
+			while (maid.IsBusy)
+			{
+				yield return null;
+			}
+			if (data.dataFacilityCostumeChange)
+			{
+				if (eventObj.targetFacility.typeCostume == Facility.CostumeType.Default)
+				{
+					eventObj.targetFacility.UpdateMaidCostumeToDefaultCostume(maid);
+				}
+				else if (eventObj.targetFacility.typeCostume == Facility.CostumeType.Edit)
+				{
+					eventObj.targetFacility.UpdateMaidCostumeToEditCostume(maid, false);
+				}
+			}
+			maid.AllProcPropSeqStart();
+		}
+		for (;;)
+		{
+			bool isAllMaidLoadComplete = true;
+			foreach (Maid maid2 in eventObj.targetMaidList)
+			{
+				if (maid2.IsBusy)
+				{
+					isAllMaidLoadComplete = false;
+					break;
+				}
+			}
+			if (isAllMaidLoadComplete)
+			{
+				break;
+			}
+			yield return null;
+		}
+		if (OnComplete != null)
+		{
+			OnComplete();
+		}
+		yield break;
+	}
+
+	private static bool TryGetMaidListOfEventData(EmpireLifeModeData.Data data, IEnumerable<Maid> maidList, out List<Maid> resultList)
+	{
+		resultList = new List<Maid>();
+		List<string> list = new List<string>(data.dataMaidPersonalUniqueNameAndActiveSlotDic.Values);
+		List<Maid> list2 = new List<Maid>(maidList);
+		if (list.Count > list2.Count)
+		{
+			return false;
+		}
+		foreach (string b in list)
+		{
+			Maid maid = null;
+			foreach (Maid maid2 in list2)
+			{
+				if (maid2.status.personal.uniqueName == b && data.IsCorrectMaid(maid2))
+				{
+					maid = maid2;
+					break;
+				}
+			}
+			if (!(maid != null))
+			{
+				return false;
+			}
+			resultList.Add(maid);
+			if (resultList.Count == list.Count)
+			{
+				return true;
+			}
+			list2.Remove(maid);
+		}
+		return false;
+	}
+
+	public List<Maid> GetNotAllocatedMaidList(List<Maid> maidList)
+	{
+		List<Maid> list = new List<Maid>();
+		if (maidList == null || maidList.Count <= 0)
+		{
+			return list;
+		}
+		for (int i = maidList.Count - 1; i >= 0; i--)
+		{
+			if (!this.executedMaidList.Contains(maidList[i]))
+			{
+				if (!this.IsAllocatedMaid(maidList[i]))
+				{
+					list.Add(maidList[i]);
+				}
+			}
+		}
+		return list;
+	}
+
+	public bool IsAllocatedMaid(Maid maid)
+	{
+		NDebug.Assert(maid != null, "判定するキャラクターにnullが指定されました");
+		foreach (EmpireLifeModeManager.EventDataObject eventDataObject in this.nowEventList)
+		{
+			if (eventDataObject.targetMaidList != null && eventDataObject.targetMaidList.Contains(maid))
+			{
+				return true;
+			}
+		}
+		return false;
+	}
+
+	private DataArray<int, byte> CreateMaidDataArray(Maid maid)
+	{
+		NDebug.AssertNull(maid);
+		string guid = maid.status.guid;
+		if (this.m_SaveDataMaidScenarioExecuteCountArray.ContainsKey(guid))
+		{
+			return this.m_SaveDataMaidScenarioExecuteCountArray[guid];
+		}
+		DataArray<int, byte> dataArray = new DataArray<int, byte>();
+		this.m_SaveDataMaidScenarioExecuteCountArray.Add(guid, dataArray);
+		Debug.LogFormat("メイド「{0}」の情報を作成しました。", new object[]
+		{
+			maid.status.fullNameJpStyle
+		});
+		return dataArray;
+	}
+
+	public int GetMaidScenarioExecuteCount(int eventID, Maid maid)
+	{
+		NDebug.AssertNull(maid);
+		string guid = maid.status.guid;
+		if (!this.m_SaveDataMaidScenarioExecuteCountArray.ContainsKey(guid))
+		{
+			return 0;
+		}
+		return (int)this.m_SaveDataMaidScenarioExecuteCountArray[guid].Get(eventID, false);
+	}
+
+	private void IncrementMaidScenarioExecuteCount(int eventID, Maid maid)
+	{
+		NDebug.AssertNull(maid);
+		string guid = maid.status.guid;
+		DataArray<int, byte> dataArray = this.CreateMaidDataArray(maid);
+		byte b = dataArray.Get(eventID, false);
+		if (b < 255)
+		{
+			b += 1;
+		}
+		dataArray.Add(eventID, b, true);
+		this.m_SaveDataScenarioExecuteCountArray.Add(eventID, b, true);
+	}
+
+	public int GetScenarioExecuteCount(int eventID)
+	{
+		if (!this.m_SaveDataScenarioExecuteCountArray.Contains(eventID))
+		{
+			return 0;
+		}
+		return (int)this.m_SaveDataScenarioExecuteCountArray.Get(eventID, false);
+	}
+
+	public bool Serialize(BinaryWriter brWrite)
+	{
+		brWrite.Write("CM3D21_LIFE_MODE_MGR");
+		brWrite.Write(1210);
+		brWrite.Write("2");
+		DataArray<int, byte> saveDataScenarioExecuteCountArray = this.m_SaveDataScenarioExecuteCountArray;
+		if (EmpireLifeModeManager.<>f__mg$cache1 == null)
+		{
+			EmpireLifeModeManager.<>f__mg$cache1 = new Converter<int, byte[]>(Util.GetBytes);
+		}
+		saveDataScenarioExecuteCountArray.Serialize(brWrite, EmpireLifeModeManager.<>f__mg$cache1, (byte data) => new byte[]
+		{
+			data
+		});
+		int count = this.m_SaveDataMaidScenarioExecuteCountArray.Count;
+		brWrite.Write(count);
+		foreach (KeyValuePair<string, DataArray<int, byte>> keyValuePair in this.m_SaveDataMaidScenarioExecuteCountArray)
+		{
+			brWrite.Write(keyValuePair.Key);
+			DataArray<int, byte> value = keyValuePair.Value;
+			if (EmpireLifeModeManager.<>f__mg$cache2 == null)
+			{
+				EmpireLifeModeManager.<>f__mg$cache2 = new Converter<int, byte[]>(Util.GetBytes);
+			}
+			value.Serialize(brWrite, EmpireLifeModeManager.<>f__mg$cache2, (byte data) => new byte[]
+			{
+				data
+			});
+		}
+		List<string> list = new List<string>();
+		foreach (Maid maid in this.lifeModeAllMaidList)
+		{
+			if (maid != null)
+			{
+				list.Add(maid.status.guid);
+			}
+		}
+		brWrite.Write(list.Count);
+		foreach (string value2 in list)
+		{
+			brWrite.Write(value2);
+		}
+		return true;
+	}
+
+	public bool Deserialize(BinaryReader brRead)
+	{
+		this.m_SaveDataScenarioExecuteCountArray.Clear();
+		this.m_SaveDataMaidScenarioExecuteCountArray.Clear();
+		if (brRead.BaseStream.Length <= brRead.BaseStream.Position + 1L)
+		{
+			Debug.Log("LifeMode\nこれ以上は読めない");
+			return false;
+		}
+		long position = brRead.BaseStream.Position;
+		string text = brRead.ReadString();
+		if (text != "CM3D21_LIFE_MODE_MGR")
+		{
+			Debug.Log("LifeMode\nヘッダー取得に失敗しました。\n" + text);
+			brRead.BaseStream.Seek(position, SeekOrigin.Begin);
+			return false;
+		}
+		int num = brRead.ReadInt32();
+		position = brRead.BaseStream.Position;
+		string text2 = brRead.ReadString();
+		int num2;
+		if (string.IsNullOrEmpty(text2))
+		{
+			num2 = 0;
+			brRead.BaseStream.Seek(position, SeekOrigin.Begin);
+		}
+		else
+		{
+			int num3 = 0;
+			if (int.TryParse(text2, out num3) && num3 > 0 && 100 > num3)
+			{
+				num2 = num3;
+			}
+			else
+			{
+				num2 = 0;
+				brRead.BaseStream.Seek(position, SeekOrigin.Begin);
+			}
+		}
+		if (num2 <= 1)
+		{
+			if (EmpireLifeModeManager.<>f__mg$cache3 == null)
+			{
+				EmpireLifeModeManager.<>f__mg$cache3 = new Func<BinaryReader, int>(Util.ToInt32);
+			}
+			Func<BinaryReader, int> func_read_key = EmpireLifeModeManager.<>f__mg$cache3;
+			if (EmpireLifeModeManager.<>f__mg$cache4 == null)
+			{
+				EmpireLifeModeManager.<>f__mg$cache4 = new Func<BinaryReader, int>(Util.ToInt32);
+			}
+			DataArray<int, int>.Skip(brRead, func_read_key, EmpireLifeModeManager.<>f__mg$cache4);
+		}
+		else
+		{
+			DataArray<int, byte> saveDataScenarioExecuteCountArray = this.m_SaveDataScenarioExecuteCountArray;
+			if (EmpireLifeModeManager.<>f__mg$cache5 == null)
+			{
+				EmpireLifeModeManager.<>f__mg$cache5 = new Func<BinaryReader, int>(Util.ToInt32);
+			}
+			Func<BinaryReader, int> func_read_key2 = EmpireLifeModeManager.<>f__mg$cache5;
+			if (EmpireLifeModeManager.<>f__mg$cache6 == null)
+			{
+				EmpireLifeModeManager.<>f__mg$cache6 = new Func<BinaryReader, byte>(Util.ToByte);
+			}
+			saveDataScenarioExecuteCountArray.Deserialize(brRead, func_read_key2, EmpireLifeModeManager.<>f__mg$cache6);
+			int num4 = brRead.ReadInt32();
+			for (int i = 0; i < num4; i++)
+			{
+				string text3 = brRead.ReadString();
+				Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaid(text3);
+				if (stockMaid == null)
+				{
+					Debug.LogFormat("■GUID「{0}」のメイドは存在しなかったので、このメイドの情報は読み飛ばします", new object[]
+					{
+						text3
+					});
+					if (EmpireLifeModeManager.<>f__mg$cache7 == null)
+					{
+						EmpireLifeModeManager.<>f__mg$cache7 = new Func<BinaryReader, int>(Util.ToInt32);
+					}
+					Func<BinaryReader, int> func_read_key3 = EmpireLifeModeManager.<>f__mg$cache7;
+					if (EmpireLifeModeManager.<>f__mg$cache8 == null)
+					{
+						EmpireLifeModeManager.<>f__mg$cache8 = new Func<BinaryReader, byte>(Util.ToByte);
+					}
+					DataArray<int, byte>.Skip(brRead, func_read_key3, EmpireLifeModeManager.<>f__mg$cache8);
+				}
+				else
+				{
+					DataArray<int, byte> dataArray = this.CreateMaidDataArray(stockMaid);
+					DataArray<int, byte> dataArray2 = dataArray;
+					if (EmpireLifeModeManager.<>f__mg$cache9 == null)
+					{
+						EmpireLifeModeManager.<>f__mg$cache9 = new Func<BinaryReader, int>(Util.ToInt32);
+					}
+					Func<BinaryReader, int> func_read_key4 = EmpireLifeModeManager.<>f__mg$cache9;
+					if (EmpireLifeModeManager.<>f__mg$cacheA == null)
+					{
+						EmpireLifeModeManager.<>f__mg$cacheA = new Func<BinaryReader, byte>(Util.ToByte);
+					}
+					dataArray2.Deserialize(brRead, func_read_key4, EmpireLifeModeManager.<>f__mg$cacheA);
+				}
+			}
+			List<Maid> list = new List<Maid>();
+			num4 = brRead.ReadInt32();
+			for (int j = 0; j < num4; j++)
+			{
+				string guid = brRead.ReadString();
+				Maid stockMaid2 = GameMain.Instance.CharacterMgr.GetStockMaid(guid);
+				if (stockMaid2 != null)
+				{
+					list.Add(stockMaid2);
+				}
+			}
+			this.SetAllMaidList(list);
+		}
+		return true;
+	}
+
+	private const int MAX_COUNT_MAID_ALLOCATE = 3;
+
+	private List<EmpireLifeModeManager.EventDataObject> m_EventList = new List<EmpireLifeModeManager.EventDataObject>();
+
+	private Dictionary<Facility, List<Maid>> m_NowMaidAllocationDic = new Dictionary<Facility, List<Maid>>();
+
+	private List<EmpireLifeModeManager.EventDataObject> m_ExecutedEventList = new List<EmpireLifeModeManager.EventDataObject>();
+
+	private List<Maid> m_LifeModeAllMaidList = new List<Maid>();
+
+	private List<Maid> m_ExecutedMaidList = new List<Maid>();
+
+	private Dictionary<string, DataArray<int, byte>> m_SaveDataMaidScenarioExecuteCountArray = new Dictionary<string, DataArray<int, byte>>();
+
+	private DataArray<int, byte> m_SaveDataScenarioExecuteCountArray = new DataArray<int, byte>();
+
+	private const string STR_LOG_HEAD = "LifeMode\n";
+
+	private const string STR_LIFE_MODE_SERIALIZE_HEADER = "CM3D21_LIFE_MODE_MGR";
+
+	private const string STR_LIFE_MODE_SERIALIZE_VER = "2";
+
+	[CompilerGenerated]
+	private static Func<EmpireLifeModeData.Data, int> <>f__mg$cache0;
+
+	[CompilerGenerated]
+	private static Converter<int, byte[]> <>f__mg$cache1;
+
+	[CompilerGenerated]
+	private static Converter<int, byte[]> <>f__mg$cache2;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, int> <>f__mg$cache3;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, int> <>f__mg$cache4;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, int> <>f__mg$cache5;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, byte> <>f__mg$cache6;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, int> <>f__mg$cache7;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, byte> <>f__mg$cache8;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, int> <>f__mg$cache9;
+
+	[CompilerGenerated]
+	private static Func<BinaryReader, byte> <>f__mg$cacheA;
+
+	public class EventDataObject
+	{
+		public Facility targetFacility { get; set; }
+
+		public EmpireLifeModeData.Data targetEvent { get; set; }
+
+		public List<Maid> targetMaidList;
+	}
+}

+ 83 - 0
Assembly-CSharp/FacilityDetailsListViewer.cs

@@ -0,0 +1,83 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+
+public class FacilityDetailsListViewer : MonoBehaviour
+{
+	public void CreateFacilityDetailsList<T>(int itemCount, Action<int, T> onCreateItem) where T : FacilityDetailsListViewer.FacilityDetailsUI
+	{
+		this.m_ListViewerFacilityDetails.Show<Transform>(itemCount, delegate(int index, Transform trans)
+		{
+			onCreateItem(index, trans.gameObject.AddComponent<T>());
+		});
+	}
+
+	public bool IsExistItemList()
+	{
+		NDebug.Assert(this.m_ListViewerFacilityDetails != null, "FacilityDetailsListViewer.cs\nUI項目を並べるコンポーネントがアタッチされていません");
+		return this.m_ListViewerFacilityDetails.ItemArray != null && this.m_ListViewerFacilityDetails.ItemArray.Length > 0;
+	}
+
+	public int GetItemCount()
+	{
+		NDebug.Assert(this.m_ListViewerFacilityDetails != null, "FacilityDetailsListViewer.cs\nUI項目を並べるコンポーネントがアタッチされていません");
+		if (!this.IsExistItemList())
+		{
+			return 0;
+		}
+		return this.m_ListViewerFacilityDetails.ItemArray.Length;
+	}
+
+	public T GetItem<T>(int index) where T : Component
+	{
+		NDebug.Assert(this.m_ListViewerFacilityDetails != null, "FacilityDetailsListViewer.cs\nUI項目を並べるコンポーネントがアタッチされていません");
+		GameObject[] itemArray = this.m_ListViewerFacilityDetails.ItemArray;
+		if (itemArray == null)
+		{
+			return (T)((object)null);
+		}
+		if (itemArray.Length <= index)
+		{
+			return (T)((object)null);
+		}
+		return itemArray[index].GetComponent<T>();
+	}
+
+	public List<T> GetAllItem<T>() where T : Component
+	{
+		NDebug.Assert(this.m_ListViewerFacilityDetails != null, "FacilityDetailsListViewer.cs\nUI項目を並べるコンポーネントがアタッチされていません");
+		GameObject[] itemArray = this.m_ListViewerFacilityDetails.ItemArray;
+		if (itemArray == null)
+		{
+			return null;
+		}
+		List<T> list = new List<T>();
+		int num = itemArray.Length;
+		for (int i = 0; i < num; i++)
+		{
+			list.Add(this.GetItem<T>(i));
+		}
+		return list;
+	}
+
+	[SerializeField]
+	private uGUIListViewer m_ListViewerFacilityDetails;
+
+	public class FacilityDetailsUI : MonoBehaviour
+	{
+		public FacilityInfoUI facilityInfoUI
+		{
+			get
+			{
+				FacilityInfoUI result;
+				if ((result = this.m_InfoUI) == null)
+				{
+					result = (this.m_InfoUI = base.GetComponent<FacilityInfoUI>());
+				}
+				return result;
+			}
+		}
+
+		private FacilityInfoUI m_InfoUI;
+	}
+}

+ 1 - 1
Assembly-CSharp/FacilityManager.cs

@@ -657,7 +657,7 @@ public class FacilityManager : MonoBehaviour
 		Stopwatch stopwatch = new Stopwatch();
 		stopwatch.Start();
 		brWrite.Write("CM3D21_FACILITY_MGR");
-		brWrite.Write(1200);
+		brWrite.Write(1210);
 		brWrite.Write("5");
 		int num = 0;
 		for (int i = 0; i < this.m_FacilityArray.Count; i++)

+ 1 - 0
Assembly-CSharp/FreeSkillSelect.cs

@@ -425,6 +425,7 @@ public class FreeSkillSelect : MonoBehaviour
 		list2.Add(new KeyValuePair<Skill.Data.SpecialConditionType, string>(Skill.Data.SpecialConditionType.Drug, "媚薬"));
 		list2.Add(new KeyValuePair<Skill.Data.SpecialConditionType, string>(Skill.Data.SpecialConditionType.Confess, "告白"));
 		list2.Add(new KeyValuePair<Skill.Data.SpecialConditionType, string>(Skill.Data.SpecialConditionType.Faint, "気絶"));
+		list2.Add(new KeyValuePair<Skill.Data.SpecialConditionType, string>(Skill.Data.SpecialConditionType.NewType, "新夜伽"));
 		for (int i = 0; i < list2.Count; i++)
 		{
 			FreeSkillSelect.ButtonData buttonData = new FreeSkillSelect.ButtonData();

+ 16 - 2
Assembly-CSharp/GameMain.cs

@@ -151,6 +151,14 @@ public class GameMain : MonoSingleton<GameMain>
 		}
 	}
 
+	public EmpireLifeModeManager LifeModeMgr
+	{
+		get
+		{
+			return this.m_LifeModeMgr;
+		}
+	}
+
 	public SystemDialog SysDlg
 	{
 		get
@@ -408,6 +416,7 @@ public class GameMain : MonoSingleton<GameMain>
 		this.m_FacilityMgr.Init(this);
 		this.m_KasizukiMgr = base.gameObject.AddComponent<KasizukiManager>();
 		this.m_KasizukiMgr.Init();
+		this.m_LifeModeMgr = base.gameObject.AddComponent<EmpireLifeModeManager>();
 		if (this.CMSystem.NetUse)
 		{
 			this.m_Webs = base.gameObject.AddComponent<Webs>();
@@ -565,6 +574,7 @@ public class GameMain : MonoSingleton<GameMain>
 	public void OnStartDay()
 	{
 		this.FacilityMgr.UpdateNextDay();
+		this.LifeModeMgr.OnNextDay();
 		ScheduleAPI.DayStartManage();
 		bool flag = false;
 		for (int i = 0; i < GameMain.Instance.CharacterMgr.GetStockMaidCount(); i++)
@@ -668,7 +678,7 @@ public class GameMain : MonoSingleton<GameMain>
 		serializeHeader.nMaidNum = this.m_CharacterMgr.GetStockMaidCount();
 		serializeHeader.strComment = f_strComment;
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		this.SerializeWriteHeader(binaryWriter, serializeHeader);
 		binaryWriter.Write("bookmark_kk_01");
 		GameMain.BinaryBookmark binaryBookmark = new GameMain.BinaryBookmark(binaryWriter);
@@ -782,7 +792,7 @@ public class GameMain : MonoSingleton<GameMain>
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("COM3D2_SAVE");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		this.SerializeWriteHeader(binaryWriter, saveDataHeader);
 		binaryWriter.Write(array, (int)saveDataHeader.lHeaderSize, (int)((long)array.Length - saveDataHeader.lHeaderSize));
 		File.WriteAllBytes(path, memoryStream.ToArray());
@@ -1043,6 +1053,8 @@ public class GameMain : MonoSingleton<GameMain>
 				this.m_ScenarioSelectMgr.Deserialize(binaryReader);
 			}
 			this.m_FacilityMgr.Deserialize(binaryReader);
+			this.m_LifeModeMgr.Deserialize(binaryReader);
+			GameModeManager.Deserialize(binaryReader);
 			this.m_KasizukiMgr.Deserialize(f_nSaveNo, binaryReader);
 			CasinoDataMgr.Instance.Deserialize(binaryReader, num);
 			VsDanceDataMgr.Instance.Deserialize(binaryReader, num);
@@ -1354,6 +1366,8 @@ public class GameMain : MonoSingleton<GameMain>
 
 	private ScenarioSelectMgr m_ScenarioSelectMgr = new ScenarioSelectMgr();
 
+	private EmpireLifeModeManager m_LifeModeMgr;
+
 	private SystemDialog m_SysDlg;
 
 	private LoadIcon m_LoadIcon;

+ 116 - 0
Assembly-CSharp/GameModeManager.cs

@@ -0,0 +1,116 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using UnityEngine;
+
+public static class GameModeManager
+{
+	public static GameModeManager.Data GetData(GameModeManager.Type gameMode)
+	{
+		NDebug.Assert(GameModeManager.DataDic.ContainsKey(gameMode), "ゲームの進行モードに不正な値が入りました");
+		return GameModeManager.DataDic[gameMode];
+	}
+
+	public static GameModeManager.Data GetData()
+	{
+		return GameModeManager.GetData(GameModeManager.nowGameMode);
+	}
+
+	public static GameModeManager.Type nowGameMode
+	{
+		get
+		{
+			return GameModeManager.m_NowGameModeType;
+		}
+		set
+		{
+			GameModeManager.m_NowGameModeType = value;
+		}
+	}
+
+	public static bool Serialize(BinaryWriter brWrite)
+	{
+		brWrite.Write("CM3D21_GAME_MODE_MGR");
+		brWrite.Write(1210);
+		brWrite.Write(1);
+		brWrite.Write((int)GameModeManager.m_NowGameModeType);
+		return true;
+	}
+
+	public static bool Deserialize(BinaryReader brRead)
+	{
+		GameModeManager.Reset();
+		if (brRead.BaseStream.Length <= brRead.BaseStream.Position + 1L)
+		{
+			Debug.Log("GameModeManager\nこれ以上は読めない");
+			return false;
+		}
+		long position = brRead.BaseStream.Position;
+		string text = brRead.ReadString();
+		if (text != "CM3D21_GAME_MODE_MGR")
+		{
+			Debug.Log("GameModeManager\nヘッダー取得に失敗しました。\n" + text);
+			brRead.BaseStream.Seek(position, SeekOrigin.Begin);
+			return false;
+		}
+		int num = brRead.ReadInt32();
+		position = brRead.BaseStream.Position;
+		int num2 = brRead.ReadInt32();
+		int value = brRead.ReadInt32();
+		try
+		{
+			GameModeManager.nowGameMode = (GameModeManager.Type)Enum.ToObject(typeof(GameModeManager.Type), value);
+		}
+		catch (Exception e)
+		{
+			NDebug.AssertParseError("GameModeManager.Type", e);
+		}
+		return true;
+	}
+
+	private static void Reset()
+	{
+		GameModeManager.nowGameMode = GameModeManager.Type.Normal;
+	}
+
+	public static readonly Dictionary<GameModeManager.Type, GameModeManager.Data> DataDic = new Dictionary<GameModeManager.Type, GameModeManager.Data>
+	{
+		{
+			GameModeManager.Type.Normal,
+			new GameModeManager.Data(GameModeManager.Type.Normal, "main_banner_dammy", "今までどおりのゲーム進行モード。")
+		},
+		{
+			GameModeManager.Type.LifeMode,
+			new GameModeManager.Data(GameModeManager.Type.LifeMode, "main_banner_dammy", "ライフモード。")
+		}
+	};
+
+	private static GameModeManager.Type m_NowGameModeType;
+
+	private const string STR_LOG_HEAD = "GameModeManager\n";
+
+	private const string STR_GAME_MODE_SERIALIZE_HEADER = "CM3D21_GAME_MODE_MGR";
+
+	private const int GAME_MODE_SERIALIZE_VER = 1;
+
+	public enum Type
+	{
+		Normal,
+		LifeMode
+	}
+
+	public class Data
+	{
+		public Data(GameModeManager.Type mode, string strBannerImageName, string strDescription)
+		{
+			this.strBannerImageName = strBannerImageName;
+			this.strDescription = strDescription;
+		}
+
+		public readonly GameModeManager.Type gameMode;
+
+		public readonly string strBannerImageName;
+
+		public readonly string strDescription;
+	}
+}

+ 100 - 55
Assembly-CSharp/GameUty.cs

@@ -4,6 +4,7 @@ using System.IO;
 using System.Linq;
 using System.Text;
 using System.Text.RegularExpressions;
+using I2.Loc;
 using UnityEngine;
 using wf;
 
@@ -281,34 +282,34 @@ public class GameUty
 		HashSet<string> addedLegacyArchives = new HashSet<string>();
 		Action<string> action = delegate(string name)
 		{
-			foreach (string text26 in GameUty.PathList)
+			foreach (string text28 in GameUty.PathList)
 			{
-				string text27 = name + "_" + text26;
-				bool flag3 = AddFolderOrArchive(text27);
-				if (flag3 && !addedLegacyArchives.Contains(text27))
+				string text29 = name + "_" + text28;
+				bool flag3 = AddFolderOrArchive(text29);
+				if (flag3 && !addedLegacyArchives.Contains(text29))
 				{
-					addedLegacyArchives.Add(text27);
+					addedLegacyArchives.Add(text29);
 				}
 				if (flag3)
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text26);
+						GameUty.ExistCsvPathList.Add(text28);
 					}
-					for (int num12 = 2; num12 <= check_ver_no; num12++)
+					for (int num14 = 2; num14 <= check_ver_no; num14++)
 					{
-						AddFolderOrArchive(text27 + "_" + num12);
+						AddFolderOrArchive(text29 + "_" + num14);
 					}
 				}
 			}
 		};
 		Action<string> action2 = delegate(string name)
 		{
-			foreach (string text26 in GameUty.PathList)
+			foreach (string text28 in GameUty.PathList)
 			{
-				string text27 = name + "_" + text26;
-				bool flag3 = AddFolderOrArchive(text27);
-				if (!flag3 && addedLegacyArchives.Contains(text27))
+				string text29 = name + "_" + text28;
+				bool flag3 = AddFolderOrArchive(text29);
+				if (!flag3 && addedLegacyArchives.Contains(text29))
 				{
 					flag3 = true;
 				}
@@ -316,17 +317,17 @@ public class GameUty
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text26);
+						GameUty.ExistCsvPathList.Add(text28);
 					}
-					for (int num12 = 2; num12 <= check_ver_no; num12++)
+					for (int num14 = 2; num14 <= check_ver_no; num14++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
 							name,
 							"_",
-							text26,
+							text28,
 							"_",
-							num12
+							num14
 						}));
 					}
 				}
@@ -334,23 +335,23 @@ public class GameUty
 		};
 		Action<string> action3 = delegate(string name)
 		{
-			foreach (string text26 in GameUty.PathList)
+			foreach (string text28 in GameUty.PathList)
 			{
-				if (AddFolderOrArchive(name + "_" + text26))
+				if (AddFolderOrArchive(name + "_" + text28))
 				{
 					if (name == "csv")
 					{
-						GameUty.ExistCsvPathList.Add(text26);
+						GameUty.ExistCsvPathList.Add(text28);
 					}
-					for (int num12 = 2; num12 <= check_ver_no; num12++)
+					for (int num14 = 2; num14 <= check_ver_no; num14++)
 					{
 						AddFolderOrArchive(string.Concat(new object[]
 						{
 							name,
 							"_",
-							text26,
+							text28,
 							"_",
-							num12
+							num14
 						}));
 					}
 				}
@@ -594,9 +595,10 @@ public class GameUty
 			}
 		}
 		AddFolderOrArchive("system2");
+		AddFolderOrArchive("language");
 		foreach (string text19 in GameUty.PathList)
 		{
-			string text20 = "bg";
+			string text20 = "language";
 			if (AddFolderOrArchive(text20 + "_" + text19))
 			{
 				for (int num3 = 2; num3 <= check_ver_no; num3++)
@@ -612,51 +614,69 @@ public class GameUty
 				}
 			}
 		}
+		foreach (string text21 in GameUty.PathList)
+		{
+			string text22 = "bg";
+			if (AddFolderOrArchive(text22 + "_" + text21))
+			{
+				for (int num4 = 2; num4 <= check_ver_no; num4++)
+				{
+					AddFolderOrArchive(string.Concat(new object[]
+					{
+						text22,
+						"_",
+						text21,
+						"_",
+						num4
+					}));
+				}
+			}
+		}
 		AddFolderOrArchive("voice");
-		for (int num4 = 0; num4 < 25; num4++)
+		for (int num5 = 0; num5 < 25; num5++)
 		{
 			string arg = "voice";
-			string arg2 = arg + "_" + (char)(97 + num4);
+			string arg2 = arg + "_" + (char)(97 + num5);
 			AddFolderOrArchive(arg2);
 		}
-		foreach (string text21 in GameUty.PathList)
+		foreach (string text23 in GameUty.PathList)
 		{
-			string text22 = "voice";
-			if (AddFolderOrArchive(text22 + "_" + text21))
+			string text24 = "voice";
+			if (AddFolderOrArchive(text24 + "_" + text23))
 			{
-				for (int num5 = 2; num5 <= check_ver_no; num5++)
+				for (int num6 = 2; num6 <= check_ver_no; num6++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text22,
+						text24,
 						"_",
-						text21,
+						text23,
 						"_",
-						num5
+						num6
 					}));
 				}
 			}
 		}
-		for (int num6 = 2; num6 <= check_ver_no; num6++)
+		for (int num7 = 2; num7 <= check_ver_no; num7++)
 		{
 			string arg3 = "voice";
-			AddFolderOrArchive(arg3 + num6);
+			AddFolderOrArchive(arg3 + num7);
 		}
-		string text23 = "parts";
-		NDebug.Assert(AddFolderOrArchive(text23), str + text23);
-		foreach (string text24 in GameUty.PathList)
+		string text25 = "parts";
+		NDebug.Assert(AddFolderOrArchive(text25), str + text25);
+		foreach (string text26 in GameUty.PathList)
 		{
-			if (AddFolderOrArchive(text23 + "_" + text24))
+			if (AddFolderOrArchive(text25 + "_" + text26))
 			{
-				for (int num7 = 2; num7 <= check_ver_no; num7++)
+				for (int num8 = 2; num8 <= check_ver_no; num8++)
 				{
 					AddFolderOrArchive(string.Concat(new object[]
 					{
-						text23,
+						text25,
 						"_",
-						text24,
+						text26,
 						"_",
-						num7
+						num8
 					}));
 				}
 			}
@@ -677,25 +697,50 @@ public class GameUty
 				}
 			}
 		}
+		list = GameUty.m_FileSystem.GetList("languagesource", AFileSystemBase.ListType.AllFile);
+		if (list != null && 0 < list.Length)
+		{
+			foreach (string path2 in list)
+			{
+				string fileName2 = Path.GetFileName(path2);
+				if (!(Path.GetExtension(fileName2) != ".asset_language"))
+				{
+					if (!(fileName2 == "parts.asset_language"))
+					{
+						using (AFileBase afileBase = GameUty.m_FileSystem.FileOpen(fileName2))
+						{
+							AssetBundle assetBundle = AssetBundle.LoadFromMemory(afileBase.ReadAll());
+							LanguageSource languageSource = UnityEngine.Object.Instantiate<LanguageSource>(assetBundle.LoadAllAssets<GameObject>()[0].GetComponent<LanguageSource>());
+							if (GameMain.Instance.transform.Find("Language") == null)
+							{
+								new GameObject("Language").transform.SetParent(GameMain.Instance.transform);
+							}
+							languageSource.transform.SetParent(GameMain.Instance.transform.Find("Language"));
+							assetBundle.Unload(true);
+						}
+					}
+				}
+			}
+		}
 		if (Directory.Exists(fullPath + "Mod"))
 		{
 			GameUty.m_ModFileSystem = new FileSystemWindows();
 			GameUty.m_ModFileSystem.SetBaseDirectory(fullPath);
 			GameUty.m_ModFileSystem.AddFolder("Mod");
 			string[] list2 = GameUty.m_ModFileSystem.GetList(string.Empty, AFileSystemBase.ListType.AllFolder);
-			foreach (string text25 in list2)
+			foreach (string text27 in list2)
 			{
-				if (!GameUty.m_ModFileSystem.AddAutoPath(text25))
+				if (!GameUty.m_ModFileSystem.AddAutoPath(text27))
 				{
-					Debug.Log("m_ModFileSystemのAddAutoPathには既に " + text25 + " がありました。");
+					Debug.Log("m_ModFileSystemのAddAutoPathには既に " + text27 + " がありました。");
 				}
 			}
 		}
 		string[] fileListAtExtension = GameUty.m_FileSystem.GetFileListAtExtension(".menu");
 		List<string> list3 = new List<string>();
-		foreach (string path2 in fileListAtExtension)
+		foreach (string path3 in fileListAtExtension)
 		{
-			list3.Add(Path.GetFileName(path2));
+			list3.Add(Path.GetFileName(path3));
 		}
 		GameUty.m_aryMenuFiles = list3.ToArray();
 		if (GameUty.m_ModFileSystem != null)
@@ -713,20 +758,20 @@ public class GameUty
 		{
 			string[] menuFiles = GameUty.MenuFiles;
 			GameUty.rid_menu_dic_ = new Dictionary<int, string>();
-			for (int num11 = 0; num11 < menuFiles.Length; num11++)
+			for (int num13 = 0; num13 < menuFiles.Length; num13++)
 			{
-				string fileName2 = Path.GetFileName(menuFiles[num11]);
-				int hashCode = fileName2.ToLower().GetHashCode();
+				string fileName3 = Path.GetFileName(menuFiles[num13]);
+				int hashCode = fileName3.ToLower().GetHashCode();
 				if (!GameUty.rid_menu_dic_.ContainsKey(hashCode))
 				{
-					GameUty.rid_menu_dic_.Add(hashCode, fileName2);
+					GameUty.rid_menu_dic_.Add(hashCode, fileName3);
 				}
 				else
 				{
-					NDebug.Assert(fileName2 == GameUty.rid_menu_dic_[hashCode], string.Concat(new string[]
+					NDebug.Assert(fileName3 == GameUty.rid_menu_dic_[hashCode], string.Concat(new string[]
 					{
 						"[",
-						fileName2,
+						fileName3,
 						"]と[",
 						GameUty.rid_menu_dic_[hashCode],
 						"]は同じハッシュキーです"
@@ -918,14 +963,14 @@ public class GameUty
 
 	public static string GetBuildVersionText()
 	{
-		int num = 1200;
+		int num = 1210;
 		return (num >= 1000) ? ((float)num / 1000f).ToString("F2") : ((float)num / 100f).ToString("F2");
 	}
 
 	public static string GetGameVersionText()
 	{
 		string text = "COM3D2x64.exe";
-		int num = 1200;
+		int num = 1210;
 		string path = Path.GetFullPath(".\\") + "update.lst";
 		string[] array = new string[0];
 		if (File.Exists(path))

+ 2 - 2
Assembly-CSharp/HandSignShortcut.cs

@@ -494,7 +494,7 @@ public class HandSignShortcut : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1200;
+			this.m_nVersion = 1210;
 		}
 
 		public void OnAfterDeserialize()
@@ -803,7 +803,7 @@ public class HandSignShortcut : MonoBehaviour
 		private const string CONF_NAME = "MaidFingerDataList.json";
 
 		[SerializeField]
-		private int m_nVersion = 1200;
+		private int m_nVersion = 1210;
 
 		[SerializeField]
 		private List<HandSignShortcut.MaidFingerData> MaidFingerDataList = new List<HandSignShortcut.MaidFingerData>();

+ 33 - 24
Assembly-CSharp/I2/Loc/LanguageSource.cs

@@ -436,7 +436,16 @@ namespace I2.Loc
 
 		public string Import_CSV(string Category, List<string[]> CSV, eSpreadsheetUpdateMode UpdateMode = eSpreadsheetUpdateMode.Replace)
 		{
-			string[] array = CSV[0];
+			List<string[]> list = new List<string[]>(CSV);
+			CSV.Clear();
+			foreach (string[] array in list)
+			{
+				if (0 < array.Length && !string.IsNullOrEmpty(array[0]))
+				{
+					CSV.Add(array);
+				}
+			}
+			string[] array2 = CSV[0];
 			int num = 1;
 			int num2 = -1;
 			int num3 = -1;
@@ -453,49 +462,49 @@ namespace I2.Loc
 				"Desc",
 				"Description"
 			};
-			if (array.Length > 1 && this.ArrayContains(array[0], texts))
+			if (array2.Length > 1 && this.ArrayContains(array2[0], texts))
 			{
 				if (UpdateMode == eSpreadsheetUpdateMode.Replace)
 				{
 					this.ClearAllData();
 				}
-				if (array.Length > 2)
+				if (array2.Length > 2)
 				{
-					if (this.ArrayContains(array[1], texts2))
+					if (this.ArrayContains(array2[1], texts2))
 					{
 						num2 = 1;
 						num = 2;
 					}
-					if (this.ArrayContains(array[1], texts3))
+					if (this.ArrayContains(array2[1], texts3))
 					{
 						num3 = 1;
 						num = 2;
 					}
 				}
-				if (array.Length > 3)
+				if (array2.Length > 3)
 				{
-					if (this.ArrayContains(array[2], texts2))
+					if (this.ArrayContains(array2[2], texts2))
 					{
 						num2 = 2;
 						num = 3;
 					}
-					if (this.ArrayContains(array[2], texts3))
+					if (this.ArrayContains(array2[2], texts3))
 					{
 						num3 = 2;
 						num = 3;
 					}
 				}
-				int num4 = Mathf.Max(array.Length - num, 0);
-				int[] array2 = new int[num4];
+				int num4 = Mathf.Max(array2.Length - num, 0);
+				int[] array3 = new int[num4];
 				for (int i = 0; i < num4; i++)
 				{
-					if (string.IsNullOrEmpty(array[i + num]))
+					if (string.IsNullOrEmpty(array2[i + num]))
 					{
-						array2[i] = -1;
+						array3[i] = -1;
 					}
 					else
 					{
-						string text = array[i + num];
+						string text = array2[i + num];
 						bool flag = true;
 						if (text.StartsWith("$"))
 						{
@@ -523,7 +532,7 @@ namespace I2.Loc
 							this.mLanguages.Add(languageData);
 							num5 = this.mLanguages.Count - 1;
 						}
-						array2[i] = num5;
+						array3[i] = num5;
 					}
 				}
 				num4 = this.mLanguages.Count;
@@ -543,8 +552,8 @@ namespace I2.Loc
 				int count2 = CSV.Count;
 				while (k < count2)
 				{
-					array = CSV[k];
-					string text4 = (!string.IsNullOrEmpty(Category)) ? (Category + "/" + array[0]) : array[0];
+					array2 = CSV[k];
+					string text4 = (!string.IsNullOrEmpty(Category)) ? (Category + "/" + array2[0]) : array2[0];
 					string text5 = null;
 					if (text4.EndsWith("]"))
 					{
@@ -578,25 +587,25 @@ namespace I2.Loc
 						}
 						else if (UpdateMode == eSpreadsheetUpdateMode.AddNewTerms)
 						{
-							goto IL_461;
+							goto IL_4D3;
 						}
 						if (num2 > 0)
 						{
-							termData2.TermType = LanguageSource.GetTermType(array[num2]);
+							termData2.TermType = LanguageSource.GetTermType(array2[num2]);
 						}
 						if (num3 > 0)
 						{
-							termData2.Description = array[num3];
+							termData2.Description = array2[num3];
 						}
 						int num7 = 0;
-						while (num7 < array2.Length && num7 < array.Length - num)
+						while (num7 < array3.Length && num7 < array2.Length - num)
 						{
-							if (!string.IsNullOrEmpty(array[num7 + num]))
+							if (!string.IsNullOrEmpty(array2[num7 + num]))
 							{
-								int num8 = array2[num7];
+								int num8 = array3[num7];
 								if (num8 >= 0)
 								{
-									string text6 = array[num7 + num];
+									string text6 = array2[num7 + num];
 									if (text6 == "-")
 									{
 										text6 = string.Empty;
@@ -611,7 +620,7 @@ namespace I2.Loc
 							num7++;
 						}
 					}
-					IL_461:
+					IL_4D3:
 					k++;
 				}
 				return string.Empty;

+ 0 - 1
Assembly-CSharp/I2/Loc/LocalizationManager.cs

@@ -656,7 +656,6 @@ namespace I2.Loc
 		{
 			LocalizationManager.UnregisterDeletededSources();
 			LocalizationManager.RegisterSourceInResources();
-			LocalizationManager.RegisterSceneSources();
 			return LocalizationManager.Sources.Count > 0;
 		}
 

+ 1 - 1
Assembly-CSharp/Kasizuki/KasizukiManager.cs

@@ -804,7 +804,7 @@ namespace Kasizuki
 		public void Serialize(BinaryWriter bw)
 		{
 			bw.Write("COM3D2_KASIZUKI");
-			bw.Write(1200);
+			bw.Write(1210);
 			this.SerializeOriginHeader(bw);
 			foreach (KeyValuePair<int, KasizukiManager.SaveData> keyValuePair in this.m_SaveDataArray)
 			{

+ 290 - 0
Assembly-CSharp/LifeModeChangeWindow.cs

@@ -0,0 +1,290 @@
+using System;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.Events;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+
+public class LifeModeChangeWindow : MonoBehaviour
+{
+	private void UpdateNowSelectType()
+	{
+		this.m_NowSelectType = GameModeManager.nowGameMode;
+	}
+
+	private void SetNowSelectType(GameModeManager.Type type)
+	{
+		this.m_NowSelectType = type;
+	}
+
+	private void SetNowGameMode()
+	{
+		GameModeManager.nowGameMode = this.m_NowSelectType;
+	}
+
+	private uGUICanvasFade uGUICanvasFade
+	{
+		get
+		{
+			if (this.m_uGUICanvasFade == null)
+			{
+				this.m_uGUICanvasFade = base.GetComponent<uGUICanvasFade>();
+			}
+			return this.m_uGUICanvasFade;
+		}
+	}
+
+	private void Init()
+	{
+		if (this.m_IsInit)
+		{
+			return;
+		}
+		this.m_IsInit = true;
+		this.m_UIListBanner.tempItem.AddComponent<LifeModeChangeWindow.BannerEnterHandler>();
+		this.m_ButtonClose.onClick.AddListener(new UnityAction(this.CloseWindow));
+	}
+
+	private void Start()
+	{
+		if (this.m_IsInit)
+		{
+			return;
+		}
+		this.Init();
+		this.uGUICanvasFade.FadeOut(0f, null);
+		base.gameObject.SetActive(false);
+	}
+
+	public void Open(Action callback)
+	{
+		this.Init();
+		this.m_CallbackCloseWindow = callback;
+		this.OpenWindow();
+	}
+
+	private void OpenWindow()
+	{
+		LifeModeChangeWindow.<OpenWindow>c__AnonStorey0 <OpenWindow>c__AnonStorey = new LifeModeChangeWindow.<OpenWindow>c__AnonStorey0();
+		<OpenWindow>c__AnonStorey.$this = this;
+		this.uGUICanvasFade.interactable = false;
+		this.uGUICanvasFade.blocksRaycasts = true;
+		this.uGUICanvasFade.alpha = 0f;
+		this.uGUICanvasFade.FadeIn(0.3f, delegate
+		{
+			<OpenWindow>c__AnonStorey.$this.uGUICanvasFade.interactable = true;
+		});
+		this.UpdateNowSelectType();
+		Dictionary<GameModeManager.Type, GameModeManager.Data> dataDic = GameModeManager.DataDic;
+		<OpenWindow>c__AnonStorey.keyList = new List<GameModeManager.Type>(dataDic.Keys);
+		<OpenWindow>c__AnonStorey.valueList = new List<GameModeManager.Data>(dataDic.Values);
+		this.m_UIListBanner.Show<Toggle>(dataDic.Count, delegate(int index, Toggle toggle)
+		{
+			GameModeManager.Type dataType = <OpenWindow>c__AnonStorey.keyList[index];
+			GameModeManager.Data data = <OpenWindow>c__AnonStorey.valueList[index];
+			if (toggle.image != null)
+			{
+				Sprite spriteInAtlas = <OpenWindow>c__AnonStorey.$this.GetSpriteInAtlas(<OpenWindow>c__AnonStorey.$this.m_UIAtlasBusinessBannger, data.strBannerImageName);
+				if (spriteInAtlas != null)
+				{
+					toggle.image.sprite = spriteInAtlas;
+				}
+			}
+			if (dataType == <OpenWindow>c__AnonStorey.$this.m_NowSelectType)
+			{
+				toggle.isOn = true;
+			}
+			toggle.onValueChanged.AddListener(delegate(bool value)
+			{
+				if (!value)
+				{
+					return;
+				}
+				<OpenWindow>c__AnonStorey.SetNowSelectType(dataType);
+				<OpenWindow>c__AnonStorey.UpdateBannerList();
+			});
+			LifeModeChangeWindow.BannerEnterHandler component = toggle.GetComponent<LifeModeChangeWindow.BannerEnterHandler>();
+			component.onPointerEnter = delegate()
+			{
+				<OpenWindow>c__AnonStorey.UpdateDescription(data.strDescription);
+			};
+			component.onPointerExit = delegate()
+			{
+				<OpenWindow>c__AnonStorey.UpdateDescription(GameModeManager.GetData(<OpenWindow>c__AnonStorey.m_NowSelectType).strDescription);
+			};
+		});
+		this.UpdateDescription(GameModeManager.GetData().strDescription);
+		this.UpdateBannerList();
+	}
+
+	private void UpdateBannerList()
+	{
+		foreach (GameObject gameObject in this.m_UIListBanner.ItemArray)
+		{
+			LifeModeChangeWindow.BannerEnterHandler component = gameObject.GetComponent<LifeModeChangeWindow.BannerEnterHandler>();
+			component.UpdateColorBlock();
+			component.toggle.interactable = !component.toggle.isOn;
+		}
+	}
+
+	private void UpdateDescription(string msg)
+	{
+		this.m_UITextDescription.text = msg;
+	}
+
+	public void CloseWindow()
+	{
+		if (this.m_CallbackCloseWindow != null)
+		{
+			this.m_CallbackCloseWindow();
+			this.m_CallbackCloseWindow = null;
+		}
+		this.SetNowGameMode();
+		this.uGUICanvasFade.interactable = false;
+		this.uGUICanvasFade.FadeOut(0.3f, delegate
+		{
+			base.gameObject.SetActive(false);
+			this.uGUICanvasFade.blocksRaycasts = false;
+			this.uGUICanvasFade.alpha = 0f;
+		});
+	}
+
+	private Sprite GetSpriteInAtlas(UIAtlas atlas, string resourceName)
+	{
+		Sprite sprite = null;
+		if (this.m_SpriteDic.TryGetValue(resourceName, out sprite))
+		{
+			return sprite;
+		}
+		sprite = uGUIUtility.GetSpriteInAtlas(atlas, resourceName);
+		this.m_SpriteDic.Add(resourceName, sprite);
+		return sprite;
+	}
+
+	private void OnDestroy()
+	{
+		if (this == null)
+		{
+			return;
+		}
+		if (base.gameObject == null)
+		{
+			return;
+		}
+		if (this.m_SpriteDic != null)
+		{
+			int count = this.m_SpriteDic.Count;
+			List<Sprite> list = new List<Sprite>(this.m_SpriteDic.Values);
+			for (int i = count - 1; i >= 0; i--)
+			{
+				UnityEngine.Object.Destroy(list[i]);
+			}
+			this.m_SpriteDic.Clear();
+			list.Clear();
+		}
+	}
+
+	private GameModeManager.Type m_NowSelectType;
+
+	[SerializeField]
+	private uGUIListViewer m_UIListBanner;
+
+	[SerializeField]
+	private Text m_UITextDescription;
+
+	[SerializeField]
+	private Button m_ButtonClose;
+
+	private uGUICanvasFade m_uGUICanvasFade;
+
+	private Action m_CallbackCloseWindow;
+
+	private bool m_IsInit;
+
+	[SerializeField]
+	private UIAtlas m_UIAtlasBusinessBannger;
+
+	private Dictionary<string, Sprite> m_SpriteDic = new Dictionary<string, Sprite>();
+
+	private class BannerEnterHandler : UIBehaviour, IPointerEnterHandler, IPointerExitHandler, IEventSystemHandler
+	{
+		public Toggle toggle
+		{
+			get
+			{
+				if (this.m_Toggle == null)
+				{
+					this.m_Toggle = base.gameObject.GetComponentInChildren<Toggle>();
+				}
+				return this.m_Toggle;
+			}
+		}
+
+		protected override void Start()
+		{
+			this.InitColorBlock();
+		}
+
+		private void InitColorBlock()
+		{
+			if (this.m_IsInitColorBlock)
+			{
+				return;
+			}
+			this.m_IsInitColorBlock = true;
+			this.m_ColorBlockDefault = this.toggle.colors;
+			this.m_ColorBlockSelected = this.toggle.colors;
+			this.m_ColorBlockSelected.normalColor = this.m_ColorBlockSelected.highlightedColor;
+			this.m_ColorBlockSelected.disabledColor = this.m_ColorBlockSelected.highlightedColor;
+			this.m_ColorBlockSelected.pressedColor = this.m_ColorBlockSelected.highlightedColor;
+		}
+
+		public void OnPointerEnter(PointerEventData eventData)
+		{
+			if (this.IsSelecting())
+			{
+				return;
+			}
+			if (this.onPointerEnter != null)
+			{
+				this.onPointerEnter();
+			}
+		}
+
+		public void OnPointerExit(PointerEventData eventData)
+		{
+			if (this.IsSelecting())
+			{
+				return;
+			}
+			if (this.onPointerExit != null)
+			{
+				this.onPointerExit();
+			}
+		}
+
+		private bool IsSelecting()
+		{
+			return this.toggle.isOn;
+		}
+
+		public void UpdateColorBlock()
+		{
+			this.InitColorBlock();
+			bool flag = this.IsSelecting();
+			this.toggle.colors = ((!flag) ? this.m_ColorBlockDefault : this.m_ColorBlockSelected);
+		}
+
+		public Action onPointerEnter;
+
+		public Action onPointerExit;
+
+		private ColorBlock m_ColorBlockDefault;
+
+		private ColorBlock m_ColorBlockSelected;
+
+		private Toggle m_Toggle;
+
+		private bool m_IsInitColorBlock;
+	}
+}

+ 3 - 3
Assembly-CSharp/Maid.cs

@@ -1214,7 +1214,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeProp(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP_LIST");
-		f_bwWrite.Write(1200);
+		f_bwWrite.Write(1210);
 		f_bwWrite.Write(this.m_dicMaidProp.Count);
 		foreach (KeyValuePair<string, MaidProp> keyValuePair in this.m_dicMaidProp)
 		{
@@ -1246,7 +1246,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeMisc(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_MISC");
-		f_bwWrite.Write(1200);
+		f_bwWrite.Write(1210);
 		f_bwWrite.Write(this.m_nActiveSlotNo);
 		if (this.m_texIcon != null)
 		{
@@ -1271,7 +1271,7 @@ public class Maid : MonoBehaviour
 	public bool SerializeBody(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MAID_BODY");
-		f_bwWrite.Write(1200);
+		f_bwWrite.Write(1210);
 		return true;
 	}
 

+ 54 - 14
Assembly-CSharp/MaidParts.cs

@@ -11,6 +11,7 @@ public class MaidParts : MonoBehaviour
 		for (int i = 0; i < 9; i++)
 		{
 			this.m_aryPartsColorTable[i] = new Texture2D(256, 1, TextureFormat.RGBA32, false);
+			this.m_aryPartsColorTable[i].wrapMode = TextureWrapMode.Clamp;
 		}
 		return true;
 	}
@@ -35,10 +36,12 @@ public class MaidParts : MonoBehaviour
 	public unsafe bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MULTI_COL");
-		f_bwWrite.Write(1200);
+		f_bwWrite.Write(1210);
 		f_bwWrite.Write(this.m_aryPartsColor.Length);
 		for (int i = 0; i < this.m_aryPartsColor.Length; i++)
 		{
+			MaidParts.PARTS_COLOR parts_COLOR = (MaidParts.PARTS_COLOR)i;
+			f_bwWrite.Write(parts_COLOR.ToString());
 			fixed (MaidParts.PartsColor* ptr = &this.m_aryPartsColor[i])
 			{
 				f_bwWrite.Write(ptr->m_bUse);
@@ -53,6 +56,7 @@ public class MaidParts : MonoBehaviour
 				f_bwWrite.Write(ptr->m_nShadowContrast);
 			}
 		}
+		f_bwWrite.Write(MaidParts.PARTS_COLOR.MAX.ToString());
 		return true;
 	}
 
@@ -63,24 +67,60 @@ public class MaidParts : MonoBehaviour
 		NDebug.Assert(a == "CM3D2_MULTI_COL", "無限色のヘッダーが不正です。");
 		int num = f_brRead.ReadInt32();
 		int num2 = f_brRead.ReadInt32();
-		if (num >= 200 && array.Length != num2)
+		if (num <= 1200 && ((200 > num) ? (7 != num2) : (9 != num2)))
 		{
 			NDebug.Assert("無限色数が異なります。セーブデータが破損しています。", false);
 		}
-		for (int i = 0; i < num2; i++)
+		if (num <= 1200)
 		{
-			fixed (MaidParts.PartsColor* ptr = &array[i])
+			string[] array2 = new string[]
 			{
-				ptr->m_bUse = f_brRead.ReadBoolean();
-				ptr->m_nMainHue = f_brRead.ReadInt32();
-				ptr->m_nMainChroma = f_brRead.ReadInt32();
-				ptr->m_nMainBrightness = f_brRead.ReadInt32();
-				ptr->m_nMainContrast = f_brRead.ReadInt32();
-				ptr->m_nShadowRate = f_brRead.ReadInt32();
-				ptr->m_nShadowHue = f_brRead.ReadInt32();
-				ptr->m_nShadowChroma = f_brRead.ReadInt32();
-				ptr->m_nShadowBrightness = f_brRead.ReadInt32();
-				ptr->m_nShadowContrast = f_brRead.ReadInt32();
+				"EYE_L",
+				"EYE_R",
+				"HAIR",
+				"EYE_BROW",
+				"UNDER_HAIR",
+				"SKIN",
+				"NIPPLE",
+				"HAIR_OUTLINE",
+				"SKIN_OUTLINE"
+			};
+			for (int i = 0; i < num2; i++)
+			{
+				MaidParts.PartsColor partsColor = default(MaidParts.PartsColor);
+				partsColor.m_bUse = f_brRead.ReadBoolean();
+				partsColor.m_nMainHue = f_brRead.ReadInt32();
+				partsColor.m_nMainChroma = f_brRead.ReadInt32();
+				partsColor.m_nMainBrightness = f_brRead.ReadInt32();
+				partsColor.m_nMainContrast = f_brRead.ReadInt32();
+				partsColor.m_nShadowRate = f_brRead.ReadInt32();
+				partsColor.m_nShadowHue = f_brRead.ReadInt32();
+				partsColor.m_nShadowChroma = f_brRead.ReadInt32();
+				partsColor.m_nShadowBrightness = f_brRead.ReadInt32();
+				partsColor.m_nShadowContrast = f_brRead.ReadInt32();
+				MaidParts.PARTS_COLOR parts_COLOR = (MaidParts.PARTS_COLOR)Enum.Parse(typeof(MaidParts.PARTS_COLOR), array2[i], true);
+				array[(int)parts_COLOR] = partsColor;
+			}
+		}
+		else
+		{
+			string value;
+			while ((value = f_brRead.ReadString()) != MaidParts.PARTS_COLOR.MAX.ToString())
+			{
+				MaidParts.PARTS_COLOR parts_COLOR2 = (MaidParts.PARTS_COLOR)Enum.Parse(typeof(MaidParts.PARTS_COLOR), value, true);
+				fixed (MaidParts.PartsColor* ptr = &array[(int)parts_COLOR2])
+				{
+					ptr->m_bUse = f_brRead.ReadBoolean();
+					ptr->m_nMainHue = f_brRead.ReadInt32();
+					ptr->m_nMainChroma = f_brRead.ReadInt32();
+					ptr->m_nMainBrightness = f_brRead.ReadInt32();
+					ptr->m_nMainContrast = f_brRead.ReadInt32();
+					ptr->m_nShadowRate = f_brRead.ReadInt32();
+					ptr->m_nShadowHue = f_brRead.ReadInt32();
+					ptr->m_nShadowChroma = f_brRead.ReadInt32();
+					ptr->m_nShadowBrightness = f_brRead.ReadInt32();
+					ptr->m_nShadowContrast = f_brRead.ReadInt32();
+				}
 			}
 		}
 		return array;

+ 1 - 1
Assembly-CSharp/MaidProp.cs

@@ -8,7 +8,7 @@ public class MaidProp
 	public bool Serialize(BinaryWriter f_bwWrite)
 	{
 		f_bwWrite.Write("CM3D2_MPROP");
-		f_bwWrite.Write(1200);
+		f_bwWrite.Write(1210);
 		f_bwWrite.Write(this.idx);
 		f_bwWrite.Write(this.name);
 		f_bwWrite.Write(this.type);

+ 1 - 1
Assembly-CSharp/MaidStatus/Status.cs

@@ -1215,7 +1215,7 @@ namespace MaidStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_MAID_STATUS");
-			binary.Write(1200);
+			binary.Write(1210);
 			binary.Write(this.guid);
 			binary.Write(this.creationTime);
 			binary.Write((short)this.heroineType);

+ 1 - 1
Assembly-CSharp/Menu.cs

@@ -753,7 +753,7 @@ public class Menu : MonoBehaviour
 			Directory.CreateDirectory(text);
 		}
 		StreamWriter streamWriter = new StreamWriter(text + "\\" + text2 + ".txt", false, Encoding.UTF8);
-		streamWriter.WriteLine("出力バージョン\t" + 1200);
+		streamWriter.WriteLine("出力バージョン\t" + 1210);
 		streamWriter.WriteLine("基本アイテム\t" + filename.Replace(" ", ":"));
 		try
 		{

+ 1 - 1
Assembly-CSharp/Misc.cs

@@ -2,7 +2,7 @@
 
 public class Misc
 {
-	public const int GAME_VERSION = 1200;
+	public const int GAME_VERSION = 1210;
 
 	public const string GAME_DATA_PATH = "GameData";
 

+ 1 - 1
Assembly-CSharp/ModCompile.cs

@@ -604,7 +604,7 @@ public class ModCompile : MonoBehaviour
 		MemoryStream memoryStream = new MemoryStream();
 		BinaryWriter binaryWriter = new BinaryWriter(memoryStream);
 		binaryWriter.Write("CM3D2_MESH");
-		binaryWriter.Write(1200);
+		binaryWriter.Write(1210);
 		string fileNameWithoutExtension = Path.GetFileNameWithoutExtension(f_strMqoFile);
 		binaryWriter.Write(fileNameWithoutExtension);
 		binaryWriter.Write(exObjIn2.strName);

+ 1 - 0
Assembly-CSharp/MyRoomCustom/CreativeRoom.cs

@@ -81,6 +81,7 @@ namespace MyRoomCustom
 					component.shadowCastingMode = ShadowCastingMode.Off;
 					component.receiveShadows = false;
 					CreativeRoom.m_PrefabUnit.gameObject.SetActive(false);
+					CreativeRoom.m_PrefabUnit.layer = LayerMask.NameToLayer("Terrain");
 				}
 				return CreativeRoom.m_PrefabUnit;
 			}

+ 18 - 4
Assembly-CSharp/MyRoomCustom/CreativeRoomManager.cs

@@ -33,6 +33,14 @@ namespace MyRoomCustom
 			}
 		}
 
+		public Camera inputCamera
+		{
+			get
+			{
+				return this.m_CamerauGUI;
+			}
+		}
+
 		private float cameraFOV
 		{
 			set
@@ -86,6 +94,8 @@ namespace MyRoomCustom
 			this.m_CamerauGUI.clearFlags = CameraClearFlags.Nothing;
 			this.m_CamerauGUI.useOcclusionCulling = false;
 			this.m_CamerauGUI.enabled = false;
+			this.m_CamerauGUI.allowHDR = false;
+			this.m_CamerauGUI.allowMSAA = false;
 			this.m_CamerauGUI.gameObject.AddComponent<PhysicsRaycaster>();
 			Transform transform = camera.transform;
 			gameObject.transform.SetParent(transform, false);
@@ -136,10 +146,14 @@ namespace MyRoomCustom
 
 		private void Update()
 		{
-			this.cameraFOV = this.m_MainCamera.fieldOfView;
-			this.cameraOrthographic = this.m_MainCamera.orthographic;
-			this.cameraOrthographicSize = this.m_MainCamera.orthographicSize;
-			this.cameraRect = this.m_MainCamera.pixelRect;
+			GameMain.VRDeviceType vrdeviceTypeID = GameMain.Instance.VRDeviceTypeID;
+			if (vrdeviceTypeID != GameMain.VRDeviceType.RIFT_TOUCH && vrdeviceTypeID != GameMain.VRDeviceType.VIVE)
+			{
+				this.cameraFOV = this.m_MainCamera.fieldOfView;
+				this.cameraOrthographic = this.m_MainCamera.orthographic;
+				this.cameraOrthographicSize = this.m_MainCamera.orthographicSize;
+				this.cameraRect = this.m_MainCamera.pixelRect;
+			}
 		}
 
 		public CreativeRoomManager.CreativeRoomHeader Save(int number)

+ 574 - 0
Assembly-CSharp/MyRoomCustom/CreativeRoomUIPlacementMaid.cs

@@ -0,0 +1,574 @@
+using System;
+using System.Collections;
+using System.Collections.Specialized;
+using UnityEngine;
+using UnityEngine.EventSystems;
+using UnityEngine.UI;
+
+namespace MyRoomCustom
+{
+	public class CreativeRoomUIPlacementMaid : MonoBehaviour
+	{
+		private Maid targetMaid
+		{
+			get
+			{
+				if (this.m_TargetMaid == null)
+				{
+					this.m_TargetMaid = this.GetMaid(true);
+					if (this.m_TargetMaid == null)
+					{
+						this.m_TargetMaid = this.GetMaid(false);
+					}
+					if (this.m_TargetMaid)
+					{
+						this.m_TargetMaid.body0.SetBoneHitHeightY(-1000f);
+					}
+				}
+				return this.m_TargetMaid;
+			}
+		}
+
+		private Maid GetMaid(bool searchLeader = true)
+		{
+			if (this.m_CharaMgr == null)
+			{
+				return null;
+			}
+			Maid maid = null;
+			foreach (Maid maid2 in this.m_CharaMgr.GetStockMaidList())
+			{
+				if (maid2 != null)
+				{
+					if (!searchLeader || maid2.status.leader)
+					{
+						maid = maid2;
+						break;
+					}
+				}
+			}
+			if (maid == null)
+			{
+				int maidCount = this.m_CharaMgr.GetMaidCount();
+				for (int i = 0; i < maidCount; i++)
+				{
+					Maid maid3 = this.m_CharaMgr.GetMaid(i);
+					if (maid3 != null)
+					{
+						if (!searchLeader || maid3.status.leader)
+						{
+							maid = maid3;
+							break;
+						}
+					}
+				}
+			}
+			return maid;
+		}
+
+		public float snapValuePosition
+		{
+			set
+			{
+				if (this.m_GizmoObject == null)
+				{
+					return;
+				}
+				this.m_GizmoObject.snapValuePosition = value;
+			}
+		}
+
+		private void Awake()
+		{
+			this.m_CharaMgr = GameMain.Instance.CharacterMgr;
+			GameObject gameObject;
+			if (!(gameObject = GameObject.Find("[CreativeRoomUI Placement Maid] GizmoControlObject")))
+			{
+				gameObject = new GameObject("[CreativeRoomUI Placement Maid] GizmoControlObject");
+				GizmoObject gizmoObject = gameObject.AddComponent<GizmoObject>();
+				gizmoObject.activeAxis = true;
+				gizmoObject.activeRot = false;
+				gizmoObject.snapValuePosition = 0.5f;
+				gizmoObject.snapValueAngles = 15f;
+				gizmoObject.snapValueScale = 0.1f;
+				gameObject.SetActive(false);
+			}
+			this.m_GizmoObject = gameObject.GetComponent<GizmoObject>();
+			GizmoObject gizmoObject2 = this.m_GizmoObject;
+			gizmoObject2.onChangePosition = (Action<Vector3>)Delegate.Combine(gizmoObject2.onChangePosition, new Action<Vector3>(this.OnUpdateGizmoPosition));
+			GizmoObject gizmoObject3 = this.m_GizmoObject;
+			gizmoObject3.onChangeRotation = (Action<Quaternion>)Delegate.Combine(gizmoObject3.onChangeRotation, new Action<Quaternion>(this.OnUpdateGizmoRotation));
+			GizmoObject gizmoObject4 = this.m_GizmoObject;
+			gizmoObject4.onChangeScale = (Action<Vector3>)Delegate.Combine(gizmoObject4.onChangeScale, new Action<Vector3>(this.OnUpdateGizmoScale));
+			this.SetUpUI();
+		}
+
+		private void SetUpUI()
+		{
+			this.m_CachedTransformDataDic = new StringDictionary();
+			this.m_InputFieldPosX.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldPosY.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldPosZ.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldRotX.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldRotY.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldRotZ.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldScale.contentType = InputField.ContentType.DecimalNumber;
+			this.m_InputFieldPosX.text = this.m_GizmoObject.position.x.ToString("f3");
+			this.m_InputFieldPosY.text = this.m_GizmoObject.position.y.ToString("f3");
+			this.m_InputFieldPosZ.text = this.m_GizmoObject.position.z.ToString("f3");
+			this.m_InputFieldRotX.text = this.m_GizmoObject.eulerAngles.x.ToString("f3");
+			this.m_InputFieldRotY.text = this.m_GizmoObject.eulerAngles.y.ToString("f3");
+			this.m_InputFieldRotZ.text = this.m_GizmoObject.eulerAngles.z.ToString("f3");
+			this.m_InputFieldScale.text = this.m_GizmoObject.scale.x.ToString("f3");
+			this.m_SliderScale.value = this.m_GizmoObject.scale.x;
+			Action<InputField, Action<float>, Action> action = delegate(InputField input, Action<float> act_change, Action act_end)
+			{
+				input.onValueChanged.AddListener(delegate(string str)
+				{
+					float obj;
+					if (float.TryParse(str, out obj))
+					{
+						act_change(obj);
+					}
+				});
+				input.onEndEdit.AddListener(delegate(string str)
+				{
+					act_end();
+				});
+			};
+			action(this.m_InputFieldPosX, delegate(float value)
+			{
+				Vector3 position = this.m_GizmoObject.position;
+				position.x = value;
+				this.m_GizmoObject.position = position;
+			}, delegate
+			{
+				this.m_InputFieldPosX.text = this.m_GizmoObject.position.x.ToString("f3");
+			});
+			action(this.m_InputFieldPosY, delegate(float value)
+			{
+				Vector3 position = this.m_GizmoObject.position;
+				position.y = value;
+				this.m_GizmoObject.position = position;
+			}, delegate
+			{
+				this.m_InputFieldPosY.text = this.m_GizmoObject.position.y.ToString("f3");
+			});
+			action(this.m_InputFieldPosZ, delegate(float value)
+			{
+				Vector3 position = this.m_GizmoObject.position;
+				position.z = value;
+				this.m_GizmoObject.position = position;
+			}, delegate
+			{
+				this.m_InputFieldPosZ.text = this.m_GizmoObject.position.z.ToString("f3");
+			});
+			action(this.m_InputFieldRotX, delegate(float value)
+			{
+				Vector3 eulerAngles = this.m_GizmoObject.eulerAngles;
+				eulerAngles.x = value;
+				this.m_GizmoObject.eulerAngles = eulerAngles;
+			}, delegate
+			{
+				this.m_InputFieldRotX.text = this.m_GizmoObject.eulerAngles.x.ToString("f3");
+			});
+			action(this.m_InputFieldRotY, delegate(float value)
+			{
+				Vector3 eulerAngles = this.m_GizmoObject.eulerAngles;
+				eulerAngles.y = value;
+				this.m_GizmoObject.eulerAngles = eulerAngles;
+			}, delegate
+			{
+				this.m_InputFieldRotY.text = this.m_GizmoObject.eulerAngles.y.ToString("f3");
+			});
+			action(this.m_InputFieldRotZ, delegate(float value)
+			{
+				Vector3 eulerAngles = this.m_GizmoObject.eulerAngles;
+				eulerAngles.z = value;
+				this.m_GizmoObject.eulerAngles = eulerAngles;
+			}, delegate
+			{
+				this.m_InputFieldRotZ.text = this.m_GizmoObject.eulerAngles.z.ToString("f3");
+			});
+			action(this.m_InputFieldScale, delegate(float value)
+			{
+				Vector3 scale = this.m_GizmoObject.scale;
+				value = Mathf.Clamp(value, this.m_SliderScale.minValue, this.m_SliderScale.maxValue);
+				if (Mathf.Approximately(scale.x, value))
+				{
+					return;
+				}
+				scale.x = (scale.y = (scale.z = value));
+				this.m_GizmoObject.scale = scale;
+				this.m_SliderScale.value = value;
+			}, delegate
+			{
+				this.m_InputFieldScale.text = this.m_GizmoObject.scale.x.ToString("f3");
+			});
+			this.m_SliderScale.onValueChanged.AddListener(delegate(float value)
+			{
+				if (Mathf.Approximately(this.m_GizmoObject.cachedSnapScale.x, value))
+				{
+					return;
+				}
+				this.m_GizmoObject.nonCallbackScale = Vector3.one * value;
+				float x = this.m_GizmoObject.cachedSnapScale.x;
+				this.m_SliderScale.value = x;
+				if (!this.m_InputFieldScale.isFocused)
+				{
+					this.m_InputFieldScale.text = x.ToString("f3");
+				}
+			});
+		}
+
+		private void Update()
+		{
+			if (this.targetMaid == null || !this.targetMaid.Visible)
+			{
+				this.m_GizmoObject.gameObject.SetActive(false);
+				return;
+			}
+			if (EventSystem.current != null)
+			{
+				if (NInput.GetMouseButtonDown(0))
+				{
+					GameObject currentSelectedGameObject = EventSystem.current.currentSelectedGameObject;
+					if (EventSystem.current.IsPointerOverGameObject() && currentSelectedGameObject && currentSelectedGameObject.GetComponent<RectTransform>())
+					{
+						this.m_GizmoObject.gameObject.SetActive(false);
+					}
+				}
+				else if (NInput.GetMouseButtonUp(0))
+				{
+					this.m_GizmoObject.gameObject.SetActive(true);
+				}
+			}
+		}
+
+		private void OnUpdateGizmoPosition(Vector3 position)
+		{
+			if (this.targetMaid != null)
+			{
+				this.targetMaid.transform.position = position;
+				if (!this.m_InputFieldPosX.isFocused)
+				{
+					this.m_InputFieldPosX.text = position.x.ToString("f3");
+				}
+				if (!this.m_InputFieldPosY.isFocused)
+				{
+					this.m_InputFieldPosY.text = position.y.ToString("f3");
+				}
+				if (!this.m_InputFieldPosZ.isFocused)
+				{
+					this.m_InputFieldPosZ.text = position.z.ToString("f3");
+				}
+			}
+		}
+
+		private void OnUpdateGizmoRotation(Quaternion rotation)
+		{
+			if (this.targetMaid != null)
+			{
+				this.targetMaid.transform.rotation = rotation;
+				Vector3 eulerAngles = rotation.eulerAngles;
+				if (!this.m_InputFieldRotX.isFocused)
+				{
+					this.m_InputFieldRotX.text = eulerAngles.x.ToString("f3");
+				}
+				if (!this.m_InputFieldRotY.isFocused)
+				{
+					this.m_InputFieldRotY.text = eulerAngles.y.ToString("f3");
+				}
+				if (!this.m_InputFieldRotZ.isFocused)
+				{
+					this.m_InputFieldRotZ.text = eulerAngles.z.ToString("f3");
+				}
+			}
+		}
+
+		private void OnUpdateGizmoScale(Vector3 scale)
+		{
+			if (this.targetMaid != null)
+			{
+				this.targetMaid.transform.localScale = scale;
+				if (!this.m_InputFieldScale.isFocused)
+				{
+					this.m_InputFieldScale.text = scale.x.ToString("f3");
+				}
+				this.m_SliderScale.value = scale.x;
+			}
+		}
+
+		public void ButtonEvent_GizmoEnableMove()
+		{
+			GizmoObject gizmoObject = this.m_GizmoObject;
+			gizmoObject.activeAxis = true;
+			gizmoObject.activeRot = false;
+		}
+
+		public void ButtonEvent_GizmoEnableRot()
+		{
+			GizmoObject gizmoObject = this.m_GizmoObject;
+			gizmoObject.activeAxis = false;
+			gizmoObject.activeRot = true;
+		}
+
+		public void ButtonEvent_GizmoDisable()
+		{
+			GizmoObject gizmoObject = this.m_GizmoObject;
+			gizmoObject.activeAxis = false;
+			gizmoObject.activeRot = false;
+		}
+
+		public void ButtonEvent_CopyPosition()
+		{
+			Vector3 position = this.m_GizmoObject.position;
+			string text = string.Format("{0},{1},{2}", position.x, position.y, position.z);
+			this.m_CachedTransformDataDic["position"] = text.ToString();
+		}
+
+		public void ButtonEvent_PastePosition()
+		{
+			string text = this.m_CachedTransformDataDic["position"];
+			if (string.IsNullOrEmpty(text))
+			{
+				Debug.Log("座標データはまだない");
+				return;
+			}
+			string[] array = text.Split(new char[]
+			{
+				','
+			});
+			if (array.Length != 3)
+			{
+				Debug.LogError("position の文字数が" + array.Length + "でした");
+				return;
+			}
+			this.m_GizmoObject.position = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]));
+		}
+
+		public void ButtonEvent_ResetPosition()
+		{
+			this.m_GizmoObject.position = Vector3.zero;
+		}
+
+		public void ButtonEvent_CopyRotation()
+		{
+			Quaternion rotation = this.m_GizmoObject.rotation;
+			string text = string.Format("{0},{1},{2},{3}", new object[]
+			{
+				rotation.x,
+				rotation.y,
+				rotation.z,
+				rotation.w
+			});
+			this.m_CachedTransformDataDic["rotation"] = text.ToString();
+		}
+
+		public void ButtonEvent_PasteRotation()
+		{
+			string text = this.m_CachedTransformDataDic["rotation"];
+			if (string.IsNullOrEmpty(text))
+			{
+				Debug.Log("回転データはまだない");
+				return;
+			}
+			string[] array = text.Split(new char[]
+			{
+				','
+			});
+			if (array.Length != 4)
+			{
+				Debug.LogError("rotation の文字数が" + array.Length + "でした");
+				return;
+			}
+			this.m_GizmoObject.rotation = new Quaternion(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]), float.Parse(array[3]));
+		}
+
+		public void ButtonEvent_ResetRotation()
+		{
+			this.m_GizmoObject.rotation = Quaternion.identity;
+		}
+
+		public void ButtonEvent_CopyScale()
+		{
+			Vector3 scale = this.m_GizmoObject.scale;
+			string text = string.Format("{0},{1},{2}", scale.x, scale.y, scale.z);
+			this.m_CachedTransformDataDic["scale"] = text.ToString();
+		}
+
+		public void ButtonEvent_PasteScale()
+		{
+			string text = this.m_CachedTransformDataDic["scale"];
+			if (string.IsNullOrEmpty(text))
+			{
+				Debug.Log("スケールデータはまだない");
+				return;
+			}
+			string[] array = text.Split(new char[]
+			{
+				','
+			});
+			if (array.Length != 3)
+			{
+				Debug.LogError("scale の文字数が" + array.Length + "でした");
+				return;
+			}
+			this.m_GizmoObject.scale = new Vector3(float.Parse(array[0]), float.Parse(array[1]), float.Parse(array[2]));
+		}
+
+		public void ButtonEvent_ResetScale()
+		{
+			this.m_GizmoObject.scale = Vector3.one;
+		}
+
+		public void ButtonEvent_CameraFocus()
+		{
+			Maid targetMaid = this.targetMaid;
+			if (!targetMaid)
+			{
+				return;
+			}
+			if (!targetMaid.Visible)
+			{
+				return;
+			}
+			Transform bone = targetMaid.body0.GetBone("Bip01 Head");
+			WfCameraMoveSupport wfCameraMoveSupport = base.GetComponent<WfCameraMoveSupport>();
+			if (wfCameraMoveSupport == null)
+			{
+				wfCameraMoveSupport = base.gameObject.AddComponent<WfCameraMoveSupport>();
+			}
+			Vector3 position = bone.position;
+			float distance = Mathf.Sqrt(5f) * 2f;
+			Vector2 aroundAngle = new Vector2(-135f, 45f);
+			wfCameraMoveSupport.StartCameraPosition(position, distance, aroundAngle);
+		}
+
+		public void ButtonEvent_VisibleMaid(bool isVisible)
+		{
+			if (this.m_CharaMgr.IsBusy())
+			{
+				return;
+			}
+			if (this.targetMaid == null)
+			{
+				return;
+			}
+			if (this.targetMaid.ActiveSlotNo == -1)
+			{
+				this.m_CharaMgr.SetActiveMaid(this.targetMaid, 0);
+				this.targetMaid.AllProcPropSeqStart();
+			}
+			this.targetMaid.Visible = isVisible;
+			if (isVisible && this.targetMaid.IsBusy)
+			{
+				uGUIUtility.SetActiveEventSystem(false);
+				GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
+				base.StartCoroutine(this.CorMaidLoad(this.targetMaid, new Action(this.OnMaidLoadEnd)));
+			}
+		}
+
+		public void ButtonEvent_ToggleSnap(bool isEnable)
+		{
+			if (this.m_GizmoObject)
+			{
+				if (isEnable)
+				{
+					this.m_GizmoObject.controlType = GizmoObject.ControlType.Snap;
+				}
+				else
+				{
+					this.m_GizmoObject.controlType = GizmoObject.ControlType.Default;
+				}
+			}
+		}
+
+		private IEnumerator CorMaidLoad(Maid targetMaid, Action actLoadEnd)
+		{
+			targetMaid.Visible = true;
+			while (targetMaid.IsBusy)
+			{
+				yield return null;
+			}
+			actLoadEnd();
+			yield break;
+		}
+
+		private void OnMaidLoadEnd()
+		{
+			GameMain.Instance.MainCamera.FadeIn(0.3f, false, null, true, true, default(Color));
+			this.targetMaid.CrossFade("maid_stand01.anm", false, true, false, 0.5f, 1f);
+			this.targetMaid.FaceAnime("通常", 0f, 0);
+			this.targetMaid.EyeToCamera(Maid.EyeMoveType.目と顔を向ける, 0f);
+			uGUIUtility.SetActiveEventSystem(true);
+		}
+
+		private void OnDisable()
+		{
+			if (this.m_GizmoObject)
+			{
+				this.m_GizmoObject.gameObject.SetActive(false);
+			}
+		}
+
+		private void OnEnable()
+		{
+			if (this.m_GizmoObject && this.targetMaid != null && this.targetMaid.Visible)
+			{
+				this.m_GizmoObject.gameObject.SetActive(true);
+			}
+		}
+
+		private void OnDestroy()
+		{
+			if (this.m_GizmoObject)
+			{
+				UnityEngine.Object.Destroy(this.m_GizmoObject);
+			}
+			if (this.targetMaid)
+			{
+				this.targetMaid.transform.position = Vector3.zero;
+				this.targetMaid.transform.rotation = Quaternion.identity;
+				this.targetMaid.transform.localScale = Vector3.one;
+				this.targetMaid.ResetAll();
+				this.targetMaid.Visible = false;
+			}
+		}
+
+		[Header("座標入力欄")]
+		[SerializeField]
+		private InputField m_InputFieldPosX;
+
+		[SerializeField]
+		private InputField m_InputFieldPosY;
+
+		[SerializeField]
+		private InputField m_InputFieldPosZ;
+
+		[Header("回転入力欄")]
+		[SerializeField]
+		private InputField m_InputFieldRotX;
+
+		[SerializeField]
+		private InputField m_InputFieldRotY;
+
+		[SerializeField]
+		private InputField m_InputFieldRotZ;
+
+		[Header("スケール入力欄")]
+		[SerializeField]
+		private InputField m_InputFieldScale;
+
+		[SerializeField]
+		private Slider m_SliderScale;
+
+		private CharacterMgr m_CharaMgr;
+
+		private GizmoObject m_GizmoObject;
+
+		private Maid m_TargetMaid;
+
+		private StringDictionary m_CachedTransformDataDic;
+	}
+}

+ 30 - 43
Assembly-CSharp/MyRoomCustom/PlacementData.cs

@@ -12,14 +12,14 @@ namespace MyRoomCustom
 			get
 			{
 				PlacementData.CreateData();
-				return PlacementData.commonIdManager.idMap.Count;
+				return PlacementData.enabledIDList.Count;
 			}
 		}
 
 		public static bool Contains(int id)
 		{
 			PlacementData.CreateData();
-			return PlacementData.commonIdManager.idMap.ContainsKey(id);
+			return PlacementData.enabledIDList.Contains(id);
 		}
 
 		public static PlacementData.Data GetData(int id)
@@ -29,21 +29,15 @@ namespace MyRoomCustom
 			return PlacementData.basicDatas[id];
 		}
 
-		public static bool IsEnabled(int id)
-		{
-			PlacementData.CreateData();
-			return PlacementData.commonIdManager.enabledIdList.Contains(id);
-		}
-
 		public static List<PlacementData.Data> GetAllDatas(bool onlyEnabled)
 		{
 			PlacementData.CreateData();
 			List<PlacementData.Data> list = new List<PlacementData.Data>();
-			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in PlacementData.commonIdManager.idMap)
+			foreach (KeyValuePair<int, PlacementData.Data> keyValuePair in PlacementData.basicDatas)
 			{
-				if (!onlyEnabled || PlacementData.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
+				if (!onlyEnabled || PlacementData.enabledIDList.Contains(keyValuePair.Key))
 				{
-					list.Add(PlacementData.basicDatas[keyValuePair.Key]);
+					list.Add(keyValuePair.Value);
 				}
 			}
 			return list;
@@ -53,9 +47,9 @@ namespace MyRoomCustom
 		{
 			PlacementData.CreateData();
 			List<PlacementData.Data> list = new List<PlacementData.Data>();
-			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in PlacementData.commonIdManager.idMap)
+			foreach (int key in PlacementData.enabledIDList)
 			{
-				PlacementData.Data data = PlacementData.basicDatas[keyValuePair.Key];
+				PlacementData.Data data = PlacementData.basicDatas[key];
 				if (customCheckFunction(data))
 				{
 					list.Add(data);
@@ -89,37 +83,26 @@ namespace MyRoomCustom
 
 		public static void CreateData()
 		{
-			PlacementData.CreateCategoryData();
-			if (PlacementData.commonIdManager != null)
+			if (PlacementData.enabledIDList != null)
 			{
 				return;
 			}
-			PlacementData.commonIdManager = new CsvCommonIdManager("my_room_placement_obj", "自室カスタム.配置物", CsvCommonIdManager.Type.IdOnly, null);
+			PlacementData.CreateCategoryData();
 			PlacementData.basicDatas = new Dictionary<int, PlacementData.Data>();
-			string[] array = new string[]
-			{
-				"list"
-			};
-			KeyValuePair<AFileBase, CsvParser>[] array2 = new KeyValuePair<AFileBase, CsvParser>[array.Length];
-			for (int i = 0; i < array2.Length; i++)
+			PlacementData.enabledIDList = new HashSet<int>();
+			CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "my_room_placement_obj_enabled_list", ref PlacementData.enabledIDList);
+			using (AFileBase afileBase = GameUty.FileSystem.FileOpen("my_room_placement_obj_list.nei"))
 			{
-				string text = "my_room_placement_obj_" + array[i] + ".nei";
-				AFileBase afileBase = GameUty.FileSystem.FileOpen(text);
-				CsvParser csvParser = new CsvParser();
-				bool condition = csvParser.Open(afileBase);
-				NDebug.Assert(condition, text + "\nopen failed.");
-				array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
-			}
-			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in PlacementData.commonIdManager.idMap)
-			{
-				int key = keyValuePair.Key;
-				PlacementData.Data value = new PlacementData.Data(key, array2[0].Value);
-				PlacementData.basicDatas.Add(key, value);
-			}
-			foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair2 in array2)
-			{
-				keyValuePair2.Value.Dispose();
-				keyValuePair2.Key.Dispose();
+				using (CsvParser csvParser = new CsvParser())
+				{
+					bool condition = csvParser.Open(afileBase);
+					NDebug.Assert(condition, "my_room_placement_obj_list\nopen failed.");
+					foreach (int num in PlacementData.enabledIDList)
+					{
+						PlacementData.Data value = new PlacementData.Data(num, csvParser);
+						PlacementData.basicDatas.Add(num, value);
+					}
+				}
 			}
 		}
 
@@ -134,9 +117,13 @@ namespace MyRoomCustom
 
 		public static void Clear()
 		{
-			if (PlacementData.commonIdManager != null)
+			if (PlacementData.enabledIDList != null)
 			{
-				PlacementData.commonIdManager = null;
+				PlacementData.enabledIDList = null;
+			}
+			if (PlacementData.basicDatas != null)
+			{
+				PlacementData.basicDatas = null;
 			}
 			if (PlacementData.categoryIdManager != null)
 			{
@@ -148,10 +135,10 @@ namespace MyRoomCustom
 
 		private const string typeNameForErrorLog = "自室カスタム.配置物";
 
-		private static CsvCommonIdManager commonIdManager;
-
 		private static CsvCommonIdManager categoryIdManager;
 
+		private static HashSet<int> enabledIDList;
+
 		private static Dictionary<int, PlacementData.Data> basicDatas;
 
 		public class Data

+ 25 - 36
Assembly-CSharp/MyRoomCustom/TextureData.cs

@@ -11,14 +11,14 @@ namespace MyRoomCustom
 			get
 			{
 				TextureData.CreateData();
-				return TextureData.commonIdManager.idMap.Count;
+				return TextureData.enabledIDList.Count;
 			}
 		}
 
 		public static bool Contains(int id)
 		{
 			TextureData.CreateData();
-			return TextureData.commonIdManager.idMap.ContainsKey(id);
+			return TextureData.enabledIDList.Contains(id);
 		}
 
 		public static TextureData.Data GetData(int id)
@@ -31,18 +31,18 @@ namespace MyRoomCustom
 		public static bool IsEnabled(int id)
 		{
 			TextureData.CreateData();
-			return TextureData.commonIdManager.enabledIdList.Contains(id);
+			return TextureData.enabledIDList.Contains(id);
 		}
 
 		public static List<TextureData.Data> GetAllDatas(bool onlyEnabled)
 		{
 			TextureData.CreateData();
 			List<TextureData.Data> list = new List<TextureData.Data>();
-			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in TextureData.commonIdManager.idMap)
+			foreach (KeyValuePair<int, TextureData.Data> keyValuePair in TextureData.basicDatas)
 			{
-				if (!onlyEnabled || TextureData.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
+				if (!onlyEnabled || TextureData.enabledIDList.Contains(keyValuePair.Key))
 				{
-					list.Add(TextureData.basicDatas[keyValuePair.Key]);
+					list.Add(keyValuePair.Value);
 				}
 			}
 			return list;
@@ -52,9 +52,9 @@ namespace MyRoomCustom
 		{
 			TextureData.CreateData();
 			List<TextureData.Data> list = new List<TextureData.Data>();
-			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in TextureData.commonIdManager.idMap)
+			foreach (int key in TextureData.enabledIDList)
 			{
-				TextureData.Data data = TextureData.basicDatas[keyValuePair.Key];
+				TextureData.Data data = TextureData.basicDatas[key];
 				if (customCheckFunction(data))
 				{
 					list.Add(data);
@@ -65,44 +65,33 @@ namespace MyRoomCustom
 
 		public static void CreateData()
 		{
-			if (TextureData.commonIdManager != null)
+			if (TextureData.enabledIDList != null)
 			{
 				return;
 			}
-			TextureData.commonIdManager = new CsvCommonIdManager("my_room_texture_panel", "自室カスタム.壁紙系テクスチャ", CsvCommonIdManager.Type.IdOnly, null);
 			TextureData.basicDatas = new Dictionary<int, TextureData.Data>();
-			string[] array = new string[]
+			TextureData.enabledIDList = new HashSet<int>();
+			CsvCommonIdManager.ReadEnabledIdList(CsvCommonIdManager.FileSystemType.Normal, true, "my_room_texture_panel_enabled_list", ref TextureData.enabledIDList);
+			using (AFileBase afileBase = GameUty.FileSystem.FileOpen("my_room_texture_panel_list.nei"))
 			{
-				"list"
-			};
-			KeyValuePair<AFileBase, CsvParser>[] array2 = new KeyValuePair<AFileBase, CsvParser>[array.Length];
-			for (int i = 0; i < array2.Length; i++)
-			{
-				string text = "my_room_texture_panel_" + array[i] + ".nei";
-				AFileBase afileBase = GameUty.FileSystem.FileOpen(text);
-				CsvParser csvParser = new CsvParser();
-				bool condition = csvParser.Open(afileBase);
-				NDebug.Assert(condition, text + "\nopen failed.");
-				array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
-			}
-			foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in TextureData.commonIdManager.idMap)
-			{
-				int key = keyValuePair.Key;
-				TextureData.Data value = new TextureData.Data(key, array2[0].Value);
-				TextureData.basicDatas.Add(key, value);
-			}
-			foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair2 in array2)
-			{
-				keyValuePair2.Value.Dispose();
-				keyValuePair2.Key.Dispose();
+				using (CsvParser csvParser = new CsvParser())
+				{
+					bool condition = csvParser.Open(afileBase);
+					NDebug.Assert(condition, "my_room_texture_panel_list\nopen failed.");
+					foreach (int num in TextureData.enabledIDList)
+					{
+						TextureData.Data value = new TextureData.Data(num, csvParser);
+						TextureData.basicDatas.Add(num, value);
+					}
+				}
 			}
 		}
 
 		public static void Clear()
 		{
-			if (TextureData.commonIdManager != null)
+			if (TextureData.enabledIDList != null)
 			{
-				TextureData.commonIdManager = null;
+				TextureData.enabledIDList = null;
 			}
 		}
 
@@ -110,7 +99,7 @@ namespace MyRoomCustom
 
 		private const string typeNameForErrorLog = "自室カスタム.壁紙系テクスチャ";
 
-		private static CsvCommonIdManager commonIdManager;
+		private static HashSet<int> enabledIDList;
 
 		private static Dictionary<int, TextureData.Data> basicDatas;
 

+ 2 - 2
Assembly-CSharp/OvrIK.cs

@@ -1438,7 +1438,7 @@ public class OvrIK : MonoBehaviour
 	{
 		public void OnBeforeSerialize()
 		{
-			this.m_nVersion = 1200;
+			this.m_nVersion = 1210;
 		}
 
 		public void OnAfterDeserialize()
@@ -1498,7 +1498,7 @@ public class OvrIK : MonoBehaviour
 		private const string CONF_NAME = "OvrIK.json";
 
 		[SerializeField]
-		private int m_nVersion = 1200;
+		private int m_nVersion = 1210;
 
 		[SerializeField]
 		private float solver_locomotion_weight = 1f;

+ 1 - 1
Assembly-CSharp/PhotoModeSaveAndLoad.cs

@@ -450,7 +450,7 @@ public class PhotoModeSaveAndLoad : MonoBehaviour
 	private XElement CreateCommonData(string title, string comment)
 	{
 		string value = DateTime.ParseExact(DateTime.Now.ToString("yyyyMMddHHmmss"), "yyyyMMddHHmmss", null).ToString("yyyy.MM.dd HH:mm");
-		XElement xelement = new XElement("GameVersion", 1200);
+		XElement xelement = new XElement("GameVersion", 1210);
 		XElement xelement2 = new XElement("SaveTime", value);
 		XElement xelement3 = new XElement("Title", title);
 		XElement xelement4 = new XElement("Comment", comment);

+ 1 - 1
Assembly-CSharp/PlayerStatus/Status.cs

@@ -827,7 +827,7 @@ namespace PlayerStatus
 		public void Serialize(BinaryWriter binary)
 		{
 			binary.Write("CM3D2_PLAYER_STATUS");
-			binary.Write(1200);
+			binary.Write(1210);
 			binary.Write(this.playerName_);
 			binary.Write(this.days_);
 			binary.Write(this.totalPurchasePrice_);

+ 13 - 1
Assembly-CSharp/SceneCharacterSelect.cs

@@ -79,6 +79,17 @@ public class SceneCharacterSelect : WfScreenManager
 		}
 	}
 
+	public static void CreateLifeModeCharaList()
+	{
+		SceneCharacterSelect.chara_guid_stock_list.Clear();
+		List<Maid> list = new List<Maid>();
+		CharacterSelectManager.DefaultMaidList(list);
+		foreach (Maid maid in EmpireLifeModeAPI.SelectionMaidList(list))
+		{
+			SceneCharacterSelect.chara_guid_stock_list.Add(maid.status.guid);
+		}
+	}
+
 	public static bool IsSelectChara()
 	{
 		return 0 < SceneCharacterSelect.chara_guid_stock_list.Count;
@@ -213,6 +224,7 @@ public class SceneCharacterSelect : WfScreenManager
 		VRKaraokeSelect,
 		Additional,
 		NewYotogi,
-		NewYotogiAdditional
+		NewYotogiAdditional,
+		LifeMode
 	}
 }

+ 230 - 0
Assembly-CSharp/SceneEmpireLifeMode.cs

@@ -0,0 +1,230 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using UnityEngine;
+using UnityEngine.Events;
+using UnityEngine.UI;
+
+public class SceneEmpireLifeMode : MonoBehaviour
+{
+	private EmpireLifeModeManager lifeModeMgr
+	{
+		get
+		{
+			EmpireLifeModeManager result;
+			if ((result = this.m_LifeModeMgr) == null)
+			{
+				result = (this.m_LifeModeMgr = GameMain.Instance.LifeModeMgr);
+			}
+			return result;
+		}
+	}
+
+	private string strNextJumpLabel { get; set; }
+
+	private void Start()
+	{
+		if (EmpireLifeModeData.GetAllDatas(true).Count <= 0)
+		{
+			NDebug.Assert("不正な処理が実行されました。", false);
+			return;
+		}
+		GameMain.Instance.MainLight.Reset();
+		GameMain.Instance.CharacterMgr.DeactivateCharaAll();
+		GameMain.Instance.MainCamera.Reset(CameraMain.CameraType.Target, true);
+		GameMain.Instance.SoundMgr.VoiceStopAll();
+		GameMain.Instance.SoundMgr.StopSe();
+		GameMain.Instance.MainCamera.FadeOut(0f, false, null, true, default(Color));
+		ADVKagManager adv_kag = GameMain.Instance.ScriptMgr.adv_kag;
+		if (!adv_kag.tag_backup.TryGetValue("label_start", out this.m_StrScenarioStartLabel))
+		{
+			Debug.LogFormat("イベント開始時のラベルが未指定です\nラベル名 : {0}", new object[]
+			{
+				"label_start"
+			});
+		}
+		if (!adv_kag.tag_backup.TryGetValue("label_end", out this.m_StrOKLabel))
+		{
+			Debug.LogFormat("終了時のラベルが未指定です\nラベル名 : {0}", new object[]
+			{
+				"label_end"
+			});
+		}
+		this.m_ButtonOK.onClick.AddListener(new UnityAction(this.OnClickOK));
+		if (SceneEmpireLifeMode.m_SelectedEventObject != null)
+		{
+		}
+		if (this.lifeModeMgr.executedEventList.Count <= 0)
+		{
+			this.lifeModeMgr.CreateStoryEvent();
+			this.lifeModeMgr.AllMaidRandomAllocate();
+			this.lifeModeMgr.CreateEventListOfMaidAllocateData();
+			Debug.Log("イベントを作成しました。");
+		}
+		this.m_FacilityListUI.ShowFacilityList();
+		this.ShowMaidIconsOfEventData();
+		GameMain.Instance.MainCamera.FadeIn(0.5f, false, new CameraMain.dgOnCompleteFade(this.OnCompleteFadeIn), true, true, default(Color));
+	}
+
+	private void OnCompleteFadeIn()
+	{
+	}
+
+	private void OnCompleteFadeOut()
+	{
+		if (SceneEmpireLifeMode.m_SelectedEventObject != null)
+		{
+			this.lifeModeMgr.SetupScenarioEvent(SceneEmpireLifeMode.m_SelectedEventObject, delegate
+			{
+				ADVKagManager adv_kag2 = GameMain.Instance.ScriptMgr.adv_kag;
+				NDebug.Assert(!string.IsNullOrEmpty(this.strNextJumpLabel), "SceneEmpireLifeMode.cs\n飛び先ラベルが空でした");
+				adv_kag2.JumpLabel(this.strNextJumpLabel);
+				adv_kag2.Exec();
+			});
+			return;
+		}
+		Debug.Log("エンパイアライフモードのループを終了。");
+		ADVKagManager adv_kag = GameMain.Instance.ScriptMgr.adv_kag;
+		NDebug.Assert(!string.IsNullOrEmpty(this.strNextJumpLabel), "SceneEmpireLifeMode.cs\n飛び先ラベルが空でした");
+		adv_kag.JumpLabel(this.strNextJumpLabel);
+		adv_kag.Exec();
+	}
+
+	private void OnClickOK()
+	{
+		SceneEmpireLifeMode.m_SelectedEventObject = null;
+		this.strNextJumpLabel = this.m_StrOKLabel;
+		GameMain.Instance.MainCamera.FadeOut(0.5f, false, new CameraMain.dgOnCompleteFade(this.OnCompleteFadeOut), true, default(Color));
+	}
+
+	private void OnClickEventFrame(EmpireLifeModeManager.EventDataObject eventObj)
+	{
+		StringBuilder stringBuilder = new StringBuilder();
+		stringBuilder.AppendLine(string.Format("[{0}] {1}  種類:{2}[{3}]", new object[]
+		{
+			eventObj.targetEvent.ID,
+			eventObj.targetEvent.strUniqueName,
+			eventObj.targetEvent.dataScenarioType,
+			eventObj.targetEvent.GetPriorityScenarioType()
+		}));
+		stringBuilder.AppendLine(string.Format("実行する施設 : {0} ({1})", eventObj.targetFacility.facilityName, eventObj.targetFacility.defaultName));
+		foreach (Maid maid in eventObj.targetMaidList)
+		{
+			stringBuilder.AppendLine(string.Format("{0} ({1})", maid.status.fullNameJpStyle, maid.status.personal.drawName));
+		}
+		Debug.Log(stringBuilder.ToString());
+		SceneEmpireLifeMode.m_SelectedEventObject = eventObj;
+		this.strNextJumpLabel = this.m_StrScenarioStartLabel;
+		GameMain.Instance.MainCamera.FadeOut(0.5f, false, new CameraMain.dgOnCompleteFade(this.OnCompleteFadeOut), true, default(Color));
+	}
+
+	public void MaidRandomAllocate()
+	{
+		this.lifeModeMgr.DeleteNowEventList();
+		this.lifeModeMgr.CreateStoryEvent();
+		this.lifeModeMgr.AllMaidRandomAllocate();
+		this.lifeModeMgr.CreateEventListOfMaidAllocateData();
+	}
+
+	public void ShowMaidIconsOfNowAllocateState()
+	{
+		Debug.LogWarning("ShowMaidIconsOfNowAllocateState()\nこの関数は使わなくなる?");
+		foreach (EmpireLifeModeFacilityUI.FacilityLifeModeViewer facilityLifeModeViewer in this.m_FacilityListUI.GetAllItem())
+		{
+			Facility nowShowingFacility = facilityLifeModeViewer.GetNowShowingFacility();
+			List<Maid> maidList;
+			if (!(nowShowingFacility == null) && this.lifeModeMgr.nowMaidAllocationDic.TryGetValue(nowShowingFacility, out maidList))
+			{
+				facilityLifeModeViewer.listViewerParentMaidIcon.Show<uGUIListViewer>(maidList.Count, delegate(int index, uGUIListViewer viewer)
+				{
+					viewer.Show<Transform>(1, delegate(int notUseIndex, Transform trans)
+					{
+						RawImage componentInChildren = trans.GetComponentInChildren<RawImage>();
+						Maid maid = maidList[index];
+						componentInChildren.texture = maid.GetThumIcon();
+						Text componentInChildren2 = componentInChildren.GetComponentInChildren<Text>();
+						if (componentInChildren2 != null)
+						{
+							if (componentInChildren.texture == null)
+							{
+								componentInChildren2.text = string.Format("{0}\n({1})", maid.status.fullNameJpStyle, maid.status.personal.drawName);
+							}
+							else
+							{
+								componentInChildren2.text = string.Empty;
+							}
+						}
+					});
+				});
+			}
+		}
+	}
+
+	public void ShowMaidIconsOfEventData()
+	{
+		List<EmpireLifeModeManager.EventDataObject> nowEventList = this.lifeModeMgr.nowEventList;
+		Debug.LogFormat("現在の発生イベント数 : {0}", new object[]
+		{
+			nowEventList.Count
+		});
+		foreach (EmpireLifeModeFacilityUI.FacilityLifeModeViewer facilityLifeModeViewer in this.m_FacilityListUI.GetAllItem())
+		{
+			SceneEmpireLifeMode.<ShowMaidIconsOfEventData>c__AnonStorey2 <ShowMaidIconsOfEventData>c__AnonStorey = new SceneEmpireLifeMode.<ShowMaidIconsOfEventData>c__AnonStorey2();
+			<ShowMaidIconsOfEventData>c__AnonStorey.$this = this;
+			Facility nowShowingFacility = facilityLifeModeViewer.GetNowShowingFacility();
+			if (!(nowShowingFacility == null))
+			{
+				<ShowMaidIconsOfEventData>c__AnonStorey.eventList = new List<EmpireLifeModeManager.EventDataObject>();
+				foreach (EmpireLifeModeManager.EventDataObject eventDataObject in nowEventList)
+				{
+					if (eventDataObject.targetFacility == nowShowingFacility)
+					{
+						<ShowMaidIconsOfEventData>c__AnonStorey.eventList.Add(eventDataObject);
+					}
+				}
+				facilityLifeModeViewer.listViewerParentMaidIcon.Show<uGUIListViewer>(<ShowMaidIconsOfEventData>c__AnonStorey.eventList.Count, delegate(int eventIndex, uGUIListViewer viewer)
+				{
+					RawImage component = viewer.transform.Find("event type icon").GetComponent<RawImage>();
+					component.texture = EmpireLifeModeAPI.GetIconScenarioType(<ShowMaidIconsOfEventData>c__AnonStorey.eventList[eventIndex].targetEvent.dataScenarioType);
+					viewer.Show<Transform>(<ShowMaidIconsOfEventData>c__AnonStorey.eventList[eventIndex].targetMaidList.Count, delegate(int maidIndex, Transform trans)
+					{
+						RawImage componentInChildren = trans.GetComponentInChildren<RawImage>();
+						Maid maid = <ShowMaidIconsOfEventData>c__AnonStorey.eventList[eventIndex].targetMaidList[maidIndex];
+						componentInChildren.texture = maid.GetThumIcon();
+						Text componentInChildren2 = componentInChildren.GetComponentInChildren<Text>();
+						if (componentInChildren2 != null)
+						{
+							if (componentInChildren.texture == null)
+							{
+								componentInChildren2.text = string.Format("{0}\n({1})", maid.status.fullNameJpStyle, maid.status.personal.drawName);
+							}
+							else
+							{
+								componentInChildren2.text = string.Empty;
+							}
+						}
+					});
+					Button component2 = viewer.GetComponent<Button>();
+					component2.onClick.AddListener(delegate()
+					{
+						<ShowMaidIconsOfEventData>c__AnonStorey.OnClickEventFrame(<ShowMaidIconsOfEventData>c__AnonStorey.eventList[eventIndex]);
+					});
+				});
+			}
+		}
+	}
+
+	[SerializeField]
+	private EmpireLifeModeFacilityUI m_FacilityListUI;
+
+	[SerializeField]
+	private Button m_ButtonOK;
+
+	private string m_StrScenarioStartLabel;
+
+	private string m_StrOKLabel;
+
+	private static EmpireLifeModeManager.EventDataObject m_SelectedEventObject;
+
+	private EmpireLifeModeManager m_LifeModeMgr;
+}

+ 32 - 1
Assembly-CSharp/ScriptManager.cs

@@ -277,6 +277,7 @@ public class ScriptManager : IDisposable
 		this.tjs_.AddFunction("CreateNewYotogiHaremPairCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateNewYotogiHaremPairCharaList));
 		this.tjs_.AddFunction("CreateVipCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateVipCharaList));
 		this.tjs_.AddFunction("CreateFacilityCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateFacilityCharaList));
+		this.tjs_.AddFunction("CreateLifeModeCharaList", new TJSScript.FunctionCallBack(this.TJSFuncCreateLifeModeCharaList));
 		this.tjs_.AddFunction("IsReceptionChara", new TJSScript.FunctionCallBack(this.TJSFuncIsReceptionChara));
 		this.tjs_.AddFunction("SetRandomReceptionChara", new TJSScript.FunctionCallBack(this.TJSFuncSetRandomReceptionChara));
 		this.tjs_.AddFunction("IsSelectChara", new TJSScript.FunctionCallBack(this.TJSFuncIsSelectChara));
@@ -342,6 +343,9 @@ public class ScriptManager : IDisposable
 		this.tjs_.AddFunction("IsVRKaraokeMode", new TJSScript.FunctionCallBack(this.TJSFuncIsVRKaraokeMode));
 		this.tjs_.AddFunction("GetRemainingDanceTime", new TJSScript.FunctionCallBack(this.TJSFuncGetRemainingDanceTime));
 		this.tjs.AddFunction("GetYotogiCommandClickCount", new TJSScript.FunctionCallBack(this.TJSFuncGetYotogiCommandClickCount));
+		this.tjs.AddFunction("SetYotogiStage", new TJSScript.FunctionCallBack(this.TJSFuncSetYotogiStage));
+		this.tjs_.AddFunction("GetGameMode", new TJSScript.FunctionCallBack(this.TJSFuncGetGameMode));
+		this.tjs_.AddFunction("IsLifeMode", new TJSScript.FunctionCallBack(this.TJSFuncIsLifeMode));
 		MotionKagManager motionKagManager = new MotionKagManager(this.tjs_, this);
 		motionKagManager.Initialize();
 		motionKagManager.SetSloatNo(0);
@@ -1795,6 +1799,11 @@ public class ScriptManager : IDisposable
 		SceneCharacterSelect.CreateFacilityCharaList();
 	}
 
+	private void TJSFuncCreateLifeModeCharaList(TJSVariantRef[] tjs_param, TJSVariantRef result)
+	{
+		SceneCharacterSelect.CreateLifeModeCharaList();
+	}
+
 	private void TJSFuncIsReceptionChara(TJSVariantRef[] tjs_param, TJSVariantRef result)
 	{
 		if (result == null)
@@ -2888,6 +2897,16 @@ public class ScriptManager : IDisposable
 		result.SetInteger((!SceneVRCommunication.Instance.KaraokeMode) ? 0 : 1);
 	}
 
+	public void TJSFuncGetGameMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
+	{
+		result.SetString(GameModeManager.nowGameMode.ToString());
+	}
+
+	public void TJSFuncIsLifeMode(TJSVariantRef[] tjs_param, TJSVariantRef result)
+	{
+		result.SetBool(GameModeManager.nowGameMode == GameModeManager.Type.LifeMode);
+	}
+
 	public void TJSFuncGetRemainingDanceTime(TJSVariantRef[] tjs_param, TJSVariantRef result)
 	{
 		if (result == null)
@@ -2928,6 +2947,18 @@ public class ScriptManager : IDisposable
 		result.SetInteger(integer);
 	}
 
+	public void TJSFuncSetYotogiStage(TJSVariantRef[] tjs_param, TJSVariantRef result)
+	{
+		NDebug.Assert(1 <= tjs_param.Length && tjs_param.Length <= 2, "SetYotogiStage:引数が1つ,もしくは2つである必要があります");
+		YotogiStage.Data data = YotogiStage.GetData(tjs_param[0].AsString());
+		bool isDayTime = GameMain.Instance.CharacterMgr.status.isDaytime;
+		if (tjs_param.Length == 2)
+		{
+			isDayTime = tjs_param[1].AsBool();
+		}
+		YotogiStageSelectManager.SelectStage(data, isDayTime);
+	}
+
 	public void OnReturnEvent(string fileName, int line)
 	{
 		if (this.compatibilityMode)
@@ -2995,7 +3026,7 @@ public class ScriptManager : IDisposable
 	public void Serialize(BinaryWriter binary)
 	{
 		binary.Write("CM3D2_SCRIPT");
-		binary.Write(1200);
+		binary.Write(1210);
 		this.adv_kag_.Serialize(binary);
 	}
 

+ 32 - 0
Assembly-CSharp/StatusViewer.cs

@@ -40,6 +40,22 @@ public class StatusViewer : MonoBehaviour
 		}
 	}
 
+	public bool isEnabledGameModeChangeButton
+	{
+		get
+		{
+			return !(this.gameModeChangeBtn == null) && this.gameModeChangeBtn.gameObject.activeSelf;
+		}
+		set
+		{
+			if (this.gameModeChangeBtn == null)
+			{
+				return;
+			}
+			this.gameModeChangeBtn.gameObject.SetActive(value);
+		}
+	}
+
 	public void Awake()
 	{
 		if (DailyMgr.IsLegacy)
@@ -57,9 +73,14 @@ public class StatusViewer : MonoBehaviour
 		EventDelegate.Add(this.clubNameInputOk.onClick, new EventDelegate.Callback(this.OnInputClubNameOK));
 		EventDelegate.Add(this.clubNameInputCancel.onClick, new EventDelegate.Callback(this.CloseClubNameInputPanel));
 		EventDelegate.Add(this.mainBusinessChangeBtn.onClick, new EventDelegate.Callback(this.OnClickMainBusinessChange));
+		if (this.gameModeChangeBtn != null)
+		{
+			EventDelegate.Add(this.gameModeChangeBtn.onClick, new EventDelegate.Callback(this.OnClickGameModeChange));
+		}
 		bool flag = false;
 		this.isEnabledMainBusinessChangeButton = flag;
 		this.isEnabledClubNameChangeButton = flag;
+		this.isEnabledGameModeChangeButton = false;
 	}
 
 	public void Start()
@@ -110,6 +131,11 @@ public class StatusViewer : MonoBehaviour
 		this.mainBusinessWindow.OpenBusinessWindow(callback);
 	}
 
+	private void OnClickGameModeChange()
+	{
+		this.gameModeChangeWindow.Open(null);
+	}
+
 	private void OnInputClubName()
 	{
 		string clubName = GameMain.Instance.CharacterMgr.status.clubName;
@@ -195,6 +221,9 @@ public class StatusViewer : MonoBehaviour
 	private UISprite mainBusinessImage;
 
 	[SerializeField]
+	private UIButton gameModeChangeBtn;
+
+	[SerializeField]
 	private UILabel clubEvaluationLabel;
 
 	[SerializeField]
@@ -226,4 +255,7 @@ public class StatusViewer : MonoBehaviour
 
 	[SerializeField]
 	private MainBusinessWindow mainBusinessWindow;
+
+	[SerializeField]
+	private LifeModeChangeWindow gameModeChangeWindow;
 }

+ 1 - 1
Assembly-CSharp/WindowPartsFingerPreset.cs

@@ -182,7 +182,7 @@ public class WindowPartsFingerPreset : MonoBehaviour
 	{
 		WindowPartsFingerBlend.Type blendType = tareget_blend.BlendType;
 		FingerBlend.BaseFinger baseFingerClass = tareget_blend.GetBaseFingerClass(tareget_blend.mgr.select_maid, blendType);
-		XElement xelement = new XElement("GameVersion", 1200);
+		XElement xelement = new XElement("GameVersion", 1210);
 		XElement xelement2 = new XElement("RightData", blendType == WindowPartsFingerBlend.Type.RightArm || blendType == WindowPartsFingerBlend.Type.RightLeg);
 		XElement xelement3 = new XElement("BinaryData", Convert.ToBase64String(baseFingerClass.GetBinary()));
 		XNode[] contents = new XNode[]

+ 74 - 9
Assembly-CSharp/YotogiManager.cs

@@ -70,6 +70,8 @@ public class YotogiManager : WfScreenManager
 		action("yotogicall", new KagScript.KagTagCallBack(this.TagYotogiCall));
 		action("returnsuspend", new KagScript.KagTagCallBack(this.TagReturnSuspend));
 		action("restart", new KagScript.KagTagCallBack(this.TagReStart));
+		action("playend", new KagScript.KagTagCallBack(this.TagPlayEnd));
+		action("heroinechangeskill", new KagScript.KagTagCallBack(this.TagHeroineChangeSkill));
 		this.yotogi_kag_.kag.AddTagCallBack("playbgmroom", new KagScript.KagTagCallBack(this.TagPlayBGMRoom));
 		this.yotogi_kag_.kag.AddTagCallBack("controlmask", new KagScript.KagTagCallBack(this.TagControlMask));
 		this.yotogi_kag_.enabled = false;
@@ -84,14 +86,8 @@ public class YotogiManager : WfScreenManager
 		this.CreateBackUpStatus();
 		GameMain.Instance.ScriptMgr.yotogi_kag.SetYotogiManager(this);
 		string b = "SceneYotogi";
-		if (this.adv_kag_.tag_backup.ContainsKey("free_start"))
-		{
-			this.is_free_mode_ = true;
-		}
-		else
-		{
-			this.is_free_mode_ = false;
-		}
+		this.is_new_yotogi_ = false;
+		this.is_free_mode_ = this.adv_kag_.tag_backup.ContainsKey("free_start");
 		this.is_vr_mode_ = this.adv_kag_.tag_backup.ContainsKey("vr_mode");
 		if (GameMain.Instance.VRMode)
 		{
@@ -115,6 +111,7 @@ public class YotogiManager : WfScreenManager
 			{
 				NDebug.Assert("[" + text + "]を特定できませんでした", false);
 			}
+			this.is_new_yotogi_ = (callScreenType == YotogiManager.CallScreenType.Init);
 			if ((callScreenType == YotogiManager.CallScreenType.SubCharaSelect || callScreenType == YotogiManager.CallScreenType.FreeSkillSelect) && this.adv_kag_.tag_backup.ContainsKey("cancel_label"))
 			{
 				YotogiFreeSkillSelectManager yotogiFreeSkillSelectManager = this.free_skill_select_mgr_;
@@ -202,6 +199,28 @@ public class YotogiManager : WfScreenManager
 		{
 			this.skill_select_mgr_.SetEditNextLabel(tag_data.GetTagProperty("edit_label").AsString());
 		}
+		if (callScreenType == YotogiManager.CallScreenType.Play && tag_data.IsValid("skillid"))
+		{
+			int num = tag_data.GetTagProperty("skillid").AsInteger();
+			Skill.Data data = Skill.Get(num);
+			if (data == null)
+			{
+				Debug.LogError("TagReStart Error\nnot find yotogiSkill " + num);
+				return false;
+			}
+			for (int i = 0; i < this.play_skill_array.Length; i++)
+			{
+				if (this.play_skill_array[i].skill_pair.base_data == null)
+				{
+					YotogiManager.PlayingSkillData playingSkillData = new YotogiManager.PlayingSkillData();
+					playingSkillData.skill_pair = Yotogi.SkillDataPair.Create(this.maid_, data);
+					playingSkillData.skill_pair.lock_skill_exp = true;
+					playingSkillData.backup_total_exp = playingSkillData.skill_pair.skill_data.expSystem.GetTotalExp();
+					this.play_skill_array[i] = playingSkillData;
+					break;
+				}
+			}
+		}
 		this.CallScreen(text);
 		return false;
 	}
@@ -221,6 +240,14 @@ public class YotogiManager : WfScreenManager
 		{
 			"skillid"
 		});
+		if (tag_data.IsValid("label"))
+		{
+			string text = tag_data.GetTagProperty("label").AsString();
+			if (!string.IsNullOrEmpty(text))
+			{
+				this.null_mgr.SetNextLabel(text);
+			}
+		}
 		int num = tag_data.GetTagProperty("skillid").AsInteger();
 		Skill.Data data = Skill.Get(num);
 		if (data == null)
@@ -240,7 +267,33 @@ public class YotogiManager : WfScreenManager
 				break;
 			}
 		}
-		this.play_mgr_.OnClickNext();
+		this.play_mgr_.ReStart();
+		return false;
+	}
+
+	public bool TagPlayEnd(KagTagSupport tag_data)
+	{
+		if (tag_data.IsValid("label"))
+		{
+			string text = tag_data.GetTagProperty("label").AsString();
+			if (!string.IsNullOrEmpty(text))
+			{
+				this.null_mgr.SetNextLabel(text);
+			}
+		}
+		if (string.IsNullOrEmpty(this.null_mgr.nextLabel))
+		{
+			return false;
+		}
+		this.play_mgr_.SetFadeTime(0f);
+		this.play_mgr_.AdvanceSkillMove();
+		this.maid_.status.currentMind = this.maid_.status.maxMind;
+		return false;
+	}
+
+	public bool TagHeroineChangeSkill(KagTagSupport tag_data)
+	{
+		this.play_mgr_.heroineChangeFlag = true;
 		return false;
 	}
 
@@ -285,6 +338,7 @@ public class YotogiManager : WfScreenManager
 		children_dic.Add(YotogiManager.CallScreenType.Result.ToString(), this.result_mgr_);
 		children_dic.Add(YotogiManager.CallScreenType.FreeSkillSelect.ToString(), this.free_skill_select_mgr_);
 		children_dic.Add(YotogiManager.CallScreenType.StageSelect.ToString(), this.stage_select_mgr_);
+		children_dic.Add(YotogiManager.CallScreenType.Init.ToString(), this.stage_select_mgr_);
 		children_dic.Add(YotogiManager.CallScreenType.Play.ToString(), this.play_mgr_);
 		children_dic.Add(YotogiManager.CallScreenType.SubCharaSelect.ToString(), this.sub_chara_select_mgr_);
 		children_dic.Add(YotogiManager.CallScreenType.Null.ToString(), this.null_mgr_);
@@ -793,6 +847,14 @@ public class YotogiManager : WfScreenManager
 		}
 	}
 
+	public bool is_new_yotogi_mode
+	{
+		get
+		{
+			return this.is_new_yotogi_;
+		}
+	}
+
 	public int fix_skill_level
 	{
 		get
@@ -869,6 +931,8 @@ public class YotogiManager : WfScreenManager
 
 	private bool is_free_mode_;
 
+	private bool is_new_yotogi_;
+
 	private int fix_skill_level_;
 
 	private YotogiFreeSkillSelectManager free_skill_select_mgr_;
@@ -886,6 +950,7 @@ public class YotogiManager : WfScreenManager
 	public enum CallScreenType
 	{
 		Null,
+		Init,
 		StageSelect,
 		SkillSelect,
 		Play,

+ 8 - 0
Assembly-CSharp/YotogiNullManager.cs

@@ -43,5 +43,13 @@ public class YotogiNullManager : WfScreenChildren
 		return !string.IsNullOrEmpty(this.next_label_);
 	}
 
+	public string nextLabel
+	{
+		get
+		{
+			return this.next_label_;
+		}
+	}
+
 	private string next_label_ = string.Empty;
 }

+ 12 - 0
Assembly-CSharp/YotogiParamBasicBar.cs

@@ -40,6 +40,10 @@ public class YotogiParamBasicBar : MonoBehaviour
 	public void SetMaid(Maid maid)
 	{
 		this.maid_ = maid;
+		if (YotogiManager.instans != null && YotogiManager.instans.is_new_yotogi_mode)
+		{
+			UTY.GetChildObject(base.gameObject, "Mind/Name", false).GetComponent<UILabel>().text = "時間";
+		}
 	}
 
 	public void SetMaxMind(int max_num)
@@ -129,6 +133,14 @@ public class YotogiParamBasicBar : MonoBehaviour
 		}
 	}
 
+	private bool is_new_yotogi_mode
+	{
+		get
+		{
+			return YotogiManager.instans != null && YotogiManager.instans.is_new_yotogi_mode;
+		}
+	}
+
 	private Dictionary<YotogiParamBasicBar.Kind, YotogiParamBasicBar.BarSet> bar_dic_ = new Dictionary<YotogiParamBasicBar.Kind, YotogiParamBasicBar.BarSet>();
 
 	private Dictionary<YotogiParamBasicBar.GageColor, Color> color_dic_ = new Dictionary<YotogiParamBasicBar.GageColor, Color>();

+ 12 - 6
Assembly-CSharp/YotogiParameterViewer.cs

@@ -40,6 +40,8 @@ public class YotogiParameterViewer : MonoBehaviour
 	public void SetMaid(Maid maid)
 	{
 		this.maid_ = maid;
+		this.attributeViewer.targetMaid = maid;
+		this.attributeViewer.UpdateStatusInfo();
 	}
 
 	public void UpdateTextCommon()
@@ -68,6 +70,10 @@ public class YotogiParameterViewer : MonoBehaviour
 		this.label_dictionary_[YotogiParameterViewer.LabelType.Likability].text = status.likability.ToString();
 		this.label_dictionary_[YotogiParameterViewer.LabelType.Hp].text = ((!this.CurrentValueDraw) ? status.maxHp.ToString() : status.currentHp.ToString());
 		this.label_dictionary_[YotogiParameterViewer.LabelType.Mind].text = ((!this.CurrentValueDraw) ? status.maxMind.ToString() : status.currentMind.ToString());
+		if (YotogiManager.instans != null && YotogiManager.instans.is_new_yotogi_mode)
+		{
+			this.label_dictionary_[YotogiParameterViewer.LabelType.Mind].text = status.maxMind.ToString();
+		}
 		this.label_dictionary_[YotogiParameterViewer.LabelType.Inyoku].text = status.inyoku.ToString();
 		this.label_dictionary_[YotogiParameterViewer.LabelType.MValue].text = status.mvalue.ToString();
 		this.label_dictionary_[YotogiParameterViewer.LabelType.Hentai].text = status.hentai.ToString();
@@ -89,20 +95,20 @@ public class YotogiParameterViewer : MonoBehaviour
 		}
 	}
 
-	public void SetAttributeViewer(GameObject obj)
+	public void SetAttributeViewer(AttributeViewer obj)
 	{
-		this.AttributeViewer = obj;
-		this.AttributeViewer.SetActive(false);
+		this.attributeViewer = obj;
+		this.attributeViewer.gameObject.SetActive(false);
 	}
 
 	public void OnHoverOver()
 	{
-		this.AttributeViewer.SetActive(true);
+		this.attributeViewer.gameObject.SetActive(true);
 	}
 
 	public void OnHoverOut()
 	{
-		this.AttributeViewer.SetActive(false);
+		this.attributeViewer.gameObject.SetActive(false);
 	}
 
 	public UIButton costume_button
@@ -123,7 +129,7 @@ public class YotogiParameterViewer : MonoBehaviour
 
 	public bool CostumeButtonVisible = true;
 
-	public GameObject AttributeViewer;
+	public AttributeViewer attributeViewer;
 
 	public bool CurrentValueDraw;
 

+ 149 - 68
Assembly-CSharp/YotogiPlayManager.cs

@@ -84,50 +84,21 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			this.is_excite_lock_ = false;
 		}
-		GameObject childObject = UTY.GetChildObject(base.root_obj, "StatusViewer", false);
-		GameObject childObject2 = UTY.GetChildObject(base.root_obj, "StatusSlider", false);
 		if (this.command_menu != null)
 		{
 			this.command_menu.SetOnEnterEvetn(new Action<Skill.Data.Command.Data>(this.OnClickCommand));
 		}
-		if (!this.is_free_mode && !this.is_vr_mode && this.paramenter_viewer_ == null)
-		{
-			childObject.SetActive(true);
-			childObject2.SetActive(false);
-			this.param_basic_bar_ = UTY.GetChildObject(childObject, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent<YotogiParamBasicBar>();
-			this.paramenter_viewer_ = Utility.CreatePrefab(UTY.GetChildObject(base.root_obj, "ParameterViewer/YotogiParameterViewer/MaskGroup", false), "SceneYotogi/Common/Prefab/ParameterViewer", true).GetComponent<YotogiParameterViewer>();
-			this.paramenter_viewer_.SetCostumeButtonVisible(false);
-			this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false));
-			UTY.GetChildObject(base.root_obj, "SkillSelectViewer", false).SetActive(false);
-		}
-		else if (this.is_free_mode)
+		this.player_state_ = YotogiPlay.PlayerState.Normal;
+		if (this.is_free_mode)
 		{
-			this.playing_skill_no_ = -1;
-			this.param_basic_bar_ = UTY.GetChildObject(childObject2, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent<YotogiParamBasicBarPlusSlider>();
-			childObject.SetActive(false);
-			childObject2.SetActive(true);
-			UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(false);
-			GameObject childObject3 = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Parent", false);
-			if (childObject3.transform.childCount == 0)
-			{
-				this.yotogi_mgr_.skill_select_prefab_object.transform.SetParent(childObject3.transform, false);
-			}
-			this.free_skill_select_ = childObject3.GetComponentInChildren<FreeSkillSelect>();
-			this.common_buttons_.next_btn.gameObject.SetActive(false);
-			UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).SetActive(true);
-			UIButton component = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Next", false).GetComponent<UIButton>();
-			component.onClick.Clear();
-			EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickSkillSelectEnd));
 			this.free_mode_backup_data_.seikeiken = this.maid_.status.seikeiken;
 		}
-		this.param_basic_bar_.SetMaid(this.maid_);
-		this.player_state_ = YotogiPlay.PlayerState.Normal;
 		if (this.estrusMode)
 		{
 			this.estrusMode = false;
 			this.maid_.status.currentSensual = 0;
-			this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false);
 		}
+		this.UIStartup();
 		if (this.playing_skill_no_ == -1)
 		{
 			this.Initialize();
@@ -142,7 +113,7 @@ public class YotogiPlayManager : WfScreenChildren
 		for (int i = 0; i < GameMain.Instance.CharacterMgr.GetMaidCount(); i++)
 		{
 			Maid maid = GameMain.Instance.CharacterMgr.GetMaid(i);
-			if (!(maid == null))
+			if (!(maid == null) && maid.Visible)
 			{
 				maid.AddPrefab("Particle/pToiki", "夜伽_吐息", "Bip01 Head", new Vector3(0.042f, 0.076f, 0f), new Vector3(-90f, 90f, 0f));
 				this.breatheObjects.Add(maid.GetPrefab("夜伽_吐息"));
@@ -167,6 +138,67 @@ public class YotogiPlayManager : WfScreenChildren
 		}
 	}
 
+	private void UIStartup()
+	{
+		GameObject childObject = UTY.GetChildObject(base.root_obj, "StatusViewer", false);
+		GameObject childObject2 = UTY.GetChildObject(base.root_obj, "StatusSlider", false);
+		UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(true);
+		if (!this.is_free_mode && !this.is_vr_mode && this.paramenter_viewer_ == null)
+		{
+			childObject.SetActive(true);
+			childObject2.SetActive(false);
+			this.param_basic_bar_ = UTY.GetChildObject(childObject, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent<YotogiParamBasicBar>();
+			this.paramenter_viewer_ = Utility.CreatePrefab(UTY.GetChildObject(base.root_obj, "ParameterViewer/YotogiParameterViewer/MaskGroup", false), "SceneYotogi/Common/Prefab/ParameterViewer", true).GetComponent<YotogiParameterViewer>();
+			this.paramenter_viewer_.SetCostumeButtonVisible(false);
+			this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false).GetComponent<AttributeViewer>());
+			UTY.GetChildObject(base.root_obj, "SkillSelectViewer", false).SetActive(false);
+		}
+		else if (this.is_free_mode)
+		{
+			this.playing_skill_no_ = -1;
+			this.param_basic_bar_ = UTY.GetChildObject(childObject2, "ParameterViewer/MaskGroup/ParameterParent", false).GetComponent<YotogiParamBasicBarPlusSlider>();
+			childObject.SetActive(false);
+			childObject2.SetActive(true);
+			UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(false);
+			GameObject childObject3 = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Parent", false);
+			if (childObject3.transform.childCount == 0)
+			{
+				this.yotogi_mgr_.skill_select_prefab_object.transform.SetParent(childObject3.transform, false);
+			}
+			this.free_skill_select_ = childObject3.GetComponentInChildren<FreeSkillSelect>();
+			this.common_buttons_.next_btn.gameObject.SetActive(false);
+			UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).SetActive(true);
+			UIButton component = UTY.GetChildObject(base.root_obj, "SkillSelectViewer/YotogiSkillSelectViewer/MaskGroup/Next", false).GetComponent<UIButton>();
+			component.onClick.Clear();
+			EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickSkillSelectEnd));
+		}
+		if (this.is_new_yotogi_mode)
+		{
+			GameObject childObject4 = UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer/MaskGroup/SkillGroup", false);
+			UTY.GetChildObject(childObject4, "SkillParent", false).SetActive(false);
+			UTY.GetChildObject(childObject4, "FrameGroup", false).SetActive(false);
+			UTY.GetChildObject(childObject4, "Line", false).SetActive(false);
+			UTY.GetChildObject(base.root_obj, "CommandViewer/SkillViewer", false).transform.localPosition = new Vector3(130f, 0f, 0f);
+			GameObject gameObject = childObject4.transform.parent.gameObject;
+			UTY.GetChildObject(gameObject, "SectionLine", false).transform.localPosition = new Vector3(-12f, -277f, 0f);
+			UTY.GetChildObject(gameObject, "ParamView", false).transform.localPosition = new Vector3(109f, -279f, 0f);
+			UIGrid component2 = UTY.GetChildObject(gameObject, "ParamView/Parent", false).GetComponent<UIGrid>();
+			component2.maxPerLine = 2;
+			component2.enabled = true;
+			if (this.heroineChangeFlag)
+			{
+				UTY.GetChildObject(base.root_obj, "ParameterViewer", false).SetActive(false);
+				this.singleStatusLock = true;
+				this.heroineChangeFlag = false;
+			}
+		}
+		this.param_basic_bar_.SetMaid(this.maid_);
+		if (this.estrusMode)
+		{
+			this.param_basic_bar_.SetCurrentSensual(0, false);
+		}
+	}
+
 	private void Initialize()
 	{
 		this.suspendStoreData = null;
@@ -183,8 +215,8 @@ public class YotogiPlayManager : WfScreenChildren
 		UIButton component = UTY.GetChildObject(this.common_buttons_.gameObject, "UnderButtonGroup/End", false).GetComponent<UIButton>();
 		component.onClick.Clear();
 		EventDelegate.Add(component.onClick, new EventDelegate.Callback(this.OnClickNext));
-		this.maid_status_ = this.maid_.status;
-		this.bonusCorrectionStatus_ = this.maid_status_.GetBonusStatusAsFeatureAndPropensitys();
+		Status status = this.maid_.status;
+		this.bonusCorrectionStatus_ = status.GetBonusStatusAsFeatureAndPropensitys();
 		if (!this.is_free_mode)
 		{
 			this.maid_.status.currentSensual = 0;
@@ -195,9 +227,9 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			this.maid_.status.currentSensual = 300;
 		}
-		this.maid_.status.currentMind = this.maid_status_.maxMind;
-		this.param_basic_bar_.SetMaxMind(this.maid_status_.maxMind);
-		this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false);
+		this.maid_.status.currentMind = status.maxMind;
+		this.param_basic_bar_.SetMaxMind(status.maxMind);
+		this.param_basic_bar_.SetCurrentSensual(status.currentSensual, false);
 		this.man_alpha_slider_.value = (float)GameMain.Instance.CMSystem.ManAlpha / 100f;
 		this.setting_man_alpha_ = GameMain.Instance.CMSystem.ManAlpha;
 		this.man_alpha_slider_.onChange.Clear();
@@ -247,7 +279,7 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			string text = string.Empty;
 			string text2 = string.Empty;
-			if (0 <= this.maid_status_.currentExcite && this.maid_status_.currentExcite <= 200)
+			if (0 <= this.maid_.status.currentExcite && this.maid_.status.currentExcite <= 200)
 			{
 				if (this.playing_skill_level_ == 3)
 				{
@@ -366,7 +398,7 @@ public class YotogiPlayManager : WfScreenChildren
 					GameMain.Instance.SysDlg.Close();
 					this.yotogi_mgr_.AddPlaySkill(this.playing_skill_.skill_pair.base_data.connect_faint_skill);
 					this.playing_skill_no_ = this.yotogi_mgr_.play_skill_array.Length - 2;
-					this.maid_status_.currentMind = this.maid_status_.maxMind;
+					this.maid_.status.currentMind = this.maid_.status.maxMind;
 					this.Finish();
 				}, delegate
 				{
@@ -408,17 +440,18 @@ public class YotogiPlayManager : WfScreenChildren
 		this.SetControlMask(false, false);
 		this.play_command_id_.Clear();
 		this.playing_skill_no_++;
-		if (this.maid_status_.currentMind <= 0)
+		Status status = this.maid_.status;
+		if (status.currentMind <= 0)
 		{
-			this.maid_status_.currentMind = this.maid_status_.maxMind / 2;
+			status.currentMind = status.maxMind / 2;
 		}
 		else
 		{
-			this.maid_status_.currentMind = this.maid_status_.maxMind;
+			status.currentMind = status.maxMind;
 		}
-		this.param_basic_bar_.SetCurrentExcite(this.maid_status_.currentExcite, false);
-		this.param_basic_bar_.SetCurrentMind(this.maid_status_.currentMind, false);
-		this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, false);
+		this.param_basic_bar_.SetCurrentExcite(status.currentExcite, false);
+		this.param_basic_bar_.SetCurrentMind(status.currentMind, false);
+		this.param_basic_bar_.SetCurrentSensual(status.currentSensual, false);
 		if (this.paramenter_viewer_ != null && this.paramenter_viewer_.gameObject.activeSelf)
 		{
 			this.paramenter_viewer_.SetMaid(this.maid_);
@@ -506,7 +539,7 @@ public class YotogiPlayManager : WfScreenChildren
 		return true;
 	}
 
-	public void Suspend(Skill.Data.Command.Data suspendCommandData)
+	public void Suspend(Skill.Data.Command.Data suspendCommandData, string jumpLabel)
 	{
 		if (GameMain.Instance.MainCamera.IsFadeProc())
 		{
@@ -521,7 +554,7 @@ public class YotogiPlayManager : WfScreenChildren
 		GameMain.Instance.MainCamera.FadeOut(0.5f, false, delegate
 		{
 			this.yotogi_mgr_.uiVisible = false;
-			GameMain.Instance.ScriptMgr.adv_kag.JumpLabel("*サスペンド");
+			GameMain.Instance.ScriptMgr.adv_kag.JumpLabel(jumpLabel);
 			GameMain.Instance.ScriptMgr.adv_kag.Exec();
 		}, true, default(Color));
 	}
@@ -564,6 +597,31 @@ public class YotogiPlayManager : WfScreenChildren
 		}, true, true, default(Color));
 	}
 
+	public void ReStart()
+	{
+		if (GameMain.Instance.MainCamera.IsFadeProc() || this.suspendStoreData == null)
+		{
+			Debug.LogError("failed to Yotogi ReStart.");
+			return;
+		}
+		this.playing_skill_no_ = -1;
+		if (!this.is_free_mode && !this.is_vr_mode)
+		{
+			for (int i = 0; i < this.yotogi_mgr_.play_skill_array.Length; i++)
+			{
+				if (this.yotogi_mgr_.play_skill_array[i].skill_pair.base_data != null)
+				{
+					if (!this.yotogi_mgr_.play_skill_array[i].is_play)
+					{
+						this.playing_skill_no_ = i - 1;
+						break;
+					}
+				}
+			}
+		}
+		this.OnNextSkillMove();
+	}
+
 	public string CallNormalFile(string file, string label)
 	{
 		string text = ScriptManager.ReplacePersonal(this.replace_personal_target_maid_array_, file);
@@ -580,7 +638,7 @@ public class YotogiPlayManager : WfScreenChildren
 	public void ApplyExecCommandStatus(Maid maid, Skill.Data.Command.Data cm)
 	{
 		Skill.Data.Command.Data.Status status = cm.status;
-		bool enabledYotogiStatusLock = this.maid_.status.enabledYotogiStatusLock;
+		bool flag = this.maid_.status.enabledYotogiStatusLock || this.singleStatusLock;
 		Status maid_status = maid.status;
 		BonusStatus bonusStatus = this.bonusCorrectionStatus_;
 		Func<float, int> feiling_func = (float ceiling_num) => (0f > ceiling_num) ? ((int)System.Math.Floor((double)ceiling_num)) : ((int)System.Math.Ceiling((double)ceiling_num));
@@ -608,7 +666,7 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			return;
 		}
-		if (!enabledYotogiStatusLock)
+		if (!flag)
 		{
 			maid_status.baseLovely += func3(status.lovely, bonusStatus.lovely);
 			maid_status.baseElegance += func3(status.elegance, bonusStatus.elegance);
@@ -623,7 +681,7 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			maid_status.currentSensual += func(status.cost_sensual, bonusStatus.sensual);
 		}
-		if (!enabledYotogiStatusLock)
+		if (!flag)
 		{
 			maid_status.baseInyoku += func(status.inyoku, bonusStatus.inyoku);
 			maid_status.baseMvalue += func(status.m_value, bonusStatus.mvalue);
@@ -717,7 +775,7 @@ public class YotogiPlayManager : WfScreenChildren
 			string text = string.Empty;
 			GameMain.Instance.ScriptMgr.EvalScript("global.__yotogi_advhook_file = '';");
 			GameMain.Instance.ScriptMgr.EvalScript("global.__yotogi_advhook_label = '';");
-			this.CallNormalFile(command_data.basic.call_file.adv_hook_file, "*top");
+			this.CallNormalFile(command_data.basic.call_file.adv_hook_file, string.Empty);
 			using (TJSVariant tjsvariant = new TJSVariant())
 			{
 				GameMain.Instance.ScriptMgr.EvalScript("global.__yotogi_advhook_file != ''", tjsvariant);
@@ -755,7 +813,7 @@ public class YotogiPlayManager : WfScreenChildren
 			}
 			if (flag)
 			{
-				this.Suspend(command_data);
+				this.Suspend(command_data, "*サスペンド");
 				return;
 			}
 		}
@@ -797,9 +855,9 @@ public class YotogiPlayManager : WfScreenChildren
 			}
 			this.particleLoveLiquidType = ((200 > this.maid_.status.currentExcite) ? ((100 > this.maid_.status.currentExcite) ? 1 : 2) : 3);
 		}
-		this.param_basic_bar_.SetCurrentMind(this.maid_status_.currentMind, true);
-		this.param_basic_bar_.SetCurrentSensual(this.maid_status_.currentSensual, true);
-		this.param_basic_bar_.SetCurrentExcite(this.maid_status_.currentExcite, true);
+		this.param_basic_bar_.SetCurrentMind(this.maid_.status.currentMind, true);
+		this.param_basic_bar_.SetCurrentSensual(this.maid_.status.currentSensual, true);
+		this.param_basic_bar_.SetCurrentExcite(this.maid_.status.currentExcite, true);
 		YotogiPlay.Param param = YotogiPlay.Param.Create(this.maid_) - this.backup_maid_param_;
 		Action<List<KeyValuePair<string, int>>, string, int> action = delegate(List<KeyValuePair<string, int>> list, string name, int num)
 		{
@@ -811,7 +869,7 @@ public class YotogiPlayManager : WfScreenChildren
 		};
 		List<KeyValuePair<string, int>> list2 = new List<KeyValuePair<string, int>>();
 		action(list2, "興奮", param.currentExcite);
-		action(list2, "精神", param.currentMind);
+		action(list2, (!this.is_new_yotogi_mode) ? "精神" : "時間", param.currentMind);
 		action(list2, "官能", param.cur_sensory);
 		action(list2, "淫欲", param.inyoku);
 		action(list2, "M性", param.m_value);
@@ -1528,18 +1586,18 @@ public class YotogiPlayManager : WfScreenChildren
 
 	private bool OnCreateCommand(Skill.Data.Command.Data command_data)
 	{
-		return command_data.basic.ng_propensity == null || !this.maid_status_.propensitys.ContainsKey(command_data.basic.ng_propensity.id);
+		return command_data.basic.ng_propensity == null || !this.maid_.status.propensitys.ContainsKey(command_data.basic.ng_propensity.id);
 	}
 
 	private bool OnEnabledCommand(Skill.Data.Command.Data command_data)
 	{
 		Func<bool> func = delegate()
 		{
-			if (command_data.basic.isEstrusTriggerCommand && (200 > this.maid_status_.currentExcite || 300 > this.maid_status_.currentSensual))
+			if (command_data.basic.isEstrusTriggerCommand && (200 > this.maid_.status.currentExcite || 300 > this.maid_.status.currentSensual))
 			{
 				return false;
 			}
-			if (command_data.basic.command_type == Yotogi.SkillCommandType.絶頂 && this.maid_status_.currentExcite < 80)
+			if (command_data.basic.command_type == Yotogi.SkillCommandType.絶頂 && this.maid_.status.currentExcite < 80)
 			{
 				return false;
 			}
@@ -1592,12 +1650,12 @@ public class YotogiPlayManager : WfScreenChildren
 		{
 			Propensity.Data data = Propensity.GetData(num);
 			string key = "性癖【" + data.drawName + "】";
-			list.Add(new KeyValuePair<string, bool>(key, this.maid_status_.propensitys.ContainsKey(num)));
+			list.Add(new KeyValuePair<string, bool>(key, this.maid_.status.propensitys.ContainsKey(num)));
 		}
 		if (command_data.basic.isEstrusTriggerCommand)
 		{
-			list.Add(new KeyValuePair<string, bool>("興奮 200", 200 <= this.maid_status_.currentExcite));
-			list.Add(new KeyValuePair<string, bool>("官能 300", 300 <= this.maid_status_.currentSensual));
+			list.Add(new KeyValuePair<string, bool>("興奮 200", 200 <= this.maid_.status.currentExcite));
+			list.Add(new KeyValuePair<string, bool>("官能 300", 300 <= this.maid_.status.currentSensual));
 		}
 		if (command_data.basic.executionConditionParameters != null)
 		{
@@ -1852,6 +1910,18 @@ public class YotogiPlayManager : WfScreenChildren
 			this.yotogi_mgr_.AddDebugLog("============================================");
 			return;
 		}
+		if (this.is_new_yotogi_mode)
+		{
+			this.Suspend(null, this.yotogi_mgr_.null_mgr.nextLabel);
+		}
+		else
+		{
+			this.AdvanceSkillMove();
+		}
+	}
+
+	public void AdvanceSkillMove()
+	{
 		this.playing_skill_no_ = -1;
 		if (!this.is_free_mode && !this.is_vr_mode)
 		{
@@ -1877,6 +1947,7 @@ public class YotogiPlayManager : WfScreenChildren
 			this.command_menu.DestroySkillCommand();
 			this.command_menu.visible = false;
 		}
+		this.singleStatusLock = false;
 		if (this.is_free_mode)
 		{
 			this.maid_.status.seikeiken = this.free_mode_backup_data_.seikeiken;
@@ -1912,7 +1983,7 @@ public class YotogiPlayManager : WfScreenChildren
 	{
 		if (!this.is_free_mode && !this.is_vr_mode && this.playing_skill_ != null && this.playing_skill_.skill_pair.base_data.specialConditionType == Skill.Data.SpecialConditionType.Faint)
 		{
-			this.maid_status_.currentMind = 0;
+			this.maid_.status.currentMind = 0;
 		}
 		if (this.playing_skill_no_ == -1 || this.IsFaint())
 		{
@@ -2032,7 +2103,7 @@ public class YotogiPlayManager : WfScreenChildren
 
 	public bool IsFaint()
 	{
-		return !this.is_free_mode && !this.is_vr_mode && ((this.maid_.status.currentMind <= 0 && this.maid_.status.currentHp <= 0) || (this.playing_skill_no_ == -1 && this.maid_.status.currentHp <= 0));
+		return !this.is_free_mode && !this.is_vr_mode && !this.is_new_yotogi_mode && ((this.maid_.status.currentMind <= 0 && this.maid_.status.currentHp <= 0) || (this.playing_skill_no_ == -1 && this.maid_.status.currentHp <= 0));
 	}
 
 	public List<YotogiPlayManager.RepeatVoiceData> repeat_voice_data_list
@@ -2059,6 +2130,14 @@ public class YotogiPlayManager : WfScreenChildren
 		}
 	}
 
+	private bool is_new_yotogi_mode
+	{
+		get
+		{
+			return this.yotogi_mgr_.is_new_yotogi_mode;
+		}
+	}
+
 	private YotogiCommandMenuOVR command_menu
 	{
 		get
@@ -2076,7 +2155,7 @@ public class YotogiPlayManager : WfScreenChildren
 		set
 		{
 			bool flag = value;
-			if (flag && (!this.estrusMode || this.maid_status_.currentExcite < 200))
+			if (flag && (!this.estrusMode || this.maid_.status.currentExcite < 200))
 			{
 				flag = false;
 			}
@@ -2128,6 +2207,10 @@ public class YotogiPlayManager : WfScreenChildren
 
 	public SubtitleDisplayManager subtitlesManager;
 
+	public bool heroineChangeFlag;
+
+	public bool singleStatusLock;
+
 	public Dictionary<string, int> commandClickCountTotal = new Dictionary<string, int>();
 
 	public Dictionary<string, int> commandClickCountSingle = new Dictionary<string, int>();
@@ -2138,8 +2221,6 @@ public class YotogiPlayManager : WfScreenChildren
 
 	private ScriptManager script_mgr_;
 
-	private Status maid_status_;
-
 	private YotogiManager yotogi_mgr_;
 
 	private YotogiManager.PlayingSkillData playing_skill_;

+ 14 - 6
Assembly-CSharp/YotogiResultManager.cs

@@ -18,7 +18,7 @@ public class YotogiResultManager : WfScreenChildren
 		gameObject.transform.localPosition = new Vector3(0f, 360f, 0f);
 		this.paramenter_viewer_ = gameObject.GetComponent<YotogiParameterViewer>();
 		this.paramenter_viewer_.SetCostumeButtonVisible(false);
-		this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false));
+		this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false).GetComponent<AttributeViewer>());
 		this.fluctuation_status_parent_ = UTY.GetChildObject(base.root_obj, "AcquiredParameterViewer/FluctuationOfParameter/FluctuationOfParameterParent", false).GetComponent<UITable>();
 		this.acquired_class_parent_ = UTY.GetChildObject(base.root_obj, "AcquiredParameterViewer/YotogiClass/AcquiredSkillParent/Contents/UnitParent", false).GetComponent<UIGrid>();
 		this.acquired_skill_parent_ = UTY.GetChildObject(base.root_obj, "AcquiredParameterViewer/AcquiredSkill/AcquiredSkillParent/Contents/UnitParent", false).GetComponent<UIGrid>();
@@ -28,6 +28,7 @@ public class YotogiResultManager : WfScreenChildren
 
 	protected override void OnCall()
 	{
+		this.yotogi_mgr_.uiVisible = true;
 		this.common_buttons_.next_btn.onClick.Clear();
 		EventDelegate.Add(this.common_buttons_.next_btn.onClick, new EventDelegate.Callback(this.OnClickNext));
 		this.maid_ = this.yotogi_mgr_.maid;
@@ -39,7 +40,7 @@ public class YotogiResultManager : WfScreenChildren
 		YotogiManager.PlayingSkillData[] play_skill_array = this.yotogi_mgr_.play_skill_array;
 		for (int i = 0; i < play_skill_array.Length; i++)
 		{
-			if (play_skill_array[i].skill_pair.base_data != null && !hashSet.Contains(play_skill_array[i].skill_pair.base_data.id) && play_skill_array[i].skill_pair.base_data.specialConditionType != Skill.Data.SpecialConditionType.Faint)
+			if (play_skill_array[i].skill_pair.base_data != null && !hashSet.Contains(play_skill_array[i].skill_pair.base_data.id) && play_skill_array[i].skill_pair.base_data.specialConditionType != Skill.Data.SpecialConditionType.Faint && play_skill_array[i].skill_pair.base_data.specialConditionType != Skill.Data.SpecialConditionType.NewType)
 			{
 				hashSet.Add(play_skill_array[i].skill_pair.base_data.id);
 				YotogiSkillUnit yotogiSkillUnit = this.AddSkillUnit(play_skill_array[i].skill_pair);
@@ -118,7 +119,7 @@ public class YotogiResultManager : WfScreenChildren
 		foreach (int id3 in hashSet4)
 		{
 			Skill.Data data = Skill.Get(id3);
-			if (data.specialConditionType != Skill.Data.SpecialConditionType.Faint)
+			if (data.specialConditionType != Skill.Data.SpecialConditionType.Faint && data.specialConditionType != Skill.Data.SpecialConditionType.NewType)
 			{
 				if (!lockNTRPlay || (data.category != Yotogi.Category.交換 && data.category != Yotogi.Category.乱交))
 				{
@@ -135,6 +136,10 @@ public class YotogiResultManager : WfScreenChildren
 		this.acquired_attribute_parent_.Reposition();
 		this.skill_unit_parent_.Reposition();
 		this.StartAnime();
+		if (this.yotogi_mgr_.is_new_yotogi_mode)
+		{
+			UTY.GetChildObject(base.root_obj, "SkillViewer", false).SetActive(false);
+		}
 		GameMain.Instance.CharacterMgr.status.CheckTrophyMaidStatus(this.maid_);
 		this.acquired_class_parent_.Reposition();
 		Utility.ResetNGUI(UTY.GetChildObject(this.acquired_class_parent_.transform.parent.parent.gameObject, "Contents", false).GetComponent<UIScrollView>());
@@ -232,10 +237,13 @@ public class YotogiResultManager : WfScreenChildren
 		{
 			transform.GetChild(i).GetComponent<FluctuationOfParameterUnit>().StartAnime();
 		}
-		transform = this.skill_unit_parent_.gameObject.transform;
-		for (int j = 0; j < transform.childCount; j++)
+		if (!this.yotogi_mgr_.is_new_yotogi_mode)
 		{
-			transform.GetChild(j).GetComponent<YotogiSkillUnit>().StartAnime();
+			transform = this.skill_unit_parent_.gameObject.transform;
+			for (int j = 0; j < transform.childCount; j++)
+			{
+				transform.GetChild(j).GetComponent<YotogiSkillUnit>().StartAnime();
+			}
 		}
 	}
 

+ 1 - 1
Assembly-CSharp/YotogiSkillListManager.cs

@@ -127,7 +127,7 @@ public class YotogiSkillListManager : MonoBehaviour
 			YotogiSkillListManager.Data value = keyValuePair.Value;
 			if (value.skillData != null)
 			{
-				if (value.skillData.specialConditionType == Skill.Data.SpecialConditionType.Faint)
+				if (value.skillData.specialConditionType == Skill.Data.SpecialConditionType.Faint || value.skillData.specialConditionType == Skill.Data.SpecialConditionType.NewType)
 				{
 					continue;
 				}

+ 1 - 1
Assembly-CSharp/YotogiSkillSelectManager.cs

@@ -17,7 +17,7 @@ public class YotogiSkillSelectManager : WfScreenChildren
 		GameObject gameObject = Utility.CreatePrefab(base.root_obj, "SceneYotogi/Common/Prefab/ParameterViewer", true);
 		gameObject.transform.localPosition = new Vector3(782f, 449f, 0f);
 		this.paramenter_viewer_ = gameObject.GetComponent<YotogiParameterViewer>();
-		this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false));
+		this.paramenter_viewer_.SetAttributeViewer(UTY.GetChildObject(base.root_obj.transform.parent.gameObject, "AttributeViewer", false).GetComponent<AttributeViewer>());
 		EventDelegate.Add(this.paramenter_viewer_.costume_button.onClick, new EventDelegate.Callback(this.OnClickEdit));
 		this.skill_container_mgr_ = new YotogiSkillContainerViewer(base.root_obj, this);
 		this.skill_container_mgr_.SetOnSkillChangeEvent(new Action<YotogiSkillContainerViewer>(this.OnSkillChangeEvent));

+ 9 - 0
Assembly-CSharp/YotogiStageSelectManager.cs

@@ -72,6 +72,15 @@ public class YotogiStageSelectManager : WfScreenChildren
 		this.maid_.FaceAnime("通常", 0f, 0);
 		this.maid_.FaceBlend("無し");
 		this.maid_.Visible = false;
+		if (this.yotogi_mgr_.is_new_yotogi_mode)
+		{
+			base.SetFadeStatus(WfScreenChildren.FadeStatus.Wait);
+			float fade_time = base.fade_time;
+			base.SetFadeTime(0f);
+			this.Finish();
+			base.SetFadeTime(fade_time);
+			return false;
+		}
 		return true;
 	}
 

+ 2 - 1
Assembly-CSharp/Yotogis/Skill.cs

@@ -2053,7 +2053,8 @@ namespace Yotogis
 				Mask,
 				Drug,
 				Faint,
-				Confess
+				Confess,
+				NewType
 			}
 
 			public class GetConditionData : SkillAcquisitionCondition