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); }
protected override void FillFromEntity(Entity entity) { if (entity.HasComponent <ImageItemComponent>()) { string spriteUid = entity.GetComponent <ImageItemComponent>().SpriteUid; base.banner.SpriteUid = spriteUid; } base.title.text = MarketItemNameLocalization.Instance.GetCategoryName(entity) + " \""; GarageItem item = GarageItemsRegistry.GetItem <GarageItem>(entity); if (item != null) { base.title.text = base.title.text + MarketItemNameLocalization.Instance.GetGarageItemName(item); } else if (entity.HasComponent <DescriptionItemComponent>()) { DescriptionItemComponent component = entity.GetComponent <DescriptionItemComponent>(); base.title.text = base.title.text + component.Name; } base.title.text = base.title.text + "\""; XPriceItemComponent component2 = entity.GetComponent <XPriceItemComponent>(); string priceStr = component2.Price.ToStringSeparatedByThousands(); if (component2.Price < component2.OldPrice) { priceStr = priceStr + $" <s><#{this.greyColor.Color.ToHexString()}>{component2.OldPrice.ToStringSeparatedByThousands()}</color></s>"; } this.SetPrice(priceStr, "<sprite=9>"); base.EndDate = entity.GetComponent <MarketItemSaleComponent>().endDate; if (base.EndDate.UnityTime != 0f) { TextTimerComponent component = base.GetComponent <TextTimerComponent>(); component.EndDate = base.EndDate; component.enabled = true; } base.FillFromEntity(entity); }
public void SetItemName(NodeAddedEvent e, GarageListItemNode listItemNode) { DescriptionItemComponent descriptionItem = listItemNode.descriptionItem; listItemNode.garageListItemContent.Header.text = descriptionItem.Name; }