1
0
mirror of https://github.com/mt-mods/pipeworks.git synced 2025-06-29 14:50:41 +02:00

39 Commits

Author SHA1 Message Date
e0b826576b Merge remote-tracking branch 'upstream/master' 2025-03-20 12:41:45 +01:00
858154cb78 Fix #145 caused by #142 Make new feature opt-in (#146)
* Update default_settings.lua and settingtypes.txt
- Make new vertical behaviour opt-in
- crop comment
2024-12-17 20:43:19 +01:00
dd660c3c1c fix crash from bad digiline msg (#144) 2024-12-01 20:00:02 -05:00
dcc62eb231 Fixes Issue #64 (#142)
* Fixes Issue #64

Uses a simple boolean setting in default_settings.lua to decide which digiline rules to use in common.lua

* Reviewer Suggestion

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* Changed Code Comment per Reviewer Suggestion

* Removed trailing whitespace from 2 comment lines.

* Modified settings comment per reviewer suggestion

* Changed variable name per reviewer suggestion.

Variable changed from use_default_digilines_rules to enable_vertical_digilines_connectivity.

---------

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2024-11-03 19:00:04 -05:00
222a865e17 Allow digging injectors without clearing the filter (#141)
Thie PR allows diging injectors without clearing their filter inventory. I can't see a reason why this was nessessary.
2024-10-20 12:13:20 -04:00
ba2e4333c5 Merge remote-tracking branch 'upstream/master' 2024-09-15 09:39:27 +02:00
7079fff85f remove hardcoded stack_max in tube registration
fixes #138
2024-09-07 20:19:46 +10:00
3189da7c9b add Russian locale (#136) 2024-09-06 06:21:42 +02:00
a2ffaa9dc3 fix nodebreaker not ejecting replacement items
fixes #137
2024-09-05 12:56:33 +10:00
63bc754889 luacheck with builtin minetest (#109)
* [PoC] luacheck with builtin minetest

* switch to `minetest+max` std for luacheck

* use branch in action

* use SX's docker image

* disable tty

* Update .github/workflows/luacheck.yml

Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>

* go back to upstream luacheck

* fix globals listing

---------

Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com>
2024-09-04 22:35:45 +03:00
171faec7e9 Optimize move_entities_globalstep_part1 (#134) 2024-08-24 12:05:27 -04:00
2f9f9a7b54 Merge remote-tracking branch 'upstream/master' 2023-11-23 00:15:18 +01:00
02322855d5 Merge remote-tracking branch 'upstream/master' 2023-06-07 22:19:10 +02:00
b11cb37123 Merge remote-tracking branch 'upstream/master' 2022-08-26 15:22:54 +02:00
503c1190ed Merge remote-tracking branch 'upstream/master' 2022-06-25 16:52:37 +02:00
5bba517b03 Merge remote-tracking branch 'upstream/master' 2022-05-27 18:46:28 +02:00
66070dd801 Merge remote-tracking branch 'upstream/master' 2022-03-06 16:37:56 +01:00
7ee74133e1 Merge remote-tracking branch 'upstream/master' 2021-06-20 17:21:30 +02:00
c01bd7b888 Merge remote-tracking branch 'upstream/master' 2021-05-09 21:42:46 +02:00
e2fdcc4fb2 Merge remote-tracking branch 'upstream/master' 2021-04-08 13:32:05 +02:00
e4db1e885e Merge remote-tracking branch 'upstream/master' 2021-04-04 21:02:57 +02:00
f7839444cd Merge remote-tracking branch 'upstream/master' 2021-03-25 21:57:03 +01:00
93f5fb3d87 Merge remote-tracking branch 'upstream/master' 2021-03-12 12:36:16 +01:00
a535bebd2e Merge remote-tracking branch 'upstream/master' 2021-02-13 14:18:53 +01:00
be2776fc46 Merge remote-tracking branch 'upstream/master' 2021-02-07 13:13:20 +01:00
ee03959a65 Merge remote-tracking branch 'upstream/master' 2020-12-20 15:26:00 +01:00
4dd30df37a Merge remote-tracking branch 'upstream/master' 2020-10-29 22:16:20 +01:00
946da11206 Merge remote-tracking branch 'upstream/master' 2020-10-18 02:13:58 +02:00
77c8026400 Merge remote-tracking branch 'upstream/master' 2020-09-26 11:40:25 +02:00
70b521c721 Merge remote-tracking branch 'upstream/master' 2020-09-11 20:50:17 +02:00
6d795b7d34 Merge remote-tracking branch 'upstream/master' 2020-08-11 20:30:19 +02:00
92249b7941 Merge remote-tracking branch 'upstream/master' 2020-07-31 22:18:16 +02:00
e04fb691ad Merge remote-tracking branch 'upstream/master' 2020-07-19 22:41:58 +02:00
ac80224371 Merge remote-tracking branch 'upstream/master' 2020-07-17 22:41:46 +02:00
34262ed8d5 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-14 21:11:09 +02:00
5cfe8d893f Merge branch 'master' of yunohost.local:mtcontrib/pipeworks into nalc-1.2-dev 2020-03-25 23:00:57 +01:00
975e20f704 Merge branch 'master' of yunohost.local:mtcontrib/pipeworks into nalc-1.2-dev 2019-12-22 14:33:13 +01:00
2693e2ecbb Merge branch 'master' into nalc-1.2 2019-05-04 19:56:03 +02:00
c93df73a5c Rend les items du groupe limitcraft non craftable par l'autocrafter 2019-03-02 19:29:26 +01:00
9 changed files with 172 additions and 28 deletions

View File

@ -256,8 +256,11 @@ local function run_autocrafter(pos, elapsed)
local inventory = meta:get_inventory()
local craft = get_craft(pos, inventory)
local output_item = craft.output.item
-- NALC: existence de limitgroup ?
local limitcraft = minetest.get_item_group(output_item:get_name(), "limitcraft") or 0
-- only use crafts that have an actual result
if output_item:is_empty() then
-- NALC: ou si l'item n'est pas dans le group limitcraft
if output_item:is_empty() or limitcraft > 0 then
meta:set_string("infotext", S("unconfigured Autocrafter: unknown recipe"))
return false
end
@ -598,11 +601,12 @@ minetest.register_node("pipeworks:autocrafter", {
if #msg < 3 then return end
local inv = meta:get_inventory()
for y = 0, 2, 1 do
local row = msg[y + 1]
for x = 1, 3, 1 do
local slot = y * 3 + x
if minetest.registered_items[msg[y + 1][x]] then
if type(row) == "table" and minetest.registered_items[row[x]] then
inv:set_stack("recipe", slot, ItemStack(
msg[y + 1][x]))
row[x]))
else
inv:set_stack("recipe", slot, ItemStack(""))
end

View File

@ -15,7 +15,17 @@ pipeworks.rules_all = {{x=0, y=0, z=1},{x=0, y=0, z=-1},{x=1, y=0, z=0},{x=-1, y
{x=0, y=1, z=0}, {x=0, y=-1, z=0}}
pipeworks.mesecons_rules={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=1,y=0,z=0},{x=-1,y=0,z=0},{x=0,y=1,z=0},{x=0,y=-1,z=0}}
pipeworks.digilines_rules={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=1,y=0,z=0},{x=-1,y=0,z=0},{x=0,y=1,z=0},{x=0,y=-1,z=0}}
local digilines_enabled = minetest.get_modpath("digilines") ~= nil
if digilines_enabled and pipeworks.enable_vertical_digilines_connectivity then
pipeworks.digilines_rules=digiline.rules.default
else
-- These rules break vertical connectivity to deployers, node breakers, dispensers, and digiline filter injectors
-- via digiline conducting tubes. Changing them may break some builds on some servers, so the setting was added
-- for server admins to be able to revert to the old "broken" behavior as some builds may use it as a "feature".
-- See https://github.com/mt-mods/pipeworks/issues/64
pipeworks.digilines_rules={{x=0,y=0,z=1},{x=0,y=0,z=-1},{x=1,y=0,z=0},{x=-1,y=0,z=0},{x=0,y=1,z=0},{x=0,y=-1,z=0}}
end
pipeworks.liquid_texture = minetest.registered_nodes[pipeworks.liquids.water.flowing].tiles[1]
if type(pipeworks.liquid_texture) == "table" then pipeworks.liquid_texture = pipeworks.liquid_texture.name end

View File

@ -31,6 +31,7 @@ local settings = {
delete_item_on_clearobject = true,
use_real_entities = true,
entity_update_interval = 0,
enable_vertical_digilines_connectivity = false,
}
pipeworks.toggles = {}

View File

@ -451,11 +451,6 @@ for _, data in ipairs({
if not pipeworks.may_configure(pos, player) then return 0 end
return count
end,
can_dig = function(pos, player)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
return inv:is_empty("main")
end,
tube = {connect_sides = {right = 1}},
}

121
locale/pipeworks.ru.tr Normal file
View File

@ -0,0 +1,121 @@
# textdomain: pipeworks
# License: CC-by-SA 4.0
# Author: VinAdmin ovvitalik@gmail.com
## generic interaction
Set=Установить
Cancel=Отмена
## digilines interfacing
Channel=Канал
## init
Allow splitting incoming stacks from tubes=Разрешить разделение входящих стопок из трубок
## autocrafter
Unknown item=Неизвестный предмет
unconfigured Autocrafter: unknown recipe=ненастроенный автокрафтер: неизвестный рецепт
unconfigured Autocrafter=ненастроенный автокрафтер
'@1' Autocrafter (@2)='@1' Автокрафтер (@2)
Save=Сохранить
paused '@1' Autocrafter=приостановлено '@1' Автокрафтер
Autocrafter=Автокрафтер
## compat-furnaces
Allow splitting incoming material (not fuel) stacks from tubes=Разрешить разделение стопок поступающего материала (не топлива) из трубок.
## decorative tubes
Airtight steelblock embedded tube=Герметичная встроенная трубка из стального блока
Airtight panel embedded tube=Герметичная встроенная в панель трубка
## devices
Pump/Intake Module=Модуль насоса/впуска
Valve=Клапан
Decorative grating=Декоративная решетка
Spigot outlet=Выходной патрубок
Airtight Pipe entry/exit=Вход/выход герметичной трубы
Flow Sensor=Датчик потока
Flow sensor (on)=Датчик расхода (вкл.)
empty=пустой
@1% full=@1% заполнено
Expansion Tank (@1)=Расширительный бак (@1)
Fluid Storage Tank (@1)=Резервуар для хранения жидкости (@1)
Fountainhead=Источник
Straight-only Pipe=Только прямая труба
## filter-injector
(slot #@1 next)=(слот #@1 следующий)
@1 Filter-Injector=@1 фильтр-инжектор
Sequence slots by Priority=Последовательность слотов по приоритету
Sequence slots Randomly=Слоты последовательности Случайный
Sequence slots by Rotation=Последовательность слотов по вращению
Exact match - off=Точное совпадение выключено
Exact match - on=Точное совпадение - включено
Prefer item types:=Предпочитаете типы предметов:
Itemwise=По пунктам
Stackwise=Стекообразно
Digiline=Диджилайн
## legacy
Auto-Tap=Авто-нажатие
## pipes
Pipe Segment=Сегмент трубы
Pipe Segment (legacy)=Сегмент трубы (устаревший)
## routing tubes
Pneumatic tube segment=Сегмент пневматической трубки
Broken Tube=Сломанная трубка
High Priority Tube Segment=Сегмент трубы с высоким приоритетом
Accelerating Pneumatic Tube Segment=Ускорительный сегмент пневматической трубки
Crossing Pneumatic Tube Segment=Пересечение сегмента пневматической трубы
One way tube=Односторонняя трубка
## signal tubes
Detecting Pneumatic Tube Segment on=Обнаружение сегмента пневматической трубки включено
Detecting Pneumatic Tube Segment=Обнаружение сегмента пневматической трубки
Digiline Detecting Pneumatic Tube Segment=Digiline обнаруживает сегмент пневматической трубки
Digiline Detecting Tube=Детекторная трубка Digiline
Conducting Pneumatic Tube Segment=Проводящий сегмент пневматической трубки
Conducting Pneumatic Tube Segment on=Проводящий сегмент пневматической трубки на
Digiline Conducting Pneumatic Tube Segment=Сегмент проводящей пневматической трубки Digiline
Mesecon and Digiline Conducting Pneumatic Tube Segment=Сегмент токопроводящей пневматической трубки Mesecon и Digiline
Mesecon and Digiline Conducting Pneumatic Tube Segment on=Сегмент проводящей пневматической трубки Mesecon и Digiline на
Tag Sorting Pneumatic Tube Segment=Сегмент пневматической трубки для сортировки тегов
Lua controlled Tube=Трубка, управляемая Lua
## sorting tubes
Sorting Pneumatic Tube Segment=Сортировка сегментов пневматической трубки
Sorting pneumatic tube=Сортировочная пневматическая труба
## teleport tube
Receive=Получить
Channels are public by default=По умолчанию каналы являются общедоступными
Use <player>:<channel> for fully private channels=Используйте <игрок>:<канал> для полностью приватных каналов
Use <player>;<channel> for private receivers=Используйте <игрок>;<канал> для частных приемников
Teleporting Pneumatic Tube Segment=Сегмент пневматической трубы для телепортации
Teleporting Tube=Телепортационная труба
Unconfigured Teleportation Tube=Неконфигурированная телепортационная труба
Sorry, channel '@1' is reserved for exclusive use by @2=Извините, канал '@1' зарезервирован исключительно для использования @2
Sorry, receiving from channel '@1' is reserved for @2=Извините, прием с канала '@1' зарезервирован для @2
Teleportation Tube @1 on '@2'=Трубка телепортации @1 на '@2'
## trashcan
Trash Can=Мусорное ведро
## tube registration
Pneumatic tube segment (legacy)=Сегмент пневматической трубы (устаревший)
## vacuum tubes
Radius=Радиус
Vacuuming Pneumatic Tube Segment=Сегмент пневматической трубки для вакуумирования
Adjustable Vacuuming Tube=Регулируемая вакуумная трубка
Adjustable Vacuuming Pneumatic Tube Segment=Регулируемый сегмент вакуумной пневматической трубки
Adjustable Vacuuming Pneumatic Tube Segment (@1m)=Регулируемый сегмент вакуумной пневматической трубки (@1m)
## wielder
Node Breaker=Разрушитель узла
Deployer=Развертыватель
Dispenser=Распылитель

View File

@ -67,36 +67,41 @@ end
minetest.register_on_shutdown(write_entities)
luaentity.entities_index = 0
local function get_blockpos(pos)
return {x = math.floor(pos.x / 16),
y = math.floor(pos.y / 16),
z = math.floor(pos.z / 16)}
end
local move_entities_globalstep_part1
local is_active
if pipeworks.use_real_entities then
local active_blocks = {} -- These only contain active blocks near players (i.e., not forceloaded ones)
local function get_blockpos(pos)
return {x = math.floor(pos.x / 16),
y = math.floor(pos.y / 16),
z = math.floor(pos.z / 16)}
end
move_entities_globalstep_part1 = function(dtime)
local active_block_range = tonumber(minetest.settings:get("active_block_range")) or 2
local new_active_blocks = {}
for key in pairs(active_blocks) do
active_blocks[key] = nil
end
for _, player in ipairs(minetest.get_connected_players()) do
local blockpos = get_blockpos(player:get_pos())
local minp = vector.subtract(blockpos, active_block_range)
local maxp = vector.add(blockpos, active_block_range)
local minpx = blockpos.x - active_block_range
local minpy = blockpos.y - active_block_range
local minpz = blockpos.z - active_block_range
local maxpx = blockpos.x + active_block_range
local maxpy = blockpos.y + active_block_range
local maxpz = blockpos.z + active_block_range
for x = minp.x, maxp.x do
for y = minp.y, maxp.y do
for z = minp.z, maxp.z do
local pos = {x = x, y = y, z = z}
new_active_blocks[minetest.hash_node_position(pos)] = pos
end
end
for x = minpx, maxpx do
for y = minpy, maxpy do
for z = minpz, maxpz do
local pos = {x = x, y = y, z = z}
active_blocks[minetest.hash_node_position(pos)] = true
end
end
end
end
active_blocks = new_active_blocks
-- todo: callbacks on block load/unload
end

View File

@ -85,6 +85,14 @@ pipeworks_use_real_entities (Use Real Entities) bool true
#A value 0.2 or above may cause issues with accelerator tubes.
pipeworks_entity_update_interval (Entity Update Interval) float 0 0 0.8
# Use the default rules from the digilines mod.
# If enabled the following devices will connect to digiline networks in the vertical direction:
# digiline filter injector, deployer, dispenser, node breaker, autocrafter
# This breaks expected behavior with digiline conducting tubes.
# If disabled, the devices will not be able to send or recieve digiline signals from the top
# or bottom faces, regardless of the node rotation.
enable_vertical_digilines_connectivity (Use the default rules from the digilines mod) bool false
# if set to true, items passing through teleport tubes will log log where they came from and where they went.
pipeworks_log_teleport_tubes (Log Teleport Tubes) bool false

View File

@ -112,7 +112,6 @@ local register_one_tube = function(name, tname, dropname, desc, plain, noctrs, e
key = "node_sound_wood_defaults",
},
walkable = true,
stack_max = 99,
basename = name,
style = style,
drop = string.format("%s_%s", name, dropname),

View File

@ -251,7 +251,8 @@ if pipeworks.enable_node_breaker then
local old_stack = ItemStack(stack)
local item_def = minetest.registered_items[stack:get_name()]
if item_def.on_use then
fakeplayer:set_wielded_item(item_def.on_use(stack, fakeplayer, pointed) or stack)
stack = item_def.on_use(stack, fakeplayer, pointed) or stack
fakeplayer:set_wielded_item(stack)
else
local node = minetest.get_node(pointed.under)
local node_def = minetest.registered_nodes[node.name]