Snayff/nqp2

Selecting Character Crashes Game

Closed this issue · 1 comments

The Bug

When selecting the second character the game crashes.

Reproduction Instructions

Detail the steps to reproduce the bug.

  1. Go to character select.
  2. Press the right arrow to move to the second character.
  3. Press enter, to select.

Expected behaviour

Game to start.

Log Output/Stack Trace

  File "C:\Users\Gabriel\Documents\nqp2\scripts\scenes\run_setup\ui.py", line 236, in _handle_exit_input
    self._game.run_setup.start_run()
  File "C:\Users\Gabriel\Documents\nqp2\scripts\scenes\run_setup\scene.py", line 51, in start_run
    self._game.memory.commander = Commander(self._game, commander["type"])
  File "C:\Users\Gabriel\Documents\nqp2\scripts\scene_elements\commander.py", line 24, in __init__
    self.items: List[Item] = [create_item(game.data, name) for name in data["items"]]
  File "C:\Users\Gabriel\Documents\nqp2\scripts\scene_elements\commander.py", line 24, in <listcomp>
    self.items: List[Item] = [create_item(game.data, name) for name in data["items"]]
  File "C:\Users\Gabriel\Documents\nqp2\scripts\scene_elements\item.py", line 46, in create_item
    item_data = data.items[name]
KeyError: 'bragans_item'