forked from minetest-mods/technic
Compare commits
7 Commits
fbc4cc8511
...
master
Author | SHA1 | Date | |
---|---|---|---|
88f42539bb | |||
b2a124dd83 | |||
34f2894321 | |||
fb4fef783b | |||
4a9ad94bf9 | |||
f3828c1943 | |||
0e10e8360d |
@ -13,14 +13,16 @@ The technic modpack depends on some other modpacks:
|
||||
signalling elements
|
||||
* pipeworks, which supports the automation of item transport
|
||||
* moreores, which provides some additional ore types
|
||||
* basic_materials, which provides some basic craft items
|
||||
|
||||
This manual doesn't explain how to use these other modpacks, which have
|
||||
their own manuals:
|
||||
|
||||
* [Minetest Game Documentation](https://wiki.minetest.net/Main_Page)
|
||||
* [Mesecons Documentation](http://mesecons.net/items.html)
|
||||
* [Pipeworks Documentation](https://github.com/minetest-mods/pipeworks/wiki)
|
||||
* [Pipeworks Documentation](https://gitlab.com/VanessaE/pipeworks/-/wikis/home)
|
||||
* [Moreores Forum Post](https://forum.minetest.net/viewtopic.php?t=549)
|
||||
* [Basic materials Repository](https://gitlab.com/VanessaE/basic_materials)
|
||||
|
||||
Recipes for constructable items in technic are generally not guessable,
|
||||
and are also not specifically documented here. You should use a
|
||||
|
@ -215,7 +215,7 @@ function technic.register_cable(tier, size)
|
||||
if i == 1 then
|
||||
def.on_place = function(itemstack, placer, pointed_thing)
|
||||
local pointed_thing_diff = vector.subtract(pointed_thing.above, pointed_thing.under)
|
||||
local num
|
||||
local num = 1
|
||||
local changed
|
||||
for k, v in pairs(pointed_thing_diff) do
|
||||
if v ~= 0 then
|
||||
@ -225,7 +225,7 @@ function technic.register_cable(tier, size)
|
||||
end
|
||||
end
|
||||
local crtl = placer:get_player_control()
|
||||
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) then
|
||||
if (crtl.aux1 or crtl.sneak) and not (crtl.aux1 and crtl.sneak) and changed then
|
||||
local fine_pointed = minetest.pointed_thing_to_face_pos(placer, pointed_thing)
|
||||
fine_pointed = vector.subtract(fine_pointed, pointed_thing.above)
|
||||
fine_pointed[changed] = nil
|
||||
|
@ -48,14 +48,17 @@ function technic.register_can(d)
|
||||
on_place = function(itemstack, user, pointed_thing)
|
||||
if pointed_thing.type ~= "node" then return end
|
||||
local pos = pointed_thing.under
|
||||
local def = minetest.registered_nodes[minetest.get_node(pos).name] or {}
|
||||
local node_name = minetest.get_node(pos).name
|
||||
local def = minetest.registered_nodes[node_name] or {}
|
||||
if def.on_rightclick and user and not user:get_player_control().sneak then
|
||||
return def.on_rightclick(pos, minetest.get_node(pos), user, itemstack, pointed_thing)
|
||||
end
|
||||
if not def.buildable_to then
|
||||
if not def.buildable_to or node_name == data.liquid_source_name then
|
||||
pos = pointed_thing.above
|
||||
def = minetest.registered_nodes[minetest.get_node(pos).name] or {}
|
||||
if not def.buildable_to then return end
|
||||
node_name = minetest.get_node(pos).name
|
||||
def = minetest.registered_nodes[node_name] or {}
|
||||
-- Try to place node above the pointed source, or abort.
|
||||
if not def.buildable_to or node_name == data.liquid_source_name then return end
|
||||
end
|
||||
local charge = get_can_level(itemstack)
|
||||
if charge == 0 then return end
|
||||
|
@ -18,9 +18,10 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:copper_locked_chest 1',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:copper_chest'},
|
||||
'basic_materials:padlock',
|
||||
'technic:copper_chest',
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -29,9 +29,10 @@ end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:gold_locked_chest',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:gold_chest'},
|
||||
'basic_materials:padlock',
|
||||
'technic:gold_chest',
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -25,9 +25,10 @@ minetest.register_craft({
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:iron_locked_chest 1',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:iron_chest'},
|
||||
'basic_materials:padlock',
|
||||
'technic:iron_chest',
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -20,9 +20,10 @@ end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:mithril_locked_chest 1',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:mithril_chest'},
|
||||
'basic_materials:padlock',
|
||||
'technic:mithril_chest',
|
||||
}
|
||||
})
|
||||
|
||||
|
@ -159,6 +159,16 @@ local function get_receive_fields(name, data)
|
||||
return function(pos, formname, fields, sender)
|
||||
local meta = minetest.get_meta(pos)
|
||||
local page = "main"
|
||||
|
||||
local owner = meta:get_string("owner")
|
||||
if owner ~= "" then
|
||||
-- prevent modification of locked chests
|
||||
if owner ~= sender:get_player_name() then return end
|
||||
elseif not fields.quit then
|
||||
-- prevent modification of protected chests
|
||||
if minetest.is_protected(pos, sender:get_player_name()) then return end
|
||||
end
|
||||
|
||||
if fields.sort or (data.autosort and fields.quit and meta:get_int("autosort") == 1) then
|
||||
sort_inventory(meta:get_inventory())
|
||||
end
|
||||
|
@ -20,9 +20,10 @@ end
|
||||
|
||||
minetest.register_craft({
|
||||
output = 'technic:silver_locked_chest',
|
||||
type = "shapeless",
|
||||
recipe = {
|
||||
{'basic_materials:padlock'},
|
||||
{'technic:silver_chest'},
|
||||
'basic_materials:padlock',
|
||||
'technic:silver_chest',
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user