Remove trailing whitespace

This commit is contained in:
ShadowNinja 2014-01-19 13:27:52 -05:00
parent d560bcd6f0
commit 26473a8346
5 changed files with 13 additions and 13 deletions

@ -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

@ -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

@ -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

@ -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

@ -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,
})