public static string GetNodeTypeName(UInt32 id, ref CommandsPAK pak) //This is performed separately to be able to remap nodes that are flowgraphs { if (id == 0) { return(""); } foreach (ShortGUIDDescriptor db_entry in cathode_id_map) { if (db_entry.ID == id) { return(db_entry.Description); } } CathodeFlowgraph flow = pak.GetFlowgraph(id); if (flow == null) { return(id.ToString()); } return(flow.name); }
public static string GetNodeTypeName(byte[] id, CommandsPAK pak) //This is performed separately to be able to remap nodes that are flowgraphs { if (id == null) { return(""); } foreach (ShortGUIDDescriptor db_entry in cathode_id_map) { if (db_entry.ID.SequenceEqual(id)) { return(db_entry.Description); } } CathodeFlowgraph flow = pak.GetFlowgraph(id); if (flow == null) { return(BitConverter.ToString(id)); } return(flow.name); }
public IEnumerator LoadCommandsPAK(string LEVEL_NAME, List <int> redsbin, System.Action <int, GameObject> loadModelCallback) { string basePath = LEVEL_NAME + "\\"; commandsPAK = new CommandsPAK(basePath + @"WORLD\COMMANDS.PAK"); redsBIN = redsbin; for (int i = 0; i < commandsPAK.AllFlowgraphs.Count; i++) { preloadedModelReferenceNodes.Add(PreloadFlowgraphContent(commandsPAK.AllFlowgraphs[i], ModelReferenceID)); preloadedPlayerTriggerBoxNodes.Add(PreloadFlowgraphContent(commandsPAK.AllFlowgraphs[i], PlayerTriggerBoxID)); } for (int i = 0; i < commandsPAK.EntryPoints.Count; i++) { GameObject thisFlowgraphGO = new GameObject(commandsPAK.EntryPoints[i].name); StartCoroutine(RecursiveLoad(commandsPAK.EntryPoints[i], thisFlowgraphGO, loadModelCallback)); } yield break; }