forked from ColtonMcCasland/Raspipboy-3000
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
207 lines (179 loc) · 4.87 KB
/
Copy pathconfig.py
File metadata and controls
207 lines (179 loc) · 4.87 KB
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
import pygame
PLAYERNAME = "Markuspwn"
PLAYERLEVEL = 10
WIDTH = 480
HEIGHT = 320
minSwipe = 50
maxClick = 15
longPressTime = 200
touchScale = 1
invertPosition = False
GPIO_AVAILABLE = True
RADIO_PLAYING = True
QUICKLOAD = False
LOAD_CACHED_MAP = True
# Main
TINTCOLOUR = pygame.Color(26, 255, 128) # Green
# TINTCOLOUR = pygame.Color (46, 207, 255) # Blue
# TINTCOLOUR = pygame.Color (255, 182, 66) # Amber
# TINTCOLOUR = pygame.Color (192, 255, 255) # White
#MAP_FOCUS = (-5.9347681, 54.5889076)
#MAP_FOCUS = (-102.3016145, 21.8841274) #Old Default?
#MAP_FOCUS = (-118.5723894,34.3917171)#CodeNinjasValencia
#MAP_FOCUS = (32.7157, 117.1611)
MAP_FOCUS = (-92.1943197, 38.5653437)
WORLD_MAP_FOCUS = 0.07 #Needed to handle the 50k node limit from OSM
LOAD_CACHED_MAP = True
SOUND_ENABLED = True
EVENTS = {
'SONG_END': pygame.USEREVENT + 1
}
MODULES = {
0: "stats",
1: "items",
2: "data"
}
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",
pygame.K_PLUS: "zoom_in",
pygame.K_MINUS: "zoom_out",
pygame.K_KP_PLUS: "zoom_in",
pygame.K_KP_MINUS: "zoom_out"
}
# Using GPIO.BCM as mode
#GPIO 23 pin16 reboot
#GPIO 25 pin 22 blank screen do not use
GPIO_ACTIONS = {
4: "dial_down", #GPIO 23
17: "dial_up", #GPIO 24
22: "knob_down", #GPIO 4
27: "knob_up", #GPIO 17
}
# LEDs
# pin 18, 23, 24,
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['settlement'],
'cafe': MAP_ICONS['settlement'],
# '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['office'],
# 'bus_station': MAP_ICONS['misc'],
# 'parking': MAP_ICONS['misc'],
# 'fountain': MAP_ICONS['misc'],
# 'marketplace': MAP_ICONS['misc'],
# 'atm': MAP_ICONS['misc'],
'misc': MAP_ICONS['misc']
}
INVENTORY_OLD = [
"Ranger Sequoia",
"Anti-Materiel Rifle ",
"Deathclaw Gauntlet",
"Flamer",
"NCR dogtag",
".45-70 Gov't(20)",
".44 Magnum(20)",
"Pulse Grenade (2)"
]
WEAPONS = [
"10mm Pistol",
"Combat Knife",
"Fragmentation Grenade (2)",
"Laser Pistol",
"Plasma Mine (3)"
]
ARMOR = [
"Eyeglasses",
"Vault 111 Jumpsuit",
"Wedding Ring"
]
AID = [
"Purified Water (3)",
"Rad Away (2)",
"Stim Pack (2)"
]
MISC = [
"Pencil",
"Pre-War Money (250)",
"Super Glue",
"Toy Mini-Nuke"
]
AMMO = [
"10mm Rounds (15)",
"Fusion Cells (28)"
]
QUESTS = [
"Cosplacon",
"Cosplay Royale",
"Drink n Draw",
"Queens of Cosplay"
]
SKILLS = [
"Action Boy",
"Animal Friend",
"Awareness",
"Gunslinger"
"Hacker",
"Mysterious Stranger",
"Rifleman",
"Science"
]
PERKS = [
"Action Boy",
"Animal Friend",
"Awareness",
"Gunslinger"
"Hacker",
"Mysterious Stranger",
"Rifleman",
"Science"
]
pygame.font.init()
FONTS = {}
for x in range(10, 28):
FONTS[x] = pygame.font.Font('monofonto.ttf', x)
kernedFontName = 'fonts/monofonto-kerned.ttf'
monoFontName = 'fonts/monofonto.ttf'
# Scale font-sizes to chosen resolution:
FONT_SML = pygame.font.Font(kernedFontName, int (HEIGHT * (12.0 / 360)))
FONT_MED = pygame.font.Font(kernedFontName, int (HEIGHT * (16.0 / 360.0)))
FONT_LRG = pygame.font.Font(kernedFontName, int (HEIGHT * (18.0 / 360.0)))
MONOFONT = pygame.font.Font(monoFontName, int (HEIGHT * (16.0 / 360.0)))
# Find monofont's character-size:
tempImg = MONOFONT.render("X", True, TINTCOLOUR, (0, 0, 0))
charHeight = tempImg.get_height()
charWidth = tempImg.get_width()
del tempImg