-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathglobals.gd
257 lines (238 loc) · 4.32 KB
/
globals.gd
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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
extends Node
#cursor icons
var pointer = load("res://pics/mouse/pointer.png")
var hand = load("res://pics/mouse/hand.png")
var beam = load("res://pics/mouse/beam.png")
var crosshairs = load("res://pics/mouse/crosshairs.png")
var closedhand = load("res://pics/mouse/closedhand.png")
var openhand = load("res://pics/mouse/openhand.png")
var eraser = load("res://pics/mouse/eraser.png")
var point = load("res://pics/mouse/point.png")
var map_name
var puzzles_won = [] #TODO: load this from file for PC users
#TODO: make sure these values are taken from the JSON,
#(the variable here should only be used to CREATE the JSON)
const default_settings = {
"name": "My State",
"pointer" : null,
"parties" : {
"Reds" : {"voters": 10, "asset": "Red House", "color": "red"},
"Blues" : {"voters": 15, "asset": "Blue House", "color": "blue"}
},
"districts" : {
"A" : {
"max" : 5,
"min" : 5,
"color" : "blue",
"party" : ["Reds", "Blues"]
},
"B" : {
"max" : 5,
"min" : 5,
"color" : "red",
"party" : ["Blues", "Reds"]
},
"C" : {
"max" : 5,
"min" : 5,
"color" : "orange",
"party" : ["Reds", "Blues"]
},
"D" : {
"max" : 5,
"min" : 5,
"color" : "purple",
"party" : ["Blues", "Reds"]
},
"E" : {
"max" : 5,
"min" : 5,
"color" : "green",
"party" : ["Reds", "Blues"]
}
},
"advanced" : {
"District Rules" : {
"contiguous" : true,
"runtime contiguity enforcement" : false,
"diagonals" : false,
"show grid": false,
"multiplayer" : false
},
"House Placement" : {
"gaps": true,
"randomize positions" : false,
"layout": ["random", "user placed"],
"algorithm" : ["spiral", "fill", "load from file"]
},
"Other" : {
"debug" : false
}
},
"shape": "Rectagonia",
"colors" : {
"blue" : [0.25,0.25,1],
"red" : [0.8,0.1,0.1],
"orange" : [0.8,0.4,0.1],
"purple" : [0.5,0.2,0.8],
"yellow" : [0.8,0.8,0.0],
"brown" : [0.3,0.2,0.0],
"green" : [0.2,0.8,0.1],
"white" : [.9,.9,.9],
"gray" : [0.5,0.5,0.5],
"teal" : [0.1,0.8,0.8],
"pink" : [0.8,0.1,0.7],
"black" : [.1,.1,.1]
},
"assets" : {
"Red House" : 0,
"Blue House" : 1,
"Orange House" : 2,
"Purple House" : 3,
"Yellow House" : 4,
"Green House" : 5,
"Weird House" : 6,
"Red House Medium" : 7,
"Blue House Medium" : 8,
"Orange House Medium" : 9,
"Purple House Medium" : 10,
"Yellow House Medium" : 11,
"Green House Medium" : 12,
"Weird House Medium" : 13,
"Red House Apartments" : 14,
"Blue House Apartments" : 15,
"Orange House Apartments" : 16,
"Purple House Apartments" : 17,
"Yellow House Apartments" : 18,
"Green House Apartments" : 19,
"Weird House Apartments" : 20
}
}
var house_placement_layout = 0
var house_placement_algorithm = 0
#these are not taken from a json
var default_names = {
"prefixes": [
"blip",
"bloop",
"blob",
"glip",
"gloop",
"glob",
"bob",
"lol",
"lib",
"con",
"wang",
"flip",
"floop",
"flop",
"flim",
"flam",
"fash",
"bip",
"boop",
"bop",
"cat",
"dog",
"zoop",
"zip",
"nerp",
"nom",
"flimb",
"beat",
"mod",
"nic",
"pub",
"bubl",
"blubl",
"blub",
"nub",
"nubl",
"fluffl",
"fluff",
"puff",
"puffl",
"huff",
"huffl",
"fizzl",
"publ",
"republ",
"dem",
"commun",
"anarch",
"conserv",
"preserv",
"reserv",
"lib",
"nation",
"contrar",
"ludd",
"ilum",
"fed",
"soc"
],
"suffixes": [
"icans",
"ocrats",
"ists",
"atives",
"erals",
"eralists",
"itarians",
"ialists",
"alists",
"ians",
"inati",
"ites",
"als",
"ards",
"s"
],
"affixes": [
"anarcho",
"paleo",
"neo",
"proto",
"crypto"
]
}
var current_settings = {}
var current_vertices = {}
func word2color(word):
if word:
return arr2color(default_settings["colors"][word])
func arr2color(arr):
return Color(arr[0],arr[1],arr[2])
var user_experience_settings = {
"Audio": {
"Music": 0.7,
"Sound": 0.7
},
"Video": {
"Orientation": [
"sensor",
"portrait",
"landscape"
],
"Resolution": [
"1920x1080"
]
}
}
var map_progress = {
"Tutoria": {
"lvl1" : false,
"lvl2" : false,
"lvl3" : false,
"completed" : false
}
}
var chamber_of_legislation = {
}
var current_map = {
"name" : "",
"scene": ""
}
var current_terrain = {
}