mirror of
https://github.com/mt-mods/pipeworks.git
synced 2025-07-20 01:00:24 +02:00
Compare commits
19 Commits
2021-02-19
...
93f5fb3d87
Author | SHA1 | Date | |
---|---|---|---|
93f5fb3d87 | |||
9ad6e5d07a | |||
31e1255245 | |||
a535bebd2e | |||
be2776fc46 | |||
ee03959a65 | |||
4dd30df37a | |||
946da11206 | |||
77c8026400 | |||
70b521c721 | |||
6d795b7d34 | |||
92249b7941 | |||
e04fb691ad | |||
ac80224371 | |||
34262ed8d5 | |||
5cfe8d893f | |||
975e20f704 | |||
2693e2ecbb | |||
c93df73a5c |
8
.gitlab-ci.yml
Normal file
8
.gitlab-ci.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
stages:
|
||||||
|
- test
|
||||||
|
|
||||||
|
luacheck:
|
||||||
|
stage: test
|
||||||
|
image: pipelinecomponents/luacheck:latest
|
||||||
|
script:
|
||||||
|
- luacheck .
|
24
.luacheckrc
Normal file
24
.luacheckrc
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
unused_args = false
|
||||||
|
max_line_length= 240
|
||||||
|
redefined = false
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
"pipeworks",
|
||||||
|
"luaentity"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
-- Stdlib
|
||||||
|
string = {fields = {"split"}},
|
||||||
|
table = {fields = {"copy", "getn"}},
|
||||||
|
|
||||||
|
-- Minetest
|
||||||
|
"vector", "ItemStack",
|
||||||
|
"dump", "minetest",
|
||||||
|
"VoxelManip", "VoxelArea",
|
||||||
|
|
||||||
|
-- mods
|
||||||
|
"default", "mesecon", "digiline",
|
||||||
|
"screwdriver"
|
||||||
|
|
||||||
|
}
|
@ -67,8 +67,11 @@ local function run_autocrafter(pos, elapsed)
|
|||||||
local inventory = meta:get_inventory()
|
local inventory = meta:get_inventory()
|
||||||
local craft = get_craft(pos, inventory)
|
local craft = get_craft(pos, inventory)
|
||||||
local output_item = craft.output.item
|
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
|
-- 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"))
|
meta:set_string("infotext", S("unconfigured Autocrafter: unknown recipe"))
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user