20 Commits

Author SHA1 Message Date
Michal Cieslakiewicz
a5bf21660d biogasmachines: gasifier: fix listring order.
Putting 'cur' at the end of listring in formspec brings back
shift-click access to 'src' which had been broken by putting
'cur' in the middle.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 14:07:59 +01:00
Michal Cieslakiewicz
1c93dd5e73 biogasmachines: freezer: allow taking items from working tray.
Items can be taken from working tray ('cur' inventory list) when
machine is stopped. This functionality is identical to gasifier behaviour.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 14:05:20 +01:00
Michal Cieslakiewicz
33c7cbf09e biogasmachines: gasifier: fixed working tray item processing.
Fixed incorrect behaviour when machine was restarted with non-empty
working tray. Now device checks this tray before source (input) inventory
and if item is present, sets it for processing.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 13:37:04 +01:00
Michal Cieslakiewicz
22ef12415d biogasmachines: freezer: add color to working tray.
Working tray has now blue background that gets brighter when machine
is operating. It is used to indicate that this tray is a special one
and cannot be accessed by player like normal inventory cell.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 13:00:43 +01:00
Michal Cieslakiewicz
d8cf44597f biogasmachines: freezer: static formspec data calculated only once.
Formspec data that needs to be calculated only once is stored in
a special array (method introduced in gasifier) and never re-calculated.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 12:07:07 +01:00
Michal Cieslakiewicz
811b486e9e biogasmachines: freezer: unused variable removed from function.
Unused 'number' variable removed from on_receive_fields() callback.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 11:46:50 +01:00
Michal Cieslakiewicz
485b578e33 biogasmachines: gasifier machine added.
This machine is designed to extract Biogas from highly compressed
dry organic matter, such as fossil fuels (coal block) and straw.
It requires no fuel to avoid complex processing loops.
Its recipe base is expandable via API function.
All functionality and Tubelib integration is in place.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-19 11:40:56 +01:00
Michal Cieslakiewicz
d1f39d9582 biogasmachines: code update for stub machines.
Code cleanup and preparations for another Biogas Machine.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-15 17:44:35 +01:00
Michal Cieslakiewicz
8a05d661a2 README.md and freezer header comment updated.
README.md and freezer.lua documentation changes.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-15 17:20:31 +01:00
Michal Cieslakiewicz
bbe683365e biogasmachines: water freezer done.
Water Freezer is now fully functional.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-13 23:38:39 +01:00
Michal Cieslakiewicz
590037ca21 biogasmachines: freezer: crafting recipe added.
Crafting recipe added. When unified_inventory is installed, crafting guide
is expanded with 'freezing' type and ice generation recipe.
What's left: textures and look.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-13 17:28:24 +01:00
Michal Cieslakiewicz
94ea89dc2f biogasmachines: functions: connection table moved out of function.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-13 15:24:26 +01:00
Michal Cieslakiewicz
94c9594961 biogasmachines: freezer: accept pipe connections from all sides.
Freezer now accepts pipe connections from all sides, thanks to improved
pipe detection logic in functions.lua. Function that checks if an element
belongs to an array has been made public to all module files, module
has been rewritten to utilize this function instead of duplicating
code.
What's left: textures, crafting.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-13 15:16:18 +01:00
Michal Cieslakiewicz
c2607b5ea9 biogasmachines: freezer: tubelib integration implemented.
Freezer now interacts with tubelib devices and can be a part of
complex machines (i.e. paired with Liquid Sampler).
Minor code adjustments: inventory reshaping, on_punch logic.
What's left: textures, crafting.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-11 11:24:07 +01:00
Michal Cieslakiewicz
69dfcc7847 biogasmachines: freezer: basic work implemented.
Freezer can now work as a standalone device, producing ice
from water supplied in bucket or through pipes.
What works: ice production logic, manual on/off.
Todo: tubelib integration (tubes and message i/o), crafting,
textures.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-10 15:03:43 +01:00
Michal Cieslakiewicz
847156e703 biogasmachines: further works on freezer.
Water detection code reorganized, new graphics for freezer added.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-07 15:46:21 +01:00
Michal Cieslakiewicz
6eafa51477 biogasmachines: freezer early version created.
Simple freezer node created to test pipeworks water supply.
Node has temporary textures, no formspecs and no inventories.
When punched node shows if water is flowing into it via pipes.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-11-06 20:45:02 +01:00
Michal Cieslakiewicz
b193a53c00 Files reorganized before pushing to GitHub.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-10-19 11:06:57 +02:00
Michal Cieslakiewicz
4fd6d953e7 biogasmachines: code clean-up.
Commented out code removed, that's all.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-10-16 22:57:13 +02:00
Michal Cieslakiewicz
2e40c91d05 Initial commit.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
2018-10-03 21:49:04 +02:00