diff --git a/settings/__pycache__/__init__.cpython-310.pyc b/settings/__pycache__/__init__.cpython-310.pyc index f280f6c..2e44082 100644 Binary files a/settings/__pycache__/__init__.cpython-310.pyc and b/settings/__pycache__/__init__.cpython-310.pyc differ diff --git a/settings/__pycache__/settings_handler.cpython-310.pyc b/settings/__pycache__/settings_handler.cpython-310.pyc index f0b9e3a..59a4b24 100644 Binary files a/settings/__pycache__/settings_handler.cpython-310.pyc and b/settings/__pycache__/settings_handler.cpython-310.pyc differ diff --git a/settings/settings.json b/settings/game_settings.json similarity index 100% rename from settings/settings.json rename to settings/game_settings.json diff --git a/settings/settings_handler.py b/settings/settings_handler.py old mode 100644 new mode 100755 index fe3dc90..b6b90c0 --- a/settings/settings_handler.py +++ b/settings/settings_handler.py @@ -1,11 +1,11 @@ -from json import (load, - dump, - ) +#!/usr/bin/python3 + +import json def read_file(filename): with open(filename, "r") as file: - return load(file) + return json.load(file) # def save_file(filename): @@ -17,14 +17,14 @@ def get_plane_settings(): """ :return: dictionary with the plane settings """ - return read_file("planes_settings.json") + pass -def get_game_settings(): +def get_game_settings(file): """ :return: dictionary with the game settings """ - return read_file("settings.json") + return read_file(file) def overwrite_game_settings(**kwargs): @@ -33,8 +33,6 @@ def overwrite_game_settings(**kwargs): - - # def overwrite_settings(self, **kwargs): # kwargs = {k.lower(): v for k, v in kwargs.items()} #