1
0
forked from MDL29/JacoBot

Change path system

This commit is contained in:
Romain 2024-04-23 11:14:28 +02:00
parent e52488249f
commit 7ba83ee570
8 changed files with 11 additions and 4 deletions

View File

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,5 +1,6 @@
import arcade
import os.path
from importlib import resources
import redis
@ -86,15 +87,19 @@ class Token_sprite(arcade.Sprite):
# Attributes for token type
self.token_type = token_type
scale *= SCREEN_MULTILPLIER
self.image_file_name = f"{CURRENT_PATH}/Img/token/{self.token_type}.png"
with resources.path("jacovirt", 'Img') as img_folder :
self.image_file_name = fr"{img_folder}/pad/token/{self.token_type}.png"
# Call the parent
super().__init__(self.image_file_name, scale, hit_box_algorithm="None")
class Image(arcade.Sprite):
def __init__(self, file_name, scale=1):
self.image_file_name = f"{CURRENT_PATH}/Img/{file_name}"
with resources.path("jacovirt", 'Img') as img_folder :
self.image_file_name = f"{img_folder}/pad/{file_name}"
scale *= SCREEN_MULTILPLIER
# Call the parent
super().__init__(self.image_file_name, scale, hit_box_algorithm="None")

View File

@ -17,5 +17,7 @@ build-backend = "poetry.core.masonry.api"
[tool.poetry.scripts]
jacovirt-bot = "jacovirt.jacobot:main"
jacovirt-pad = "jacovirt.jacopad:main"
jacovirt-pad = "jacovirt.pad.jacopad:main"
[[tool.poetry.include]]
path = "jacovirt/jacovirt/Img/*"