// Token: 0x06000007 RID: 7 RVA: 0x00002D88 File Offset: 0x00000F88 public static void Register(RoomFactory.RoomData roomData) { PrototypeDungeonRoom room = roomData.room; WeightedRoom w = new WeightedRoom { room = room, additionalPrerequisites = new DungeonPrerequisite[0], weight = ((roomData.weight == 0f) ? DungeonHandler.GlobalRoomWeight : roomData.weight) }; switch (room.category) { case PrototypeDungeonRoom.RoomCategory.BOSS: return; case PrototypeDungeonRoom.RoomCategory.SPECIAL: { PrototypeDungeonRoom.RoomSpecialSubCategory subCategorySpecial = room.subCategorySpecial; PrototypeDungeonRoom.RoomSpecialSubCategory roomSpecialSubCategory = subCategorySpecial; bool flag = roomSpecialSubCategory != PrototypeDungeonRoom.RoomSpecialSubCategory.STANDARD_SHOP; if (flag) { bool flag2 = roomSpecialSubCategory != PrototypeDungeonRoom.RoomSpecialSubCategory.WEIRD_SHOP; if (flag2) { StaticReferences.RoomTables["special"].includedRooms.Add(w); } else { StaticReferences.subShopTable.InjectionData.Add(DungeonHandler.GetFlowModifier(roomData)); } } else { StaticReferences.RoomTables["shop"].includedRooms.Add(w); } return; } case PrototypeDungeonRoom.RoomCategory.SECRET: StaticReferences.RoomTables["secret"].includedRooms.Add(w); return; } List <DungeonPrerequisite> list = new List <DungeonPrerequisite>(); foreach (DungeonPrerequisite dungeonPrerequisite in room.prerequisites) { bool requireTileset = dungeonPrerequisite.requireTileset; bool flag3 = requireTileset; if (flag3) { StaticReferences.GetRoomTable(dungeonPrerequisite.requiredTileset).includedRooms.Add(w); list.Add(dungeonPrerequisite); } } foreach (DungeonPrerequisite item in list) { room.prerequisites.Remove(item); } }
public static void Register(RoomData roomData) { var room = roomData.room; var wRoom = new WeightedRoom() { room = room, additionalPrerequisites = new DungeonPrerequisite[0], weight = roomData.weight == 0 ? GlobalRoomWeight : roomData.weight }; switch (room.category) { case RoomCategory.SPECIAL: switch (room.subCategorySpecial) { case RoomSpecialSubCategory.STANDARD_SHOP: //shops StaticReferences.RoomTables["shop"].includedRooms.Add(wRoom); break; case RoomSpecialSubCategory.WEIRD_SHOP: //subshops StaticReferences.subShopTable.InjectionData.Add(GetFlowModifier(roomData)); break; default: StaticReferences.RoomTables["special"].includedRooms.Add(wRoom); break; } break; case RoomCategory.SECRET: StaticReferences.RoomTables["secret"].includedRooms.Add(wRoom); break; case RoomCategory.BOSS: //TODO - Boss rooms break; default: var tilesetPrereqs = new List <DungeonPrerequisite>(); foreach (var p in room.prerequisites) { if (p.requireTileset) { StaticReferences.GetRoomTable(p.requiredTileset).includedRooms.Add(wRoom); tilesetPrereqs.Add(p); } } foreach (var p in tilesetPrereqs) { room.prerequisites.Remove(p); } break; } //Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}"); }
public static void Register(RoomData roomData) { var room = roomData.room; var wRoom = new WeightedRoom() { room = room, additionalPrerequisites = new DungeonPrerequisite[0], weight = roomData.weight }; AssetBundle shared_auto_001 = ResourceManager.LoadAssetBundle("shared_auto_001"); GameObject iconPrefab = RoomFactory.MinimapIconPrefab ?? (shared_auto_001.LoadAsset("assets/data/prefabs/room icons/minimap_boss_icon.prefab") as GameObject); //bool success = false; switch (room.category) { case RoomCategory.SPECIAL: switch (room.subCategorySpecial) { case RoomSpecialSubCategory.STANDARD_SHOP: //shops StaticReferences.RoomTables["shop"].includedRooms.Add(wRoom); // Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; case RoomSpecialSubCategory.WEIRD_SHOP: //subshops StaticReferences.subShopTable.InjectionData.AddRange(GetFlowModifier(roomData)); /// Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; default: StaticReferences.RoomTables["special"].includedRooms.Add(wRoom); //Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; } break; case RoomCategory.SECRET: StaticReferences.RoomTables["secret"].includedRooms.Add(wRoom); //success = true; break; //===========================PUTS YOUR BOSS ROOMS IN THE POOLS DEFINED IN STATICREFERENCES ==================== case RoomCategory.BOSS: switch (room.subCategoryBoss) { case RoomBossSubCategory.FLOOR_BOSS: foreach (var p in room.prerequisites) { if (p.requiredTileset == GlobalDungeonData.ValidTilesets.CASTLEGEON) { StaticReferences.RoomTables["boss1"].includedRooms.Add(wRoom); StaticReferences.RoomTables["boss2"].includedRooms.Add(wRoom); StaticReferences.RoomTables["boss3"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.SEWERGEON) { StaticReferences.RoomTables["blobby"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.GUNGEON) { StaticReferences.RoomTables["gorgun"].includedRooms.Add(wRoom); StaticReferences.RoomTables["beholster"].includedRooms.Add(wRoom); StaticReferences.RoomTables["ammoconda"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.CATHEDRALGEON) { StaticReferences.RoomTables["oldking"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.MINEGEON) { StaticReferences.RoomTables["tank"].includedRooms.Add(wRoom); StaticReferences.RoomTables["cannonballrog"].includedRooms.Add(wRoom); StaticReferences.RoomTables["flayer"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.CATHEDRALGEON) { StaticReferences.RoomTables["pillars"].includedRooms.Add(wRoom); StaticReferences.RoomTables["priest"].includedRooms.Add(wRoom); StaticReferences.RoomTables["monger"].includedRooms.Add(wRoom); } else { //StaticReferences.RoomTables["doorlord"].includedRooms.Add(wRoom); } } room.associatedMinimapIcon = iconPrefab; break; case RoomBossSubCategory.MINI_BOSS: StaticReferences.RoomTables["blockner"].includedRooms.Add(wRoom); StaticReferences.RoomTables["shadeagunim"].includedRooms.Add(wRoom); //StaticReferences.RoomTables["fuselier"].includedRooms.Add(wRoom); room.associatedMinimapIcon = iconPrefab; break; default: //StaticReferences.RoomTables["doorlord"].includedRooms.Add(wRoom); // room.associatedMinimapIcon = iconPrefab; break; } break; //=============================================== default: foreach (var p in room.prerequisites) { if (p.requireTileset) { StaticReferences.GetRoomTable(p.requiredTileset).includedRooms.Add(wRoom); } } // success = true; break; } RemoveTilesetPrereqs(room); }
public static void RegisterForShrine(RoomData roomData) { var room = roomData.room; var wRoom = new WeightedRoom() { room = room, additionalPrerequisites = new DungeonPrerequisite[0], weight = roomData.weight }; //AssetBundle shared_auto_001 = ResourceManager.LoadAssetBundle("shared_auto_001"); GameObject iconPrefab = (GameObject)BraveResources.Load("Global Prefabs/Minimap_Shrine_Icon", ".prefab"); room.associatedMinimapIcon = iconPrefab; // bool success = false; switch (room.category) { case RoomCategory.SPECIAL: switch (room.subCategorySpecial) { case RoomSpecialSubCategory.STANDARD_SHOP: //shops StaticReferences.RoomTables["shop"].includedRooms.Add(wRoom); // Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; case RoomSpecialSubCategory.WEIRD_SHOP: //subshops StaticReferences.subShopTable.InjectionData.AddRange(GetFlowModifier(roomData)); /// Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; default: StaticReferences.RoomTables["special"].includedRooms.Add(wRoom); //Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; } break; case RoomCategory.SECRET: StaticReferences.RoomTables["secret"].includedRooms.Add(wRoom); //success = true; break; case RoomCategory.BOSS: // TODO break; default: foreach (var p in room.prerequisites) { if (p.requireTileset) { StaticReferences.GetRoomTable(p.requiredTileset).includedRooms.Add(wRoom); } } // success = true; break; } //success = true; RemoveTilesetPrereqs(room); }
public static void Register(RoomData roomData) { var room = roomData.room; var wRoom = new WeightedRoom() { room = room, additionalPrerequisites = new DungeonPrerequisite[0], weight = roomData.weight }; AssetBundle shared_auto_001 = ResourceManager.LoadAssetBundle("shared_auto_001"); GameObject iconPrefab = RoomFactoryTrueForm.MinimapIconPrefab ?? (shared_auto_001.LoadAsset("assets/data/prefabs/room icons/minimap_boss_icon.prefab") as GameObject); //bool success = false; switch (room.category) { case RoomCategory.SPECIAL: switch (room.subCategorySpecial) { case RoomSpecialSubCategory.STANDARD_SHOP: //shops StaticReferences2.RoomTables["shop"].includedRooms.Add(wRoom); // Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; case RoomSpecialSubCategory.WEIRD_SHOP: //subshops StaticReferences2.subShopTable.InjectionData.AddRange(GetFlowModifier(roomData)); /// Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; default: StaticReferences2.RoomTables["special"].includedRooms.Add(wRoom); //Tools.Print($"Registering {roomData.room.name} with weight {wRoom.weight} as {roomData.category}:{roomData.specialSubCategory}"); // success = true; break; } break; case RoomCategory.SECRET: StaticReferences2.RoomTables["secret"].includedRooms.Add(wRoom); //success = true; break; //===========================PUTS YOUR BOSS ROOMS IN THE POOLS DEFINED IN StaticReferences2 ==================== case RoomCategory.BOSS: switch (room.subCategoryBoss) { case RoomBossSubCategory.FLOOR_BOSS: foreach (var p in room.prerequisites) { if (p.requiredTileset == GlobalDungeonData.ValidTilesets.CASTLEGEON) { if (room.name.ToLower().Contains("bulletking")) { StaticReferences2.RoomTables["bulletking"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("triggertwins")) { StaticReferences2.RoomTables["triggertwins"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("gatlinggull")) { StaticReferences2.RoomTables["gull"].includedRooms.Add(wRoom); } else { StaticReferences2.RoomTables["gull"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["triggertwins"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["bulletking"].includedRooms.Add(wRoom); } } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.SEWERGEON) { StaticReferences2.RoomTables["blobby"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.GUNGEON) { if (room.name.ToLower().Contains("beholster")) { StaticReferences2.RoomTables["beholster"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("ammoconda")) { StaticReferences2.RoomTables["ammoconda"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("gorgun")) { StaticReferences2.RoomTables["gorgun"].includedRooms.Add(wRoom); } else { StaticReferences2.RoomTables["gorgun"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["beholster"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["ammoconda"].includedRooms.Add(wRoom); } } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.CATHEDRALGEON) { StaticReferences2.RoomTables["oldking"].includedRooms.Add(wRoom); } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.MINEGEON) { if (room.name.ToLower().Contains("tank")) { StaticReferences2.RoomTables["tank"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("cannonballrog")) { StaticReferences2.RoomTables["cannonballrog"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("mineflayer")) { StaticReferences2.RoomTables["flayer"].includedRooms.Add(wRoom); } else { StaticReferences2.RoomTables["tank"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["cannonballrog"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["flayer"].includedRooms.Add(wRoom); } } else if (p.requiredTileset == GlobalDungeonData.ValidTilesets.CATHEDRALGEON) { if (room.name.ToLower().Contains("killpillars")) { StaticReferences2.RoomTables["pillars"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("highpriest")) { StaticReferences2.RoomTables["priest"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("wallmonger")) { StaticReferences2.RoomTables["monger"].includedRooms.Add(wRoom); } else { StaticReferences2.RoomTables["pillars"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["priest"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["monger"].includedRooms.Add(wRoom); } } else { //StaticReferences2.RoomTables["doorlord"].includedRooms.Add(wRoom); } } room.associatedMinimapIcon = iconPrefab; break; case RoomBossSubCategory.MINI_BOSS: if (room.name.ToLower().Contains("blockner")) { StaticReferences2.RoomTables["blockner"].includedRooms.Add(wRoom); } else if (room.name.ToLower().Contains("agunim")) { StaticReferences2.RoomTables["shadeagunim"].includedRooms.Add(wRoom); } else { StaticReferences2.RoomTables["blockner"].includedRooms.Add(wRoom); StaticReferences2.RoomTables["shadeagunim"].includedRooms.Add(wRoom); } //StaticReferences2.RoomTables["fuselier"].includedRooms.Add(wRoom); room.associatedMinimapIcon = iconPrefab; break; default: //StaticReferences2.RoomTables["doorlord"].includedRooms.Add(wRoom); // room.associatedMinimapIcon = iconPrefab; break; } break; //=============================================== default: foreach (var p in room.prerequisites) { if (p.requireTileset) { try { //ETGModConsole.Log("Attempting To Add This Room" + room.name); StaticReferences2.GetRoomTable(p.requiredTileset).includedRooms.Add(wRoom); } catch (Exception e) { ETGModConsole.Log(e.ToString()); ETGModConsole.Log("This Room f***s it up:" + room.name); } } } // success = true; break; } RemoveTilesetPrereqs(room); }