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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Separate formspec has been added for each function of multidevice,
now device dynamically shows settings valid only for selected mode.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
According to minetest documentation, mese blocks can appear naturally
at depths < 1024. Mineral detectors have been upgraded to recognize blocks
of mese, coal and diamond (these can be generated without smelting so
theoretically can be found deep in the ground). To enable this, internal
structures and affected functions have been rewritten to allow more than
one node type for label ('coal' etc.).
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Sandstone blocks (including bricks) are now qualified by geothermometer
as nodes of natural origin and device shows reading for them.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This mod adds Furnace Monitor - device that once attached to standard
Minetest game furnace, receives Tubelib number and responds to state
requests.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Explicit call to formspec_close() removed as it is handled
automatically by button_exit.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Programmer device has all functionality of Memory Copier while at
the same time can perform similar task to Smartline Programmer.
It is designed to speed up SaferLua Controller redeployments
(for example moving mobile mining controllers for Quarries).
Minor code adjustments of copier part was also required.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Labels for settings in multidevice formspec are now prepended
with MS and MF to remind that option affects only one subsystem.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
fields.quit is now recognized as well and causes formspec closing
to emit click sound.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Button definition changed to button_exit which automates windows
closing and compacts callback code.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
All devices except geothermometer check and init their metadata on
first use. Therefore in on_use handler it is better to return item
not nil so tool gets updated immediately after handler routine ends.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This mod contains Memory Copier for SaferLua Controller which
can download and upload init, loop and notes sections of device
and is perfect for cloning or moving Controllers to a new location
(as they do not preserve metadata when put back in inventory)
Notice: controller uses formspec metadata so it's active right-click
menu is not updated on display - current tab metadata is also not
read then; workaround is to switch to outp or help tab before uploading
code.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
UMG can be a light source when enabled in mod settings. This works
with wielded_light or similar mods, otherwise it does not matter.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Major changes:
* all code now in init.lua which eliminates need for global functions
and variables
* all item-specific data is now stored within item definition
* item configuration stored in metadata
* double-click mechanics eliminated completely, device settings
available via right-click menu (formspec)
* code reusability by various devices improved dramatically
* flashlight option removed as light level is global item property
and cannot be set independently for each device
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>