Browse Source

軽量化

pull/38/head
みてるぞ 1 week ago
parent
commit
49d887b6cd
3 changed files with 3 additions and 5 deletions
  1. BIN
      assets/deerjika_relax_left.png
  2. +0
    -1
      common_module.py
  3. +3
    -4
      main.py

BIN
assets/deerjika_relax_left.png View File

Before After
Width: 47360  |  Height: 720  |  Size: 945 KiB Width: 17760  |  Height: 270  |  Size: 166 KiB

+ 0
- 1
common_module.py View File

@@ -42,4 +42,3 @@ class CommonModule:
trimmed_left: str = string[cls.index_by_f2c (string, start):] trimmed_left: str = string[cls.index_by_f2c (string, start):]


return trimmed_left[:cls.index_by_f2c (trimmed_left, length)] return trimmed_left[:cls.index_by_f2c (trimmed_left, length)]


+ 3
- 4
main.py View File

@@ -404,7 +404,7 @@ class Deerjika (Creature):
FPS = 30 FPS = 30


height: int height: int
scale: float = .375
scale: float = 1
surfaces: list[Surface] surfaces: list[Surface]
width: int width: int
talking: bool = False talking: bool = False
@@ -433,8 +433,8 @@ class Deerjika (Creature):
case DeerjikaPattern.RELAXED: case DeerjikaPattern.RELAXED:
match direction: match direction:
case Direction.LEFT: case Direction.LEFT:
self.width = 1280
self.height = 720
self.width = 480
self.height = 270
surface = pygame.image.load ('./assets/deerjika_relax_left.png') surface = pygame.image.load ('./assets/deerjika_relax_left.png')
self.surfaces = [] self.surfaces = []
for x in range (0, surface.get_width (), self.width): for x in range (0, surface.get_width (), self.width):
@@ -959,7 +959,6 @@ def add_query (
return return
DB.begin_transaction () DB.begin_transaction ()
chat.message = emoji.emojize (chat.message) chat.message = emoji.emojize (chat.message)
message: str = chat.message
user = (User.where ('platform', Platform.YOUTUBE.value) user = (User.where ('platform', Platform.YOUTUBE.value)
.where ('code', chat.author.channelId) .where ('code', chat.author.channelId)
.first ()) .first ())


Loading…
Cancel
Save