mirror of
https://github.com/minetest-mods/technic.git
synced 2024-11-15 23:10:41 +01:00
add mesecons interface for the quarry
This commit is contained in:
parent
529d09d98e
commit
c41722bf9c
13
manual.md
13
manual.md
|
@ -1125,16 +1125,7 @@ capture the output without sorting, but is liable to overflow.
|
|||
|
||||
If the quarry encounters something that cannot be dug, such as a liquid,
|
||||
a locked chest, or a protected area, it will skip past that and attempt
|
||||
to continue digging. However, anything remaining in the quarry area
|
||||
after the machine has attempted to dig there will prevent the machine
|
||||
from digging anything directly below it, all the way to the bottom
|
||||
of the quarry. An undiggable block therefore casts a shadow of undug
|
||||
blocks below it. If liquid is encountered, it is quite likely to flow
|
||||
across the entire cross section of the quarry, preventing all digging.
|
||||
The depth at which the quarry is currently attempting to dig is reported
|
||||
in its interaction form, and can be manually reset to the top of the
|
||||
quarry, which is useful to do if an undiggable obstruction has been
|
||||
manually removed.
|
||||
to continue digging.
|
||||
|
||||
The quarry consumes 10 kEU per block dug, which is quite a lot of energy.
|
||||
With most of what is dug being mere stone, it is usually not economically
|
||||
|
@ -1151,6 +1142,8 @@ world anchor is used the digging can be speeded up by placing multiple
|
|||
quarry machines with overlapping digging areas. Four can be placed to
|
||||
dig identical areas, one on each side of the square cross section.
|
||||
|
||||
The quarry can be toggled on and off with a mesecons signal.
|
||||
|
||||
### forcefield emitter ###
|
||||
|
||||
The forcefield emitter is an HV powered machine that generates a
|
||||
|
|
|
@ -17,7 +17,7 @@ local quarry_formspec =
|
|||
"listring[current_player;main]"..
|
||||
"label[0,0;"..machine_name.."]"..
|
||||
"button[5,1.9;2,1;restart;"..S("Restart").."]"
|
||||
|
||||
|
||||
-- hard-coded spiral dig pattern for up to 17x17 dig area
|
||||
local quarry_dig_pattern = {
|
||||
0,1,2,2,3,3,0,0,0,1,1,1,2,2,2,2,3,3,3,3,0,0,0,0,0,1,1,1,1,1,2,2,
|
||||
|
@ -290,7 +290,21 @@ minetest.register_node("technic:quarry", {
|
|||
end,
|
||||
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
return minetest.is_protected(pos, player:get_player_name()) and 0 or stack:get_count()
|
||||
end
|
||||
end,
|
||||
mesecons = {
|
||||
effector = {
|
||||
action_on = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_int("enabled", 1)
|
||||
set_quarry_status(pos)
|
||||
end,
|
||||
action_off = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_int("enabled", 0)
|
||||
set_quarry_status(pos)
|
||||
end
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
Loading…
Reference in New Issue
Block a user