forked from grieve/pypboy
-
Notifications
You must be signed in to change notification settings - Fork 54
/
config.py
86 lines (76 loc) · 2.39 KB
/
config.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
import pygame
WIDTH = 320
HEIGHT = 240
# OUTPUT_WIDTH = 320
# OUTPUT_HEIGHT = 240
#MAP_FOCUS = (-5.9347681, 54.5889076)
MAP_FOCUS = (-102.3016145, 21.8841274)
EVENTS = {
'SONG_END': pygame.USEREVENT + 1
}
ACTIONS = {
pygame.K_F1: "module_stats",
pygame.K_F2: "module_items",
pygame.K_F3: "module_data",
pygame.K_1: "knob_1",
pygame.K_2: "knob_2",
pygame.K_3: "knob_3",
pygame.K_4: "knob_4",
pygame.K_5: "knob_5",
pygame.K_UP: "dial_up",
pygame.K_DOWN: "dial_down"
}
# Using GPIO.BCM as mode
GPIO_ACTIONS = {
4: "module_stats", #GPIO 4
14: "module_items", #GPIO 14
15: "module_data", #GPIO 15
17: "knob_1", #GPIO 17
18: "knob_2", #GPIO 18
7: "knob_3", #GPIO 7
22: "knob_4", #GPIO 22
23: "knob_5", #GPIO 27
# 31: "dial_up", #GPIO 23
27: "dial_down" #GPIO 7
}
MAP_ICONS = {
"camp": pygame.image.load('images/map_icons/camp.png'),
"factory": pygame.image.load('images/map_icons/factory.png'),
"metro": pygame.image.load('images/map_icons/metro.png'),
"misc": pygame.image.load('images/map_icons/misc.png'),
"monument": pygame.image.load('images/map_icons/monument.png'),
"vault": pygame.image.load('images/map_icons/vault.png'),
"settlement": pygame.image.load('images/map_icons/settlement.png'),
"ruin": pygame.image.load('images/map_icons/ruin.png'),
"cave": pygame.image.load('images/map_icons/cave.png'),
"landmark": pygame.image.load('images/map_icons/landmark.png'),
"city": pygame.image.load('images/map_icons/city.png'),
"office": pygame.image.load('images/map_icons/office.png'),
"sewer": pygame.image.load('images/map_icons/sewer.png'),
}
AMENITIES = {
'pub': MAP_ICONS['vault'],
'nightclub': MAP_ICONS['vault'],
'bar': MAP_ICONS['vault'],
'fast_food': MAP_ICONS['sewer'],
'cafe': MAP_ICONS['sewer'],
'drinking_water': MAP_ICONS['sewer'],
'restaurant': MAP_ICONS['settlement'],
'cinema': MAP_ICONS['office'],
'pharmacy': MAP_ICONS['office'],
'school': MAP_ICONS['office'],
'bank': MAP_ICONS['monument'],
'townhall': MAP_ICONS['monument'],
'bicycle_parking': MAP_ICONS['misc'],
'place_of_worship': MAP_ICONS['misc'],
'theatre': MAP_ICONS['misc'],
'bus_station': MAP_ICONS['misc'],
'parking': MAP_ICONS['misc'],
'fountain': MAP_ICONS['misc'],
'marketplace': MAP_ICONS['misc'],
'atm': MAP_ICONS['misc'],
}
pygame.font.init()
FONTS = {}
for x in range(10, 28):
FONTS[x] = pygame.font.Font('monofonto.ttf', x)