public bool DeepEquals(DestinyActivityDefinition?other) { return(other is not null && (DisplayProperties is not null ? DisplayProperties.DeepEquals(other.DisplayProperties) : other.DisplayProperties is null) && (OriginalDisplayProperties is not null ? OriginalDisplayProperties.DeepEquals(other.OriginalDisplayProperties) : other.OriginalDisplayProperties is null) && (SelectionScreenDisplayProperties is not null ? SelectionScreenDisplayProperties.DeepEquals(other.SelectionScreenDisplayProperties) : other.SelectionScreenDisplayProperties is null) && ReleaseIcon == other.ReleaseIcon && ReleaseTime == other.ReleaseTime && ActivityLightLevel == other.ActivityLightLevel && DestinationHash == other.DestinationHash && PlaceHash == other.PlaceHash && ActivityTypeHash == other.ActivityTypeHash && Tier == other.Tier && PgcrImage == other.PgcrImage && Rewards.DeepEqualsList(other.Rewards) && Modifiers.DeepEqualsList(other.Modifiers) && IsPlaylist == other.IsPlaylist && Challenges.DeepEqualsList(other.Challenges) && OptionalUnlockStrings.DeepEqualsList(other.OptionalUnlockStrings) && PlaylistItems.DeepEqualsList(other.PlaylistItems) && ActivityGraphList.DeepEqualsList(other.ActivityGraphList) && (Matchmaking is not null ? Matchmaking.DeepEquals(other.Matchmaking) : other.Matchmaking is null) && (GuidedGame is not null ? GuidedGame.DeepEquals(other.GuidedGame) : other.GuidedGame is null) && DirectActivityModeHash == other.DirectActivityModeHash && DirectActivityModeType == other.DirectActivityModeType && Loadouts.DeepEqualsList(other.Loadouts) && ActivityModeHashes.DeepEqualsListNaive(other.ActivityModeHashes) && ActivityModeTypes.DeepEqualsListNaive(other.ActivityModeTypes) && IsPvP == other.IsPvP && InsertionPoints.DeepEqualsList(other.InsertionPoints) && ActivityLocationMappings.DeepEqualsList(other.ActivityLocationMappings) && Hash == other.Hash && Index == other.Index && Redacted == other.Redacted); }
public NinjaVisualViewModel(Entities database) { _database = database; _ninja = MainViewModel.CurrentNinja; Loadouts = _database.Loadouts.Where(e => e.Ninja == _ninja.Id).ToList(); SelectedLoadout = Loadouts.First(); _noItem = new Data.Equipment(); _noItem.Name = "No Item Found"; }
//Constructs each loadout /* public Loadouts(int[] loadout1, int[] loadout2, int[] loadout3, * int[] loadout4, int[] loadout5, int[] loadout6) * { * this.loadout1 = loadout1; * this.loadout2 = loadout2; * this.loadout3 = loadout3; * this.loadout4 = loadout4; * this.loadout5 = loadout5; * this.loadout6 = loadout6; * }*/ private void Awake() { if (LO == null) { LO = this; } else { Destroy(this.gameObject); } }
public IEnumerator LoadStaticContentAsync(LoadStaticContentAsyncArgs args) { //we do a CONSIDERABLE amount of trolling. contentPack.artifactDefs.Add(Artifacts.DumpContent()); //args.ReportProgress(1f); contentPack.bodyPrefabs.Add(Bodies.DumpContent()); //args.ReportProgress(1f); contentPack.buffDefs.Add(Buffs.DumpContent()); //args.ReportProgress(1f); contentPack.effectDefs.Add(Effects.DumpContent()); //args.ReportProgress(1f); contentPack.eliteDefs.Add(Elites.DumpContent()); //args.ReportProgress(1f); contentPack.gameEndingDefs.Add(GameEndings.DumpContent()); //args.ReportProgress(1f); contentPack.entityStateConfigurations.Add(Loadouts.DumpConfigs()); //args.ReportProgress(1f); contentPack.entityStateTypes.Add(Loadouts.DumpEntityStates()); //args.ReportProgress(1f); contentPack.skillFamilies.Add(Loadouts.DumpContentSkillFamilies()); //args.ReportProgress(1f); contentPack.skillDefs.Add(Loadouts.DumpContentSkillDefs()); //args.ReportProgress(1f); contentPack.survivorDefs.Add(Loadouts.DumpSurvivorDefs()); //args.ReportProgress(1f); contentPack.masterPrefabs.Add(Masters.DumpContent()); //args.ReportProgress(1f); contentPack.musicTrackDefs.Add(MusicTracks.DumpContent()); //args.ReportProgress(1f); contentPack.networkedObjectPrefabs.Add(NetworkPrefabs.DumpContent()); //args.ReportProgress(1f); contentPack.networkSoundEventDefs.Add(NetworkSoundEvents.DumpContent()); //args.ReportProgress(1f); contentPack.itemDefs.Add(Pickups.DumpContentItems()); //args.ReportProgress(1f); contentPack.equipmentDefs.Add(Pickups.DumpContentEquipment()); //args.ReportProgress(1f); contentPack.projectilePrefabs.Add(Projectiles.DumpContent()); //args.ReportProgress(1f); contentPack.gameModePrefabs.Add(Runs.DumpContent()); //args.ReportProgress(1f); contentPack.sceneDefs.Add(Scenes.DumpContent()); //args.ReportProgress(1f); contentPack.surfaceDefs.Add(SurfaceDefinitions.DumpContent()); args.ReportProgress(1f); yield break; }
void Init() { try { loadouts = Interface.Oxide.DataFileSystem.ReadObject<Loadouts>(loadoutFileName); permission.RegisterPermission(adminPermission, this); foreach (var l in loadouts.loadouts) permission.RegisterPermission($"QuickLoadouts.{l.name}", this); } catch (Exception ex) { throw new Exception($"Error in Loaded {ex.Message}"); } }
public void PopulateLoadouts(IList <PlayerLoadoutsClientModel> loadouts) { Loadouts.AddRange(from l in loadouts select new PlayerLoadoutModel { LoadoutName = l.DeckName, PlayerName = l.PlayerName, PaladinsPlayerId = Convert.ToInt32(l.PlayerId), PaladinsChampionId = Convert.ToInt32(l.ChampionId), LoadoutItems = (from li in l.LoadoutItems select new PlayerLoadoutItemModel { CardName = li.ItemName, PaladinsItemId = Convert.ToInt32(li.ItemId), PointsAssignedToItem = Convert.ToInt32(li.Points) }).ToList() }); }
public bool RenameLoadout(LoadoutViewModel loadoutViewModel) { var inputOptions = new InputOptions { WindowTitle = $"Rename skill loadout", WindowPrompt = $"Rename skill loadout '{loadoutViewModel.Name}'", WindowDefaultValue = loadoutViewModel.Name, IsInputMandatory = true, IsValid = x => Loadouts.Where(l => l != loadoutViewModel).All(l => l.Name != x) }; if (InputUtils.Show(inputOptions, out string newName)) { loadoutViewModel.Name = newName; return(true); } return(false); }
public bool RenameLoadout(LoadoutViewModel loadoutViewModel) { var renameOptions = new RenameOptions { WindowTitle = $"Rename skill loadout", WindowPrompt = $"Rename skill loadout '{loadoutViewModel.Name}'", WindowDefaultValue = loadoutViewModel.Name, IsInputMandatory = true, IsValid = x => Loadouts.Where(l => l != loadoutViewModel).All(l => l.Name != x) }; if (ServicesContainer.GetService <IRenameService>().Rename(renameOptions, out string newName)) { loadoutViewModel.Name = newName; return(true); } return(false); }
public void SetLoadOut(Loadouts ChosenLoadout) { try { Wapens[CurrentWeapon].WeaponObject.SetActive(false); } catch { } Wapens.Clear(); Wapens.Add(ChosenLoadout.Primary); AttachAttachment(ChosenLoadout.Primary.Attachment, ChosenLoadout.Primary); Wapens.Add(ChosenLoadout.Secondary); AttachAttachment(ChosenLoadout.Secondary.Attachment, ChosenLoadout.Secondary); Wapens.Add(ChosenLoadout.Tertiary); AttachAttachment(ChosenLoadout.Tertiary.Attachment, ChosenLoadout.Tertiary); CurrentWeapon = 2; SwitchWeapon(1); }
public bool DeepEquals(DestinyActivityDefinition other) { return(other != null && ActivityGraphList.DeepEqualsReadOnlyCollections(other.ActivityGraphList) && ActivityLevel == other.ActivityLevel && ActivityLightLevel == other.ActivityLightLevel && ActivityLocationMappings.DeepEqualsReadOnlyCollections(other.ActivityLocationMappings) && ActivityModes.DeepEqualsReadOnlyCollections(other.ActivityModes) && ActivityModeTypes.DeepEqualsReadOnlySimpleCollection(other.ActivityModeTypes) && ActivityType.DeepEquals(other.ActivityType) && Challenges.DeepEqualsReadOnlyCollections(other.Challenges) && CompletionUnlockHash == other.CompletionUnlockHash && Destination.DeepEquals(other.Destination) && DirectActivityMode.DeepEquals(other.DirectActivityMode) && DirectActivityModeType == other.DirectActivityModeType && DisplayProperties.DeepEquals(other.DisplayProperties) && (GuidedGame != null ? GuidedGame.DeepEquals(other.GuidedGame) : other.GuidedGame == null) && InheritFromFreeRoam == other.InheritFromFreeRoam && InsertionPoints.DeepEqualsReadOnlyCollections(other.InsertionPoints) && IsPlaylist == other.IsPlaylist && IsPvP == other.IsPvP && (Matchmaking != null ? Matchmaking.DeepEquals(other.Matchmaking) : other.Matchmaking == null) && Modifiers.DeepEqualsReadOnlyCollections(other.Modifiers) && OptionalUnlockStrings.DeepEqualsReadOnlyCollections(other.OptionalUnlockStrings) && OriginalDisplayProperties.DeepEquals(other.OriginalDisplayProperties) && PgcrImage == other.PgcrImage && Place.DeepEquals(other.Place) && PlaylistItems.DeepEqualsReadOnlyCollections(other.PlaylistItems) && ReleaseIcon == other.ReleaseIcon && ReleaseTime == other.ReleaseTime && Rewards.DeepEqualsReadOnlyCollections(other.Rewards) && (SelectionScreenDisplayProperties != null ? SelectionScreenDisplayProperties.DeepEquals(other.SelectionScreenDisplayProperties) : other.SelectionScreenDisplayProperties == null) && SuppressOtherRewards == other.SuppressOtherRewards && Tier == other.Tier && Loadouts.DeepEqualsReadOnlyCollections(other.Loadouts) && Blacklisted == other.Blacklisted && Hash == other.Hash && Index == other.Index && Redacted == other.Redacted); }
/// <summary> /// 指定したコネクション名に装備可能なEquipmentを取得する /// </summary> /// <returns></returns> public IEnumerable <T> GetEquippableEquipment <T>(string connectionName) where T : IEquipment { // 指定したコネクション名に装備可能な装備は存在するか? if (Equipments.TryGetValue(connectionName, out var wareEquipment)) { // デフォルトのロードアウトは存在するか? if (Loadouts.TryGetValue("default", out var loadouts)) { bool matched = false; // デフォルトのロードアウトの内、指定したコネクション名と同じグループ名を持つもので装備可能なものを取得する var shipLoadout = loadouts.FirstOrDefault(x => (x.GroupName == wareEquipment.GroupName && wareEquipment.CanEquipped(x.Equipment)) || (string.IsNullOrEmpty(x.GroupName) && wareEquipment.CanEquipped(x.Equipment)) ); if (shipLoadout is not null) { // 同じグループ名の装備は指定した型と一致するか? if (shipLoadout.Equipment is T ret) { matched = true; yield return(ret); } } if (matched) { yield break; } } var equipments = X4Database.Instance.Ware.GetAll <T>() .Where(x => wareEquipment.CanEquipped(x)); foreach (var equipment in equipments) { yield return(equipment); } } }
private static void InitializeSkins() { GameObject model = bodyPrefab.GetComponentInChildren <ModelLocator>().modelTransform.gameObject; CharacterModel characterModel = model.GetComponent <CharacterModel>(); DestroyImmediate(model.GetComponent <ModelSkinController>()); ModelSkinController skinController = model.AddComponent <ModelSkinController>(); ChildLocator childLocator = model.GetComponent <ChildLocator>(); SkinnedMeshRenderer mainRenderer = characterModel.mainSkinnedMeshRenderer; CharacterModel.RendererInfo[] defaultRenderers = characterModel.baseRendererInfos; List <SkinDef> skins = new List <SkinDef>(); #region DefaultSkin SkinDef defaultSkin = Modules.Skins.CreateSkinDef("Default", Loadouts.CreateSkinIcon(new Color(0.8f, 0.8f, 0.8f), new Color(0.8f, 0.8f, 0.8f), new Color(0.8f, 0.8f, 0.8f), new Color(0.8f, 0.8f, 0.8f)), defaultRenderers, mainRenderer, model); skins.Add(defaultSkin); #endregion #region MasterySkin SkinDef masterySkin = Modules.Skins.CreateSkinDef("Mastery", Loadouts.CreateSkinIcon(new Color(0.15f, 0.15f, 0.15f), new Color(0.15f, 0.15f, 0.15f), new Color(0.15f, 0.15f, 0.15f), new Color(0.15f, 0.15f, 0.15f)), defaultRenderers, mainRenderer, model); skins.Add(masterySkin); #endregion skinController.skins = skins.ToArray(); }
public bool Equals(DestinyActivityDefinition input) { if (input == null) { return(false); } return (( DisplayProperties == input.DisplayProperties || (DisplayProperties != null && DisplayProperties.Equals(input.DisplayProperties)) ) && ( OriginalDisplayProperties == input.OriginalDisplayProperties || (OriginalDisplayProperties != null && OriginalDisplayProperties.Equals(input.OriginalDisplayProperties)) ) && ( SelectionScreenDisplayProperties == input.SelectionScreenDisplayProperties || (SelectionScreenDisplayProperties != null && SelectionScreenDisplayProperties.Equals(input.SelectionScreenDisplayProperties)) ) && ( ReleaseIcon == input.ReleaseIcon || (ReleaseIcon != null && ReleaseIcon.Equals(input.ReleaseIcon)) ) && ( ReleaseTime == input.ReleaseTime || (ReleaseTime.Equals(input.ReleaseTime)) ) && ( ActivityLightLevel == input.ActivityLightLevel || (ActivityLightLevel.Equals(input.ActivityLightLevel)) ) && ( DestinationHash == input.DestinationHash || (DestinationHash.Equals(input.DestinationHash)) ) && ( PlaceHash == input.PlaceHash || (PlaceHash.Equals(input.PlaceHash)) ) && ( ActivityTypeHash == input.ActivityTypeHash || (ActivityTypeHash.Equals(input.ActivityTypeHash)) ) && ( Tier == input.Tier || (Tier.Equals(input.Tier)) ) && ( PgcrImage == input.PgcrImage || (PgcrImage != null && PgcrImage.Equals(input.PgcrImage)) ) && ( Rewards == input.Rewards || (Rewards != null && Rewards.SequenceEqual(input.Rewards)) ) && ( Modifiers == input.Modifiers || (Modifiers != null && Modifiers.SequenceEqual(input.Modifiers)) ) && ( IsPlaylist == input.IsPlaylist || (IsPlaylist != null && IsPlaylist.Equals(input.IsPlaylist)) ) && ( Challenges == input.Challenges || (Challenges != null && Challenges.SequenceEqual(input.Challenges)) ) && ( OptionalUnlockStrings == input.OptionalUnlockStrings || (OptionalUnlockStrings != null && OptionalUnlockStrings.SequenceEqual(input.OptionalUnlockStrings)) ) && ( PlaylistItems == input.PlaylistItems || (PlaylistItems != null && PlaylistItems.SequenceEqual(input.PlaylistItems)) ) && ( ActivityGraphList == input.ActivityGraphList || (ActivityGraphList != null && ActivityGraphList.SequenceEqual(input.ActivityGraphList)) ) && ( Matchmaking == input.Matchmaking || (Matchmaking != null && Matchmaking.Equals(input.Matchmaking)) ) && ( GuidedGame == input.GuidedGame || (GuidedGame != null && GuidedGame.Equals(input.GuidedGame)) ) && ( DirectActivityModeHash == input.DirectActivityModeHash || (DirectActivityModeHash.Equals(input.DirectActivityModeHash)) ) && ( DirectActivityModeType == input.DirectActivityModeType || (DirectActivityModeType.Equals(input.DirectActivityModeType)) ) && ( Loadouts == input.Loadouts || (Loadouts != null && Loadouts.SequenceEqual(input.Loadouts)) ) && ( ActivityModeHashes == input.ActivityModeHashes || (ActivityModeHashes != null && ActivityModeHashes.SequenceEqual(input.ActivityModeHashes)) ) && ( ActivityModeTypes == input.ActivityModeTypes || (ActivityModeTypes != null && ActivityModeTypes.SequenceEqual(input.ActivityModeTypes)) ) && ( IsPvP == input.IsPvP || (IsPvP != null && IsPvP.Equals(input.IsPvP)) ) && ( InsertionPoints == input.InsertionPoints || (InsertionPoints != null && InsertionPoints.SequenceEqual(input.InsertionPoints)) ) && ( ActivityLocationMappings == input.ActivityLocationMappings || (ActivityLocationMappings != null && ActivityLocationMappings.SequenceEqual(input.ActivityLocationMappings)) ) && ( Hash == input.Hash || (Hash.Equals(input.Hash)) ) && ( Index == input.Index || (Index.Equals(input.Index)) ) && ( Redacted == input.Redacted || (Redacted != null && Redacted.Equals(input.Redacted)) )); }
public void Update(DestinyActivityDefinition?other) { if (other is null) { return; } if (!DisplayProperties.DeepEquals(other.DisplayProperties)) { DisplayProperties.Update(other.DisplayProperties); OnPropertyChanged(nameof(DisplayProperties)); } if (!OriginalDisplayProperties.DeepEquals(other.OriginalDisplayProperties)) { OriginalDisplayProperties.Update(other.OriginalDisplayProperties); OnPropertyChanged(nameof(OriginalDisplayProperties)); } if (!SelectionScreenDisplayProperties.DeepEquals(other.SelectionScreenDisplayProperties)) { SelectionScreenDisplayProperties.Update(other.SelectionScreenDisplayProperties); OnPropertyChanged(nameof(SelectionScreenDisplayProperties)); } if (ReleaseIcon != other.ReleaseIcon) { ReleaseIcon = other.ReleaseIcon; OnPropertyChanged(nameof(ReleaseIcon)); } if (ReleaseTime != other.ReleaseTime) { ReleaseTime = other.ReleaseTime; OnPropertyChanged(nameof(ReleaseTime)); } if (ActivityLightLevel != other.ActivityLightLevel) { ActivityLightLevel = other.ActivityLightLevel; OnPropertyChanged(nameof(ActivityLightLevel)); } if (DestinationHash != other.DestinationHash) { DestinationHash = other.DestinationHash; OnPropertyChanged(nameof(DestinationHash)); } if (PlaceHash != other.PlaceHash) { PlaceHash = other.PlaceHash; OnPropertyChanged(nameof(PlaceHash)); } if (ActivityTypeHash != other.ActivityTypeHash) { ActivityTypeHash = other.ActivityTypeHash; OnPropertyChanged(nameof(ActivityTypeHash)); } if (Tier != other.Tier) { Tier = other.Tier; OnPropertyChanged(nameof(Tier)); } if (PgcrImage != other.PgcrImage) { PgcrImage = other.PgcrImage; OnPropertyChanged(nameof(PgcrImage)); } if (!Rewards.DeepEqualsList(other.Rewards)) { Rewards = other.Rewards; OnPropertyChanged(nameof(Rewards)); } if (!Modifiers.DeepEqualsList(other.Modifiers)) { Modifiers = other.Modifiers; OnPropertyChanged(nameof(Modifiers)); } if (IsPlaylist != other.IsPlaylist) { IsPlaylist = other.IsPlaylist; OnPropertyChanged(nameof(IsPlaylist)); } if (!Challenges.DeepEqualsList(other.Challenges)) { Challenges = other.Challenges; OnPropertyChanged(nameof(Challenges)); } if (!OptionalUnlockStrings.DeepEqualsList(other.OptionalUnlockStrings)) { OptionalUnlockStrings = other.OptionalUnlockStrings; OnPropertyChanged(nameof(OptionalUnlockStrings)); } if (!PlaylistItems.DeepEqualsList(other.PlaylistItems)) { PlaylistItems = other.PlaylistItems; OnPropertyChanged(nameof(PlaylistItems)); } if (!ActivityGraphList.DeepEqualsList(other.ActivityGraphList)) { ActivityGraphList = other.ActivityGraphList; OnPropertyChanged(nameof(ActivityGraphList)); } if (!Matchmaking.DeepEquals(other.Matchmaking)) { Matchmaking.Update(other.Matchmaking); OnPropertyChanged(nameof(Matchmaking)); } if (!GuidedGame.DeepEquals(other.GuidedGame)) { GuidedGame.Update(other.GuidedGame); OnPropertyChanged(nameof(GuidedGame)); } if (DirectActivityModeHash != other.DirectActivityModeHash) { DirectActivityModeHash = other.DirectActivityModeHash; OnPropertyChanged(nameof(DirectActivityModeHash)); } if (DirectActivityModeType != other.DirectActivityModeType) { DirectActivityModeType = other.DirectActivityModeType; OnPropertyChanged(nameof(DirectActivityModeType)); } if (!Loadouts.DeepEqualsList(other.Loadouts)) { Loadouts = other.Loadouts; OnPropertyChanged(nameof(Loadouts)); } if (!ActivityModeHashes.DeepEqualsListNaive(other.ActivityModeHashes)) { ActivityModeHashes = other.ActivityModeHashes; OnPropertyChanged(nameof(ActivityModeHashes)); } if (!ActivityModeTypes.DeepEqualsListNaive(other.ActivityModeTypes)) { ActivityModeTypes = other.ActivityModeTypes; OnPropertyChanged(nameof(ActivityModeTypes)); } if (IsPvP != other.IsPvP) { IsPvP = other.IsPvP; OnPropertyChanged(nameof(IsPvP)); } if (!InsertionPoints.DeepEqualsList(other.InsertionPoints)) { InsertionPoints = other.InsertionPoints; OnPropertyChanged(nameof(InsertionPoints)); } if (!ActivityLocationMappings.DeepEqualsList(other.ActivityLocationMappings)) { ActivityLocationMappings = other.ActivityLocationMappings; OnPropertyChanged(nameof(ActivityLocationMappings)); } if (Hash != other.Hash) { Hash = other.Hash; OnPropertyChanged(nameof(Hash)); } if (Index != other.Index) { Index = other.Index; OnPropertyChanged(nameof(Index)); } if (Redacted != other.Redacted) { Redacted = other.Redacted; OnPropertyChanged(nameof(Redacted)); } }