2021-04-03 11:24:39 +02:00
|
|
|
#definicje
|
2021-03-21 12:40:13 +01:00
|
|
|
import os
|
|
|
|
import pygame
|
2021-04-02 19:46:23 +02:00
|
|
|
BLOCK_SIZE = 60
|
2021-04-24 20:43:09 +02:00
|
|
|
BEETROOTS_ADULT_COST = 4
|
|
|
|
BEETROOTS_GROW_COST = 10
|
2021-03-31 14:02:04 +02:00
|
|
|
BEETROOTS_GROW_TIME = 5
|
2021-04-02 16:30:11 +02:00
|
|
|
BEETROOTS_MAXIMUM_STATE = BEETROOTS_GROW_TIME * 3 + 1
|
|
|
|
BEETROOTS_STAGE_0 = pygame.image.load(os.path.join('resources', 'beetroots_stage_0.png'))
|
|
|
|
BEETROOTS_STAGE_0 = pygame.transform.scale(BEETROOTS_STAGE_0, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
BEETROOTS_STAGE_1 = pygame.image.load(os.path.join('resources', 'beetroots_stage_1.png'))
|
|
|
|
BEETROOTS_STAGE_1 = pygame.transform.scale(BEETROOTS_STAGE_1, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
BEETROOTS_STAGE_2 = pygame.image.load(os.path.join('resources', 'beetroots_stage_2.png'))
|
|
|
|
BEETROOTS_STAGE_2 = pygame.transform.scale(BEETROOTS_STAGE_2, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
BEETROOTS_STAGE_3 = pygame.image.load(os.path.join('resources', 'beetroots_stage_3.png'))
|
|
|
|
BEETROOTS_STAGE_3 = pygame.transform.scale(BEETROOTS_STAGE_3, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-24 20:43:09 +02:00
|
|
|
CARROTS_ADULT_COST = 4
|
|
|
|
CARROTS_GROW_COST = 10
|
2021-03-31 14:02:04 +02:00
|
|
|
CARROTS_GROW_TIME = 5
|
2021-04-02 16:30:11 +02:00
|
|
|
CARROTS_MAXIMUM_STATE = CARROTS_GROW_TIME * 3 + 1
|
|
|
|
CARROTS_STAGE_0 = pygame.image.load(os.path.join('resources', 'carrots_stage_0.png'))
|
|
|
|
CARROTS_STAGE_0 = pygame.transform.scale(CARROTS_STAGE_0, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
CARROTS_STAGE_1 = pygame.image.load(os.path.join('resources', 'carrots_stage_1.png'))
|
|
|
|
CARROTS_STAGE_1 = pygame.transform.scale(CARROTS_STAGE_1, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
CARROTS_STAGE_2 = pygame.image.load(os.path.join('resources', 'carrots_stage_2.png'))
|
|
|
|
CARROTS_STAGE_2 = pygame.transform.scale(CARROTS_STAGE_2, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
CARROTS_STAGE_3 = pygame.image.load(os.path.join('resources', 'carrots_stage_3.png'))
|
|
|
|
CARROTS_STAGE_3 = pygame.transform.scale(CARROTS_STAGE_3, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-03-21 14:10:08 +01:00
|
|
|
DIRT = pygame.image.load(os.path.join('resources', 'dirt.png'))
|
|
|
|
DIRT = pygame.transform.scale(DIRT, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-24 20:43:09 +02:00
|
|
|
DIRT_COST = 2
|
2021-04-02 19:46:23 +02:00
|
|
|
HEIGHT_AMOUNT, WIDTH_AMOUNT = 10, 10
|
|
|
|
HEIGHT, WIDTH = BLOCK_SIZE * HEIGHT_AMOUNT, BLOCK_SIZE * WIDTH_AMOUNT
|
2021-04-02 16:30:11 +02:00
|
|
|
FARMLAND_DRY = pygame.image.load(os.path.join('resources', 'farmland_dry.png'))
|
|
|
|
FARMLAND_DRY = pygame.transform.scale(FARMLAND_DRY, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-24 20:43:09 +02:00
|
|
|
FARMLAND_DRY_COST = 3
|
2021-04-02 16:30:11 +02:00
|
|
|
FARMLAND_WET = pygame.image.load(os.path.join('resources', 'farmland_wet.png'))
|
|
|
|
FARMLAND_WET = pygame.transform.scale(FARMLAND_WET, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-24 20:43:09 +02:00
|
|
|
FARMLAND_WET_COST = 1
|
2021-04-25 17:21:14 +02:00
|
|
|
FPS = 1
|
2021-04-24 20:43:09 +02:00
|
|
|
POTATOES_ADULT_COST = 4
|
|
|
|
POTATOES_GROW_COST = 10
|
2021-03-31 14:02:04 +02:00
|
|
|
POTATOES_GROW_TIME = 5
|
2021-04-02 16:30:11 +02:00
|
|
|
POTATOES_MAXIMUM_STATE = POTATOES_GROW_TIME * 3 + 1
|
|
|
|
POTATOES_STAGE_0 = pygame.image.load(os.path.join('resources', 'potatoes_stage_0.png'))
|
|
|
|
POTATOES_STAGE_0 = pygame.transform.scale(POTATOES_STAGE_0, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
POTATOES_STAGE_1 = pygame.image.load(os.path.join('resources', 'potatoes_stage_1.png'))
|
|
|
|
POTATOES_STAGE_1 = pygame.transform.scale(POTATOES_STAGE_1, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
POTATOES_STAGE_2 = pygame.image.load(os.path.join('resources', 'potatoes_stage_2.png'))
|
|
|
|
POTATOES_STAGE_2 = pygame.transform.scale(POTATOES_STAGE_2, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
POTATOES_STAGE_3 = pygame.image.load(os.path.join('resources', 'potatoes_stage_3.png'))
|
|
|
|
POTATOES_STAGE_3 = pygame.transform.scale(POTATOES_STAGE_3, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-03 00:16:53 +02:00
|
|
|
SPONGE = pygame.image.load(os.path.join('resources', 'sponge.png'))
|
|
|
|
SPONGE = pygame.transform.scale(SPONGE, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
STATION = pygame.image.load(os.path.join('resources', 'rail_normal.png'))
|
|
|
|
STATION = pygame.transform.scale(STATION, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-24 20:43:09 +02:00
|
|
|
STATION_COST = 5
|
2021-04-09 14:57:52 +02:00
|
|
|
TRACTOR_DIRECTION_EAST_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_east.png'))
|
|
|
|
TRACTOR_DIRECTION_EAST_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_EAST_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
TRACTOR_DIRECTION_NORTH_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_north.png'))
|
|
|
|
TRACTOR_DIRECTION_NORTH_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_NORTH_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
TRACTOR_DIRECTION_SOUTH_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_south.png'))
|
|
|
|
TRACTOR_DIRECTION_SOUTH_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_SOUTH_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
TRACTOR_DIRECTION_WEST_TEXTURE = pygame.image.load(os.path.join('resources', 'minecart_command_block_west.png'))
|
|
|
|
TRACTOR_DIRECTION_WEST_TEXTURE = pygame.transform.scale(TRACTOR_DIRECTION_WEST_TEXTURE, (BLOCK_SIZE, BLOCK_SIZE))
|
2021-04-09 14:38:25 +02:00
|
|
|
TRACTOR_DIRECTION_EAST = 2
|
|
|
|
TRACTOR_DIRECTION_NORTH = 1
|
|
|
|
TRACTOR_DIRECTION_SOUTH = 3
|
|
|
|
TRACTOR_DIRECTION_WEST = 4
|
2021-03-27 21:31:22 +01:00
|
|
|
TRACTOR_FERTILIZER = 2
|
2021-04-25 17:21:14 +02:00
|
|
|
TRACTOR_FUEL = 200
|
2021-03-31 12:56:29 +02:00
|
|
|
TRACTOR_AMOUNT_OF_SEEDS_EACH_TYPE = 20
|
|
|
|
TRACTOR_MAXIMUM_COLLECTED_PLANTS = 80
|
|
|
|
TRACTOR_WATER_LEVEL = 40
|
2021-04-24 20:43:09 +02:00
|
|
|
WHEAT_ADULT_COST = 4
|
|
|
|
WHEAT_GROW_COST = 10
|
2021-03-31 12:56:29 +02:00
|
|
|
WHEAT_GROW_TIME = 5
|
2021-04-02 16:30:11 +02:00
|
|
|
WHEAT_MAXIMUM_STATE = WHEAT_GROW_TIME * 7 + 1
|
|
|
|
WHEAT_STAGE_0 = pygame.image.load(os.path.join('resources', 'wheat_stage_0.png'))
|
|
|
|
WHEAT_STAGE_0 = pygame.transform.scale(WHEAT_STAGE_0, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_1 = pygame.image.load(os.path.join('resources', 'wheat_stage_1.png'))
|
|
|
|
WHEAT_STAGE_1 = pygame.transform.scale(WHEAT_STAGE_1, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_2 = pygame.image.load(os.path.join('resources', 'wheat_stage_2.png'))
|
|
|
|
WHEAT_STAGE_2 = pygame.transform.scale(WHEAT_STAGE_2, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_3 = pygame.image.load(os.path.join('resources', 'wheat_stage_3.png'))
|
|
|
|
WHEAT_STAGE_3 = pygame.transform.scale(WHEAT_STAGE_3, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_4 = pygame.image.load(os.path.join('resources', 'wheat_stage_4.png'))
|
|
|
|
WHEAT_STAGE_4 = pygame.transform.scale(WHEAT_STAGE_4, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_5 = pygame.image.load(os.path.join('resources', 'wheat_stage_5.png'))
|
|
|
|
WHEAT_STAGE_5 = pygame.transform.scale(WHEAT_STAGE_5, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_6 = pygame.image.load(os.path.join('resources', 'wheat_stage_6.png'))
|
|
|
|
WHEAT_STAGE_6 = pygame.transform.scale(WHEAT_STAGE_6, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WHEAT_STAGE_7 = pygame.image.load(os.path.join('resources', 'wheat_stage_7.png'))
|
2021-04-03 00:16:53 +02:00
|
|
|
WHEAT_STAGE_7 = pygame.transform.scale(WHEAT_STAGE_7, (BLOCK_SIZE, BLOCK_SIZE))
|
|
|
|
WINDOW = pygame.display.set_mode((WIDTH, HEIGHT))
|