hardtorch/content/oil.lua

44 lines
954 B
Lua
Raw Normal View History

--[[
2019-12-02 09:12:11 -08:00
Mod HardTorch for Minetest
2019-12-04 08:49:43 -08:00
Copyright (C) 2017-2019 BrunoMine (https://github.com/BrunoMine)
2019-12-02 09:12:11 -08:00
You should have received a copy of the GNU General Public License
2019-12-04 08:49:43 -08:00
along with this program. If not, see <https://www.gnu.org/licenses/>.
2019-12-02 09:12:11 -08:00
Oil
]]
2019-12-01 05:56:43 -08:00
-- Used for localization
local S = minetest.get_translator("hardtorch")
2019-12-02 09:12:11 -08:00
-- Durability of oil (in nights)
-- Durabilidade do oleo (em noites)
2019-12-01 05:56:43 -08:00
local oil_nights = math.abs(tonumber(minetest.settings:get("hardtorch_oil_nights") or 1.2))
2017-09-02 06:28:32 -07:00
if oil_nights <= 0 then oil_nights = 1.2 end
2019-12-02 09:12:11 -08:00
-- Oil
-- Oleo
minetest.register_tool("hardtorch:oil", {
2019-12-01 05:56:43 -08:00
description = S("Oil"),
inventory_image = "hardtorch_oil.png",
2019-12-01 05:56:43 -08:00
})
2019-12-02 09:12:11 -08:00
-- Register fuel
-- Registrar combustivel
hardtorch.register_fuel("hardtorch:oil", {
turns = oil_nights,
})
2019-12-02 09:12:11 -08:00
-- Oil recipes
-- Receitas para oleo
minetest.register_craft({
output = 'hardtorch:oil',
recipe = {
2017-09-02 06:28:32 -07:00
{'default:coal_lump'},
{'default:coal_lump'},
{'default:coal_lump'},
}
})