forked from randomdevpete/factorio-bad-chest
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathdata.lua
More file actions
23 lines (22 loc) · 624 Bytes
/
Copy pathdata.lua
File metadata and controls
23 lines (22 loc) · 624 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function copyPrototype(type, name, newName, change_results)
if not data.raw[type][name] then error("type "..type.." "..name.." doesn't exist") end
local p = table.deepcopy(data.raw[type][name])
p.name = newName
if p.minable and p.minable.result then
p.minable.result = newName
end
if change_results then
if p.place_result then
p.place_result = newName
end
if p.result then
p.result = newName
end
end
return p
end
require("prototypes.recipe-category")
require("prototypes.items")
require("prototypes.entities")
require("prototypes.recipes")
require("prototypes.technologies")