Change path system
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
@ -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")
|
|
@ -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/*"
|