public static void Render(this IConsole console, WarriorNameTable model)
 {
     console.WriteTitle($"Warrior Name Table");
     for (int i = 0; i < WarriorNameTable.EntryCount; i++)
     {
         console.WriteProperty(i.ToString().PadLeft(3, '0'), model.GetEntry(i));
     }
 }
Example #2
0
 public override void Reload()
 {
     _cache.Clear();
     using (var br = new BinaryReader(File.OpenRead(_dataFile)))
     {
         for (int id = _minId; id <= _maxId; id++)
         {
             _cache.Add(new BaseWarrior(br.ReadBytes(BaseWarrior.DataLength)));
         }
         br.BaseStream.Position = 0x13B0;
         NameTable = new WarriorNameTable(br.ReadBytes(WarriorNameTable.DataLength));
     }
 }
Example #3
0
    public BaseWarriorViewModel(IJumpService jumpService, IOverrideSpriteProvider overrideSpriteProvider, IIdToNameService idToNameService, IBaseWarriorService baseWarriorService, ICachedMsgBlockService cachedMsgBlockService)
    {
        _model                 = new BaseWarrior();
        _nameTable             = baseWarriorService.NameTable;
        _spriteProvider        = overrideSpriteProvider;
        _cachedMsgBlockService = cachedMsgBlockService;

        JumpToWarriorSkillCommand = new RelayCommand <int>(id => jumpService.JumpTo(WarriorSkillSelectorEditorModule.Id, id));
        JumpToBaseWarriorCommand  = new RelayCommand <int>(id => jumpService.JumpTo(BaseWarriorSelectorEditorModule.Id, id));
        JumpToPokemonCommand      = new RelayCommand <int>(id => jumpService.JumpTo(PokemonSelectorEditorModule.Id, id));

        WarriorSkillItems = idToNameService.GetComboBoxItemsPlusDefault <IWarriorSkillService>();
        BaseWarriorItems  = idToNameService.GetComboBoxItemsPlusDefault <IBaseWarriorService>();
        PokemonItems      = idToNameService.GetComboBoxItemsPlusDefault <IPokemonService>();
    }
Example #4
0
 public WarriorNameTableItem(int index, WarriorNameTable table)
 {
     Index  = index;
     _table = table;
 }