Skip to content

Commit

Permalink
Linting WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Kartoffel096 committed May 15, 2024
1 parent f5e00b9 commit 93a0741
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 1 addition & 4 deletions Assethandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,7 @@ def importEffects(_effects_folder: str) -> None:

def load_game() -> None:
"""Function to init the whole Game"""
rootdir = "C:\\Users\\Maximilian Bonk\\Documents\\Projekte\\Private\\Textadventure\\TA\\Assets".replace(
"\\", os.sep
)
rootdir = "..\\Textadventure\\TA\\Assets".replace("\\", os.sep)
Assetpacks = []

# the underscore representes dirs
Expand Down Expand Up @@ -293,7 +291,6 @@ def __init__(

if not self.validate():
Logger.log(f"Assetpack {self} could not be verified!", 2)
return

def __str__(self) -> str:
return f"{self.name}"
Expand Down
2 changes: 2 additions & 0 deletions Entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,6 +673,7 @@ def check_level_up(self) -> bool:

def consume_item(self, item_name: str) -> None:
"""enables consumption of consumables."""
consumable = None
for item in self.inv:
if item.name == item_name:
consumable = item
Expand All @@ -690,6 +691,7 @@ def consume_item(self, item_name: str) -> None:

def equip_item(self, item_name: str, slot: str = "") -> None:
"""enables equiping of eqipment"""
cur_item = None
for item in self.inv:
if item.name == item_name:
cur_item = item
Expand Down
2 changes: 2 additions & 0 deletions Level.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ def load_all_levels_from_json(

Logger.log(f"Loading Levels from: {json_file}")

data = {}

if json_file:
if not isinstance(json_file, dict):
with open(json_file, encoding="UTF-8") as json_data:
Expand Down

0 comments on commit 93a0741

Please sign in to comment.