Browse Source

Log file saves specific to server and character

Changed it so when you save a log file, the log file name includes the
server name and the characters name, in the file name.

This is to improve organization, to separate logs based off the server
you are on, and the character you are logged in.
Sportacus 5 years ago
parent
commit
a9f6f7662f
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      modules/game_console/console.lua

+ 3
- 1
modules/game_console/console.lua View File

@@ -709,6 +709,8 @@ function processChannelTabMenu(tab, mousePos, mouseButton)
709 709
   local menu = g_ui.createWidget('PopupMenu')
710 710
   menu:setGameMenu(true)
711 711
 
712
+  local worldName = g_game.getWorldName()
713
+  local characterName = g_game.getCharacterName()
712 714
   channelName = tab:getText()
713 715
   if tab ~= defaultTab and tab ~= serverTab then
714 716
     menu:addOption(tr('Close'), function() removeTab(channelName) end)
@@ -726,7 +728,7 @@ function processChannelTabMenu(tab, mousePos, mouseButton)
726 728
         table.insert(lines, label:getText())
727 729
       end
728 730
 
729
-      local filename = channelName .. '.txt'
731
+      local filename = worldName .. ' - ' .. characterName .. ' - ' .. channelName .. '.txt'
730 732
       local filepath = '/' .. filename
731 733
 
732 734
       -- extra information at the beginning

Loading…
Cancel
Save