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>
New sound added for toggle to make it different from parameter
change click. Affects PMC, AMA and UMG.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
When working as MineralFinder, AMA now shows signal strength which
is function of distance to nearest ore block (it drops with
1/3 radius range, from HIGH through MEDIUM to LOW). Thanks to this
AMA which has quite long MF range compared to standalone MF,
can be more useful in locating ores.
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>