renaming and removing dust

This commit is contained in:
waxtatect 2024-12-21 17:02:07 +01:00
parent e550ff39de
commit 8139b87d5b
8 changed files with 20 additions and 22 deletions

View File

@ -1,15 +1,15 @@
## Basic Machines
Lightweight automation mod for [Minetest](https://www.minetest.net)
Lightweight automation mod for [Luanti](https://www.luanti.org/) (formerly Minetest)
![(screenshot)](screenshot.png)
This is a modified version of basic_machines mod written by rnd:\
 https://github.com/ac-minetest/basic_machines, [Minetest forum topic](https://forum.minetest.net/viewtopic.php?t=12033)
 https://github.com/ac-minetest/basic_machines, [Luanti forum topic](https://forum.luanti.org/viewtopic.php?t=12033)
Useful link: [:octocat:](https://github.com/waxtatect/basic_machines "Basic Machines repository")
At least [Minetest](https://www.minetest.net) version 5.4.0 is needed
Get the latest version of Luanti: [downloads](https://www.luanti.org/downloads/) (at least Minetest version 5.4.0 is required)
### Manual
@ -21,7 +21,7 @@ At least [Minetest](https://www.minetest.net) version 5.4.0 is needed
---
(c) 2015-2016 rnd\
textures by rnd, new textures by SaKeL (2016) and Jozet (2017)\
Copyright (C) 2022-2023 мтест
Copyright (C) 2022-2024 мтест
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,6 +1,6 @@
-- basic_machines: lightweight automation mod for minetest
-- basic_machines: lightweight automation mod for Luanti
-- (c) 2015-2016 rnd
-- Copyright (C) 2022-2023 мтест
-- Copyright (C) 2022-2024 мтест
--[[
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -220,7 +220,7 @@ DETECTOR: Position is protected. Aborting.=
DETECTOR: All coordinates must be between @1 and @2.=
Detector help=
Setup: Right click or punch and follow chat instructions (hold sneak and punch a block to abort setup). With a detector you can detect nodes, objects, players, items inside inventories, nodes information and light levels. If detector activates it will trigger machine (on or off) at target position.@n@nThere are 6 modes of operation - node/player/object/inventory/infotext/light detection. Inside detection filter write node/player/object name or infotext/light level. If you detect node/player/object you can specify a range of detection. If you want detector to activate target precisely when its not triggered set output signal to 1.@n@nFor example, to detect empty space write air, to detect tree write default:tree, to detect ripe wheat write farming:wheat_8, for flowing water write default:water_flowing... If mode is inventory it will check for items in specified inventory of source node like a chest.@n@nAdvanced:@nIn inventory (must set a filter)/node detection mode, you can specify a second source and select AND/OR from the right top dropdown list to do logical operations.@nYou can also filter output signal in any modes:@n-2@=only OFF, -1@=NOT, 0/1@=normal, 2@=only ON, 3@=only if changed, 4@=if target is keypad set its text to detected object name.=
MOVER: Wrong filter - must be name of existing minetest block=
MOVER: Wrong filter - must be the name of an existing block=
Mesecon Adapter: place machine to be activated on top=
Mesecon Adapter=
This will move blocks as they are - without change@nUpgrade with movers to process additional blocks=

View File

@ -454,7 +454,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
end
meta:set_string("mode", mode)
else
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be name of existing minetest block"))
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be the name of an existing block"))
end
end
@ -469,7 +469,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
meta:set_string("prefer", prefer)
meta:get_inventory():set_list("filter", {})
else
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be name of existing minetest block"))
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be the name of an existing block"))
end
end
@ -552,7 +552,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
minetest.show_formspec(name, "basic_machines:mover_" .. minetest.pos_to_string(pos),
basic_machines.get_mover_form(pos))
else
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be name of existing minetest block"))
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be the name of an existing block"))
end
end
@ -736,9 +736,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local pass = fields.pass or ""
if pass == "" then
if meta:get_string("pass") ~= "" then
meta:set_string("pass", "")
end
meta:set_string("pass", "")
else
local mpass = meta:get_string("pass")
if pass ~= mpass then

View File

@ -1,7 +1,7 @@
------------------------------------------------------------------------------------------------------------------------
-- BASIC MACHINES MOD by rnd
-- Mod with basic simple automatization for minetest
-- No background processing, just two abms (clock generator, generator), no other lag causing background processing
-- Mod with basic simple automatization for Luanti
-- No background processing, just two abms (clock generator and generator), no other lag causing background processing
------------------------------------------------------------------------------------------------------------------------
-- (c) 2015-2016 rnd
-- Copyright (C) 2022-2024 мтест
@ -462,7 +462,7 @@ minetest.register_node("basic_machines:mover", {
local filter_stack = basic_machines.itemstring_to_stack(prefer, palette_index)
inv:set_stack("filter", 1, filter_stack)
else
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be name of existing minetest block")); return 0
minetest.chat_send_player(name, S("MOVER: Wrong filter - must be the name of an existing block")); return 0
end
minetest.show_formspec(name, "basic_machines:mover_" .. minetest.pos_to_string(pos),
basic_machines.get_mover_form(pos))

View File

@ -1,5 +1,5 @@
-- (c) 2015-2016 rnd
-- Copyright (C) 2022-2023 мтест
-- Copyright (C) 2022-2024 мтест
-- See README.md for license details
local F, S = basic_machines.F, basic_machines.S
@ -33,7 +33,7 @@ if basic_machines.settings.mover_no_large_stacks then
end
end
-- anal retentive change in minetest 5.0.0 to minetest 5.1.0 (#7011) changing unknown node warning into crash
-- anal retentive change in Minetest 5.0.0 to Minetest 5.1.0 (#7011) changing unknown node warning into crash
-- forcing many checks with all possible combinations + adding many new crashes combinations
basic_machines.check_mover_filter = function(mode, pos, meta, filter) -- mover input validation, is it correct node
filter = filter or meta:get_string("prefer")

View File

@ -8,7 +8,7 @@ local mover_dig_up_table = basic_machines.get_mover("dig_up_table")
local mover_hardness = basic_machines.get_mover("hardness")
local mover_harvest_table = basic_machines.get_mover("harvest_table")
local mover_plants_table = basic_machines.get_mover("plants_table")
local check_for_falling = minetest.check_for_falling or nodeupdate -- 1st for mt 5.0.0+, 2nd for 0.4.17.1 and older
local check_for_falling = minetest.check_for_falling or nodeupdate -- 1st for Minetest 5.0.0+, 2nd for Minetest 0.4.17.1 and older
local check_palette_index = basic_machines.check_palette_index
local get_distance = basic_machines.get_distance
local have_bucket_liquids = minetest.global_exists("bucket") and bucket.liquids
@ -20,7 +20,7 @@ local use_farming = minetest.global_exists("farming")
local use_x_farming = minetest.global_exists("x_farming")
local math_min = math.min
-- minetest drop code emulation, other idea: minetest.get_node_drops
-- drop code emulation, other idea: minetest.get_node_drops
local function add_node_drops(node_name, pos, node, filter, node_def, param2)
local def = node_def or minetest.registered_nodes[node_name]
if def then
@ -376,7 +376,7 @@ local function dig(pos, meta, owner, prefer, pos1, node1, node1_name, source_che
else
minetest.add_item(pos1, itemname)
end
-- borrowed and adapted from bucket mod
-- borrowed and adapted from minetest_game bucket mod
-- https://github.com/minetest/minetest_game/tree/master/mods/bucket
-- GNU Lesser General Public License, version 2.1
-- Copyright (C) 2011-2016 Kahrl <kahrl@gmx.net>

View File

@ -61,7 +61,7 @@ local function object(pos, meta, owner, prefer, pos1, _, _, _, pos2, mreverse)
end
end
end
elseif prefer == "bucket:bucket_empty" and detected_obj_name == "mobs_animal:cow" then -- milk cows, bucket and mobs_animals mods needed
elseif prefer == "bucket:bucket_empty" and detected_obj_name == "mobs_animal:cow" then -- milk cows, minetest_game bucket mod and mob_animals mods needed
if lua_entity and not lua_entity.child and not lua_entity.gotten then -- already milked ?
inv = inv or minetest.get_meta(pos2):get_inventory()
if inv:contains_item("main", "bucket:bucket_empty") then