-
Notifications
You must be signed in to change notification settings - Fork 6
/
resources.py
32 lines (28 loc) · 1.05 KB
/
resources.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
import pickle
from collections import Counter
try:
with open("serverResources", "rb") as f:
serverResources = pickle.load(f)
except FileNotFoundError:
serverResources = {
"quela": {"Food": "-1068", "Wood": "449", "Gold": "-826", "Stone": "12"},
"bshammer": {"Food": "-1250", "Wood": "-1173", "Gold": "-850", "Stone": "1942"},
"probablybutter": {"Food": "295", "Wood": "-2024", "Gold": "-1006", "Stone": "-2044"},
"olaf_the_shrew": {"Food": "323", "Wood": "0", "Gold": "0", "Stone": "0"},
".harristotle": {"Food": "-2241", "Wood": "560", "Gold": "-986", "Stone": "-706"},
}
try:
with open("gizmoResources", "rb") as f:
gizmoResources = pickle.load(f)
except FileNotFoundError:
gizmoResources = Counter()
try:
with open("taoResources", "rb") as f:
taoResources = pickle.load(f)
except FileNotFoundError:
taoResources = Counter()
try:
with open("zookieResources", "rb") as f:
zookieResources = pickle.load(f)
except FileNotFoundError:
zookieResources = Counter()