removed intllib
This commit is contained in:
parent
1a7686bd39
commit
990e41ee90
@ -1,5 +0,0 @@
|
||||
default
|
||||
wool
|
||||
player_api?
|
||||
pova?
|
||||
intllib?
|
@ -1 +0,0 @@
|
||||
beds which allows sleep, featured to (auto) skip the night.
|
@ -1,5 +1,4 @@
|
||||
local S = beds.get_translator
|
||||
local is_50 = minetest.get_modpath("player_api")
|
||||
local is_54 = minetest.has_feature("direct_velocity_on_players")
|
||||
local is_pova = minetest.get_modpath("pova")
|
||||
local pi = math.pi
|
||||
@ -106,13 +105,8 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||
player:set_look_horizontal(math.random(1, 180) / 100)
|
||||
|
||||
if is_50 then
|
||||
player_api.player_attached[name] = false
|
||||
player_api.set_animation(player, "stand" , 30)
|
||||
else
|
||||
default.player_attached[name] = false
|
||||
default.player_set_animation(player, "stand" , 30)
|
||||
end
|
||||
|
||||
hud_flags.wielditem = true
|
||||
|
||||
@ -175,13 +169,8 @@ local function lay_down(player, pos, bed_pos, state, skip)
|
||||
|
||||
player:set_pos(p)
|
||||
|
||||
if is_50 then
|
||||
player_api.player_attached[name] = true
|
||||
player_api.set_animation(player, "lay" , 0)
|
||||
else
|
||||
default.player_attached[name] = true
|
||||
default.player_set_animation(player, "lay" , 0)
|
||||
end
|
||||
|
||||
hud_flags.wielditem = false
|
||||
end
|
||||
|
12
init.lua
12
init.lua
@ -2,23 +2,13 @@
|
||||
local S
|
||||
if minetest.get_translator ~= nil then
|
||||
S = minetest.get_translator("beds") -- 5.x translation function
|
||||
else
|
||||
if minetest.get_modpath("intllib") then
|
||||
dofile(minetest.get_modpath("intllib") .. "/init.lua")
|
||||
if intllib.make_gettext_pair then
|
||||
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
|
||||
else
|
||||
gettext = intllib.Getter() -- old text file method
|
||||
end
|
||||
S = gettext
|
||||
else -- boilerplate function for 0.4
|
||||
else -- boilerplate function for 0.4
|
||||
S = function(str, ...)
|
||||
local args = {...}
|
||||
return str:gsub("@%d+", function(match)
|
||||
return args[tonumber(match:sub(2))]
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user