Make collider expoint waiting time adjustable
This commit is contained in:
parent
54ed4e60c5
commit
90dd1c3bbe
@ -21,7 +21,9 @@ local getpos = techage.assemble.get_pos
|
|||||||
|
|
||||||
local CYCLE_TIME = 2
|
local CYCLE_TIME = 2
|
||||||
local TNO_MAGNETS = 22
|
local TNO_MAGNETS = 22
|
||||||
local PROBABILITY = 180 -- check every 20 s => 20 * 180 * 50% = 30 min
|
local IMPROBABILITY = 60 -- every 60 min
|
||||||
|
-- one point per 60 min: check every 20 s => factor = 60 * 3 = 180
|
||||||
|
IMPROBABILITY = (minetest.settings:get("techage_expoint_rate_in_min") or 60) * 3
|
||||||
|
|
||||||
local TIME_SLOTS = 10
|
local TIME_SLOTS = 10
|
||||||
local Schedule = {[0] =
|
local Schedule = {[0] =
|
||||||
@ -59,7 +61,7 @@ local function terminal_message(pos, msg)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function experience_points(pos)
|
local function experience_points(pos)
|
||||||
if math.random(PROBABILITY) == 1 then
|
if math.random(IMPROBABILITY) == 1 then
|
||||||
local owner = M(pos):get_string("owner")
|
local owner = M(pos):get_string("owner")
|
||||||
local own_num = M(pos):get_string("node_number")
|
local own_num = M(pos):get_string("node_number")
|
||||||
local player = minetest.get_player_by_name(owner)
|
local player = minetest.get_player_by_name(owner)
|
||||||
|
@ -34,3 +34,7 @@ techage_command_limit (Max. number of commands sent per minute) int 1200
|
|||||||
# Colliders are huge systems and should not be built on the surface.
|
# Colliders are huge systems and should not be built on the surface.
|
||||||
# 'techage_collider_min_depth specifies' the min. depth (Y) to build a TA4 Collider
|
# 'techage_collider_min_depth specifies' the min. depth (Y) to build a TA4 Collider
|
||||||
techage_collider_min_depth (Min. depth to build a TA4 Collider) int -30
|
techage_collider_min_depth (Min. depth to build a TA4 Collider) int -30
|
||||||
|
|
||||||
|
# Average waiting time in minutes to get one Collider expoint.
|
||||||
|
# Default value is 60, which means one point per hour.
|
||||||
|
techage_expoint_rate_in_min (average waiting time for one expoint) int 60
|
Loading…
Reference in New Issue
Block a user