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>
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>
This device is 3-in-1, it combines geothermometer,
mineral scanner and mineral finder in one compartment
while retaining each device's characteristics.
Double right-click to change device mode.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
functions.lua file contains functions planned for reuse
with coming all-in-one devices.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
This tool detects selected ore in front of device
(directional scanner) but can be obstructed by obsidian
deposits to make things a little harder.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
Handheld scanner shows ores (including obsidian) in cubic area
centered at player current position within preset range.
Left click (use) - scan for ores and send result via chat
Right click (place, secondary use) - change scan range
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>