Move all the logging to log.py and prefix all the log names with "erynrl"
This commit is contained in:
parent
5d4e0cff3d
commit
ce63c825b0
8 changed files with 126 additions and 102 deletions
|
@ -2,21 +2,19 @@
|
|||
|
||||
'''Defines the core game engine.'''
|
||||
|
||||
import logging
|
||||
import random
|
||||
from dataclasses import dataclass
|
||||
from typing import MutableSet
|
||||
|
||||
import tcod
|
||||
|
||||
from . import log
|
||||
from . import monsters
|
||||
from .ai import HostileEnemy
|
||||
from .geometry import Size
|
||||
from .map import Map
|
||||
from .object import Entity, Hero, Monster
|
||||
|
||||
LOG = logging.getLogger('engine')
|
||||
|
||||
@dataclass
|
||||
class Configuration:
|
||||
map_size: Size
|
||||
|
@ -66,7 +64,7 @@ class Engine:
|
|||
else:
|
||||
monster = Monster(monsters.Orc, ai_class=HostileEnemy, position=random_start_position)
|
||||
|
||||
LOG.info('Spawning %s', monster)
|
||||
log.ENGINE.info('Spawning %s', monster)
|
||||
self.entities.add(monster)
|
||||
|
||||
self.update_field_of_view()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue