Compare commits

...

77 Commits
0.4 ... master

Author SHA1 Message Date
Lukas Reichlin
0385884e58
Update 20240801 2024-08-01 23:53:26 +02:00
Lukas Reichlin
abe076d797
Add Content DB Translation 2024-08-01 23:52:35 +02:00
Lukas Reichlin
1450d324eb
Updates 20240728 2024-07-28 18:01:15 +02:00
Lukas Reichlin
491a318fc1
Merge pull request #27 from Cpyte-Engine-Developer/ru-trans
Added russian translation
2024-07-28 17:39:30 +02:00
Cpyte-Engine-Developer
aa6da64cda Added russian translation 2024-02-11 18:12:41 +03:00
Lukas Reichlin
b40d43dea7
Merge pull request #25 from Niklp09/master
Make `bottle_output` a local variable
2023-12-02 23:20:41 +01:00
620375fd2f Make bottle_output a local variable 2023-10-14 15:38:34 +02:00
Lukas Reichlin
f1f106748a Update 20230331 2023-03-31 11:16:08 +02:00
Lukas Reichlin
2e7bbe7347
Update changelog.md 2023-02-05 11:22:54 +01:00
Lukas Reichlin
8dd87b0387
Merge pull request #22 from jolesh/patch-1
Add Esperanto translation
2023-02-05 11:20:29 +01:00
jolesh
59f4caba5f
Add Esperanto translation
used template.txt
2022-11-05 22:59:34 +01:00
Lukas Reichlin
1da3f16b7e
Update changelog.md 2022-08-22 10:29:58 +02:00
Lukas Reichlin
f4d32d1939
Merge pull request #21 from Emojigit/fork-20220806
add zh_TW translations
2022-08-22 10:25:43 +02:00
Emoji
dcff458752 add zh_TW translations 2022-08-06 18:03:41 +08:00
Lukas Reichlin
94ae2465b5 Cleanup for errors 20220527 2022-05-27 11:25:44 +02:00
Lukas Reichlin
8397d9dae2
Merge pull request #15 from sfence/sfence_vessels_magament_6ad39ec
Vessels management
2022-02-20 18:34:35 +01:00
Lukas Reichlin
54b3e5b44b
Merge pull request #17 from nixnoxus/add_3_more_plantlife_nodes
add support for 3 more plantlife nodes
2022-02-20 18:27:42 +01:00
nixnoxus
895c7299ae add trunks:moss_plain_0, moss_with_fungus_0, dryplants:reedmace_sapling 2022-01-10 17:20:27 +01:00
SFENCE
30bc057635 Temporary fix for furance blocked by fuel vessel. 2021-09-22 18:08:01 +02:00
SFENCE
5c56a09337 Fix bug with calling undefined function. 2021-09-11 12:53:40 +02:00
SFENCE
ff21c1f6a5 Add vial to fragment recipe. 2021-06-09 17:09:17 +02:00
SFENCE
2e5f3cf217 Make refineri require empthy vessel to produce biofuel. 2021-06-08 22:14:25 +02:00
SFENCE
f4ddec574c Add craft recipes for added vial and can. 2021-06-08 20:21:54 +02:00
SFENCE
90deb360ba Add usage of vessels. 2021-06-08 19:59:24 +02:00
Lukas Reichlin
6ad39ec55e add use_alpha_texture property 2021-05-08 21:49:16 +02:00
Lukas Reichlin
88ed82c676 Translation-Bug fixed 2021-05-08 21:30:33 +02:00
Lukas Reichlin
b4b6683582
Update changelog.md 2021-01-05 11:08:21 +01:00
Lukas Reichlin
65f6bbf2c9
Merge pull request #12 from OgelGames/master
Fix hopper compatibility
2020-12-28 23:23:30 +01:00
OgelGames
67155f6629 fix hopper compatibility 2020-12-28 20:33:36 +11:00
Lukas Reichlin
37cec9a081 update for hopper 2020-12-27 21:47:29 +01:00
Lukas Reichlin
ae46136a77 Update screenshot.png 2020-12-26 23:42:03 +01:00
Lukas Reichlin
bfe791fda0 Update changelog.md 2020-12-26 23:14:10 +01:00
Lukas Reichlin
1790eea470 Hopper compatibility 2020-12-26 22:44:06 +01:00
Lukas Reichlin
9de65a7133
Update changelog.md 2020-12-09 22:32:01 +01:00
Lukas Reichlin
c18f69f8cb
Merge pull request #11 from El-Naso/master
new biofuel can texture
2020-12-09 22:27:47 +01:00
Naso
294f427bb7
new biofuel can texture
Made a biofuel can texture. I tried to keep the filesize down in the spirit of the original. 
It is based on a more modern, standard fuel can.
2020-11-30 15:49:57 -03:00
Lukas Reichlin
02f9350fba
Update changelog.md 2020-11-08 10:58:48 +01:00
Lukas Reichlin
845add2ad3
Merge pull request #9 from mazes-80/poisonivy
Compatibility: poisonivy
2020-11-08 10:56:05 +01:00
mazes
e5f2dca66d Compatibility: poisonivy 2020-10-11 03:35:10 +02:00
Lukas Reichlin
5e0b0aeff8
Delete intllib.lua 2020-10-10 20:44:14 +02:00
Lukas Reichlin
11ec198b60
Updates for v0.6 2020-10-10 20:43:03 +02:00
Lukas Reichlin
7fdd2d1eb9
Merge pull request #8 from mazes-80/do_not_override_groups
refactor biofuel group registration but do not override item groups
2020-10-10 20:38:39 +02:00
mazes
985a10f14a Fix some translations 2020-10-01 06:33:20 +02:00
mazes
af723eaf49 Copy groups table before inserting biofuel group 2020-10-01 06:33:11 +02:00
mazes
00d579ba7c Deprecated calls: Use settings object instead of setting_* methods 2020-09-29 10:38:19 +02:00
mazes
da9ed4ece5 refactor and do not override groups 2020-09-29 10:04:18 +02:00
Lukas Reichlin
2a9d13c819
"Food Waste"-Option added 2020-08-11 21:10:16 +02:00
Lukas Reichlin
762abad315
change from intllib to minetest.translate 2020-08-11 21:07:36 +02:00
Lukas Reichlin
e864856033
Update for v0.6 2020-08-11 21:05:59 +02:00
Lukas Reichlin
828ca6bd60
min minetest version 5.0 2020-08-11 21:03:46 +02:00
Lukas Reichlin
ab705ea479
Update for v0.6 2020-08-11 21:02:44 +02:00
Lukas Reichlin
e7568f206b
change from intllib to minetest.translate 2020-08-11 21:01:37 +02:00
Lukas Reichlin
042540f59c
change from intllib to minetest.translate 2020-08-11 21:00:10 +02:00
Lukas Reichlin
2b523b3a5b
Delete template.pot 2020-08-11 20:56:28 +02:00
Lukas Reichlin
8fed0b6d46
Delete it.po 2020-08-11 20:56:19 +02:00
Lukas Reichlin
d51a1a42af
Delete fr.po 2020-08-11 20:56:11 +02:00
Lukas Reichlin
d98f1a17e4
Delete es.po 2020-08-11 20:56:04 +02:00
Lukas Reichlin
99cb2cf04e
Delete de.po 2020-08-11 20:55:54 +02:00
Lukas Reichlin
018e2f6769
Update refinery.lua 2020-06-20 14:41:17 +02:00
Lukas Reichlin
464a8d4e68
new optional depends 2020-06-20 14:39:02 +02:00
Lukas Reichlin
360e792ab4
new optional depends 2020-06-20 14:38:25 +02:00
Lukas Reichlin
6e5e98f419
Merge pull request #7 from 6r1d/master
Adds support for Vines mod
2020-06-20 14:25:24 +02:00
Victor Gridnevsky
81fa62fc0b Fix for vines 2020-06-01 06:08:00 +03:00
Victor Gridnevsky
7228abde53 Adds support for Vines mod 2020-05-31 02:48:13 +03:00
Lukas Reichlin
213e14acdb
Merge pull request #6 from OgelGames/fixes
Add more convertible groups and fix output
2020-05-10 18:11:03 +02:00
OgelGames
9241bf64ce correctly handle output 2020-03-02 21:53:38 +11:00
OgelGames
d690d186d4 add leafdecay, leafdecay_drop, and mushroom groups 2020-03-02 21:25:56 +11:00
Lukas Reichlin
1ffcb5f7be
Update to 0.5 2019-06-30 18:12:57 +02:00
Lukas Reichlin
f6e84e1567
update to 0.5 2019-06-30 18:02:05 +02:00
Lukas Reichlin
f1a7e42f5b
update for 0.5 2019-06-30 18:00:34 +02:00
Lukas Reichlin
7513cd1a0d
Update to Biofuel 0.5 2019-06-30 17:52:25 +02:00
Lukas Reichlin
b10f22eb00
new in 0.5 2019-06-30 17:51:28 +02:00
Lukas Reichlin
c22a1b1f34
small change in height 2019-06-30 17:50:09 +02:00
Lukas Reichlin
6c4067c511
Update Biofuel 0.5 2019-06-30 17:48:45 +02:00
Lukas Reichlin
f3abbb6c1a
Add files via upload 2019-06-30 17:48:03 +02:00
Lukas Reichlin
00390ec343
Update changelog.md 2019-06-07 09:48:28 +02:00
Lukas Reichlin
4539f8d5a0
Dependencies-Bug fixed 2019-06-07 09:45:46 +02:00
24 changed files with 437 additions and 269 deletions

View File

@ -20,6 +20,8 @@ Other Textures by Lokrates (CC BY-SA 4.0)
**Installation:**
Minetest 0.4.X: Unzip, rename to 'biofuel' and copy to 'minetest/mod'-folder
Minetest 5.X: Unzip and copy to 'minetest/mod'-folder or install from the Content Database
**Issues:**
If you've used previous versions of this mod, dig and replace the refinery for proper functionality

16
api.txt Normal file
View File

@ -0,0 +1,16 @@
Refinery
--------
In order to utilize items for the refinery, they must be added to one of the following groups:
flora, leaves, flower, sapling, tree, wood, stick, plant, seed
Example:
groups = {plant = 1, snappy = 3, flammable = 2, attached_node = 1, not_in_creative_inventory=1},
Biofuel:
--------
To fill an item in the canister, it must be added to the biofuel group.
Example:
groups = {biofuel = 1, dig_immediate = 3, attached_node = 1, vessel = 1},

View File

@ -1,15 +1,14 @@
-- Load support for MT game translation.
local S = minetest.get_translator("biofuel")
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
--Biofuel:
----------
--Phial Fuel
--Vial of Biofuel
minetest.register_craftitem("biofuel:phial_fuel", {
description = S(" Phial Fuel "),
description = S("Vial of Biofuel"),
inventory_image = "biofuel_phial_fuel.png"
})
@ -19,11 +18,16 @@ minetest.register_craft({
burntime = 10,
})
minetest.register_craft({
output = "biofuel:phial_fuel 4",
recipe = {{"biofuel:bottle_fuel"}}
})
--Bottle Fuel
--Bottle of Biofuel
minetest.register_craftitem("biofuel:bottle_fuel", {
description = S(" Bottle Fuel "),
description = S("Bottle of Biofuel"),
inventory_image = "biofuel_bottle_fuel.png",
groups = {biofuel = 1}
})
@ -41,11 +45,17 @@ minetest.register_craft({
burntime = 40,
})
minetest.register_craft({
type = "shapeless",
output = "biofuel:bottle_fuel 9",
recipe = {"biofuel:fuel_can"}
})
--Can Fuel
--Canister of Biofuel
minetest.register_craftitem("biofuel:fuel_can", {
description = S(" Fuel Canister "),
description = S("Canister of Biofuel"),
inventory_image = "biofuel_fuel_can.png"
})
@ -68,55 +78,54 @@ minetest.register_craft({
--Mod compatibility:
--------------------
--Wine (TenPlus1)
minetest.override_item("wine:bottle_rum", {
groups = {biofuel = 1, dig_immediate = 3, attached_node = 1, vessel = 1},
})
minetest.register_craft({
type = "fuel",
recipe = "wine:bottle_rum",
burntime = 40,
})
local register_biofuel = function(name, burntime)
if not minetest.registered_items[name] then
return;
end
local groups = table.copy(minetest.registered_items[name].groups)
groups.biofuel = 1
minetest.override_item(name, { groups = groups })
if burntime and burntime >= 0 then
minetest.register_craft({
type = "fuel",
recipe = name,
burntime = burntime,
})
end
end
minetest.override_item("wine:bottle_tequila", {
groups = {biofuel = 1, dig_immediate = 3, attached_node = 1, vessel = 1},
})
minetest.register_craft({
type = "fuel",
recipe = "wine:bottle_tequila",
burntime = 40,
})
--Basic Materials
minetest.override_item("basic_materials:oil_extract", {
groups = {biofuel = 1},
})
--Wine
register_biofuel("wine:bottle_rum", 40)
register_biofuel("wine:bottle_tequila", 40)
register_biofuel("wine:bottle_bourbon", 40)
register_biofuel("wine:bottle_sake", 40)
register_biofuel("wine:bottle_vodka", 40)
register_biofuel("wine:bottle_brandy", 40)
register_biofuel("wine:bottle_cointreau", 40)
--Cucina_Vegana
minetest.override_item("cucina_vegana:sunflower_seeds_oil", {
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, food = 1, food_oil = 1, food_vegan = 1, eatable = 1, biofuel = 1},
})
minetest.override_item("cucina_vegana:flax_seed_oil", {
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, food = 1, food_oil = 1, food_vegan = 1, eatable = 1, biofuel = 1},
})
minetest.override_item("cucina_vegana:lettuce_oil", {
groups = {dig_immediate = 3, attached_node = 1, food_oil = 1, food_vegan = 1, eatable = 1, biofuel = 1},
})
register_biofuel("cucina_vegana:sunflower_seeds_oil")
register_biofuel("cucina_vegana:flax_seed_oil")
register_biofuel("cucina_vegana:lettuce_oil")
register_biofuel("cucina_vegana:peanut_oil")
register_biofuel("cucina_vegana:corn_oil")
--Farming_Redo
register_biofuel("farming:bottle_ethanol")
register_biofuel("farming:hemp_oil")
register_biofuel("farming:sunflower_oil")
minetest.override_item("farming:bottle_ethanol", {
groups = {vessel = 1, dig_immediate = 3, attached_node = 1, biofuel = 1},
--Basic Materials
register_biofuel("basic_materials:oil_extract")
if minetest.get_modpath("basic_materials") then
minetest.register_craft({
type = "shapeless",
output = "basic_materials:oil_extract 2",
recipe = {"biofuel:bottle_fuel", "biofuel:bottle_fuel"}
})
minetest.override_item("farming:hemp_oil", {
groups = {food_oil = 1, vessel = 1, dig_immediate = 3, attached_node = 1, biofuel = 1},
})
end

View File

@ -18,11 +18,73 @@ mod.conf added (ThorfinnS/Lokrates)
Version 0.4:
------------
[Farming_Redo Ethanol/Hemp-Oil Support](https://forum.minetest.net/viewtopic.php?t=9019)
[Farming_Redo : Ethanol/Hemp-Oil Support](https://forum.minetest.net/viewtopic.php?t=9019)
[ Wine Support Rum/Tequlla] (https://forum.minetest.net/viewtopic.php?f=11&t=13642)
[Wine Support : Rum/Tequila](https://forum.minetest.net/viewtopic.php?f=11&t=13642)
[Cucina Vegana Support Plants/Oil] (https://forum.minetest.net/viewtopic.php?f=9&t=20001)
[Cucina Vegana Support : Plants/Oil](https://forum.minetest.net/viewtopic.php?f=9&t=20001)
Refinery-Output is now a Phial instead of a bottle.
Refinery-Output is now a Vial instead of a Bottle.
Version 0.4.1:
-------------
Temporary fix of dependency error
Version 0.5:
-----------
Dependencies bug fixed
settingtypes.txt for easy configuration added
api.txt added for easy support of modifications
French, Italian and Spanish translations added with the google translator
Version 0.6
-----------
add leafdecay, leafdecay_drop, and mushroom groups (OgelGames)
correctly handle output (OgelGames)
Adds support for Vines mod (6r1d)
"Food Waste"-Option added in the settings menu (Lokrates)
change from intllib to minetest.translate (Lokrates)
extended support for cucina_vegana and farming_redo (Lokrates)
refactor biofuel group registration but do not override item groups (Mazes-80)
Adds support for Poisonivy mod (Mazes-80)
New biofuel can texture (El-Naso)
[Hopper Support : FaceDeer's Version](https://forum.minetest.net/viewtopic.php?t=20058) (Lokrates/OgelGames)
Version 0.7
-----------
Translation of the logging function removed due to errors (Lokrates)
Add use_alpha_texture property (Lokrates)
Additional trunks support (nixnoxus)
Version 0.8
-----------
zh_TW Translation added (Emojigit)
es Translation added (Jolesh)
New Screenshots (Lokrates)
add reverse Recipes (Lokrates)
Version 0.9
-----------
Make "bottle_output" a local variable (Niklp09)
ru Translation added (Cpyte-Engine-Developer)
Updates for Farming_redo and Cucina_vegana (Lokrates)

View File

@ -6,3 +6,6 @@ intllib?
wine?
basic_materials?
cucina_vegana?
moretrees?
vines?
hopper?

View File

@ -1,2 +1,2 @@
dofile(minetest.get_modpath('biofuel')..'/biofuel.lua')
dofile(minetest.get_modpath('biofuel')..'/refinery.lua')
dofile(minetest.get_modpath('biofuel')..'/refinery.lua')

View File

@ -1,45 +0,0 @@
-- Fallback functions for when `intllib` is not installed.
-- Code released under Unlicense <http://unlicense.org>.
-- Get the latest version of this file at:
-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua
local function format(str, ...)
local args = { ... }
local function repl(escape, open, num, close)
if escape == "" then
local replacement = tostring(args[tonumber(num)])
if open == "" then
replacement = replacement..close
end
return replacement
else
return "@"..open..num..close
end
end
return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl))
end
local gettext, ngettext
if minetest.get_modpath("intllib") then
if intllib.make_gettext_pair then
-- New method using gettext.
gettext, ngettext = intllib.make_gettext_pair()
else
-- Old method using text files.
gettext, ngettext = intllib.Getter()
end
end
-- Fill in missing functions.
gettext = gettext or function(msgid, ...)
return format(msgid, ...)
end
ngettext = ngettext or function(msgid, msgid_plural, n, ...)
return format(n==1 and msgid or msgid_plural, ...)
end
return gettext, ngettext

9
locale/biofuel.de.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Eine Minetest-Mod zur Herstellung von Biokraftstoff aus ungenutzten Pflanzen.
progress: @1%=Fortschritt: @1%
To start fuel production add biomass =Zur Treibstoffproduktion mit organischem Material befüllen
Biofuel Refinery=Biotreibstoff Raffinerie
Biofuel Refinery Active=Biotreibstoff Raffinerie arbeitet
Bottle of Biofuel=Treibstofflasche
Canister of Biofuel=Treibstoffkanister
Vial of Biofuel=Treibstoffphiole

9
locale/biofuel.eo.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Minetest Mod por produkti biofuelon el neuzataj plantoj.
progress: @1%=progreso: @1%
To start fuel production add biomass =Por komenci Brulaĵproduktadon aldonu organikan mason
Biofuel Refinery=Organika Brulaĵa Rafinejo
Biofuel Refinery Active=Organika Brulaĵa Rafinejo Aktiva
Bottle of Biofuel=Botelo da Organika Brulaĵo
Canister of Biofuel=Kanistro da Organika Brulaĵo
Vial of Biofuel=Fiolo da Organika Brulaĵo

9
locale/biofuel.es.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Un mod de Minetest para producir biocombustible a partir de plantas no utilizadas.
progress: @1%=progreso: @1%
To start fuel production add biomass =Para iniciar la producción de combustible añadir biomasa.
Biofuel Refinery=Refinería de biocombustibles
Biofuel Refinery Active=Refinería de biocombustibles activa
Bottle of Biofuel=Botella de biocombustible
Canister of Biofuel=Bote de Biocombustible
Vial of Biofuel=Vial de Biocombustible

9
locale/biofuel.fr.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Un mod Minetest pour produire du biocarburant à partir de plantes inutilisées.
progress: @1%=progression: @1%
To start fuel production add biomass =Pour démarrer la production de carburant, ajoutez de la biomasse
Biofuel Refinery=Raffinerie de biocarburant
Biofuel Refinery Active=Raffinerie de biocarburant active
Bottle of Biofuel=Bouteille de biocarburant
Canister of Biofuel=Bidon de biocarburant
Vial of Biofuel=Fiole de biocarburant

9
locale/biofuel.it.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Un Minetest Mod per produrre biocarburante da piante inutilizzate.
progress: @1%=progresso: @1%
To start fuel production add biomass =Per avviare la produzione di carburante aggiungere biomassa
Biofuel Refinery=Raffineria di biocarburanti
Biofuel Refinery Active=Raffineria di biocarburanti attiva
Bottle of Biofuel=Bottiglia di biocarburante
Canister of Biofuel=Contenitore di biocarburanti
Vial of Biofuel=Fiala di biocarburante

9
locale/biofuel.ru.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Модификация Minetest для производства биотоплива из неиспользуемых растений.
progress: @1%=прогресс @1%
To start fuel production add biomass =Что бы начать производство топлива добавьте биомассы
Biofuel Refinery=Переработчик биотполива
Biofuel Refinery Active=Активный переработчик биотоплива
Bottle of Biofuel=Бутылка биотоплива
Canister of Biofuel=Канистра биотоплива
Vial of Biofuel=Флакон биотоплива

9
locale/biofuel.zh_TW.tr Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=Minetest 改造,利用未使用的植物生產生質燃料
progress: @1%=進度:@1
To start fuel production add biomass =請加入有機物以開始製作生物燃料
Biofuel Refinery=生物燃料製造機
Biofuel Refinery Active=生物燃料製造機(工作中)
Bottle of Biofuel=一瓶生物燃料
Canister of Biofuel=一罐生物燃料
Vial of Biofuel=試管裏的生物燃料

View File

@ -1,57 +0,0 @@
msgid ""
msgstr ""
"Project-Id-Version: Biofuel\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Language-Team: Lokrates\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.1.1\n"
"Last-Translator: \n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: de\n"
#: refinery.lua
msgid "loading..."
msgstr "lade..."
#: refinery.lua
msgid "progress: @1%"
msgstr "Fortschritt: @1%"
#: refinery.lua
msgid "To start fuel production add biomass "
msgstr "Zur Treibstoffproduktion mit organischem Material befüllen "
#: refinery.lua
msgid " moves stuff to refinery at "
msgstr " legte Material in die Raffinerie bei "
#: refinery.lua
msgid " takes stuff from refinery at "
msgstr " nahm Material aus der Raffinerie bei "
#: refinery.lua
msgid "Biofuel Refinery"
msgstr "Biotreibstoff Raffinerie"
#: refinery.lua
msgid "Biofuel Refinery Active"
msgstr "Biotreibstoff Raffinerie arbeitet"
#: refinery.lua
msgid " loaded."
msgstr " geladen."
#: biofuel.lua
msgid " Bottle Fuel "
msgstr " Treibstofflasche "
#: biofuel.lua
msgid " Fuel Canister "
msgstr " Treibstoffkanister "
#: biofuel.lua
msgid " Phial Fuel "
msgstr " Treibstoffphiole "

View File

@ -1,46 +0,0 @@
msgid ""
msgstr ""
#: refinery.lua
msgid "loading..."
msgstr ""
#: refinery.lua
msgid "progress: @1%"
msgstr ""
#: refinery.lua
msgid "To start fuel production add biomass "
msgstr ""
#: refinery.lua
msgid " moves stuff to refinery at "
msgstr ""
#: refinery.lua
msgid " takes stuff from refinery at "
msgstr ""
#: refinery.lua
msgid "Biofuel Refinery"
msgstr ""
#: refinery.lua
msgid "Biofuel Refinery Active"
msgstr ""
#: refinery.lua
msgid " loaded."
msgstr ""
#: biofuel.lua
msgid " Bottle Fuel "
msgstr ""
#: biofuel.lua
msgid " Fuel Canister "
msgstr ""
#: biofuel.lua
msgid " Phial Fuel "
msgstr ""

9
locale/template.txt Normal file
View File

@ -0,0 +1,9 @@
# textdomain: biofuel
A Minetest Mod to produce biofuel from unused plants.=
progress: @1%=
To start fuel production add biomass =
Biofuel Refinery=
Biofuel Refinery Active=
Bottle of Biofuel=
Canister of Biofuel=
Vial of Biofuel=

View File

@ -1,7 +1,8 @@
name = biofuel
author = Lokrates
description = A Minetest-Mod to produce biofuel from unused plants.
description = A Minetest Mod to produce biofuel from unused plants.
min_minetest_version = 5.4
depends = default
optional_depends = intllib,pipeworks,farming,pooper,wine,basic_materials,cucina_vegana
version = 0.4
optional_depends = pipeworks, farming, pooper, wine, basic_materials, cucina_vegana, moretrees, vines, hopper
version = 0.9
title = Biofuel

View File

@ -2,45 +2,152 @@
--Project name: Biofuel, a Mod for Minetest
--License: General Public License, version 3 or later
--Original Work Copyright (C) 2016 cd2 (cdqwertz) <cdqwertz@gmail.com>
--Modified Work Copyright (C) Vitalie Ciubotaru <vitalie at ciubotaru dot tk>
--Modified Work Copyright (C) 2018 Lokrates
--Modified Work Copyright (C) naturefreshmilk
--Modified Work Copyright (C) 2017 Vitalie Ciubotaru <vitalie at ciubotaru dot tk>
--Modified Work Copyright (C) 2018 - 2024 Lokrates
--Modified Work Copyright (C) 2018 naturefreshmilk
--Modified Work Copyright (C) 2019 OgelGames
--Modified Work Copyright (C) 2020 6r1d
--Modified Work Copyright (C) 2021 nixnoxus
--Modified Work Copyright (C) 2021 Niklp09
-- Load support for MT game translation.
local S = minetest.get_translator("biofuel")
-- hopper compat
if minetest.get_modpath("hopper") then
hopper:add_container({
{"top", "biofuel:refinery", "dst"},
{"bottom", "biofuel:refinery", "src"},
{"side", "biofuel:refinery", "src"},
{"top", "biofuel:refinery_active", "dst"},
{"bottom", "biofuel:refinery_active", "src"},
{"side", "biofuel:refinery_active", "src"},
})
end
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname())
local S, NS = dofile(MP.."/intllib.lua")
-- pipeworks compat
local has_pipeworks = minetest.get_modpath("pipeworks")
local tube_entry = ""
if has_pipeworks then
tube_entry = "^pipeworks_tube_connection_wooden.png"
tube_entry = "^pipeworks_tube_connection_metallic.png"
end
minetest.log('action', 'MOD: Biofuel ' .. S("loading..."))
biofuel_version = '0.4'
minetest.log('action', 'MOD: Biofuel ' .. "loading...")
biofuel_version = '0.9'
food_fuel = minetest.settings:get_bool("food_fuel") -- Enables the conversion of food into fuel (settingtypes.txt)
if food_fuel == nil then food_fuel = false end -- default false
biomass = {}
biomass.convertible_groups = {'flora', 'leaves', 'flower', 'sapling', 'tree', 'wood', 'stick', 'plant', 'seed', 'eatable', 'food' }
biomass.convertible_nodes = {'default:cactus', 'default:large_cactus_seedling',
'default:bush_stem', 'default:pine_bush_stem', 'default:acacia_bush_stem',
'flowers:mushroom_red', 'flowers:mushroom_brown',
'farming:wheat', 'farming:straw', 'farming:flour', 'farming:bread',
'farming:cotton', 'farming:string',
'default:papyrus', 'default:dry_shrub', 'default:marram_grass_1', 'default:sand_with_kelp',
'default:apple', 'default:blueberries',
'pooper:poop_turd', 'pooper:poop_pile',
'farming:hemp_leaf', 'farming:hemp_block', 'farming:hemp_fibre', 'farming:hemp_rope',
'cucina_vegana:flax', 'cucina_vegana:flax_raw', 'cucina_vegana:sunflower', 'cucina_vegana:soy',
biomass.convertible_groups = {
'flora', 'leaves', 'flower', 'sapling', 'tree', 'wood', 'stick', 'plant', 'seed',
'leafdecay', 'leafdecay_drop', 'mushroom', 'vines'
}
biomass.convertible_nodes = {
'default:cactus', 'default:large_cactus_seedling', -- default cactus
'default:bush_stem', 'default:pine_bush_stem', 'default:acacia_bush_stem', -- default bush stem
'farming:cotton', 'farming:string', 'farming:wheat', 'farming:straw', -- farming
'farming:hemp_leaf', 'farming:hemp_block', 'farming:hemp_fibre', 'farming:hemp_rope', -- farming_redo hemp
'farming:mint_leaf','farming:garlic', 'farming:peas', 'farming:pepper', -- farming_redo
'farming:barley', 'farming:jackolantern', 'farming:rye', 'farming:oat', 'farming:rice',
'default:papyrus', 'default:dry_shrub', 'default:marram_grass_1', 'default:sand_with_kelp', -- default
'pooper:poop_turd', 'pooper:poop_pile', -- pooper
'cucina_vegana:flax', 'cucina_vegana:flax_roasted', 'cucina_vegana:sunflower', -- cucina_vegana
'cucina_vegana:soy', 'cucina_vegana:chives', 'cucina_vegana:corn', 'cucina_vegana:chili',
'cucina_vegana:onion', 'cucina_vegana:banana', 'cucina_vegana:carrot', 'cucina_vegana:garlic',
'cucina_vegana:potato', 'cucina_vegana:tomato', 'cucina_vegana:cucumber', 'cucina_vegana:strawberry',
'cucina_vegana:vine_grape', 'cucina_vegana:coffee_beans_raw',
'vines:vines', 'vines:vine', 'vines:rope', 'vines:rope_block', -- Vines
'trunks:moss_plain_0', 'trunks:moss_with_fungus_0', 'trunks:twig_1',
'bushes:BushLeaves1', 'bushes:BushLeaves2',
'dryplants:grass', 'dryplants:hay', 'dryplants:reed', 'dryplants:reedmace_sapling', 'dryplants:wetreed',
'poisonivy:climbing', 'poisonivy:seedling', 'poisonivy:sproutling',
}
biomass.convertible_food = {
'farming:bread', 'farming:flour', -- default food
'farming:pineapple', 'farming:pineapple_ring', 'farming:potato',
'farming:rice_flour', 'farming:blueberry_pie',
'farming:bread_multigrain', 'farming:flour_multigrain', 'farming:baked_potato', -- farming_redo
'farming:beetroot_soup', 'farming:bread_slice', 'farming:chili_bowl', 'farming:chocolate_block',
'farming:chocolate_dark', 'farming:cookie', 'farming:corn_cob', 'farming:cornstarch',
'farming:muffin_blueberry', 'farming:pea_soup', 'farming:potato_salad', 'farming:pumpkin_bread',
'farming:pumpkin_dough', 'farming:rhubarb_pie', 'farming:rice_bread', 'farming:toast',
'farming:toast_sandwich', 'farming:garlic_braid', 'farming:onion_soup',
'farming:sugar', 'farming:turkish_delight', 'farming:garlic_bread', 'farming:donut',
'farming:donut_chocolate', 'farming:donut_apple', 'farming:porridge', 'farming:jaffa_cake',
'farming:apple_pie', 'farming:pasta', 'farming:spaghetti', 'farming:bibimbap', 'farming:flan',
'farming:tofu', 'farming:gyoza', 'farming:mochi', 'farming:salad', 'farming:burger', 'farming:paella',
'farming:caramel', 'farming:onigiri', 'farming:popcorn', 'farming:sugar_cube', 'farming:carrot_gold',
'farming:tofu_cooked', 'farming:tomato_soup', 'farming:cheese_vegan', 'farming:chili_powder',
'farming:potato_omelet', 'farming:mac_and_cheese', 'farming:gingerbread_man', 'farming:sunflower_bread',
'farming:spanish_potatoes', 'farming:sunflower_seeds_toasted',
'wine:agave_syrup', -- Wine
'cucina_vegana:asparagus', 'cucina_vegana:asparagus_hollandaise', -- cucina_vegana
'cucina_vegana:asparagus_hollandaise_cooked', 'cucina_vegana:asparagus_rice', 'cucina_vegana:asparagus_rice_cooked',
'cucina_vegana:asparagus_soup_cooked', 'cucina_vegana:asparagus_soup', 'cucina_vegana:blueberry_jam',
'cucina_vegana:blueberry_pot', 'cucina_vegana:blueberry_pot_cooked', 'cucina_vegana:blueberry_puree',
'cucina_vegana:bowl_rice', 'cucina_vegana:bowl_rice_cooked', 'cucina_vegana:ciabatta_bread',
'cucina_vegana:ciabatta_dough', 'cucina_vegana:dandelion_honey', 'cucina_vegana:dandelion_suds',
'cucina_vegana:dandelion_suds_cooking', 'cucina_vegana:edamame', 'cucina_vegana:edamame_cooked',
'cucina_vegana:fish_parsley_rosemary', 'cucina_vegana:fish_parsley_rosemary_cooked', 'cucina_vegana:fryer',
'cucina_vegana:fryer_raw', 'cucina_vegana:imitation_butter', 'cucina_vegana:imitation_cheese',
'cucina_vegana:imitation_fish', 'cucina_vegana:imitation_meat', 'cucina_vegana:imitation_poultry',
'cucina_vegana:kohlrabi', 'cucina_vegana:kohlrabi_roasted', 'cucina_vegana:kohlrabi_soup',
'cucina_vegana:kohlrabi_soup_cooked', 'cucina_vegana:lettuce', 'cucina_vegana:molasses', 'cucina_vegana:parsley',
'cucina_vegana:peanut', 'cucina_vegana:peanut_butter', 'cucina_vegana:pizza_dough', 'cucina_vegana:pizza_funghi',
'cucina_vegana:pizza_funghi_raw', 'cucina_vegana:pizza_vegana', 'cucina_vegana:pizza_vegana_raw',
'cucina_vegana:rice', 'cucina_vegana:rice_flour', 'cucina_vegana:rosemary', 'cucina_vegana:salad_bowl',
'cucina_vegana:salad_hollandaise', 'cucina_vegana:sauce_hollandaise', 'cucina_vegana:soy_milk',
'cucina_vegana:soy_soup', 'cucina_vegana:soy_soup_cooked', 'cucina_vegana:sunflower_seeds_bread',
'cucina_vegana:sunflower_seeds_dough', 'cucina_vegana:sunflower_seeds_flour', 'cucina_vegana:sunflower_seeds_roasted',
'cucina_vegana:tofu', 'cucina_vegana:tofu_cooked', 'cucina_vegana:tofu_chives_rosemary',
'cucina_vegana:tofu_chives_rosemary_cooked', 'cucina_vegana:vegan_sushi'
}
biomass.convertible_items = {}
for _, v in pairs(biomass.convertible_nodes) do
biomass.convertible_items[v] = true
end
biomass.food_waste = {}
for _, v in pairs(biomass.convertible_food) do
biomass.food_waste[v] = true
end
local function is_convertible(input)
if biomass.convertible_items[input] then
return true
end
if food_fuel then
if biomass.food_waste[input] then
return true
end
end
for _, v in pairs(biomass.convertible_groups) do
if minetest.get_item_group(input, v) > 0 then
return true
end
end
return false
end
plants_input = tonumber(minetest.settings:get("biomass_input")) or 4 -- The number of biomass required for fuel production (settingtypes.txt)
local bottle_output = minetest.settings:get_bool("refinery_output") -- Change of refinery output between vial or bottle (settingtypes.txt)
if bottle_output == nil then bottle_output = false end -- default false
local function formspec(pos)
local spos = pos.x..','..pos.y..','..pos.z
local formspec =
@ -53,24 +160,13 @@ local function formspec(pos)
'list[current_player;main;0,4.25;8,1;]'..
'list[current_player;main;0,5.5;8,3;8]'..
'listring[nodemeta:'..spos ..';dst]'..
'listring[current_player;main]'..
'listring[current_player;main]'..
'listring[nodemeta:'..spos ..';src]'..
'listring[current_player;main]'..
default.get_hotbar_bg(0, 4.25)
return formspec
end
local function is_convertible(input)
if biomass.convertible_items[input] then
return true
end
for _, v in pairs(biomass.convertible_groups) do
if minetest.get_item_group(input, v) > 0 then
return true
end
end
return false
end
local function swap_node(pos, name)
local node = minetest.get_node(pos)
@ -92,6 +188,17 @@ local function count_input(pos)
return q
end
local function count_output(pos)
local q = 0
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stacks = inv:get_list('dst')
for k in pairs(stacks) do
q = q + inv:get_stack('dst', k):get_count()
end
return q
end
local function is_empty(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
@ -101,8 +208,11 @@ local function is_empty(pos)
return false
end
end
if not inv:get_stack('dst', 1):is_empty() then
return false
stacks = inv:get_list('dst')
for k in pairs(stacks) do
if not inv:get_stack('dst', k):is_empty() then
return false
end
end
return true
end
@ -119,14 +229,24 @@ end
local function update_timer(pos)
local timer = minetest.get_node_timer(pos)
local meta = minetest.get_meta(pos)
local has_output_space = (4 * 99) > count_output(pos)
if not has_output_space then
if timer:is_started() then
timer:stop()
meta:set_string('infotext', S("Output is full "))
meta:set_int('progress', 0)
end
return
end
local count = count_input(pos)
if not timer:is_started() and count >= 4 then --Input
timer:start(2) --Timebase
local refinery_time = minetest.settings:get("fuel_production_time") or 10 -- Timebase (settingtypes.txt)
if not timer:is_started() and count >= plants_input then -- Input
timer:start((refinery_time)/5) -- Timebase
meta:set_int('progress', 0)
meta:set_string('infotext', S("progress: @1%", "0"))
return
end
if timer:is_started() and count < 4 then --Input
if timer:is_started() and count < plants_input then -- Input
timer:stop()
meta:set_string('infotext', S("To start fuel production add biomass "))
meta:set_int('progress', 0)
@ -134,7 +254,7 @@ local function update_timer(pos)
end
local function create_biofuel(pos)
local q = 4 -- Input
local q = plants_input -- Input
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stacks = inv:get_list('src')
@ -147,26 +267,42 @@ local function create_biofuel(pos)
q = q - count
else
inv:set_stack('src', k, stack:get_name() .. ' ' .. (count - q))
q = 0
break
end
end
end
local dirt_count = inv:get_stack('dst', 1):get_count()
inv:set_stack('dst', 1, 'biofuel:phial_fuel ' .. (dirt_count + 1))
stacks = inv:get_list('dst')
for k in pairs(stacks) do
local stack = inv:get_stack('dst', k)
local count = stack:get_count()
if 99 > count then
if bottle_output then
inv:set_stack('dst', k, 'biofuel:bottle_fuel ' .. (count + 1))
else
inv:set_stack('dst', k, 'biofuel:phial_fuel ' .. (count + 1))
end
break
end
end
end
local function on_timer(pos)
local timer = minetest.get_node_timer(pos)
local meta = minetest.get_meta(pos)
local progress = meta:get_int('progress') + 25 --Progresss in %
local progress = meta:get_int('progress') + 20 --Progresss in %
if progress >= 100 then
create_biofuel(pos)
meta:set_int('progress', 0)
else
meta:set_int('progress', progress)
end
if count_input(pos) >= 4 then --Input
if (4 * 99) <= count_output(pos) then
timer:stop()
meta:set_string('infotext', S("Output is full "))
meta:set_int('progress', 0)
return false
end
if count_input(pos) >= plants_input then --Input
meta:set_string('infotext', S("progress: @1%", progress))
return true
else
@ -180,8 +316,8 @@ end
local function on_construct(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size('src', 9) -- Input Fields
inv:set_size('dst', 4) -- Output Fields
inv:set_size('src', 9) -- Input Fields
inv:set_size('dst', 4) -- Output Fields
meta:set_string('infotext', S("To start fuel production add biomass "))
meta:set_int('progress', 0)
end
@ -218,7 +354,7 @@ local tube = {
if not convertible then
return stack
end
local result = inv:add_item("src", stack)
update_timer(pos)
update_nodebox(pos)
@ -262,14 +398,14 @@ end
local function on_metadata_inventory_put(pos, listname, index, stack, player)
update_timer(pos)
update_nodebox(pos)
minetest.log('action', player:get_player_name() .. S(" moves stuff to refinery at ") .. minetest.pos_to_string(pos))
minetest.log('action', player:get_player_name() .. " moves stuff to refinery at " .. minetest.pos_to_string(pos))
return
end
local function on_metadata_inventory_take(pos, listname, index, stack, player)
update_timer(pos)
update_nodebox(pos)
minetest.log('action', player:get_player_name() .. S(" takes stuff from refinery at ") .. minetest.pos_to_string(pos))
minetest.log('action', player:get_player_name() .. " takes stuff from refinery at " .. minetest.pos_to_string(pos))
return
end
@ -292,13 +428,14 @@ minetest.register_node("biofuel:refinery", {
description = S("Biofuel Refinery"),
drawtype = "nodebox",
tiles = {
"biofuel_tb.png" .. tube_entry, -- top
"biofuel_tb.png" .. tube_entry, -- bottom
"biofuel_fr.png", -- right
"biofuel_bl.png", -- left
"biofuel_bl.png", -- back
"biofuel_fr.png" -- front
"biofuel_tb.png" .. tube_entry, -- top
"biofuel_tb.png" .. tube_entry, -- bottom
"biofuel_fr.png", -- right
"biofuel_bl.png", -- left
"biofuel_bl.png", -- back
"biofuel_fr.png" -- front
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {
@ -348,11 +485,12 @@ minetest.register_node("biofuel:refinery_active", {
tiles = {
"biofuel_tb.png" .. tube_entry, -- top
"biofuel_tb.png" .. tube_entry, -- bottom
"biofuel_fr_active.png", -- right
"biofuel_bl_active.png", -- left
"biofuel_bl_active.png", -- back
"biofuel_fr_active.png" -- front
"biofuel_fr_active.png", -- right
"biofuel_bl_active.png", -- left
"biofuel_bl_active.png", -- back
"biofuel_fr_active.png" -- front
},
use_texture_alpha = "clip",
node_box = {
type = "fixed",
fixed = {
@ -406,4 +544,4 @@ minetest.register_craft({
})
minetest.log('action', "MOD: Biofuel version " .. biofuel_version .. (" loaded."))
minetest.log('action', "MOD: Biofuel version " .. biofuel_version .. " loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 90 KiB

BIN
screenshot2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

13
settingtypes.txt Normal file
View File

@ -0,0 +1,13 @@
#The time that the refinery needs to produce fuel
fuel_production_time (fuel production time) int 10 5 360
#The number of biomass required for fuel production
biomass_input (required input) int 4 1 99
#Change of refinery output between vial or bottle
#Default is vial
refinery_output (bottle output) bool false
#Enables the conversion of food into fuel
#Default is disabled
food_fuel (food waste) bool false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 240 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 380 B