Warp list gui spelling fixes and task list remainders

This commit is contained in:
bbassie
2019-07-03 13:09:38 +02:00
parent abab40fcf1
commit 83590e72e4
2 changed files with 9 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
--- This file contains all the different settings for the warp system and gui --- This file contains all the different settings for the warp system and gui
return { return {
recharge_time = 60, -- The amount of time in seconds that the player must wait between warps, acts as a balance recharge_time = 60, -- The amount of time in seconds that the player must wait between warps, acts as a balance
update_smothing = 10, -- Higher is better, the amount of smothing applied to recharge timer and other gui updates, max is 60 update_smoothing = 10, -- Higher is better, the amount of smothing applied to recharge timer and other gui updates, max is 60
minimum_distance = 100, -- The minimum distance that must be between warp points, creating new ones is blocked when too close minimum_distance = 100, -- The minimum distance that must be between warp points, creating new ones is blocked when too close
activation_range = 4, -- The distance the player must be to a warp in order to use the warp gui, gui can still be viewd but not used activation_range = 4, -- The distance the player must be to a warp in order to use the warp gui, gui can still be viewd but not used
spawn_activation_range = 20, -- A second activation range which is used for the forces spawn point spawn_activation_range = 20, -- A second activation range which is used for the forces spawn point

View File

@@ -253,7 +253,7 @@ end)
local warp_timer = local warp_timer =
Gui.new_progressbar() Gui.new_progressbar()
:set_tooltip{'warp-list.timer-tooltip',config.recharge_time} :set_tooltip{'warp-list.timer-tooltip',config.recharge_time}
:set_default_maximum(math.floor(config.recharge_time*config.update_smothing)) :set_default_maximum(math.floor(config.recharge_time*config.update_smoothing))
:add_store(Gui.categorize_by_player) :add_store(Gui.categorize_by_player)
:set_style(nil,function(style) :set_style(nil,function(style)
style.horizontally_stretchable = true style.horizontally_stretchable = true
@@ -397,7 +397,7 @@ end)
generate_warp(player,element.parent.parent.parent,warp_id) generate_warp(player,element.parent.parent.parent,warp_id)
end) end)
--[[ Generates each task, handles both view and edit mode --[[ Generates each warp, handles both view and edit mode
element element
> icon-"warp_id" > icon-"warp_id"
>> goto_warp or icon >> goto_warp or icon
@@ -421,7 +421,7 @@ function generate_warp(player,element,warp_id)
local position = warp.position local position = warp.position
if not warp_name then if not warp_name then
-- task is nil so remove it from the list -- warp is nil so remove it from the list
Gui.destory_if_valid(element['icon-'..warp_id]) Gui.destory_if_valid(element['icon-'..warp_id])
Gui.destory_if_valid(element['edit-'..warp_id]) Gui.destory_if_valid(element['edit-'..warp_id])
Gui.destory_if_valid(element[warp_id]) Gui.destory_if_valid(element[warp_id])
@@ -440,7 +440,7 @@ function generate_warp(player,element,warp_id)
} }
Gui.set_padding(icon_area) Gui.set_padding(icon_area)
-- area which stores the task and buttons -- area which stores the warp and buttons
warp_area = warp_area =
element.add{ element.add{
name=warp_id, name=warp_id,
@@ -464,9 +464,9 @@ function generate_warp(player,element,warp_id)
edit_area.visible = allowed edit_area.visible = allowed
if #players > 0 then if #players > 0 then
edit_area[edit_warp.name].tooltip = {'task-list.edit-tooltip',table.concat(players,', ')} edit_area[edit_warp.name].tooltip = {'warp-list.edit-tooltip',table.concat(players,', ')}
else else
edit_area[edit_warp.name].tooltip = {'task-list.edit-tooltip-none'} edit_area[edit_warp.name].tooltip = {'warp-list.edit-tooltip-none'}
end end
-- draws/updates the warp area -- draws/updates the warp area
@@ -557,7 +557,7 @@ end
element element
> container > container
>> header >> header
>>> right aligned add_new_task >>> right aligned add_new_warp
>> scroll >> scroll
>>> table >>> table
>> warp_timer >> warp_timer
@@ -708,7 +708,7 @@ end)
--- Handles updating the timer and checking distance from a warp --- Handles updating the timer and checking distance from a warp
local r2 = config.activation_range^2 local r2 = config.activation_range^2
local rs2 = config.spawn_activation_range^2 local rs2 = config.spawn_activation_range^2
Event.on_nth_tick(math.floor(60/config.update_smothing),function() Event.on_nth_tick(math.floor(60/config.update_smoothing),function()
local categories = Store.get_children(warp_timer.store) local categories = Store.get_children(warp_timer.store)
for _,category in pairs(categories) do for _,category in pairs(categories) do
warp_timer:increment(1,category) warp_timer:increment(1,category)