local path = minetest.get_modpath("self_care")

dofile(path.."/core/funcs.lua")
dofile(path.."/core/timers.lua")
dofile(path.."/core/effects.lua")

dofile(path.."/products/products.lua")
dofile(path.."/products/crafts.lua")

--	[ guide ]

local esc = minetest.formspec_escape
function selfcare.form.Home(name) -- home page can be called globally
    local form = "size[8,10]" ..
	"background[0.5,2;0,0;#000000" .. -- need a page texture !!
	"label[2,0;t h e     s e l f c a r e     g u i d e b o o k]" ..
	--"label[0.5,0.8;entries :]" ..
	--"button[2,0.4;3,1.5;body;Body]" ..
	"table[0,0.8;7.7,9.2;;BASIC BODY HYGIENE:, wash with bodysoap when you smell bad".. esc(", ") .."use body scrub if your skin is dirty, and bodylotion if your skin is dry/flaky]" ..
	"button_exit[7.8,-0.2;0.5,0.1;exit;X]"

    minetest.show_formspec(name, "self_care:guide_home", form)
    return form
end

--[[minetest.register_craftitem("self_care:guide", {
    description = "Guide",
    inventory_image = "default_book.png^[brighten:20", -- need a guide texture...
    on_use = function(itemstack, user)
	local name = user:get_player_name()
	selfcare.form.Home(name)
    end
})]]