private PresetListItemComponent AddListItem(PresetListNode presetList, BasePresetNode preset, SelfUserNode user) { PresetListItemComponent component = presetList.presetList.AddElement().GetComponent <PresetListItemComponent>(); component.Preset = preset.Entity; component.IsUserItem = preset.Entity.HasComponent <UserItemComponent>(); component.IsOwned = component.IsUserItem && (preset.Entity.GetComponent <UserGroupComponent>().Key == user.userGroup.Key); component.PresetName = !component.IsUserItem ? presetList.presetList.LockedByRankLocalizedText.Value : this.GetPresetName(preset.Entity); component.Locked = !component.IsUserItem; return(component); }
public void AddListItemOnNewPreset(NodeAddedEvent e, UserPresetNode preset, [JoinAll] PresetListNode presetList, [JoinAll] MarketPresetNode marketPreset, [JoinAll] SelfUserNode user) {