add settingtype with timer setting
parent
d3488b1c43
commit
8104945480
3
abm.lua
3
abm.lua
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
statistic_awards.globaltimer=0
|
statistic_awards.globaltimer=tonumber(minetest.settings:get("statistic_awards.globaltime")) or 1
|
||||||
|
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
statistic_awards.globaltimer=statistic_awards.globaltimer+dtime
|
statistic_awards.globaltimer=statistic_awards.globaltimer+dtime
|
||||||
|
@ -9,7 +9,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
for i=1, #players do
|
for i=1, #players do
|
||||||
local player=players[i]
|
local player=players[i]
|
||||||
local player_awards=awards.player(player:get_player_name())
|
local player_awards=awards.player(player:get_player_name())
|
||||||
-- print(dump2(player_awards))
|
|
||||||
local player_walked=xpfw.player_get_attribute(player,"walked")
|
local player_walked=xpfw.player_get_attribute(player,"walked")
|
||||||
local hike_award=statistic_awards.hiking[1]
|
local hike_award=statistic_awards.hiking[1]
|
||||||
if player_walked ~= nil then
|
if player_walked ~= nil then
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
statistic_awards.hiking={
|
statistic_awards.hiking={
|
||||||
{basename="statisticawards_hiking",
|
{basename="statisticawards_hiking",
|
||||||
level=1,
|
level=1,
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
|
statistic_awards.globaltime (Global time step for checking awards) float 1.5
|
||||||
|
|
Loading…
Reference in New Issue