-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdata.lua
More file actions
179 lines (167 loc) · 4.4 KB
/
data.lua
File metadata and controls
179 lines (167 loc) · 4.4 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
local lab = data.raw["lab"]["lab"]
local labomatic = table.deepcopy(lab)
local ratio
local hd
if settings.startup["labomatic-hd"].value then
ratio = 4
hd = "_x4"
else
ratio = 1
hd = ""
end
labomatic.name = "labomatic"
labomatic.minable.result = "labomatic"
labomatic.module_slots = 4
labomatic.max_health = 300
labomatic.researching_speed = 2
labomatic.energy_usage = "250kW"
labomatic.icon_size = 64 * ratio
labomatic.icon = "__LabOMatic__/graphics/lab_albedo_icon" .. hd .. ".png"
labomatic.light = { intensity = 1.2, size = 10, color = { r = 255, g = 255, b = 255 } }
local function add_one_tile(a)
a[1][1] = a[1][1] - 0.5
a[1][2] = a[1][2] - 0.5
a[2][1] = a[2][1] + 0.5
a[2][2] = a[2][2] + 0.5
end
add_one_tile(labomatic.collision_box)
add_one_tile(labomatic.selection_box)
labomatic.on_animation =
{
layers =
{
{
filename = "__LabOMatic__/graphics/lab_albedo_anim" .. hd .. ".png",
width = 150 * ratio,
height = 150 * ratio,
frame_count = 29,
line_length = 10,
animation_speed = 1 / 3,
shift = { 0, -0.05 },
scale = 0.853 / ratio,
},
{
filename = "__LabOMatic__/graphics/lab_light_anim" .. hd .. ".png",
width = 150 * ratio,
height = 150 * ratio,
frame_count = 29,
line_length = 10,
animation_speed = 1 / 3,
shift = { 0, -0.05 },
scale = 0.853 / ratio,
blend_mode = "additive-soft",
},
{
filename = "__LabOMatic__/graphics/lab_shadow" .. hd .. ".png",
width = 240 * ratio,
height = 240 * ratio,
frame_count = 1,
line_length = 1,
repeat_count = 29,
animation_speed = 1,
shift = { 0, -0.20 },
scale = 1 / ratio,
draw_as_shadow = true,
},
{
filename = "__LabOMatic__/graphics/lab_albedo_ao" .. hd .. ".png",
width = 220 * ratio,
height = 220 * ratio,
frame_count = 1,
repeat_count = 29,
animation_speed = 1 / 3,
shift = { 0, -0.05 },
scale = 0.66 / ratio,
}
}
}
labomatic.off_animation =
{
layers =
{
{
filename = "__LabOMatic__/graphics/lab_albedo" .. hd .. ".png",
width = 150 * ratio,
height = 150 * ratio,
frame_count = 1,
shift = { 0, -0.05 },
scale = 0.853 / ratio,
},
{
filename = "__LabOMatic__/graphics/lab_shadow" .. hd .. ".png",
width = 240 * ratio,
height = 240 * ratio,
frame_count = 1,
repeat_count = 1,
shift = { 0, -0.20 },
scale = 1 / ratio,
draw_as_shadow = true,
},
{
filename = "__LabOMatic__/graphics/lab_albedo_ao" .. hd .. ".png",
width = 220 * ratio,
height = 220 * ratio,
frame_count = 1,
repeat_count = 1,
animation_speed = 1 / 3,
shift = { 0, -0.05 },
scale = 0.66 / ratio,
}
}
}
labomatic.working_sound.sound.filename = "__LabOMatic__/labomatic.ogg"
local labomatic_item = table.deepcopy(data.raw["item"]["lab"])
labomatic_item.place_result = "labomatic"
labomatic_item.name = "labomatic"
labomatic_item.icon_size = 64 * ratio
labomatic_item.icon = "__LabOMatic__/graphics/lab_albedo_icon" .. hd .. ".png"
labomatic_item.place_result = "labomatic"
data:extend({ labomatic, labomatic_item })
data:extend({
{
type = "recipe",
name = "labomatic",
icon = "__LabOMatic__/graphics/lab_albedo_icon" .. hd .. ".png",
icon_size = 64 * ratio,
enabled = false,
ingredients = {
{ type = "item", name = "advanced-circuit", amount = 10 },
{ type = "item", name = "steel-plate", amount = 10 },
{ type = "item", name = "electric-engine-unit", amount = 10 },
{ type = "item", name = "low-density-structure", amount = 10 },
},
results = {
{ type = "item", name = "labomatic", amount = 1 },
},
energy_required = 8,
},
})
data:extend({
{
type = "technology",
name = "labomatic",
icon = "__LabOMatic__/graphics/lab_albedo_icon" .. hd .. ".png",
icon_size = 64 * ratio,
prerequisites = {
"production-science-pack",
"low-density-structure",
"electric-engine"
},
effects = {
{
type = "unlock-recipe",
recipe = "labomatic",
},
},
unit = {
count = 400,
ingredients = {
{ "automation-science-pack", 1 },
{ "logistic-science-pack", 1 },
{ "chemical-science-pack", 1 },
{ "production-science-pack", 1 },
},
time = 60,
},
}
})