public static void MoveCamera2Hook(On.RoomCamera.orig_MoveCamera2 orig, RoomCamera rCam, string requestedTexture) { if (requestedTexture.Split('_').Length > 2) { if (ShouldScroll(rCam, GetRoomName(requestedTexture))) { requestedTexture = GetPng(requestedTexture); } } orig(rCam, requestedTexture); }
private static void RoomCamera_MoveCamera2(On.RoomCamera.orig_MoveCamera2 orig, RoomCamera self, string requestedTexture) { string path = requestedTexture; string delimitator = "file:///"; int index = path.IndexOf(delimitator) + delimitator.Length; path = path.Substring(index); if (!File.Exists(path)) { requestedTexture = FindCameraTexturePath(requestedTexture); } //CustomWorldMod.CustomWorldLog($"Custom regions: MoveCamera path [{path}] Exists [{File.Exists(path)}]. Requested texture [{requestedTexture}]. Quened texture [{self.quenedTexture}]"); orig(self, requestedTexture); }
private static void RoomCamera_MoveCamera2(On.RoomCamera.orig_MoveCamera2 orig, RoomCamera self, string requestedTexture) { CustomWorldMod.Log($"[RoomCamera] MoveCamera called with [{requestedTexture}].", false, CustomWorldMod.DebugLevel.FULL); string path = requestedTexture; string delimitator = "file:///"; int index = path.IndexOf(delimitator) + delimitator.Length; path = path.Substring(index); if (!File.Exists(path)) { // Mod is using vanilla level image requestedTexture = FindCameraTexturePath(requestedTexture); } CustomWorldMod.Log($"[RoomCamera] MoveCamera path [{path}] Exists [{File.Exists(path)}]. Requested texture [{requestedTexture}]. " + $"Quened texture [{self.quenedTexture}]", false, CustomWorldMod.DebugLevel.FULL); orig(self, requestedTexture); }