-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathconfig.lua
More file actions
81 lines (71 loc) · 1.45 KB
/
config.lua
File metadata and controls
81 lines (71 loc) · 1.45 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
local config = {}
config.mouse_click = hash("touch")
config.seed = 0
config.rseed = 0
config.rpixel = 100
config.rrot = 0
config.rlight = {x = 0, y = 0}
config.msg = {
load_planet = hash("load_planet"),
set_planet_light = hash("set_planet_light"),
set_planet_seed = hash("set_planet_seed"),
set_planet_pixel = hash("set_planet_pixel"),
set_planet_rotation = hash("set_planet_rotation")
}
config.main_url = msg.url()
config.target_script = hash("/scripts")
config.current_planet = 1
config.planets = {
[1] = {
name = "TERRAN WET",
nodes = {}
},
[2] = {
name = "TERRAN DRY",
nodes = {}
},
[3] = {
name = "ISLAND",
nodes = {}
},
[4] = {
name = "NO ATMOSPHERE",
nodes = {}
},
[5] = {
name = "GAS GIANT 1",
nodes = {}
},
[6] = {
name = "GAS GIANT 2",
nodes = {}
},
[7] = {
name = "ICE WORLD",
nodes = {}
},
[8] = {
name = "LAVA WORLD",
nodes = {}
},
[9] = {
name = "ASTEROID",
nodes = {}
},
[10] = {
name = "STAR",
nodes = {}
}
}
function config.set_seed(s)
config.seed = s
config.rseed = s % 1000 / 100.0
end
function config.set_light(_x, _y)
config.rlight.x = (_x / 360)
config.rlight.y = 1.0 - (_y / 360)
end
config.round = function(n)
return n >= 0.0 and n - n % -1 or n - n % 1
end
return config