Luacheck + german translation
This commit is contained in:
parent
6b41479a07
commit
4f83b32e4a
8
.gitlab-ci.yml
Normal file
8
.gitlab-ci.yml
Normal file
@ -0,0 +1,8 @@
|
||||
image: abaez/luarocks
|
||||
|
||||
test:
|
||||
stage: test
|
||||
before_script:
|
||||
- luarocks install --local luacheck
|
||||
script:
|
||||
- $HOME/.luarocks/bin/luacheck .
|
16
.luacheckrc
Normal file
16
.luacheckrc
Normal file
@ -0,0 +1,16 @@
|
||||
unused_args = false
|
||||
|
||||
ignore = {
|
||||
"631" -- Line is too long
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
"minetest",
|
||||
"ItemStack",
|
||||
"techage",
|
||||
"default",
|
||||
}
|
||||
|
||||
globals = {
|
||||
"ta_apiary"
|
||||
}
|
@ -81,7 +81,7 @@ local function tube_add_to_hive(pos, input_stack)
|
||||
input_stack:set_count(input_stack:get_count() - 1)
|
||||
|
||||
meta:set_string("queen", "bees:queen")
|
||||
meta:set_string("infotext", S("Queen inserted, now for the empty frames"))
|
||||
meta:set_string("infotext", S("Queen inserted, now the empty frames"))
|
||||
if inv:contains_item("frames", "bees:frame_empty") then
|
||||
timer:start(30)
|
||||
meta:set_string("infotext", S("Bees are aclimating"))
|
||||
@ -259,7 +259,7 @@ minetest.register_node("ta_apiary:bee_hive", {
|
||||
|
||||
if listname == "queen" or listname == "frames" then
|
||||
meta:set_string("queen", stack:get_name())
|
||||
meta:set_string("infotext", S("Queen inserted, now for the empty frames"))
|
||||
meta:set_string("infotext", S("Queen inserted, now the empty frames"))
|
||||
|
||||
if inv:contains_item("frames", "bees:frame_empty") then
|
||||
timer:start(30)
|
||||
|
@ -122,13 +122,13 @@ local function sink_honey(pos, crd, nvm, inv)
|
||||
return
|
||||
end
|
||||
|
||||
local put_items = space_for_items(inv, "dst", "mobs:honey", get_items)
|
||||
put_items = space_for_items(inv, "dst", "mobs:honey", get_items)
|
||||
if put_items < 1 then
|
||||
crd.State:blocked(pos, nvm)
|
||||
return
|
||||
end
|
||||
|
||||
put_stack = ItemStack({name = "mobs:honey", count = put_items})
|
||||
local put_stack = ItemStack({name = "mobs:honey", count = put_items})
|
||||
inv:remove_item("src", put_stack)
|
||||
inv:add_item("dst", put_stack)
|
||||
crd.State:keep_running(pos, nvm, COUNTDOWN_TICKS)
|
||||
@ -140,7 +140,7 @@ local function keep_running(pos, elapsed)
|
||||
local inv = M(pos):get_inventory()
|
||||
sink_honey(pos, crd, nvm, inv)
|
||||
end
|
||||
|
||||
--[[
|
||||
local function on_receive_fields(pos, formname, fields, player)
|
||||
if minetest.is_protected(pos, player:get_player_name()) then
|
||||
return
|
||||
@ -156,7 +156,7 @@ local function can_dig(pos, player)
|
||||
local inv = M(pos):get_inventory()
|
||||
return inv:is_empty("dst") and inv:is_empty("src")
|
||||
end
|
||||
|
||||
]]--
|
||||
|
||||
local tiles = {}
|
||||
-- '#' will be replaced by the stage number
|
||||
|
14
lib.lua
14
lib.lua
@ -15,16 +15,8 @@ local M = minetest.get_meta
|
||||
|
||||
ta_apiary = {}
|
||||
|
||||
if minetest.get_translator then
|
||||
ta_apiary.bees_S = minetest.get_translator("bees")
|
||||
ta_apiary.S = minetest.get_translator("ta_apiary")
|
||||
elseif minetest.global_exists("intllib") then
|
||||
ta_apiary.bees_S = intllib.Getter()
|
||||
ta_apiary.S = intllib.Getter()
|
||||
else
|
||||
ta_apiary.bees_S = function(s) return s end
|
||||
ta_apiary.S = function(s) return s end
|
||||
end
|
||||
ta_apiary.bees_S = minetest.get_translator("bees")
|
||||
ta_apiary.S = minetest.get_translator("ta_apiary")
|
||||
|
||||
ta_apiary.CRD = function(pos) return (minetest.registered_nodes[techage.get_node_lvm(pos).name] or {}).consumer or {} end
|
||||
|
||||
@ -46,7 +38,7 @@ ta_apiary.allow_metadata_inventory_move =
|
||||
function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||
local inv = M(pos):get_inventory()
|
||||
local stack = inv:get_stack(from_list, from_index)
|
||||
return allow_metadata_inventory_put(pos, to_list, to_index, stack, player)
|
||||
return ta_apiary.allow_metadata_inventory_put(pos, to_list, to_index, stack, player)
|
||||
end
|
||||
|
||||
ta_apiary.allow_metadata_inventory_take =
|
||||
|
9
locale/ta_apiary.de.tr
Normal file
9
locale/ta_apiary.de.tr
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: ta_apiary
|
||||
Requires Queen bee to function=Benötigt die Bienenkönigin zum Funktionieren
|
||||
Bees are aclimating=Bienen akklimatisieren
|
||||
Queen inserted, now the empty frames=Königin hineingelegt, jetzt die leeren Rahmen
|
||||
progress:=Fortschritt:
|
||||
Does not have empty frame(s)=Hat keinen leeren Rahmen
|
||||
Honey Extractor=Honigschleuder
|
||||
Extracting=Extrahieren
|
||||
Honey Sink=Honigspüle
|
9
locale/template.txt
Normal file
9
locale/template.txt
Normal file
@ -0,0 +1,9 @@
|
||||
# textdomain: ta_apiary
|
||||
Requires Queen bee to function=
|
||||
Bees are aclimating=
|
||||
Queen inserted, now the empty frames=
|
||||
progress:=
|
||||
Does not have empty frame(s)=
|
||||
Honey Extractor=
|
||||
Extracting=
|
||||
Honey Sink=
|
Loading…
x
Reference in New Issue
Block a user