fix comments

This commit is contained in:
Hendrik Langer 2021-11-29 20:24:08 +01:00
parent 0e64b5deed
commit 93861d9eeb
3 changed files with 7 additions and 8 deletions

View File

@ -28,7 +28,7 @@ local function awards_detector_on_receive_fields(pos, formname, fields, sender)
awards_detector_make_formspec(pos) awards_detector_make_formspec(pos)
end 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 function awards_detector_scan(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local scanname = meta:get_string("scanname") local scanname = meta:get_string("scanname")
@ -44,11 +44,11 @@ local function awards_detector_scan(pos)
-- abort if no scan results were found -- abort if no scan results were found
if next(objs) == nil then return false end if next(objs) == nil then return false end
local scan_for = {} local scan_for = {}
for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do
scan_for[str] = 0 scan_for[str] = 0
end end
--[[ --[[
for _, obj in pairs(objs) do for _, obj in pairs(objs) do
if obj:is_player() then if obj:is_player() then
@ -85,7 +85,7 @@ local function awards_detector_scan(pos)
return false return false
end 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 = { local awards_detector_digiline = {
effector = { effector = {
action = function(pos, node, channel, msg) action = function(pos, node, channel, msg)

View File

@ -28,7 +28,7 @@ local function inventory_scanner_on_receive_fields(pos, formname, fields, sender
inventory_scanner_make_formspec(pos) inventory_scanner_make_formspec(pos)
end 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 function inventory_scanner_scan(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local scanname = meta:get_string("scanname") local scanname = meta:get_string("scanname")
@ -43,7 +43,6 @@ local function inventory_scanner_scan(pos)
-- abort if no scan results were found -- abort if no scan results were found
if next(objs) == nil then return false end if next(objs) == nil then return false end
local scan_for = {} local scan_for = {}
for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do for _, str in pairs(string.split(scanname:gsub(" ", ""), ",")) do
scan_for[str] = true scan_for[str] = true
@ -71,7 +70,7 @@ local function inventory_scanner_scan(pos)
return false return false
end 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 = { local inventory_scanner_digiline = {
effector = { effector = {
action = function(pos, node, channel, msg) action = function(pos, node, channel, msg)

View File

@ -28,7 +28,7 @@ local function playerfactions_detector_on_receive_fields(pos, formname, fields,
playerfactions_detector_make_formspec(pos) playerfactions_detector_make_formspec(pos)
end 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 function playerfactions_detector_scan(pos)
local meta = minetest.get_meta(pos) local meta = minetest.get_meta(pos)
local scanname = meta:get_string("scanname") local scanname = meta:get_string("scanname")
@ -64,7 +64,7 @@ local function playerfactions_detector_scan(pos)
return false return false
end 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 = { local playerfactions_detector_digiline = {
effector = { effector = {
action = function(pos, node, channel, msg) action = function(pos, node, channel, msg)