...

/

Loading Pilot Data

Loading Pilot Data

We'll cover the following...

With the Pilot model hooked up to the ORM instance, we can start using it for something useful. We already have a sample data file and a DATA_LOADED action being dispatched containing that data. Let’s add some pilot entries to that list, and load them into memory.

For sample entries, we’re going to use the characters from the legendary Black Widow Company of the Wolf’s Dragoons mercenary unit, as they existed in the 3025 game era. This group was led by the notorious Black Widow herself, Natasha Kerensky.

We’ll define several attributes for each pilot: an ID, their name, rank, age, in-game Gunnery and Piloting skills (lower is better), and a short description of what type of Battlemech they pilot. An example looks like:

{
    pilots: [
        {
            id : 1,
            name : "Natasha Kerensky",
            rank : "Captain",
            gunnery : 2,
   
...