mirror of
https://github.com/minetest-mods/crafting_bench.git
synced 2024-11-24 04:33:43 +01:00
add setting to change how rapidly crafting happens
This commit is contained in:
parent
ad99186f3c
commit
319ddf9b21
9
init.lua
9
init.lua
@ -10,9 +10,14 @@ if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~=
|
||||
usage_help = usage_help .. "\n\n" .. S("This workbench is compatible with hoppers. Hoppers will insert into the raw material inventory and remove items from the finished goods inventory.")
|
||||
end
|
||||
|
||||
|
||||
local crafting_rate = minetest.setting_get("crafting_bench_crafting_rate")
|
||||
if crafting_rate == nil then crafting_rate = 5 end
|
||||
|
||||
|
||||
minetest.register_node("crafting_bench:workbench",{
|
||||
description = S("Workbench"),
|
||||
_doc_items_longdesc = S("A workbench that does work for you. Set a crafting recipe and provide raw materials and items will magically craft themselves once every five seconds."),
|
||||
_doc_items_longdesc = string.format(S("A workbench that does work for you. Set a crafting recipe and provide raw materials and items will magically craft themselves once every %i seconds."), crafting_rate),
|
||||
_doc_items_usagehelp = usage_help,
|
||||
tiles = {
|
||||
"crafting_bench_workbench_top.png",
|
||||
@ -115,7 +120,7 @@ end
|
||||
|
||||
minetest.register_abm( {
|
||||
nodenames = { 'crafting_bench:workbench' },
|
||||
interval = 5,
|
||||
interval = crafting_rate,
|
||||
chance = 1,
|
||||
action = function ( pos, node )
|
||||
local meta = minetest.get_meta( pos )
|
||||
|
@ -8,10 +8,11 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-02-25 21:16-0700\n"
|
||||
"POT-Creation-Date: 2017-02-28 21:08-0700\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
@ -30,24 +31,37 @@ msgid ""
|
||||
"material inventory and remove items from the finished goods inventory."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:14
|
||||
#: init.lua:19 init.lua:49
|
||||
msgid "Workbench"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:15
|
||||
#: init.lua:20
|
||||
#, lua-format
|
||||
msgid ""
|
||||
"A workbench that does work for you. Set a crafting recipe and provide raw "
|
||||
"materials and items will magically craft themselves once every five seconds."
|
||||
"materials and items will magically craft themselves once every %i seconds."
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:56
|
||||
#: init.lua:42
|
||||
msgid "Source Material"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:44
|
||||
msgid "Recipe to Use"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:46
|
||||
msgid "Craft Output"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:61
|
||||
msgid "@1 moves stuff in workbench at @2"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:59
|
||||
#: init.lua:64
|
||||
msgid "@1 moves stuff to workbench at @2"
|
||||
msgstr ""
|
||||
|
||||
#: init.lua:62
|
||||
#: init.lua:67
|
||||
msgid "@1 takes stuff from workbench at @2"
|
||||
msgstr ""
|
||||
|
2
settingtypes.txt
Normal file
2
settingtypes.txt
Normal file
@ -0,0 +1,2 @@
|
||||
# The number of seconds between each operation of the crafting bench.
|
||||
crafting_bench_crafting_rate (Crafting rate) int 5 1 60
|
Loading…
Reference in New Issue
Block a user