예제 #1
0
        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);
        }
예제 #2
0
 public void AddListItemOnNewPreset(NodeAddedEvent e, UserPresetNode preset, [JoinAll] PresetListNode presetList, [JoinAll] MarketPresetNode marketPreset, [JoinAll] SelfUserNode user)
 {