1
0
mirror of https://github.com/mt-mods/homedecor_modpack.git synced 2024-12-23 00:20:17 +01:00

MT5 translation for homedecor_electrical

- fixes luacheck warnings
This commit is contained in:
Louis Royer 2020-08-04 21:57:14 +02:00
parent 512ae9ec67
commit 07e42fb2f5
12 changed files with 84 additions and 9 deletions

View File

@ -1,5 +0,0 @@
homedecor_common
default
basic_materials
mesecons?
mesecons_receiver?

View File

@ -1,7 +1,8 @@
local S = minetest.get_translator("homedecor_electrical")
local S = homedecor.gettext homedecor_electrical = {}
function homedecor.toggle_switch(pos, node, clicker, itemstack, pointed_thing) function homedecor_electrical.toggle_switch(pos, node, clicker, itemstack, pointed_thing)
if not clicker then return false end if not clicker then return false end
local playername = clicker:get_player_name() local playername = clicker:get_player_name()
if minetest.is_protected(pos, playername) then if minetest.is_protected(pos, playername) then
@ -18,7 +19,7 @@ end
local on_rc local on_rc
if minetest.get_modpath("mesecons") then if minetest.get_modpath("mesecons") then
on_rc = function(pos, node, clicker, itemstack, pointed_thing) on_rc = function(pos, node, clicker, itemstack, pointed_thing)
local t = homedecor.toggle_switch(pos, node, clicker, itemstack, pointed_thing) local t = homedecor_electrical.toggle_switch(pos, node, clicker, itemstack, pointed_thing)
if not t then return end if not t then return end
if string.find(node.name, "_on", -5) then if string.find(node.name, "_on", -5) then
mesecon.receptor_off(pos, mesecon.rules.buttonlike_get(node)) mesecon.receptor_off(pos, mesecon.rules.buttonlike_get(node))
@ -100,7 +101,10 @@ for _, onoff in ipairs ({"on", "off"}) do
{ -0.1875, -0.25, 0.375, 0.1875, 0.1875, 0.5 }, { -0.1875, -0.25, 0.375, 0.1875, 0.1875, 0.5 },
} }
}, },
groups = {cracky=3, dig_immediate=2, mesecon_needs_receiver=1, not_in_creative_inventory = (onoff == "on") and 1 or nil}, groups = {
cracky=3, dig_immediate=2, mesecon_needs_receiver=1,
not_in_creative_inventory = (onoff == "on") and 1 or nil
},
walkable = false, walkable = false,
drop = { drop = {
items = { items = {

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Türklingel
Light switch=Lichtschalter
Power Outlet=Steckdose

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Timbre
Light switch=Interruptor de luz
Power Outlet=Toma de corriente

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Sonnette
Light switch=Interrupteur
Power Outlet=Prise de courant

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Loceng Pintu
Light switch=Suis Lampu
Power Outlet=Palam Elektrik

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Campainha
Light switch=Interruptor de luz
Power Outlet=Cristal de Força

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Campainha
Light switch=Interruptor de luz
Power Outlet=Cristal de Força

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=Дверной звонок
Light switch=Выключатель света
Power Outlet=Розетка

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=门铃
Light switch=灯光开关
Power Outlet=电源插座

View File

@ -0,0 +1,8 @@
# textdomain: homedecor_electrical
### init.lua ###
Doorbell=
Light switch=
Power Outlet=

View File

@ -0,0 +1,4 @@
name = homedecor_electrical
description = Homedecor mod: electrical
depends = homedecor_common, default, basic_materials
optional_depends = mesecons, mesecons_receiver