diff --git a/moremesecons_detector/awards_detector.lua b/moremesecons_detector/awards_detector.lua index 5a3e318..77ab4bc 100644 --- a/moremesecons_detector/awards_detector.lua +++ b/moremesecons_detector/awards_detector.lua @@ -28,7 +28,7 @@ local function awards_detector_on_receive_fields(pos, formname, fields, sender) awards_detector_make_formspec(pos) end --- returns true if player was found, false if not +-- returns true if a player was found who unlocked all given awards, false if not local function awards_detector_scan(pos) local meta = minetest.get_meta(pos) local scanname = meta:get_string("scanname") @@ -44,11 +44,11 @@ local function awards_detector_scan(pos) -- abort if no scan results were found if next(objs) == nil then return false end - local scan_for = {} for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do scan_for[str] = 0 end + --[[ for _, obj in pairs(objs) do if obj:is_player() then @@ -85,7 +85,7 @@ local function awards_detector_scan(pos) return false end --- set player name when receiving a digiline signal on a specific channel +-- set awards to search when receiving a digiline signal on a specific channel local awards_detector_digiline = { effector = { action = function(pos, node, channel, msg) diff --git a/moremesecons_detector/inventory_scanner.lua b/moremesecons_detector/inventory_scanner.lua index 4790a9a..f519928 100644 --- a/moremesecons_detector/inventory_scanner.lua +++ b/moremesecons_detector/inventory_scanner.lua @@ -28,7 +28,7 @@ local function inventory_scanner_on_receive_fields(pos, formname, fields, sender inventory_scanner_make_formspec(pos) end --- returns true if player was found, false if not +-- returns true if player was found who has any of the items in their posession, false if not local function inventory_scanner_scan(pos) local meta = minetest.get_meta(pos) local scanname = meta:get_string("scanname") @@ -43,7 +43,6 @@ local function inventory_scanner_scan(pos) -- abort if no scan results were found if next(objs) == nil then return false end - local scan_for = {} for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do scan_for[str] = true @@ -71,7 +70,7 @@ local function inventory_scanner_scan(pos) return false end --- set player name when receiving a digiline signal on a specific channel +-- set what to search for, when receiving a digiline signal on a specific channel local inventory_scanner_digiline = { effector = { action = function(pos, node, channel, msg) diff --git a/moremesecons_detector/playerfactions_detector.lua b/moremesecons_detector/playerfactions_detector.lua index 4bf3a33..2b4f72c 100644 --- a/moremesecons_detector/playerfactions_detector.lua +++ b/moremesecons_detector/playerfactions_detector.lua @@ -28,7 +28,7 @@ local function playerfactions_detector_on_receive_fields(pos, formname, fields, playerfactions_detector_make_formspec(pos) end --- returns true if player was found, false if not +-- returns true if a player was found who is member of all given faction, false if not local function playerfactions_detector_scan(pos) local meta = minetest.get_meta(pos) local scanname = meta:get_string("scanname") @@ -64,7 +64,7 @@ local function playerfactions_detector_scan(pos) return false end --- set player name when receiving a digiline signal on a specific channel +-- set factions to search for, when receiving a digiline signal on a specific channel local playerfactions_detector_digiline = { effector = { action = function(pos, node, channel, msg)