using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using Bounce.Singletons;
using Bounce.Unmanaged;
using DataModel;
using HarmonyLib;
using RadialUI;
using TMPro;
using UnityEngine;
using UnityEngine.SceneManagement;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("RoomViewPlugin")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RoomViewPlugin")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("RoomViewPlugin")]
[assembly: ComVisible(false)]
[assembly: Guid("c303405d-e66c-4316-9cdb-4e3ca15c6360")]
[assembly: AssemblyFileVersion("3.4.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("3.4.0.0")]
namespace LordAshes;
[BepInPlugin("org.lordashes.plugins.roomview", "Room View Plug-In", "3.4.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class RoomViewPlugin : BaseUnityPlugin
{
public static class Utility
{
public static bool isBoardLoaded()
{
return SimpleSingletonBehaviour<CameraController>.HasInstance && SingletonStateMBehaviour<BoardSessionManager, State<BoardSessionManager>>.HasInstance && !BoardSessionManager.IsLoading;
}
public static float ParseFloat(string value)
{
return float.Parse(value, CultureInfo.InvariantCulture);
}
public static string GetCreatureName(string nameBlock)
{
if (nameBlock == null)
{
return "(Unknown)";
}
if (!nameBlock.Contains("<size=0>"))
{
return nameBlock;
}
return nameBlock.Substring(0, nameBlock.IndexOf("<size=0>")).Trim();
}
public static void PostOnMainPage(MemberInfo plugin)
{
SceneManager.sceneLoaded += delegate(Scene scene, LoadSceneMode mode)
{
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Expected O, but got Unknown
try
{
if (((Scene)(ref scene)).name == "UI")
{
TextMeshProUGUI uITextByName = GetUITextByName("BETA");
if (Object.op_Implicit((Object)(object)uITextByName))
{
((TMP_Text)uITextByName).text = "INJECTED BUILD - unstable mods";
}
}
else
{
TextMeshProUGUI uITextByName2 = GetUITextByName("TextMeshPro Text");
if (Object.op_Implicit((Object)(object)uITextByName2))
{
BepInPlugin val = (BepInPlugin)Attribute.GetCustomAttribute(plugin, typeof(BepInPlugin));
if (((TMP_Text)uITextByName2).text.EndsWith("</size>"))
{
((TMP_Text)uITextByName2).text = ((TMP_Text)uITextByName2).text + "\n\nMods Currently Installed:\n";
}
TextMeshProUGUI val2 = uITextByName2;
((TMP_Text)val2).text = ((TMP_Text)val2).text + "\nLord Ashes' " + val.Name + " - " + val.Version;
}
}
}
catch (Exception ex)
{
Debug.Log((object)ex);
}
};
}
private static TextMeshProUGUI GetUITextByName(string name)
{
TextMeshProUGUI[] array = Object.FindObjectsOfType<TextMeshProUGUI>();
for (int i = 0; i < array.Length; i++)
{
if (((Object)array[i]).name == name)
{
return array[i];
}
}
return null;
}
}
[HarmonyPatch(typeof(MovableBoardAsset), "SwitchState")]
public static class PatchSwitchState
{
public static void Postfix(State state)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Invalid comparison between Unknown and I4
//IL_0111: Unknown result type (might be due to invalid IL or missing references)
//IL_0113: Invalid comparison between Unknown and I4
//IL_012f: Unknown result type (might be due to invalid IL or missing references)
//IL_0134: Unknown result type (might be due to invalid IL or missing references)
//IL_007c: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
CreatureGuid selectedCreatureId = LocalClient.SelectedCreatureId;
string text = AssetDataPlugin.ReadInfo(((object)(CreatureGuid)(ref selectedCreatureId)).ToString(), "org.lordashes.plugins.roomview.Revealer");
if (text == null || text.ToString() == "" || !bool.Parse(text))
{
return;
}
if ((int)state == 2)
{
if (diagnostics)
{
string[] obj = new string[5] { "Room View Plugin: Revealer Creature ", null, null, null, null };
selectedCreatureId = LocalClient.SelectedCreatureId;
obj[1] = ((object)(CreatureGuid)(ref selectedCreatureId)).ToString();
obj[2] = " picked up (Continious update is ";
obj[3] = isContiniousUpdateOn.ToString();
obj[4] = ")";
Debug.Log((object)string.Concat(obj));
}
if (isContiniousUpdateOn)
{
if (diagnostics)
{
Debug.Log((object)"Room View Plugin: Turn on hide volume updates");
}
isMoving = true;
((MonoBehaviour)_self).StartCoroutine(UpdateHideVolumes());
}
else if (diagnostics)
{
Debug.Log((object)"Room View Plugin: Wait for mini drop to do hide volume update");
}
}
if ((int)state != 1)
{
return;
}
string[] obj2 = new string[5] { "Room View Plugin: Revealer Creature ", null, null, null, null };
selectedCreatureId = LocalClient.SelectedCreatureId;
obj2[1] = ((object)(CreatureGuid)(ref selectedCreatureId)).ToString();
obj2[2] = " dropped (Continious update is ";
obj2[3] = isContiniousUpdateOn.ToString();
obj2[4] = ")";
Debug.Log((object)string.Concat(obj2));
isMoving = false;
if (!isContiniousUpdateOn)
{
if (diagnostics)
{
Debug.Log((object)"Room View Plugin: Perform hide volume update");
}
((MonoBehaviour)_self).StartCoroutine(UpdateHideVolumes());
}
else if (diagnostics)
{
Debug.Log((object)"Room View Plugin: Turn off hide volume updates");
}
}
}
public const string Name = "Room View Plug-In";
public const string Guid = "org.lordashes.plugins.roomview";
public const string Version = "3.4.0.0";
public const string Author = "Lord Ashes";
private static Vector3 margin = new Vector3(0.2f, 0.2f, 0.2f);
private static bool isMoving = false;
private static float isMovingUpdate = 0.5f;
private static bool isRehideOn = false;
private static bool isContiniousUpdateOn = false;
private static bool diagnostics = false;
private static List<NGuid> revealedRooms = new List<NGuid>();
private static List<CreatureBoardAsset> revealers = new List<CreatureBoardAsset>();
private static Transform[] hvs = null;
private static RoomViewPlugin _self = null;
private void Awake()
{
//IL_011e: Unknown result type (might be due to invalid IL or missing references)
//IL_0123: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_0144: Unknown result type (might be due to invalid IL or missing references)
//IL_014b: Unknown result type (might be due to invalid IL or missing references)
//IL_0152: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
//IL_0183: Expected O, but got Unknown
//IL_0189: Unknown result type (might be due to invalid IL or missing references)
//IL_018e: Unknown result type (might be due to invalid IL or missing references)
//IL_01a0: Unknown result type (might be due to invalid IL or missing references)
//IL_01a7: Unknown result type (might be due to invalid IL or missing references)
//IL_01ae: Unknown result type (might be due to invalid IL or missing references)
//IL_01c3: Unknown result type (might be due to invalid IL or missing references)
//IL_01df: Expected O, but got Unknown
//IL_01e5: Unknown result type (might be due to invalid IL or missing references)
//IL_01eb: Expected O, but got Unknown
_self = this;
diagnostics = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Log Diagnostics", false, (ConfigDescription)null).Value;
Debug.Log((object)("Room View Plugin: " + ((object)this).GetType().AssemblyQualifiedName + " Active. (Diagnostics = " + diagnostics + ")"));
isContiniousUpdateOn = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Continiously Update While Mini Is Moving", false, (ConfigDescription)null).Value;
isMovingUpdate = ((BaseUnityPlugin)this).Config.Bind<float>("Settings", "Reveal Update Frequency When Moving", 0.5f, (ConfigDescription)null).Value;
isRehideOn = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Rehide Empty Rooms", true, (ConfigDescription)null).Value;
string value = ((BaseUnityPlugin)this).Config.Bind<string>("Settings", "Margin", "0.2,0.2,0.2", (ConfigDescription)null).Value;
string[] array = value.Split(new char[1] { ',' });
margin = new Vector3(Utility.ParseFloat(array[0]), Utility.ParseFloat(array[1]), Utility.ParseFloat(array[2]));
RadialUIPlugin.AddCustomButtonOnCharacter("org.lordashes.plugins.roomview.Reveal", new ItemArgs
{
Action = Selected,
CloseMenuOnActivate = true,
FadeName = false,
Icon = Image.LoadSprite("org.lordashes.plugins.roomview.reveal.png", (CacheType)999),
Title = "Reveal"
}, (Func<NGuid, NGuid, bool>)ShowRuleForReveal);
RadialUIPlugin.AddCustomButtonOnCharacter("org.lordashes.plugins.roomview.NoReveal", new ItemArgs
{
Action = Selected,
CloseMenuOnActivate = true,
FadeName = false,
Icon = Image.LoadSprite("org.lordashes.plugins.roomview.noreveal.png", (CacheType)999),
Title = "No Reveal"
}, (Func<NGuid, NGuid, bool>)ShowRuleForNoReveal);
Harmony val = new Harmony("org.lordashes.plugins.roomview");
val.PatchAll();
Utility.PostOnMainPage(((object)this).GetType());
}
private bool ShowRuleForReveal(NGuid selected, NGuid radial)
{
string text = AssetDataPlugin.ReadInfo(((object)(NGuid)(ref radial)).ToString(), "org.lordashes.plugins.roomview.Revealer");
if (text == null || text.ToString() == "")
{
return false;
}
return bool.Parse(AssetDataPlugin.ReadInfo(((object)(NGuid)(ref radial)).ToString(), "org.lordashes.plugins.roomview.Revealer"));
}
private bool ShowRuleForNoReveal(NGuid selected, NGuid radial)
{
string text = AssetDataPlugin.ReadInfo(((object)(NGuid)(ref radial)).ToString(), "org.lordashes.plugins.roomview.Revealer");
if (text == null || text.ToString() == "")
{
return true;
}
return !bool.Parse(AssetDataPlugin.ReadInfo(((object)(NGuid)(ref radial)).ToString(), "org.lordashes.plugins.roomview.Revealer"));
}
private void Selected(MapMenuItem creatureId, object state)
{
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_008a: Unknown result type (might be due to invalid IL or missing references)
//IL_008f: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
NGuid lastRadialTargetCreature = RadialUIPlugin.GetLastRadialTargetCreature();
string text = AssetDataPlugin.ReadInfo(((object)(NGuid)(ref lastRadialTargetCreature)).ToString(), "org.lordashes.plugins.roomview.Revealer");
int num;
if (text != null)
{
if (!(text.Trim() == ""))
{
lastRadialTargetCreature = RadialUIPlugin.GetLastRadialTargetCreature();
num = (bool.Parse(AssetDataPlugin.ReadInfo(((object)(NGuid)(ref lastRadialTargetCreature)).ToString(), "org.lordashes.plugins.roomview.Revealer")) ? 1 : 0);
}
else
{
num = 0;
}
}
else
{
num = 0;
}
bool flag = (byte)num != 0;
lastRadialTargetCreature = RadialUIPlugin.GetLastRadialTargetCreature();
AssetDataPlugin.SetInfo(((object)(NGuid)(ref lastRadialTargetCreature)).ToString(), "org.lordashes.plugins.roomview.Revealer", (object)(!flag), false);
lastRadialTargetCreature = RadialUIPlugin.GetLastRadialTargetCreature();
Debug.Log((object)("Room View Plugin: Set creature " + ((object)(NGuid)(ref lastRadialTargetCreature)).ToString() + " revealer state to " + !flag));
}
private static IEnumerator UpdateHideVolumes()
{
CreatureGuid creatureId;
if (hvs == null)
{
hvs = null;
foreach (Transform t in ExtensionMethods.Children(((Component)SimpleSingletonBehaviour<HideVolumeManager>.Instance).transform))
{
if (((Object)t).name.ToUpper() == "ROOT")
{
hvs = ExtensionMethods.Children(t).ToArray();
break;
}
}
foreach (CreatureBoardAsset asset2 in (IEnumerable<CreatureBoardAsset>)CreaturePresenter.GetTempReadOnlyViewOfAllCreatureAssets())
{
creatureId = asset2.CreatureId;
string revealer = AssetDataPlugin.ReadInfo(((object)(CreatureGuid)(ref creatureId)).ToString(), "org.lordashes.plugins.roomview.Revealer");
if (revealer != null && revealer != "" && bool.Parse(revealer))
{
if (diagnostics)
{
string[] obj = new string[5]
{
"Room View Plugin: Applying Revealer ",
Utility.GetCreatureName(asset2.Name),
" (",
null,
null
};
creatureId = asset2.CreatureId;
obj[3] = ((object)(CreatureGuid)(ref creatureId)).ToString();
obj[4] = ")";
Debug.Log((object)string.Concat(obj));
}
revealers.Add(asset2);
}
else if (diagnostics)
{
string[] obj2 = new string[5]
{
"Room View Plugin: Ignoring Non-Revealer ",
Utility.GetCreatureName(asset2.Name),
" (",
null,
null
};
creatureId = asset2.CreatureId;
obj2[3] = ((object)(CreatureGuid)(ref creatureId)).ToString();
obj2[4] = ")";
Debug.Log((object)string.Concat(obj2));
}
}
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Performing hide volume sync (isMoving=" + isMoving + ", isContiniousUpdateOn==" + isContiniousUpdateOn + " => " + (isMoving || !isContiniousUpdateOn)));
}
if (hvs == null)
{
yield break;
}
while (isMoving || !isContiniousUpdateOn)
{
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Waiting " + isMovingUpdate + "s"));
}
yield return (object)new WaitForSeconds(isMovingUpdate);
Debug.Log((object)("Room View Plugin: Found " + hvs.Length + " hide volumes"));
Transform[] array = hvs;
foreach (Transform hvt in array)
{
HideVolumeItem hv = ((Component)hvt).GetComponent<HideVolumeItem>();
string anyRevealerPresent = "";
NGuid id;
if (diagnostics)
{
string[] obj3 = new string[16]
{
"Room View Plugin: Hide volume ",
((Object)hv).name,
" (",
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null,
null
};
id = hv.HideVolume.Id;
obj3[3] = ((object)(NGuid)(ref id)).ToString();
obj3[4] = ") bounds ";
HideVolume hideVolume = hv.HideVolume;
float x = ((Bounds)(ref hideVolume.Bounds)).center.x;
hideVolume = hv.HideVolume;
obj3[5] = (x - ((Bounds)(ref hideVolume.Bounds)).size.x / 2f - margin.x).ToString();
obj3[6] = "->";
hideVolume = hv.HideVolume;
float x2 = ((Bounds)(ref hideVolume.Bounds)).center.x;
hideVolume = hv.HideVolume;
obj3[7] = (x2 + ((Bounds)(ref hideVolume.Bounds)).size.x / 2f + margin.x).ToString();
obj3[8] = ",";
hideVolume = hv.HideVolume;
float y = ((Bounds)(ref hideVolume.Bounds)).center.y;
hideVolume = hv.HideVolume;
obj3[9] = (y - ((Bounds)(ref hideVolume.Bounds)).size.y / 2f - margin.y).ToString();
obj3[10] = "->";
hideVolume = hv.HideVolume;
float y2 = ((Bounds)(ref hideVolume.Bounds)).center.y;
hideVolume = hv.HideVolume;
obj3[11] = (y2 + ((Bounds)(ref hideVolume.Bounds)).size.y / 2f + margin.y).ToString();
obj3[12] = ",";
hideVolume = hv.HideVolume;
float z = ((Bounds)(ref hideVolume.Bounds)).center.z;
hideVolume = hv.HideVolume;
obj3[13] = (z - ((Bounds)(ref hideVolume.Bounds)).size.z / 2f - margin.z).ToString();
obj3[14] = "->";
hideVolume = hv.HideVolume;
float z2 = ((Bounds)(ref hideVolume.Bounds)).center.z;
hideVolume = hv.HideVolume;
obj3[15] = (z2 + ((Bounds)(ref hideVolume.Bounds)).size.z / 2f + margin.z).ToString();
Debug.Log((object)string.Concat(obj3));
}
foreach (CreatureBoardAsset asset in revealers)
{
Vector3 pos = ((Component)asset).transform.position;
bool isAssetInside = IsInside(pos, hv.HideVolume.Bounds, margin);
if (diagnostics)
{
string[] obj4 = new string[6] { "Room View Plugin: Revealer creature ", null, null, null, null, null };
creatureId = asset.CreatureId;
obj4[1] = ((object)(CreatureGuid)(ref creatureId)).ToString();
obj4[2] = " is at ";
obj4[3] = ((object)(Vector3)(ref pos)).ToString();
obj4[4] = ". Is inside hide volume = ";
obj4[5] = isAssetInside.ToString();
Debug.Log((object)string.Concat(obj4));
}
anyRevealerPresent = (isAssetInside ? Utility.GetCreatureName(asset.Name) : "");
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Any Revealers Present = " + anyRevealerPresent));
}
if (anyRevealerPresent != "")
{
break;
}
pos = default(Vector3);
}
if (!isRehideOn && revealedRooms.Contains(hv.HideVolume.Id))
{
anyRevealerPresent = "No Rehide";
}
string[] obj5 = new string[6]
{
"Room View Plugin: Setting hide volume ",
((Object)hv).name,
" (",
null,
null,
null
};
id = hv.HideVolume.Id;
obj5[3] = ((object)(NGuid)(ref id)).ToString();
obj5[4] = ") to ";
obj5[5] = (anyRevealerPresent == "").ToString();
Debug.Log((object)string.Concat(obj5));
hv.ChangeIsActive(anyRevealerPresent == "");
hv.ChangeHideCreatures(true);
hv.ChangeHideLights(true);
hv.ChangeHidePlaceables(true);
SimpleSingletonBehaviour<HideVolumeManager>.Instance.SetHideVolumeState(hv.HideVolume);
if (!isRehideOn && anyRevealerPresent != "")
{
revealedRooms.Add(hv.HideVolume.Id);
}
}
if (!isContiniousUpdateOn)
{
break;
}
}
}
private static bool IsInside(Vector3 pos, Bounds box, Vector3 margin)
{
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_0081: Unknown result type (might be due to invalid IL or missing references)
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
//IL_001e: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_00f3: Unknown result type (might be due to invalid IL or missing references)
//IL_00ff: Unknown result type (might be due to invalid IL or missing references)
//IL_0110: Unknown result type (might be due to invalid IL or missing references)
//IL_0117: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00c5: Unknown result type (might be due to invalid IL or missing references)
//IL_00d6: Unknown result type (might be due to invalid IL or missing references)
//IL_018b: Unknown result type (might be due to invalid IL or missing references)
//IL_0197: Unknown result type (might be due to invalid IL or missing references)
//IL_01a8: Unknown result type (might be due to invalid IL or missing references)
//IL_01af: Unknown result type (might be due to invalid IL or missing references)
//IL_0140: Unknown result type (might be due to invalid IL or missing references)
//IL_014c: Unknown result type (might be due to invalid IL or missing references)
//IL_015d: Unknown result type (might be due to invalid IL or missing references)
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_022f: Unknown result type (might be due to invalid IL or missing references)
//IL_0240: Unknown result type (might be due to invalid IL or missing references)
//IL_0247: Unknown result type (might be due to invalid IL or missing references)
//IL_01e9: Unknown result type (might be due to invalid IL or missing references)
//IL_01f5: Unknown result type (might be due to invalid IL or missing references)
//IL_0206: Unknown result type (might be due to invalid IL or missing references)
//IL_02bb: Unknown result type (might be due to invalid IL or missing references)
//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
//IL_02d8: Unknown result type (might be due to invalid IL or missing references)
//IL_02df: Unknown result type (might be due to invalid IL or missing references)
//IL_0270: Unknown result type (might be due to invalid IL or missing references)
//IL_027c: Unknown result type (might be due to invalid IL or missing references)
//IL_028d: Unknown result type (might be due to invalid IL or missing references)
//IL_0353: Unknown result type (might be due to invalid IL or missing references)
//IL_035f: Unknown result type (might be due to invalid IL or missing references)
//IL_0370: Unknown result type (might be due to invalid IL or missing references)
//IL_0377: Unknown result type (might be due to invalid IL or missing references)
//IL_0319: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Unknown result type (might be due to invalid IL or missing references)
//IL_0336: Unknown result type (might be due to invalid IL or missing references)
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Box X " + (((Bounds)(ref box)).center.x - ((Bounds)(ref box)).size.x / 2f - margin.x) + " <= " + pos.x));
}
if (((Bounds)(ref box)).center.x - ((Bounds)(ref box)).size.x / 2f - margin.x > pos.x)
{
return false;
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: " + pos.x + " <= " + (((Bounds)(ref box)).center.x + ((Bounds)(ref box)).size.x / 2f + margin.x)));
}
if (((Bounds)(ref box)).center.x + ((Bounds)(ref box)).size.x / 2f + margin.x < pos.x)
{
return false;
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Box Y " + (((Bounds)(ref box)).center.y - ((Bounds)(ref box)).size.y / 2f - margin.y) + " <= " + pos.y));
}
if (((Bounds)(ref box)).center.y - ((Bounds)(ref box)).size.y / 2f - margin.y > pos.y)
{
return false;
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: " + pos.y + " <= " + (((Bounds)(ref box)).center.y + ((Bounds)(ref box)).size.y / 2f + margin.y)));
}
if (((Bounds)(ref box)).center.y + ((Bounds)(ref box)).size.y / 2f + margin.y < pos.y)
{
return false;
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Box Z " + (((Bounds)(ref box)).center.z - ((Bounds)(ref box)).size.z / 2f - margin.z) + " <= " + pos.z));
}
if (((Bounds)(ref box)).center.z - ((Bounds)(ref box)).size.z / 2f - margin.z > pos.z)
{
return false;
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: " + pos.z + " <= " + (((Bounds)(ref box)).center.z + ((Bounds)(ref box)).size.z / 2f + margin.z)));
}
if (((Bounds)(ref box)).center.z + ((Bounds)(ref box)).size.z / 2f + margin.z < pos.z)
{
return false;
}
if (diagnostics)
{
Debug.Log((object)("Room View Plugin: Point " + ((object)(Vector3)(ref pos)).ToString() + " is inside bounds within margin"));
}
return true;
}
}