fxi(images): prepend with 'src/' to load images in modules

This commit is contained in:
Wojciech Kubicki 2024-03-11 01:10:05 +01:00
parent 7faf1c5ab7
commit f8e5d9574f
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class Tile(pygame.sprite.Sprite):
def set_type(self, type):
self.type = type
if self.type == 'grass':
self.image = pygame.image.load('images/grass.png').convert()
self.image = pygame.image.load('src/images/grass.png').convert()
self.image = pygame.transform.scale(self.image, (64, 64))

View File

@ -4,7 +4,7 @@ class Tractor(pygame.sprite.Sprite):
def __init__(self, field):
super().__init__
self.field = field
self.image = pygame.image.load('images/tractor.png').convert_alpha()
self.image = pygame.image.load('src/images/tractor.png').convert_alpha()
self.image = pygame.transform.scale(self.image, (64, 64))
self.rect = self.image.get_rect()
x, y = 0, 0