public GameQueueAction(GameQueueActionType gameQueueType, RoleRequirementViewModel roleRequirement = null, string targetUsername = null) : this() { this.GameQueueType = gameQueueType; this.RoleRequirement = roleRequirement; this.TargetUsername = targetUsername; }
public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements) { RoleRequirementViewModel starterRequirement = new RoleRequirementViewModel(this.WhoCanStart); GameCommandBase newCommand = new BidGameCommand(name, triggers, requirements, this.MinimumParticipants, this.TimeLimit, starterRequirement, this.StartedCommand, this.UserJoinedCommand, this.GameCompleteCommand, this.NotEnoughPlayersCommand); this.SaveGameCommand(newCommand, this.existingCommand); }
public void SetRoleRequirement(RoleRequirementViewModel role) { if (role != null) { this.tempRole = role; this.RoleComboBox.ItemsSource = RoleRequirementViewModel.AdvancedUserRoleAllowedValues; this.RoleComboBox.SelectedItem = role.RoleNameString; } }
public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements) { RoleRequirementViewModel starterRequirement = new RoleRequirementViewModel(this.WhoCanStart); GameCommandBase newCommand = new BidGameCommand(name, triggers, requirements, this.MinimumParticipants, this.TimeLimit, starterRequirement, this.StartedCommand, this.UserJoinedCommand, this.GameCompleteCommand, this.NotEnoughPlayersCommand); if (this.existingCommand != null) { ChannelSession.Settings.GameCommands.Remove(this.existingCommand); newCommand.ID = this.existingCommand.ID; } ChannelSession.Settings.GameCommands.Add(newCommand); }
public override void SaveGameCommand(string name, IEnumerable <string> triggers, RequirementViewModel requirements) { RoleRequirementViewModel starterRequirement = new RoleRequirementViewModel(this.WhoCanStart); GameCommandBase newCommand = new BetGameCommand(name, triggers, requirements, this.MinimumParticipants, this.TimeLimit, starterRequirement, this.Options.Select(o => o.GetGameOutcome()), this.StartedCommand, this.UserJoinedCommand, this.BetsClosedCommand, new GameOutcome("Failure", 0, new Dictionary <UserRoleEnum, int>() { { UserRoleEnum.User, 0 }, { UserRoleEnum.Subscriber, 0 }, { UserRoleEnum.Mod, 0 } }, this.UserFailCommand), this.GameCompleteCommand, this.NotEnoughPlayersCommand); this.SaveGameCommand(newCommand, this.existingCommand); }
public async Task SelectFirstType(RoleRequirementViewModel requirement) { UserViewModel user = this.queue.FirstOrDefault(u => requirement.DoesMeetRequirement(u)); if (user != null) { await this.SelectFirst(); } else { this.queue.Remove(user); await ChannelSession.Settings.GameQueueUserSelectedCommand.Perform(user); } GlobalEvents.GameQueueUpdated(); }
public override void SaveGameCommand() { int.TryParse(this.MinimumParticipantsTextBox.Text, out int minimumParticipants); int.TryParse(this.TimeLimitTextBox.Text, out int timeLimit); RoleRequirementViewModel starterRequirement = new RoleRequirementViewModel((string)this.GameStartRoleComboBox.SelectedItem); GameCommandBase newCommand = new BidGameCommand(this.CommandDetailsControl.GameName, this.CommandDetailsControl.ChatTriggers, this.CommandDetailsControl.GetRequirements(), minimumParticipants, timeLimit, starterRequirement, this.startedCommand, this.userJoinCommand, this.gameCompleteCommand); if (this.existingCommand != null) { ChannelSession.Settings.GameCommands.Remove(this.existingCommand); newCommand.ID = this.existingCommand.ID; } ChannelSession.Settings.GameCommands.Add(newCommand); }
public void SetRoleRequirement(RoleRequirementViewModel role) { if (role != null) { this.tempRole = role; this.RoleComboBox.ItemsSource = MixItUp.Base.ViewModel.Requirements.RoleRequirementViewModel.SelectableUserRoles(); this.RoleComboBox.SelectedItem = role.MixerRole; if (role.SubscriberTier > 0) { this.SubTierComboBox.SelectedIndex = role.SubscriberTier - 1; } else { this.SubTierComboBox.SelectedIndex = 0; } } }
public GameQueueAction(GameQueueActionType gameQueueType, RoleRequirementViewModel roleRequirement = null) : this() { this.GameQueueType = gameQueueType; this.RoleRequirement = roleRequirement; }