示例#1
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");
                    }
                }
            }
        }
示例#2
0
        public static List <BuilderFlowNode> NewGetNodeChildrenToBuild(Func <DungeonFlow, BuilderFlowNode, LoopFlowBuilder, List <BuilderFlowNode> > orig, DungeonFlow self, BuilderFlowNode parentBuilderNode, LoopFlowBuilder builder)
        {
            var list = orig(self, parentBuilderNode, builder);

            try
            {
                foreach (var node in list)
                {
                }
            }
            catch (Exception e)
            {
                Tools.PrintException(e);
            }


            return(list);
        }
示例#3
0
        public static bool ProcessSingleNodeInjection(Func <LoopFlowBuilder, ProceduralFlowModifierData, BuilderFlowNode, RuntimeInjectionFlags, FlowCompositeMetastructure, RuntimeInjectionMetadata, bool> orig,
                                                      LoopFlowBuilder self, ProceduralFlowModifierData pfmd, BuilderFlowNode root, RuntimeInjectionFlags flags, FlowCompositeMetastructure fcm, RuntimeInjectionMetadata rim = null)
        {
            //Tools.LogPropertiesAndFields(pfmd);
            //if (pfmd.exactRoom)
            //    Tools.Log("Exact Room: "+pfmd.exactRoom.name);
            //if (pfmd.exactSecondaryRoom)
            //    Tools.Log("Exact Secondary Room: " + pfmd.exactSecondaryRoom.name);
            //if (pfmd.roomTable)
            //    Tools.Log("Room Table: " + pfmd.roomTable.name);

            return(orig(self, pfmd, root, flags, fcm, rim));
        }
示例#4
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");
         }
     }
 }