// Token: 0x0600000C RID: 12 RVA: 0x00003260 File Offset: 0x00001460
        public static void LogProtoRoomData(PrototypeDungeonRoom room)
        {
            int num = 0;

            Tools.LogPropertiesAndFields <PrototypeDungeonRoom>(room, "ROOM");
            foreach (PrototypePlacedObjectData prototypePlacedObjectData in room.placedObjects)
            {
                Tools.Log <string>(string.Format("\n----------------Object #{0}----------------", num++));
                Tools.LogPropertiesAndFields <PrototypePlacedObjectData>(prototypePlacedObjectData, "PLACED OBJECT");
                Tools.LogPropertiesAndFields <DungeonPlaceable>((prototypePlacedObjectData != null) ? prototypePlacedObjectData.placeableContents : null, "PLACEABLE CONTENT");
                bool flag = prototypePlacedObjectData == null;
                DungeonPlaceableVariant obj;
                if (flag)
                {
                    obj = null;
                }
                else
                {
                    DungeonPlaceable placeableContents = prototypePlacedObjectData.placeableContents;
                    obj = ((placeableContents != null) ? placeableContents.variantTiers[0] : null);
                }
                Tools.LogPropertiesAndFields <DungeonPlaceableVariant>(obj, "VARIANT TIERS");
            }
            Tools.Print <string>("==LAYERS==", "FFFFFF", false);
            foreach (PrototypeRoomObjectLayer prototypeRoomObjectLayer in room.additionalObjectLayers)
            {
            }
        }
Example #2
0
        public override void Start()
        {
            try
            {
                GungeonAPI.Init();
                KeyShrine.Add();

                //Enable the debug flow
                ETGModConsole.Commands.AddUnit("debugflow", (args) =>
                {
                    DungeonHandler.debugFlow = !DungeonHandler.debugFlow;
                    string status            = DungeonHandler.debugFlow ? "enabled" : "disabled";
                    string color             = DungeonHandler.debugFlow ? "00FF00" : "FF0000";
                    Tools.Print($"Debug flow {status}", color, true);
                });

                //This is useful for figuring out where you want your shrine to go in the breach
                ETGModConsole.Commands.AddUnit("getpos", (args) =>
                {
                    ETGModConsole.Log("Player position: " + GameManager.Instance.PrimaryPlayer.transform.position);
                    ETGModConsole.Log("Player center: " + GameManager.Instance.PrimaryPlayer.sprite.WorldCenter);
                });

                ETGModConsole.Commands.AddUnit("dissectshrine", (args) =>
                {
                    var c = GetClosestCustomShrineObject();
                    Tools.BreakdownComponents(c);
                    Tools.LogPropertiesAndFields(c.GetComponent <SimpleInteractable>());
                });

                ETGModConsole.Commands.AddUnit("roomname", (args) =>
                {
                    var room = GameManager.Instance.PrimaryPlayer.CurrentRoom;
                    Tools.Print(room.GetRoomName());
                });

                ETGModConsole.Commands.AddUnit("hidehitboxes", (args) => HitboxMonitor.DeleteHitboxDisplays());
                ETGModConsole.Commands.AddUnit("showhitboxes", (args) =>
                {
                    foreach (var obj in GameObject.FindObjectsOfType <SpeculativeRigidbody>())
                    {
                        if (obj && obj.sprite && Vector2.Distance(obj.sprite.WorldCenter, GameManager.Instance.PrimaryPlayer.sprite.WorldCenter) < 8)
                        {
                            Tools.Log(obj?.name);
                            HitboxMonitor.DisplayHitbox(obj);
                        }
                    }
                });

                Tools.Print($"Custom Rooms {VERSION} loaded.", "FF00FF", true);
            }
            catch (Exception e)
            {
                Tools.Print("Failed to load Custom Rooms Mod", "FF0000", true);
                Tools.PrintException(e);
            }
        }
Example #3
0
 public static void AcquirePrototypeRoom(Action <LoopFlowBuilder, BuilderFlowNode> orig, LoopFlowBuilder self, BuilderFlowNode buildData)
 {
     orig(self, buildData);
     if (buildData.assignedPrototypeRoom)
     {
         if (buildData.assignedPrototypeRoom.category != PrototypeDungeonRoom.RoomCategory.NORMAL)
         {
             Tools.LogPropertiesAndFields(buildData.assignedPrototypeRoom, "\n" + buildData.assignedPrototypeRoom.name);
         }
         else
         {
             Tools.Log("======================= NULL =======================\n");
         }
     }
 }
Example #4
0
        public static void LogProtoRoomData(PrototypeDungeonRoom room)
        {
            int i = 0;

            Tools.LogPropertiesAndFields(room, "ROOM");
            foreach (var placedObject in room.placedObjects)
            {
                Tools.Log($"\n----------------Object #{i++}----------------");
                Tools.LogPropertiesAndFields(placedObject, "PLACED OBJECT");
                Tools.LogPropertiesAndFields(placedObject?.placeableContents, "PLACEABLE CONTENT");
                Tools.LogPropertiesAndFields(placedObject?.placeableContents?.variantTiers[0], "VARIANT TIERS");
            }

            Tools.Print("==LAYERS==");
            foreach (var layer in room.additionalObjectLayers)
            {
                //Tools.LogPropertiesAndFields(layer);
            }
        }
Example #5
0
        public static void SanityCheckRooms(Action <LoopFlowBuilder, SemioticLayoutManager> orig, LoopFlowBuilder self, SemioticLayoutManager layout)
        {
            orig(self, layout);

            FieldInfo m_allBuilderNodes = typeof(LoopFlowBuilder).GetField("allBuilderNodes", BindingFlags.Instance | BindingFlags.NonPublic);
            var       allBuilderNodes   = (List <BuilderFlowNode>)m_allBuilderNodes.GetValue(self);

            for (int j = 0; j < allBuilderNodes.Count; j++)
            {
                BuilderFlowNode builderFlowNode = allBuilderNodes[j];
                if (builderFlowNode != null && builderFlowNode.assignedPrototypeRoom)
                {
                    string name = builderFlowNode.assignedPrototypeRoom.name.ToLower();
                    if (name.Contains("shrine") || name.Contains("glass"))
                    {
                        Tools.LogPropertiesAndFields(builderFlowNode, "Builder Flow Node");
                        Tools.LogPropertiesAndFields(builderFlowNode.assignedPrototypeRoom, "Proto Room");
                        Tools.LogPropertiesAndFields(builderFlowNode.assignedPrototypeRoom.requiredInjectionData, "InjectionData");
                    }
                }
            }
        }