public InputSetSummary[] GetInputSets() { Log("Requested input sets"); var sets = new InputSets(Scenario); InputSetSummary[] result = new InputSetSummary[sets.All.Count]; for (int i = 0; i < result.Length; i++) { var inputSet = sets.All[i]; result[i] = new InputSetSummary { URL = String.Format("{0}/{1}", UriTemplates.InputSets, URLSafeString(inputSet.Name)), Name = inputSet.Name, Configuration = sets.Instructions(inputSet) }; string fn = sets.Filename(inputSet); if (!String.IsNullOrEmpty(fn)) { result[i].Filename = fn; result[i].ReloadOnRun = sets.ReloadOnRun(inputSet); } } return(result); }
public void UpdateInputSet(string inputSetName, InputSetSummary summary) { Log("Updating Input Set Commands for " + inputSetName); var sets = new InputSets(Scenario); InputSet set = sets.Find(inputSetName); sets.UpdateInstructions(set, summary.Configuration); }
public void CreateInputSet(InputSetSummary newInputSet) { Log("Creating new Input Set: " + newInputSet.Name); var sets = new InputSets(Scenario); sets.Create(newInputSet); }
/// <summary> /// Create a new <see cref="KeybindingSet"/> from an existing database model. /// </summary> public KeybindingSet(AccountModel model) { Owner = model.Id; InputSet = InputSets.Account; foreach (AccountKeybindingModel binding in model.AccountKeybinding) { bindings.Add(binding.InputActionId, new Keybinding(Owner, binding)); } }
/// <summary> /// Create a new <see cref="KeybindingSet"/> from an existing database model. /// </summary> public KeybindingSet(CharacterModel model) { Owner = model.Id; InputSet = InputSets.Character; foreach (CharacterKeybindingModel binding in model.Keybinding) { bindings.Add(binding.InputActionId, new Keybinding(Owner, binding)); } }
public void RunInputSet(string inputSetName, string action) { if (action != "run") { throw new InvalidOperationException("Cannot perform action " + action + " on input sets"); } Log("Applying inout set " + inputSetName); var sets = new InputSets(Scenario); sets.Run(inputSetName); }
public void Read(GamePacketReader reader) { InputKeySetEnum = reader.ReadEnum <InputSets>(32u); }
public bool MatchInputSet(string inputSet) { return(InputSets.Any(iSet => SourceService.URLSafeString(iSet) == inputSet)); }