summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--api.lua2
-rw-r--r--callbacks.lua12
-rw-r--r--init.lua4
-rw-r--r--internal.lua4
-rw-r--r--register.lua4
5 files changed, 13 insertions, 13 deletions
diff --git a/api.lua b/api.lua
index f090712..c5ec877 100644
--- a/api.lua
+++ b/api.lua
@@ -11,7 +11,7 @@ minetest.after(0.01, function()
if unified_inventory.crafts_table[name] == nil then
unified_inventory.crafts_table[name] = {}
end
- if recipes then
+ if recipes then
for i=1,#recipes,1 do
table.insert(unified_inventory.crafts_table[name],recipes[i])
end
diff --git a/callbacks.lua b/callbacks.lua
index 38ae6d3..d229011 100644
--- a/callbacks.lua
+++ b/callbacks.lua
@@ -11,7 +11,7 @@ minetest.register_on_joinplayer(function(player)
unified_inventory.current_item[player_name] = nil
unified_inventory.set_inventory_formspec(player,
unified_inventory.default)
-
+
-- Crafting guide inventories
local inv = minetest.create_detached_inventory(player_name.."craftrecipe", {
allow_put = function(inv, listname, index, stack, player)
@@ -62,7 +62,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return
end
end
-
+
-- Inventory page controls
local start = math.floor(
unified_inventory.current_index[player_name] / 80 + 1)
@@ -70,7 +70,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
local pagemax = math.floor(
(#unified_inventory.filtered_items_list[player_name] - 1)
/ (80) + 1)
-
+
if fields.start_list then
minetest.sound_play("paperflip1",
{to_player=player_name, gain = 1.0})
@@ -155,8 +155,8 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
unified_inventory.current_page[player_name])
minetest.sound_play("paperflip2",
{to_player=player_name, gain = 1.0})
- end
-
+ end
+
-- alternate button
if fields.alternate then
minetest.sound_play("click",
@@ -174,7 +174,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if alternate > alternates then
alternate = 1
end
- unified_inventory.alternate[player_name] = alternate
+ unified_inventory.alternate[player_name] = alternate
unified_inventory.set_inventory_formspec(player,
unified_inventory.current_page[player_name])
end
diff --git a/init.lua b/init.lua
index 3f26fef..ec4105f 100644
--- a/init.lua
+++ b/init.lua
@@ -24,12 +24,12 @@ unified_inventory.buttons = {}
unified_inventory.home_pos = {}
unified_inventory.home_filename =
worldpath.."/unified_inventory_home.home"
-
+
-- Default inventory page
unified_inventory.default = "craft"
-- Disable default creative inventory
-if creative_inventory then
+if creative_inventory then
function creative_inventory.set_creative_formspec(player, start_i, pagenum)
return
end
diff --git a/internal.lua b/internal.lua
index c88babf..3696cfc 100644
--- a/internal.lua
+++ b/internal.lua
@@ -62,7 +62,7 @@ function unified_inventory.get_formspec(player, page)
local item = {}
for y = 0, 9 do
for x = 0, 7 do
- local name = unified_inventory.filtered_items_list[player_name][list_index]
+ local name = unified_inventory.filtered_items_list[player_name][list_index]
if minetest.registered_items[name] then
formspec = formspec.."item_image_button["
..(8.2 + x * 0.7)..","
@@ -89,7 +89,7 @@ end
--apply filter to the inventory list (create filtered copy of full one)
function unified_inventory.apply_filter(player, filter)
- local player_name = player:get_player_name()
+ local player_name = player:get_player_name()
local size = 0
local lfilter = string.lower(filter)
if not pcall(function() ("technic:test"):find(lfilter) end) then
diff --git a/register.lua b/register.lua
index 66384bf..7725aaa 100644
--- a/register.lua
+++ b/register.lua
@@ -62,7 +62,7 @@ unified_inventory.register_button("misc_set_day", {
image = "ui_sun_icon.png",
action = function(player)
local player_name = player:get_player_name()
- if minetest.check_player_privs(player_name, {settime=true}) then
+ if minetest.check_player_privs(player_name, {settime=true}) then
minetest.sound_play("birds",
{to_player=player_name, gain = 1.0})
minetest.set_timeofday((6000 % 24000) / 24000)
@@ -90,7 +90,7 @@ unified_inventory.register_button("misc_set_night", {
else
minetest.chat_send_player(player_name,
"You don't have the"
- .." settime priviledge!")
+ .." settime priviledge!")
end
end,
})