diff --git a/abm.lua b/abm.lua index 3121fde..a3fdb66 100644 --- a/abm.lua +++ b/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) statistic_awards.globaltimer=statistic_awards.globaltimer+dtime @@ -9,7 +9,6 @@ minetest.register_globalstep(function(dtime) for i=1, #players do local player=players[i] local player_awards=awards.player(player:get_player_name()) --- print(dump2(player_awards)) local player_walked=xpfw.player_get_attribute(player,"walked") local hike_award=statistic_awards.hiking[1] if player_walked ~= nil then diff --git a/config.lua b/config.lua index a27bb7b..1b6dcaf 100644 --- a/config.lua +++ b/config.lua @@ -1,3 +1,6 @@ + + + statistic_awards.hiking={ {basename="statisticawards_hiking", level=1, diff --git a/settingtypes.txt b/settingtypes.txt index 8b13789..6aa143c 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -1 +1 @@ - +statistic_awards.globaltime (Global time step for checking awards) float 1.5