pokken: add frontend stub

This commit is contained in:
Hay1tsme
2023-04-11 11:40:05 -04:00
parent bf6c7d39f5
commit 68e25b9c5e
4 changed files with 46 additions and 6 deletions

View File

@ -66,13 +66,14 @@ class FrontendServlet(resource.Resource):
fe_game = FE_Game(cfg, self.environment)
games = Utils.get_all_titles()
for game_dir, game_mod in games.items():
if hasattr(game_mod, "frontend"):
if hasattr(game_mod, "frontend"):
try:
game_fe = game_mod.frontend(cfg, self.environment, config_dir)
self.game_list.append({"url": game_dir, "name": game_fe.nav_name})
fe_game.putChild(game_dir.encode(), game_fe)
except:
raise
except Exception as e:
self.logger.error(f"Failed to import frontend from {game_dir} because {e}")
self.environment.globals["game_list"] = self.game_list
self.putChild(b"gate", FE_Gate(cfg, self.environment))