// Token: 0x06003156 RID: 12630 RVA: 0x000D45DC File Offset: 0x000D27DC public virtual void OnImpactServer(Vector3 contactPoint) { string text = BodyCatalog.GetBodyName(base.characterBody.bodyIndex); text = text.Replace("Body", ""); text = "iscBroken" + text; SpawnCard spawnCard = Resources.Load <SpawnCard>("SpawnCards/InteractableSpawnCard/" + text); if (spawnCard != null) { DirectorPlacementRule placementRule = new DirectorPlacementRule { placementMode = DirectorPlacementRule.PlacementMode.Direct, position = contactPoint }; GameObject gameObject = DirectorCore.instance.TrySpawnObject(new DirectorSpawnRequest(spawnCard, placementRule, new Xoroshiro128Plus(0UL))); if (gameObject) { PurchaseInteraction component = gameObject.GetComponent <PurchaseInteraction>(); if (component && component.costType == CostTypeIndex.Money) { component.Networkcost = Run.instance.GetDifficultyScaledCost(component.cost); } } } }
public void OnContentLoad() { // Set survivor dict SurvivorDict.Add("mult", SurvivorCatalog.FindSurvivorIndex("Toolbot")); SurvivorDict.Add("mul-t", SurvivorCatalog.FindSurvivorIndex("Toolbot")); SurvivorDict.Add("toolbot", SurvivorCatalog.FindSurvivorIndex("Toolbot")); SurvivorDict.Add("hunt", SurvivorCatalog.FindSurvivorIndex("Huntress")); SurvivorDict.Add("huntress", SurvivorCatalog.FindSurvivorIndex("Huntress")); SurvivorDict.Add("engi", SurvivorCatalog.FindSurvivorIndex("Engi")); SurvivorDict.Add("engineer", SurvivorCatalog.FindSurvivorIndex("Engi")); SurvivorDict.Add("mage", SurvivorCatalog.FindSurvivorIndex("Mage")); SurvivorDict.Add("arti", SurvivorCatalog.FindSurvivorIndex("Mage")); SurvivorDict.Add("artificer", SurvivorCatalog.FindSurvivorIndex("Mage")); SurvivorDict.Add("merc", SurvivorCatalog.FindSurvivorIndex("Merc")); SurvivorDict.Add("mercenary", SurvivorCatalog.FindSurvivorIndex("Merc")); SurvivorDict.Add("rex", SurvivorCatalog.FindSurvivorIndex("Treebot")); SurvivorDict.Add("treebot", SurvivorCatalog.FindSurvivorIndex("Treebot")); SurvivorDict.Add("croco", SurvivorCatalog.FindSurvivorIndex("Croco")); SurvivorDict.Add("capt", SurvivorCatalog.FindSurvivorIndex("Captain")); // Add skill helpers AiSkillHelperCatalog.Populate(); // Config InitialBots = new ConfigEntry <int> [RandomSurvivorsList.Count]; for (int i = 0; i < RandomSurvivorsList.Count; i++) { string name = BodyCatalog.GetBodyName(SurvivorCatalog.GetBodyIndexFromSurvivorIndex(RandomSurvivorsList[i])).Replace("\'", ""); InitialBots[i] = Config.Bind("Starting Bots", "StartingBots." + name, 0, "Starting amount of bots to spawn at the start of a run. (" + name + ")"); } }
private void ChangeOrSetCharacter(NetworkUser player, GameObject bodyPrefab, bool firstTimeJoining) { var master = player.master; var oldBody = master.GetBody(); master.bodyPrefab = bodyPrefab; _fallenFriends?.Instance?.InvokeMethod("setOldPrefab", master); CharacterBody body; if (firstTimeJoining) { var spawnTransform = Stage.instance.GetPlayerSpawnTransform(); body = master.SpawnBody(bodyPrefab, spawnTransform.position + _spawnOffset, spawnTransform.rotation); Run.instance.HandlePlayerFirstEntryAnimation(body, spawnTransform.position + _spawnOffset, spawnTransform.rotation); } else { if (BodyCatalog.GetBodyName(oldBody.bodyIndex) == "CaptainBody") { master.inventory.RemoveItem(ItemIndex.CaptainDefenseMatrix, 1); } if (bodyPrefab.name == "CaptainBody") { master.inventory.GiveItem(ItemIndex.CaptainDefenseMatrix, 1); } body = master.Respawn(master.GetBody().transform.position, master.GetBody().transform.rotation); } AddChatMessage($"{player.userName} is spawning as {body.GetDisplayName()}!"); }
private void HandleScepterSkill(CharacterBody self, bool forceOff = false) { if (self.skillLocator && self.master?.loadout != null) { var bodyName = BodyCatalog.GetBodyName(self.bodyIndex); var repl = scepterReplacers.FindAll(x => x.bodyName == bodyName); if (repl.Count > 0) { SkillSlot targetSlot = scepterSlots[bodyName]; var targetSkill = self.skillLocator.GetSkill(targetSlot); var targetSlotIndex = self.skillLocator.GetSkillSlotIndex(targetSkill); if (!targetSkill) { return; } var targetVariant = self.master.loadout.bodyLoadoutManager.GetSkillVariant(self.bodyIndex, targetSlotIndex); var replVar = repl.Find(x => x.variantIndex == targetVariant); if (replVar == null) { return; } if (GetCount(self) > 0 && !forceOff) { targetSkill.SetSkillOverride(self, replVar.replDef, GenericSkill.SkillOverridePriority.Upgrade); } else { targetSkill.UnsetSkillOverride(self, replVar.replDef, GenericSkill.SkillOverridePriority.Upgrade); } } } }
private string GetTeamName2(SurvivorIndex firstSurvivorIndex = SurvivorIndex.None) { var networkUsers = characterSelectController.GetSortedNetworkUsersList(); List <string> bodyNames = new List <string>(); List <BodyIndex> bodyIndices = new List <BodyIndex>(); if (!debug) { if (networkUsers.Count <= 3) { return(string.Empty); } foreach (var networkUser in networkUsers) { bodyIndices.Add(networkUser.NetworkbodyIndexPreference); bodyNames.Add(BodyCatalog.GetBodyName(networkUser.NetworkbodyIndexPreference)); } } else { bodyNames = debug_characters.ToList(); foreach (var bodyName in debug_characters) { bodyIndices.Add(BodyCatalog.FindBodyIndex(bodyName)); } } if (firstSurvivorIndex != SurvivorIndex.None) { bodyIndices[0] = SurvivorCatalog.GetBodyIndexFromSurvivorIndex(firstSurvivorIndex); bodyNames[0] = SurvivorCatalog.GetSurvivorDef(firstSurvivorIndex).bodyPrefab.name; } /* * if (characterNames_to_teamName.TryGetValue(bodyNames.ToArray(), out string output)) * { * Debug.Log(output); * }*/ foreach (var name in bodyNames) { Debug.Log(name); } foreach (var entry in characterNames_to_teamName) { var key = entry.Key; if ( key[0] == bodyNames[0] && key[1] == bodyNames[1] && key[2] == bodyNames[2] && key[3] == bodyNames[3] ) { return(entry.Value); } } return(string.Empty); }
private bool HandleScepterSkill(CharacterBody self, bool forceOff = false) { bool hasStrides = self.inventory.GetItemCount(RoR2Content.Items.LunarUtilityReplacement) > 0; if (self.skillLocator && self.master?.loadout != null) { var bodyName = BodyCatalog.GetBodyName(self.bodyIndex); var repl = scepterReplacers.FindAll(x => x.bodyName == bodyName); if (repl.Count > 0) { SkillSlot targetSlot = scepterSlots[bodyName]; if (targetSlot == SkillSlot.Utility && stridesInteractionMode == StridesInteractionMode.ScepterRerolls && hasStrides) { return(false); } var targetSkill = self.skillLocator.GetSkill(targetSlot); if (!targetSkill) { return(false); } var targetSlotIndex = self.skillLocator.GetSkillSlotIndex(targetSkill); var targetVariant = self.master.loadout.bodyLoadoutManager.GetSkillVariant(self.bodyIndex, targetSlotIndex); var replVar = repl.Find(x => x.variantIndex == targetVariant); if (replVar == null) { return(false); } if (!forceOff && GetCount(self) > 0) { if (stridesInteractionMode == StridesInteractionMode.ScepterTakesPrecedence && hasStrides) { self.skillLocator.utility.UnsetSkillOverride(self, CharacterBody.CommonAssets.lunarUtilityReplacementSkillDef, GenericSkill.SkillOverridePriority.Replacement); } targetSkill.SetSkillOverride(self, replVar.replDef, GenericSkill.SkillOverridePriority.Upgrade); } else { targetSkill.UnsetSkillOverride(self, replVar.replDef, GenericSkill.SkillOverridePriority.Upgrade); if (stridesInteractionMode == StridesInteractionMode.ScepterTakesPrecedence && hasStrides) { self.skillLocator.utility.SetSkillOverride(self, CharacterBody.CommonAssets.lunarUtilityReplacementSkillDef, GenericSkill.SkillOverridePriority.Replacement); } } return(true); } } return(false); }
// Token: 0x06001C9F RID: 7327 RVA: 0x0007A7C0 File Offset: 0x000789C0 public static void RegisterStatDefs() { foreach (PerBodyStatDef perBodyStatDef in PerBodyStatDef.instancesList) { perBodyStatDef.bodyIndexToStatDef = new StatDef[BodyCatalog.bodyCount]; for (int i = 0; i < BodyCatalog.bodyCount; i++) { string bodyName = BodyCatalog.GetBodyName(i); StatDef statDef = StatDef.Register(perBodyStatDef.prefix + "." + bodyName, perBodyStatDef.recordType, perBodyStatDef.dataType, 0.0, perBodyStatDef.displayValueFormatter); perBodyStatDef.bodyNameToStatDefDictionary.Add(bodyName, statDef); perBodyStatDef.bodyNameToStatDefDictionary.Add(bodyName + "(Clone)", statDef); perBodyStatDef.bodyIndexToStatDef[i] = statDef; } } }
private void Reroll(CharacterBody self, int count) { var bodyName = BodyCatalog.GetBodyName(self.bodyIndex); if (count <= 0 || bodyName == "EngiWalkerTurretBody" || bodyName == "EngiTurretBody") { return; } var list = Run.instance.availableTier3DropList.Except(new[] { pickupIndex }).ToList(); for (var i = 0; i < count; i++) { self.inventory.RemoveItem(catalogIndex, 1); self.inventory.GiveItem(PickupCatalog.GetPickupDef(list[UnityEngine.Random.Range(0, list.Count)]).itemIndex); } }
private void ChangeOrSetCharacter(NetworkUser player, GameObject bodyPrefab, bool firstTimeJoining) { CharacterMaster master = player.master; CharacterBody oldBody = master.GetBody(); master.bodyPrefab = bodyPrefab; CharacterBody body; if (firstTimeJoining) { Transform spawnTransform = Stage.instance.GetPlayerSpawnTransform(); body = master.SpawnBody(spawnTransform.position + _spawnOffset, spawnTransform.rotation); if (bodyPrefab.name == "HereticBody") { master.inventory.GiveItem(RoR2Content.Items.LunarPrimaryReplacement, 1); master.inventory.GiveItem(RoR2Content.Items.LunarSecondaryReplacement, 1); master.inventory.GiveItem(RoR2Content.Items.LunarSpecialReplacement, 1); master.inventory.GiveItem(RoR2Content.Items.LunarUtilityReplacement, 1); } Run.instance.HandlePlayerFirstEntryAnimation(body, spawnTransform.position + _spawnOffset, spawnTransform.rotation); } else { if (BodyCatalog.GetBodyName(oldBody.bodyIndex) == "CaptainBody") { master.inventory.RemoveItem(RoR2Content.Items.CaptainDefenseMatrix, 1); } if (bodyPrefab.name == "CaptainBody") { master.inventory.GiveItem(RoR2Content.Items.CaptainDefenseMatrix, 1); } if (BodyCatalog.GetBodyName(oldBody.bodyIndex) == "HereticBody") { master.inventory.RemoveItem(RoR2Content.Items.LunarPrimaryReplacement, 1); master.inventory.RemoveItem(RoR2Content.Items.LunarSecondaryReplacement, 1); master.inventory.RemoveItem(RoR2Content.Items.LunarSpecialReplacement, 1); master.inventory.RemoveItem(RoR2Content.Items.LunarUtilityReplacement, 1); } if (bodyPrefab.name != "HereticBody") { body = master.Respawn(master.GetBody().transform.position, master.GetBody().transform.rotation); } else { if (bodyPrefab.name == "HereticBody") { master.inventory.GiveItem(RoR2Content.Items.LunarPrimaryReplacement, 1); master.inventory.GiveItem(RoR2Content.Items.LunarSecondaryReplacement, 1); master.inventory.GiveItem(RoR2Content.Items.LunarSpecialReplacement, 1); master.inventory.GiveItem(RoR2Content.Items.LunarUtilityReplacement, 1); } body = master.GetBody(); } } ChatHelper.AddChatMessage($"{player.userName} is spawning as {body.GetDisplayName()}!"); }
private static string JoinAs(NetworkUser sender, string[] args) { if (args.Length != 1 && args.Length != 2) { return("join as requires either 1 or 2 arguments"); } NetworkUser player = args.Length == 1 ? sender : GetNetUserFromString(args[1]); if (player == null) { return("Unable to find player with given name"); } string survivorOrBodyName = args[0]; string displayName; SurvivorDef survivor = GetAvailibleSurvivorForPlayerByName(player, survivorOrBodyName); BodyIndex spawnAsBodyIndex = BodyIndex.None; if (survivor != null) { spawnAsBodyIndex = BodyCatalog.FindBodyIndex(survivor.bodyPrefab); displayName = Language.GetString(survivor.displayNameToken); } else if (DropInConfig.AllowJoinAsAllBodies.Value) { BodyIndex bodyIndex = BodyCatalog.FindBodyIndexCaseInsensitive(survivorOrBodyName.EndsWith("Body", StringComparison.InvariantCultureIgnoreCase) ? survivorOrBodyName : survivorOrBodyName + "Body"); if (bodyIndex == BodyIndex.None) { return("Unable to find survivor or body with given name"); } spawnAsBodyIndex = bodyIndex; displayName = BodyCatalog.GetBodyName(bodyIndex); } else { return("Unable to find survivor with the given name"); } JoinAsResult joinAsResult; try { joinAsResult = SpawnPlayerWithBody(player, spawnAsBodyIndex); } catch (Exception ex) { Debug.LogException(ex); Logger.LogError(ex); return($"An exception occured spawning {player.userName} as {displayName}"); } switch (joinAsResult) { case JoinAsResult.Success: return($"Spawning {player.userName} as {displayName}"); case JoinAsResult.DeadAndNotAllowRespawn: return($"{player.userName} will be spawned as {displayName} next stage"); default: return("Unknown join as result"); } }
private void CharacterMaster_RespawnExtraLife(On.RoR2.CharacterMaster.orig_RespawnExtraLife orig, CharacterMaster self) { // one is already consumed before calling this var spawnHeretic = false; if (NetworkServer.active && currentlyInBattle) { if (self && self.playerCharacterMasterController && self.inventory && self.inventory.GetItemCount(RoR2Content.Items.ExtraLife) > 0 && self.GetBody() && self.GetBody().name.StartsWith("Heretic")) { spawnHeretic = true; self.inventory.RemoveItem(RoR2Content.Items.ExtraLife); //heretic's } } orig(self); if (spawnHeretic) { self.inventory.GiveItem(RoR2Content.Items.ExtraLifeConsumed); var summon = SummonHeretic(self.bodyInstanceObject, self.deathFootPosition); var chatter = summon.gameObject.AddComponent <HereticChatter>(); chatter.characterMaster = self; var preferredBody = self.playerCharacterMasterController.networkUser.bodyIndexPreference; #region heretic chatting bool primary = true; bool secondary = true; bool utility = true; bool special = true; Chat.SendBroadcastChat(new SubjectChatMessage() { baseToken = "PLAYER_CONNECTED", subjectAsCharacterBody = summon.GetBody(), }); if (summon.inventory.GetItemCount(RoR2Content.Items.LunarPrimaryReplacement) == 0) { chatter.AddLine("DC_HERETIC_SEPERATES_NOPRIMARY"); primary = false; } else { self.inventory.RemoveItem(RoR2Content.Items.LunarPrimaryReplacement, summon.inventory.GetItemCount(RoR2Content.Items.LunarPrimaryReplacement)); } if (summon.inventory.GetItemCount(RoR2Content.Items.LunarSecondaryReplacement) == 0) { chatter.AddLine("DC_HERETIC_SEPERATES_NOSECONDARY"); secondary = false; } else { self.inventory.RemoveItem(RoR2Content.Items.LunarSecondaryReplacement, summon.inventory.GetItemCount(RoR2Content.Items.LunarSecondaryReplacement)); } if (summon.inventory.GetItemCount(RoR2Content.Items.LunarUtilityReplacement) == 0) { chatter.AddLine("DC_HERETIC_SEPERATES_NOUTILITY"); utility = false; } else { self.inventory.RemoveItem(RoR2Content.Items.LunarUtilityReplacement, summon.inventory.GetItemCount(RoR2Content.Items.LunarUtilityReplacement)); } if (summon.inventory.GetItemCount(RoR2Content.Items.LunarSpecialReplacement) == 0) { chatter.AddLine("DC_HERETIC_SEPERATES_NOSPECIAL"); special = false; } else { self.inventory.RemoveItem(RoR2Content.Items.LunarSpecialReplacement, summon.inventory.GetItemCount(RoR2Content.Items.LunarSpecialReplacement)); } if (!primary && !secondary && !utility && !special) { chatter.AddLine("DC_HERETIC_SEPERATES_AMPUTEE"); } #endregion heretic chatting self.TransformBody(BodyCatalog.GetBodyName(preferredBody)); } }
static void DisplayCustomCharacters(On.RoR2.Networking.GameNetworkManager.orig_OnServerAddPlayerInternal orig, GameNetworkManager self, NetworkConnection conn, short playerControllerId, NetworkReader extraMessageReader) { if (NetworkServer.active) { //Ghetto code to prevent duplicates if (self.playerPrefab == null) { return; } if (self.playerPrefab.GetComponent <NetworkIdentity>() == null) { return; } if ((int)playerControllerId < conn.playerControllers.Count && conn.playerControllers[(int)playerControllerId].IsValid && conn.playerControllers[(int)playerControllerId].gameObject != null) { return; } if (NetworkUser.readOnlyInstancesList.Count >= self.maxConnections) { return; } string text = ""; for (int i = 0; i < Settings.PlayableCharactersList.Count; i++) { string slotName = ""; switch (i) { case 0: slotName = "Commando"; break; case 1: slotName = "Huntress"; break; case 2: slotName = "Bandit"; break; case 3: slotName = "MUL-T"; break; case 4: slotName = "Engineer"; break; case 5: slotName = "Artificer"; break; case 6: slotName = "Mercenary"; break; case 7: slotName = "REX"; break; case 8: slotName = "Loader"; break; case 9: slotName = "Acrid"; break; case 10: slotName = "Captain"; break; } text += Util.GenerateColoredString(slotName, new Color32(255, 255, 0, 255)) + " = " + BodyCatalog.GetBodyName(BodyCatalog.FindBodyIndex(Settings.PlayableCharactersList[i])) + " "; if (i + 1 % 3 == 0 || i + 1 == Settings.PlayableCharactersList.Count) { Tools.SendPM(conn, new Chat.SimpleChatMessage { baseToken = text }); text = ""; } } } orig(self, conn, playerControllerId, extraMessageReader); }
public void TryAddItem() { if (this.characterBody.master) { bool flag = false; if (this.characterBody.master.playerStatsComponent) { flag = (this.characterBody.master.playerStatsComponent.currentStats.GetStatValueDouble(PerBodyStatDef.totalTimeAlive, BodyCatalog.GetBodyName(this.characterBody.bodyIndex)) > 0.0); } if (!flag && this.characterBody.master.inventory.GetItemCount(ContentPacks.shinyJetpackDef.itemIndex) <= 0) { this.characterBody.master.inventory.GiveItem(ContentPacks.shinyJetpackDef.itemIndex); } } }
// Token: 0x06002210 RID: 8720 RVA: 0x0009325C File Offset: 0x0009145C private void RebuildLocal() { Loadout loadout = new Loadout(); LocalUser localUser = this.localUser; if (localUser != null) { UserProfile userProfile = localUser.userProfile; if (userProfile != null) { userProfile.CopyLoadout(loadout); } } SurvivorDef survivorDef = SurvivorCatalog.GetSurvivorDef(this.selectedSurvivorIndex); int bodyIndexFromSurvivorIndex = SurvivorCatalog.GetBodyIndexFromSurvivorIndex(this.selectedSurvivorIndex); Color color = Color.white; string text = string.Empty; string text2 = string.Empty; string viewableName = string.Empty; if (survivorDef != null) { color = survivorDef.primaryColor; text = Language.GetString(survivorDef.displayNameToken); text2 = Language.GetString(survivorDef.descriptionToken); } List <CharacterSelectController.StripDisplayData> list = new List <CharacterSelectController.StripDisplayData>(); if (bodyIndexFromSurvivorIndex != -1) { GameObject bodyPrefab = BodyCatalog.GetBodyPrefab(bodyIndexFromSurvivorIndex); SkillLocator component = bodyPrefab.GetComponent <SkillLocator>(); if (component.passiveSkill.enabled) { list.Add(new CharacterSelectController.StripDisplayData { enabled = true, primaryColor = color, icon = component.passiveSkill.icon, titleString = Language.GetString(component.passiveSkill.skillNameToken), descriptionString = Language.GetString(component.passiveSkill.skillDescriptionToken) }); } GenericSkill[] components = bodyPrefab.GetComponents <GenericSkill>(); for (int i = 0; i < components.Length; i++) { uint skillVariant = loadout.bodyLoadoutManager.GetSkillVariant(bodyIndexFromSurvivorIndex, i); SkillDef skillDef = components[i].skillFamily.variants[(int)skillVariant].skillDef; list.Add(new CharacterSelectController.StripDisplayData { enabled = true, primaryColor = color, icon = skillDef.icon, titleString = Language.GetString(skillDef.skillNameToken), descriptionString = Language.GetString(skillDef.skillDescriptionToken) }); } viewableName = "/Loadout/Bodies/" + BodyCatalog.GetBodyName(bodyIndexFromSurvivorIndex) + "/"; } this.skillStripAllocator.AllocateElements(list.Count); for (int j = 0; j < list.Count; j++) { this.RebuildStrip(this.skillStripAllocator.elements[j], list[j]); } this.survivorName.SetText(text); this.survivorDescription.SetText(text2); Image[] array = this.primaryColorImages; for (int k = 0; k < array.Length; k++) { array[k].color = color; } TextMeshProUGUI[] array2 = this.primaryColorTexts; for (int k = 0; k < array2.Length; k++) { array2[k].color = color; } this.loadoutViewableTag.viewableName = viewableName; }
private static void CharacterBody_Start(On.RoR2.CharacterBody.orig_Start orig, CharacterBody self) { orig(self); if (NetworkServer.active && RunArtifactManager.instance.IsArtifactEnabled(ArtifactOfGenetics.artifactDef)) { if (instance == null) //Emergency Catch for Bulwark Edge Case { Run.instance.gameObject.AddComponent <GeneEngineDriver>(); GeneticsArtifactPlugin.geneticLogSource.LogWarning("GeneEngineDriver Emergency Activation! Wasn't ready for a body yet."); } if (self.teamComponent.teamIndex == TeamIndex.Monster && self.inventory) { if (!masterGenes.Exists(x => x.bodyIndex == self.bodyIndex)) { MasterGeneBehaviour newMaster = new MasterGeneBehaviour(); newMaster.Init(); newMaster.bodyIndex = self.bodyIndex; masterGenes.Add(newMaster); GeneticsArtifactPlugin.geneticLogSource.LogInfo("Generated a Master Template for: " + BodyCatalog.GetBodyName(self.bodyIndex)); } MonsterGeneBehaviour geneBehaviour = self.gameObject.AddComponent <MonsterGeneBehaviour>(); geneBehaviour.MutateFromMaster(); } } }
// Token: 0x0600259A RID: 9626 RVA: 0x000A39F4 File Offset: 0x000A1BF4 private void Rebuild() { SurvivorDef survivorDef = SurvivorCatalog.GetSurvivorDef(this.survivorIndex); if (survivorDef != null) { GameObject bodyPrefab = survivorDef.bodyPrefab; if (bodyPrefab) { CharacterBody component = bodyPrefab.GetComponent <CharacterBody>(); if (component) { if (this.survivorIcon) { this.survivorIcon.texture = component.portraitIcon; } string viewableName = string.Format(CultureInfo.InvariantCulture, "/Survivors/{0}", this.survivorIndex.ToString()); if (this.viewableTag) { this.viewableTag.viewableName = viewableName; this.viewableTag.Refresh(); } if (this.loadoutViewableTag) { this.loadoutViewableTag.viewableName = string.Format(CultureInfo.InvariantCulture, "/Loadout/Bodies/{0}/", BodyCatalog.GetBodyName(SurvivorCatalog.GetBodyIndexFromSurvivorIndex(this.survivorIndex))); this.loadoutViewableTag.Refresh(); } if (this.viewableTrigger) { this.viewableTrigger.viewableName = viewableName; } if (this.tooltipProvider) { UnlockableDef unlockableDef = UnlockableCatalog.GetUnlockableDef(survivorDef.unlockableName); if (unlockableDef != null) { this.tooltipProvider.titleToken = "UNIDENTIFIED"; this.tooltipProvider.titleColor = Color.gray; this.tooltipProvider.overrideBodyText = unlockableDef.getHowToUnlockString(); } } } } } }