from classes.Trashcan import * from classes.Household import * from classes.Garbagetruck import * from classes.Tilemap import * from classes.Tileset import * from QOLfunc import * import pygame def trashcanGenerator(mult) -> list: typelist = ["paper", "metals_and_plastics", "mixed", "bio_waste", "glass"] trash_cans = [ {'position': (1, 0), 'type': 'paper'}, {'position': (1, 1), 'type': 'metals_and_plastics'}, {'position': (1, 2), 'type': 'mixed'}, {'position': (1, 3), 'type': 'bio_waste'}, {'position': (1, 4), 'type': 'glass'}, ] trash_can_images = { 'paper': pygame.image.load('sprites/trash_can_papier.jpg').convert_alpha(), 'metals_and_plastics': pygame.image.load('sprites/trash_can_metale_plastik.jpg').convert_alpha(), 'mixed': pygame.image.load('sprites/trash_can_zmieszane.jpg').convert_alpha(), 'bio_waste': pygame.image.load('sprites/trash_can_bio.jpg').convert_alpha(), 'glass': pygame.image.load('sprites/trash_can_szklo.jpg').convert_alpha(), } trashcans = [] for key in trash_can_images: trash_can_images[key] = pygame.transform.scale(trash_can_images[key], (mult, mult)) for i in range(5): trashcan = generateTrashcan(mult, i, trash_can_images[typelist[i]], trash_cans[i]["position"], trash_cans[i]["type"]) trashcans.append(trashcan) return trashcans def householdGenerator(mult): new_house_size = (mult, mult) house_positions = [(15, 5), (17, 5), (19, 5), (21, 5), (15, 8), (17, 8), (19, 8), (21, 8)] houses = [] for i in range(8): house_image = pygame.image.load(f'sprites/domek.png') house_image = pygame.transform.scale(house_image, new_house_size) house = generateHousehold(mult, i, house_image, house_positions[i]) if i == 1: house.switchFinal() houses.append(house) return houses