public void SetChestProgression(NodeAddedEvent e, PlayScreenNode screen, SingleNode <ChestProgressBarComponent> energygui, [JoinAll] SelfUserNode user, [JoinSelf] SingleNode <GameplayChestScoreComponent> chestScore, [JoinByLeague] LeaguemNode league) { long chestId = league.chestBattleReward.ChestId; Entity entityById = base.GetEntityById(chestId); DescriptionItemComponent component = entityById.GetComponent <DescriptionItemComponent>(); ImageItemComponent component2 = entityById.GetComponent <ImageItemComponent>(); energygui.component.SetChest(component.Name, component2.SpriteUid); energygui.component.SetChestTooltip(chestScore.component.Limit, league.leagueConfig.LeagueIndex > 2); }
private void AddItemToList(long itemId, int count, LeagueRewardListUIComponent list) { Entity entity = Flow.Current.EntityRegistry.GetEntity(itemId); DescriptionItemComponent component = entity.GetComponent <DescriptionItemComponent>(); ImageItemComponent component2 = entity.GetComponent <ImageItemComponent>(); string str = (count <= 1) ? string.Empty : (" x" + count); string str2 = string.Empty; if (!entity.HasComponent <ContainerMarkerComponent>()) { str2 = MarketItemNameLocalization.Instance.GetCategoryName(entity) + " "; } string[] textArray1 = new string[] { str2, component.Name, str, "\n", component.Description }; list.AddItem(string.Concat(textArray1), component2.SpriteUid); }