modpack.conf and mod.conf files have been expanded to contain
new information that follows modding rules introduced in Minetest
version 5.0.0. Old txt files are still present for compatibility
reasons.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
minetest.get_modpath() and generic Lua global variable checks
changed to minetest.global_exists() function for all mods
in modpack.
This is the first change after moving modpack development from
Minetest version 0.4.17.1 to 5.0.0.
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>
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>
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>
Geothermometer is now limited to natural (mineral) nodes like
stones, sand, dirt, raw ore blocks and simple processed stones
that retain 'natural' characteristics.
Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>