Skip to content

Commit

Permalink
Ajustes de configurações e documentação
Browse files Browse the repository at this point in the history
  • Loading branch information
BrunoMine committed Sep 5, 2019
1 parent 91ebdbe commit bcd2111
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
HardTorch v0.5.5
HardTorch v0.5.6
================

[![Baixar](https://img.shields.io/github/tag/BrunoMine/hardtorch.svg?style=flat-square&label=release)](https://github.com/BrunoMine/hardtorch/archive/master.zip)
Expand All @@ -11,7 +11,7 @@ Este mod vai tornar as tochas muito mais realistas.
_This mod will make torches much more realistic._

## Requisitos _(Requirements)_
* Minetest 0.4.16
* Minetest 0.4.16 (ou superior|_or later_)
* Mod default
* Mod fire

Expand Down
2 changes: 1 addition & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ dofile(modpath.."/api.lua")
dofile(modpath.."/oil.lua")
dofile(modpath.."/torchs/torch.lua")
dofile(modpath.."/torchs/lamp.lua")
dofile(modpath.."/torchs/candle.lua")
dofile(modpath.."/torchs/xdecor_candle.lua")
notificar("[OK]!")


Expand Down
8 changes: 8 additions & 0 deletions minetest.conf.example
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,11 @@
# This will ignore the true duration of the night in the game.
# Set 0 to disable.
#hardtorch_night_time = 0

# Numero de noites que uma Vela perdura acesa.
# Number of nights a Candle remains lit.
#hardtorch_xdecor_candle_nights = 0.8

# Luminosidade da Vela Acesa (limite: 14)
# Light source of Candle Lit (limit: 14)
#hardtorch_xdecor_candle_light_source = 7
8 changes: 4 additions & 4 deletions torchs/candle.lua → torchs/xdecor_candle.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
Public License junto com esse software,
se não, veja em <http://www.gnu.org/licenses/>.
Registro de Candieiro (candle) do mod xdecor
Registro de Vela (candle) do mod xdecor
]]

if minetest.registered_nodes["xdecor:candle"] == nil then return end

-- Luminosidade da lamparina
local candle_light_source = hardtorch.check_light_number(minetest.settings:get("hardtorch_candle_light_source") or 7)
local candle_light_source = hardtorch.check_light_number(minetest.settings:get("hardtorch_xdecor_candle_light_source") or 7)

-- Noites de durabilidade da tocha
local candle_nights = math.abs(tonumber(minetest.settings:get("hardtorch_candle_nights") or 0.8))
local candle_nights = math.abs(tonumber(minetest.settings:get("hardtorch_xdecor_candle_nights") or 0.8))
if candle_nights <= 0 then candle_nights = 0.8 end


-- Ajuste no candieiro padrão
-- Ajuste na vela (candle) do mod xdecor
do
minetest.override_item("xdecor:candle", {
-- Muda imagem para jogador saber que tem que acendela
Expand Down

0 comments on commit bcd2111

Please sign in to comment.