added some tools to server, removed deprecated

code and adjusted entity, game, and event files to
work with items being mandatory for entities.
This commit is contained in:
2026-01-30 18:14:05 +01:00
parent 13488e1c2d
commit 5fef91e110
5 changed files with 196 additions and 78 deletions

View File

@@ -1,7 +1,7 @@
# Game imports
from utils.serializable import Serializable
from entities.entity import Entity
from turn import Turn, TurnAction
from events.turn import Turn, TurnAction
# Native imports
import json
@@ -35,7 +35,7 @@ class Event(Serializable):
current_turn = self.get_current_turn()
current_turn.add_action(action_type=action, entity_id=entity_id, description=description)
if current_turn.is_finished():
if current_turn.is_finished(len(self.entities)):
self.add_turn()
return True