Optimize mod check

This commit is contained in:
tacotexmex 2018-02-19 21:09:37 +01:00
parent d3254916c2
commit 0aa19f99c5
1 changed files with 3 additions and 6 deletions

View File

@ -22,13 +22,10 @@ local sprint_timer_step = 0.5
local sprint_timer = 0
local stamina_timer = 0
local breath_timer = 0
local hudbars = false
local starve = false
local monoids = false
if minetest.get_modpath("hudbars") ~= nil then hudbars = true else hudbars = false end
if minetest.get_modpath("hbhunger") ~= nil then starve = true else starve = false end
if minetest.get_modpath("player_monoids") ~= nil then monoids = true else monoids = false end
local hudbars = minetest.get_modpath("hudbars") or false
local starve = minetest.get_modpath("hbhunger") or false
local monoids = minetest.get_modpath("player_monoids") or false
-- Functions