Implemented requested changes

* Pressing `Discard changes` removes warp if it has been pressed after `New warp`.
* Changed `not_available` (not in range) status icon to a cross, fits the sizing of the other icons better.
* Renamed locals key `'warp-list.discard-tooltip'` to `'warp-list.remove-tooltip'`
* Added textfield squashable and strechable to make it dynamic to the container size.
* Container size changes depending on permissiong `'allow_add_warp'`
This commit is contained in:
bbassie
2021-01-26 23:01:07 +01:00
parent 2fc598f287
commit 90f650ce7a
3 changed files with 34 additions and 11 deletions

View File

@@ -46,6 +46,7 @@ end
-- When a warp is updated change its chat tag and resort the warp order
WrapData:on_update(function(warp_id, warp, old_warp)
if warp then
warp.updates = warp.updates + 1
-- Update the map chart tag if there is one
if warp.tag then
Warps.make_warp_tag(warp_id)
@@ -327,7 +328,8 @@ function Warps.add_warp(force_name, surface, position, player_name, warp_name)
},
last_edit_name = player_name or '<server>',
last_edit_time = game.tick,
currently_editing = editing
currently_editing = editing,
updates = 0,
})
return warp_id