mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-25 16:43:50 +01:00
V2.02, Logic Not added, output reduction on Harvester, Fermenter, and Gravel Sieve
This commit is contained in:
parent
1af6d380d3
commit
b457f3011f
@ -1,4 +1,4 @@
|
|||||||
# TechPack V2.01
|
# TechPack V2.02
|
||||||
|
|
||||||
TechPack, a Mining, Crafting, & Farming Modpack for Minetest.
|
TechPack, a Mining, Crafting, & Farming Modpack for Minetest.
|
||||||
|
|
||||||
@ -43,6 +43,7 @@ TechPack provides:
|
|||||||
- two Sequencer nodes for a waiting time controlled sending of commands (on/off)
|
- two Sequencer nodes for a waiting time controlled sending of commands (on/off)
|
||||||
- an item Detector node sending commands (on/off)
|
- an item Detector node sending commands (on/off)
|
||||||
- a Repeater node to distribute received commands to connected nodes
|
- a Repeater node to distribute received commands to connected nodes
|
||||||
|
- a Logic Not node to invert on/off commands
|
||||||
- Gate/Door nodes in different textures to be controlled via on/off commands
|
- Gate/Door nodes in different textures to be controlled via on/off commands
|
||||||
- an Access Lock node with number key field
|
- an Access Lock node with number key field
|
||||||
- a Mesecon Converter node to translate tubelib commands in mesecon commands and vice versa
|
- a Mesecon Converter node to translate tubelib commands in mesecon commands and vice versa
|
||||||
@ -145,6 +146,7 @@ tubelib_addons1 optional: unified_inventory
|
|||||||
- 2018-12-29 V2.00 * beta
|
- 2018-12-29 V2.00 * beta
|
||||||
- 2019-01-12 V2.00 * release
|
- 2019-01-12 V2.00 * release
|
||||||
- 2019-01-27 V2.01 * SaferLua Controller Terminal added
|
- 2019-01-27 V2.01 * SaferLua Controller Terminal added
|
||||||
|
- 2019-01-28 V2.02 * Logic Not added, output reduction on Harvester, Fermenter, and Gravel Sieve
|
||||||
|
|
||||||
|
|
||||||
## New in v2 (from players point of view)
|
## New in v2 (from players point of view)
|
||||||
|
@ -2,4 +2,4 @@
|
|||||||
# 1.0 is according to the mapgen generator
|
# 1.0 is according to the mapgen generator
|
||||||
# 2.0 means half as many ores as result
|
# 2.0 means half as many ores as result
|
||||||
# 0.5 means twice as many ores as result
|
# 0.5 means twice as many ores as result
|
||||||
gravelsieve_ore_rarity (Rarity factor to find ores) float 1
|
gravelsieve_ore_rarity (Rarity factor to find ores) float 1.5
|
@ -2,6 +2,23 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## V2.02 (2019-01-28)
|
||||||
|
|
||||||
|
### Additions
|
||||||
|
- Tubelib_addons2 "Logic Not" added
|
||||||
|
- second (classical) SaferLua Terminal added
|
||||||
|
|
||||||
|
### Removals
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Output reduction on Harvester (cycle time from 4 to 6 s),
|
||||||
|
Fermenter (from 2 to 3 input items needed per bio gas),
|
||||||
|
and Gravel Sieve (rarity from 1 to 1.5)
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- removing the Gate block returns the original block
|
||||||
|
|
||||||
|
|
||||||
## V2.01 (2019-01-27)
|
## V2.01 (2019-01-27)
|
||||||
|
|
||||||
### Additions
|
### Additions
|
||||||
|
@ -24,6 +24,8 @@ Local commands:
|
|||||||
- help = this message
|
- help = this message
|
||||||
- pub = switch to public use
|
- pub = switch to public use
|
||||||
- priv = switch to private use
|
- priv = switch to private use
|
||||||
|
Test commands:
|
||||||
|
- send <num> on/off = send on/off event
|
||||||
]]
|
]]
|
||||||
|
|
||||||
local function formspec1()
|
local function formspec1()
|
||||||
@ -80,36 +82,30 @@ local function command(pos, cmnd, player)
|
|||||||
output(pos, player..":$ "..cmnd)
|
output(pos, player..":$ "..cmnd)
|
||||||
output(pos, "Switched to private use!")
|
output(pos, "Switched to private use!")
|
||||||
elseif meta:get_int("public") == 1 or owner == player then
|
elseif meta:get_int("public") == 1 or owner == player then
|
||||||
|
local num, topic = cmnd:match('^send%s+([0-9]+)%s+([onff]+)$')
|
||||||
|
if num and topic then
|
||||||
|
local own_number = meta:get_string("own_number")
|
||||||
|
output(pos, player..":$ send "..num.." "..topic)
|
||||||
|
tubelib.send_message(num, owner, nil, topic, own_number)
|
||||||
|
else
|
||||||
local number = meta:get_string("number") or "0000"
|
local number = meta:get_string("number") or "0000"
|
||||||
output(pos, player..":$ "..cmnd)
|
output(pos, player..":$ "..cmnd)
|
||||||
tubelib.send_message(number, owner, nil, "term", cmnd)
|
tubelib.send_message(number, owner, nil, "term", cmnd)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_node("sl_controller:terminal", {
|
local function register_terminal(num, tiles, node_box, selection_box)
|
||||||
|
minetest.register_node("sl_controller:terminal"..num, {
|
||||||
description = "SaferLua Controller Terminal",
|
description = "SaferLua Controller Terminal",
|
||||||
tiles = {
|
tiles = tiles,
|
||||||
-- up, down, right, left, back, front
|
|
||||||
'sl_controller_terminal_top.png',
|
|
||||||
'sl_controller_terminal_bottom.png',
|
|
||||||
'sl_controller_terminal_side.png',
|
|
||||||
'sl_controller_terminal_side.png',
|
|
||||||
'sl_controller_terminal_bottom.png',
|
|
||||||
"sl_controller_terminal_front.png",
|
|
||||||
},
|
|
||||||
|
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
node_box = {
|
node_box = node_box,
|
||||||
type = "fixed",
|
selection_box = selection_box,
|
||||||
fixed = {
|
|
||||||
{-12/32, -16/32, -8/32, 12/32, -14/32, 12/32},
|
|
||||||
{-12/32, -14/32, 12/32, 12/32, 6/32, 14/32},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
after_place_node = function(pos, placer)
|
after_place_node = function(pos, placer)
|
||||||
local number = tubelib.add_node(pos, "sl_controller:terminal")
|
local number = tubelib.add_node(pos, minetest.get_node(pos).name)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
meta:set_string("own_number", number)
|
meta:set_string("own_number", number)
|
||||||
meta:set_string("formspec", formspec1())
|
meta:set_string("formspec", formspec1())
|
||||||
@ -141,8 +137,25 @@ minetest.register_node("sl_controller:terminal", {
|
|||||||
groups = {choppy=2, cracky=2, crumbly=2},
|
groups = {choppy=2, cracky=2, crumbly=2},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
sounds = default.node_sound_metal_defaults(),
|
sounds = default.node_sound_metal_defaults(),
|
||||||
})
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
register_terminal("", {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
'sl_controller_terminal_top.png',
|
||||||
|
'sl_controller_terminal_bottom.png',
|
||||||
|
'sl_controller_terminal_side.png',
|
||||||
|
'sl_controller_terminal_side.png',
|
||||||
|
'sl_controller_terminal_bottom.png',
|
||||||
|
"sl_controller_terminal_front.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-12/32, -16/32, -8/32, 12/32, -14/32, 12/32},
|
||||||
|
{-12/32, -14/32, 12/32, 12/32, 6/32, 14/32},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
minetest.register_craft({
|
||||||
output = "sl_controller:terminal",
|
output = "sl_controller:terminal",
|
||||||
@ -153,7 +166,44 @@ minetest.register_craft({
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
tubelib.register_node("sl_controller:terminal", {}, {
|
register_terminal("2", {
|
||||||
|
-- up, down, right, left, back, front
|
||||||
|
'sl_controller_terminal2_top.png',
|
||||||
|
'sl_controller_terminal2_side.png',
|
||||||
|
'sl_controller_terminal2_side.png^[transformFX',
|
||||||
|
'sl_controller_terminal2_side.png',
|
||||||
|
'sl_controller_terminal2_back.png',
|
||||||
|
"sl_controller_terminal2_front.png",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-12/32, -16/32, -16/32, 12/32, -14/32, 16/32},
|
||||||
|
{-12/32, -14/32, -3/32, 12/32, 6/32, 16/32},
|
||||||
|
{-10/32, -12/32, 14/32, 10/32, 4/32, 18/32},
|
||||||
|
{-12/32, 4/32, -4/32, 12/32, 6/32, 16/32},
|
||||||
|
{-12/32, -16/32, -4/32, -10/32, 6/32, 16/32},
|
||||||
|
{ 10/32, -16/32, -4/32, 12/32, 6/32, 16/32},
|
||||||
|
{-12/32, -14/32, -4/32, 12/32, -12/32, 16/32},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {
|
||||||
|
{-12/32, -16/32, -4/32, 12/32, 6/32, 16/32},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "sl_controller:terminal2",
|
||||||
|
recipe = {
|
||||||
|
{"", "smartline:display", ""},
|
||||||
|
{"", "", ""},
|
||||||
|
{"dye:grey", "tubelib:wlanchip", "default:copper_ingot"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
tubelib.register_node("sl_controller:terminal", {"sl_controller:terminal2", "sl_controller:terminal3"}, {
|
||||||
on_recv_message = function(pos, topic, payload)
|
on_recv_message = function(pos, topic, payload)
|
||||||
if topic == "term" then
|
if topic == "term" then
|
||||||
output(pos, payload)
|
output(pos, payload)
|
||||||
|
BIN
sl_controller/textures/sl_controller_terminal2_back.png
Normal file
BIN
sl_controller/textures/sl_controller_terminal2_back.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 206 B |
BIN
sl_controller/textures/sl_controller_terminal2_front.png
Normal file
BIN
sl_controller/textures/sl_controller_terminal2_front.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 646 B |
BIN
sl_controller/textures/sl_controller_terminal2_side.png
Normal file
BIN
sl_controller/textures/sl_controller_terminal2_side.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 197 B |
BIN
sl_controller/textures/sl_controller_terminal2_top.png
Normal file
BIN
sl_controller/textures/sl_controller_terminal2_top.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 371 B |
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
fermenter.lua
|
fermenter.lua
|
||||||
|
|
||||||
The Fermenter converts 2 leave items of any kind into one Bio Gas item,
|
The Fermenter converts 3 leave items of any kind into one Bio Gas item,
|
||||||
needed by the Reformer to produce Bio Fuel.
|
needed by the Reformer to produce Bio Fuel.
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
@ -23,6 +23,7 @@ local M = minetest.get_meta
|
|||||||
local STANDBY_TICKS = 4
|
local STANDBY_TICKS = 4
|
||||||
local COUNTDOWN_TICKS = 4
|
local COUNTDOWN_TICKS = 4
|
||||||
local CYCLE_TIME = 2
|
local CYCLE_TIME = 2
|
||||||
|
local NUM_LEAVES = 3 -- to produce on bio gas
|
||||||
|
|
||||||
local function formspec(self, pos, meta)
|
local function formspec(self, pos, meta)
|
||||||
return "size[8,8]"..
|
return "size[8,8]"..
|
||||||
@ -113,10 +114,10 @@ local function convert_leaves_to_biogas(pos, meta)
|
|||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
-- take 2 items
|
-- take NUM_LEAVES items
|
||||||
local items = {}
|
local items = {}
|
||||||
local fault = false
|
local fault = false
|
||||||
for i = 1, 2 do
|
for i = 1, NUM_LEAVES do
|
||||||
items[i] = tubelib.get_num_items(meta, "src", 1)
|
items[i] = tubelib.get_num_items(meta, "src", 1)
|
||||||
if items[i] then -- input available?
|
if items[i] then -- input available?
|
||||||
if not is_leaves(items[i]:get_name()) then
|
if not is_leaves(items[i]:get_name()) then
|
||||||
@ -127,7 +128,7 @@ local function convert_leaves_to_biogas(pos, meta)
|
|||||||
end
|
end
|
||||||
|
|
||||||
-- put result into dst inventory
|
-- put result into dst inventory
|
||||||
if #items == 2 then
|
if #items == NUM_LEAVES then
|
||||||
inv:add_item("dst", biogas)
|
inv:add_item("dst", biogas)
|
||||||
State:keep_running(pos, meta, COUNTDOWN_TICKS)
|
State:keep_running(pos, meta, COUNTDOWN_TICKS)
|
||||||
return
|
return
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
The machine is able to harvest an square area of up to 33x33 blocks (radius = 16).
|
The machine is able to harvest an square area of up to 33x33 blocks (radius = 16).
|
||||||
The base node has to be placed in the middle of the harvesting area.
|
The base node has to be placed in the middle of the harvesting area.
|
||||||
The Harvester processes one node every 4 seconds.
|
The Harvester processes one node every 6 seconds.
|
||||||
It requires one item Bio Fuel per 20 nodes.
|
It requires one item Bio Fuel per 20 nodes.
|
||||||
|
|
||||||
]]--
|
]]--
|
||||||
@ -24,7 +24,7 @@ local S = function(pos) if pos then return minetest.pos_to_string(pos) end end
|
|||||||
local P = minetest.string_to_pos
|
local P = minetest.string_to_pos
|
||||||
local M = minetest.get_meta
|
local M = minetest.get_meta
|
||||||
|
|
||||||
local CYCLE_TIME = 4
|
local CYCLE_TIME = 6
|
||||||
local MAX_HEIGHT = 18 -- harvesting altitude
|
local MAX_HEIGHT = 18 -- harvesting altitude
|
||||||
local MAX_DIAMETER = 33
|
local MAX_DIAMETER = 33
|
||||||
local BURNING_TIME = 20 -- fuel
|
local BURNING_TIME = 20 -- fuel
|
||||||
|
@ -73,7 +73,7 @@ for idx,pgn in ipairs(tPgns) do
|
|||||||
sounds = default.node_sound_stone_defaults(),
|
sounds = default.node_sound_stone_defaults(),
|
||||||
groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==NUM_TEXTURES and 0 or 1},
|
groups = {cracky=2, choppy=2, crumbly=2, not_in_creative_inventory = idx==NUM_TEXTURES and 0 or 1},
|
||||||
is_ground_content = false,
|
is_ground_content = false,
|
||||||
drop = "tubelib_addons2:gateblock15",
|
drop = "tubelib_addons2:gateblock1",
|
||||||
})
|
})
|
||||||
|
|
||||||
not_in_inventory = 1
|
not_in_inventory = 1
|
||||||
|
@ -15,6 +15,7 @@ dofile(minetest.get_modpath("tubelib_addons2") .. "/sequencer.lua")
|
|||||||
dofile(minetest.get_modpath("tubelib_addons2") .. "/gateblock.lua")
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/gateblock.lua")
|
||||||
dofile(minetest.get_modpath("tubelib_addons2") .. "/doorblock.lua")
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/doorblock.lua")
|
||||||
dofile(minetest.get_modpath("tubelib_addons2") .. "/repeater.lua")
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/repeater.lua")
|
||||||
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/logic_not.lua")
|
||||||
dofile(minetest.get_modpath("tubelib_addons2") .. "/programmer.lua")
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/programmer.lua")
|
||||||
dofile(minetest.get_modpath("tubelib_addons2") .. "/accesscontrol.lua")
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/accesscontrol.lua")
|
||||||
dofile(minetest.get_modpath("tubelib_addons2") .. "/streetlamp.lua")
|
dofile(minetest.get_modpath("tubelib_addons2") .. "/streetlamp.lua")
|
||||||
|
Loading…
Reference in New Issue
Block a user