added blueprints
This commit is contained in:
parent
9e7752b895
commit
254103106d
1
mods/blueprint/depends.txt
Normal file
1
mods/blueprint/depends.txt
Normal file
@ -0,0 +1 @@
|
||||
default
|
26
mods/blueprint/init.lua
Normal file
26
mods/blueprint/init.lua
Normal file
@ -0,0 +1,26 @@
|
||||
blueprint = {}
|
||||
blueprint.all = {}
|
||||
|
||||
function blueprint.register_blueprint(name, def)
|
||||
table.insert(def.materials, "blueprint:"..name)
|
||||
table.insert(blueprint.all, "blueprint:"..name)
|
||||
|
||||
minetest.register_craftitem(":blueprint:"..name, {
|
||||
description = "Blueprint : " .. def.description,
|
||||
inventory_image = "blueprint_blueprint.png",
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "shapeless",
|
||||
output = def.out,
|
||||
recipe = def.materials,
|
||||
replacements = {
|
||||
{"blueprint:"..name, "blueprint:"..name}
|
||||
}
|
||||
})
|
||||
end
|
||||
|
||||
minetest.register_craftitem("blueprint:empty", {
|
||||
description = "Empty Blueprint",
|
||||
inventory_image = "blueprint_empty.png",
|
||||
})
|
BIN
mods/blueprint/textures/blueprint_blueprint.png
Normal file
BIN
mods/blueprint/textures/blueprint_blueprint.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 260 B |
BIN
mods/blueprint/textures/blueprint_empty.png
Normal file
BIN
mods/blueprint/textures/blueprint_empty.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 B |
@ -1 +1,2 @@
|
||||
default
|
||||
blueprint
|
||||
|
@ -106,3 +106,17 @@ minetest.register_abm({
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
-- craft
|
||||
|
||||
blueprint.register_blueprint("pipe", {
|
||||
description = "Pipe",
|
||||
materials = {"furnace:iron_plate"},
|
||||
out = "pipe:pipe"
|
||||
})
|
||||
|
||||
blueprint.register_blueprint("pump", {
|
||||
description = "Pump",
|
||||
materials = {"furnace:iron_plate", "furnace:iron_plate", "furnace:iron_plate", "pipe:pipe"},
|
||||
out = "pipe:pump"
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user