Skip to content

Commit 46c28aa

Browse files
committed
Merge dev fixes
1 parent 02dd011 commit 46c28aa

7 files changed

Lines changed: 16 additions & 13 deletions

File tree

scripts/cat/sprites.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import ujson
77

88
from scripts.game_structure import constants
9+
from scripts.game_structure.game_essentials import game
910
from scripts.game_structure.game.settings import game_setting_get
1011
from scripts.special_dates import SpecialDate, is_today
1112

scripts/game_structure/game_essentials.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import pygame
44
import ujson
5+
from os import walk
56

67
from scripts.event_class import Single_Event
78
from scripts.game_structure import constants
@@ -85,7 +86,7 @@ class Game:
8586
cat_class = None
8687
prey_config = {}
8788

88-
species_list = {}
89+
species = {}
8990
sprite_folders = set()
9091

9192
rpc = None
@@ -103,6 +104,14 @@ def __init__(self, current_screen="start screen"):
103104
with open(f"resources/prey_config.json", "r", encoding="utf-8") as read_file:
104105
self.prey_config = ujson.loads(read_file.read())
105106

107+
with open(f"resources/species.json", 'r') as read_file:
108+
self.species = ujson.loads(read_file.read())
109+
110+
# count amount of folders excluding faded and dicts folder
111+
for x in(next(walk('sprites'))[1]):
112+
if not x in ['faded', 'dicts']:
113+
self.sprite_folders.add(x)
114+
106115
@property
107116
def config(self):
108117
"""DEPRECATED: use constants.CONFIG instead"""
@@ -139,14 +148,6 @@ def settings(self):
139148
"game.settings has been deprecated, use get_game_setting() and set_game_setting() or helpers instead. Unrecoverable."
140149
)
141150

142-
with open(f"resources/species.json", 'r') as read_file:
143-
self.species = ujson.loads(read_file.read())
144-
145-
# count amount of folders excluding faded and dicts folder
146-
for x in(next(os.walk('sprites'))[1]):
147-
if not x in ['faded', 'dicts']:
148-
self.sprite_folders.add(x)
149-
150151
def update_game(self):
151152
if self.current_screen != switch_get_value(Switch.cur_screen):
152153
self.current_screen = switch_get_value(Switch.cur_screen)

scripts/housekeeping/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
logger = logging.getLogger(__name__)
1111

1212
VERSION_NAME = "unknown"
13-
SPS_VERSION = "1.1.4dev"
13+
SPS_VERSION = "1.1.5dev"
1414
# This is saved in the Clan save-file, and is used for save-file converstion.
1515
SAVE_VERSION_NUMBER = 3
1616

scripts/screens/ChooseMateScreen.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from scripts.cat.cats import Cat
88
from scripts.game_structure import image_cache
9+
from scripts.game_structure.game_essentials import game
910
from scripts.game_structure.ui_elements import (
1011
UIImageButton,
1112
UISpriteButton,

scripts/utility.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2952,17 +2952,17 @@ def generate_sprite(
29522952
if accessory in getattr(Pelt, category):
29532953
if accessory in cat.pelt.plant_accessories:
29542954
new_sprite.blit(
2955-
sprites.sprites["acc_herbs" + accessory + cat_sprite],
2955+
sprites.sprites["acc_herbs" + f'{n}_' + accessory + cat_sprite],
29562956
(0, 0),
29572957
)
29582958
elif accessory in cat.pelt.wild_accessories:
29592959
new_sprite.blit(
2960-
sprites.sprites["acc_wild" + accessory + cat_sprite],
2960+
sprites.sprites["acc_wild" + f'{n}_' + accessory + cat_sprite],
29612961
(0, 0),
29622962
)
29632963
elif accessory in cat.pelt.collars:
29642964
new_sprite.blit(
2965-
sprites.sprites["collars" + accessory + cat_sprite],
2965+
sprites.sprites["collars" + f'{n}_' + accessory + cat_sprite],
29662966
(0, 0),
29672967
)
29682968

sprites/2/medcatherbs.png

13.8 KB
Loading

sprites/2/wild.png

-2.59 KB
Loading

0 commit comments

Comments
 (0)