From 7f66539e5dd913c03a3868f1f117dc02e5254064 Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sat, 1 Jun 2019 00:34:38 +0100 Subject: [PATCH 1/2] Added runtime uid --- utils/token.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/utils/token.lua b/utils/token.lua index f9d511b7..dce270b1 100644 --- a/utils/token.lua +++ b/utils/token.lua @@ -47,9 +47,23 @@ end local uid_counter = 0 function Token.uid() + if _LIFECYCLE == 8 then + return Token.runtime_uid() + end + uid_counter = uid_counter + 1 return uid_counter end +function Token.runtime_uid() + if not global.uid_counter then + global.uid_counter = 0 + end + + global.uid_counter = global.uid_counter + 1 + + return global.uid_counter+uid_counter +end + return Token From ef683773fe2eba224906036a7adec6742a4d3a6b Mon Sep 17 00:00:00 2001 From: Cooldude2606 Date: Sat, 1 Jun 2019 00:36:19 +0100 Subject: [PATCH 2/2] Increased zoom on find --- modules/commands/find.lua | 2 +- modules/gui/player-list.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/commands/find.lua b/modules/commands/find.lua index ee242b1b..1f06f475 100644 --- a/modules/commands/find.lua +++ b/modules/commands/find.lua @@ -6,6 +6,6 @@ Commands.new_command('find-on-map','Find a player on your map.') :add_alias('find','zoom-to') :register(function(player,action_player,raw) local position = action_player.position - player.zoom_to_world(position,2) + player.zoom_to_world(position,1.75) return Commands.success -- prevents command complete message from showing end) \ No newline at end of file diff --git a/modules/gui/player-list.lua b/modules/gui/player-list.lua index 2666422e..baaa26b1 100644 --- a/modules/gui/player-list.lua +++ b/modules/gui/player-list.lua @@ -19,7 +19,7 @@ Gui.on_click(zoom_to_map_name,function(event) if event.button == defines.mouse_button_type.left then -- lmb will zoom to map local position = action_player.position - event.player.zoom_to_world(position,2) + event.player.zoom_to_world(position,1.75) else -- rmb will open settings local player_name = event.player.name