Minor fixes
* Fix focusing opened channel on login * Add missing options to rule violation window * Send rule violations messages in default channel * Enable show private messages in console by default * Fix battle issues with invisible creatures * Allow to use hotkeys while trading
This commit is contained in:
parent
0fc56c73cc
commit
4c51009ed9
|
@ -11,7 +11,7 @@ local defaultOptions = {
|
||||||
showInfoMessagesInConsole = true,
|
showInfoMessagesInConsole = true,
|
||||||
showTimestampsInConsole = true,
|
showTimestampsInConsole = true,
|
||||||
showLevelsInConsole = true,
|
showLevelsInConsole = true,
|
||||||
showPrivateMessagesInConsole = false,
|
showPrivateMessagesInConsole = true,
|
||||||
showPrivateMessagesOnScreen = true,
|
showPrivateMessagesOnScreen = true,
|
||||||
showLeftPanel = false,
|
showLeftPanel = false,
|
||||||
foregroundFrameRate = 61,
|
foregroundFrameRate = 61,
|
||||||
|
|
|
@ -175,14 +175,11 @@ function onCreaturePositionChange(creature, newPos, oldPos)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function onCreatureOutfitChange(creature, outfit, oldOutfit)
|
function onCreatureOutfitChange(creature, outfit, oldOutfit)
|
||||||
if hasCreature(creature) then
|
if doCreatureFitFilters(creature) then
|
||||||
if doCreatureFitFilters(creature) then
|
addCreature(creature)
|
||||||
addCreature(creature)
|
else
|
||||||
else
|
removeCreature(creature)
|
||||||
removeCreature(creature)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -71,6 +71,7 @@ serverTab = nil
|
||||||
violationsChannelId = nil
|
violationsChannelId = nil
|
||||||
violationWindow = nil
|
violationWindow = nil
|
||||||
violationReportTab = nil
|
violationReportTab = nil
|
||||||
|
ignoredChannels = {}
|
||||||
|
|
||||||
local ignoreSettings = {
|
local ignoreSettings = {
|
||||||
privateMessages = false,
|
privateMessages = false,
|
||||||
|
@ -346,14 +347,15 @@ end
|
||||||
|
|
||||||
function addChannel(name, id)
|
function addChannel(name, id)
|
||||||
channels[id] = name
|
channels[id] = name
|
||||||
local tab = addTab(name, true)
|
local focus = not table.find(ignoredChannels, id)
|
||||||
|
local tab = addTab(name, focus)
|
||||||
tab.channelId = id
|
tab.channelId = id
|
||||||
return tab
|
return tab
|
||||||
end
|
end
|
||||||
|
|
||||||
function addPrivateChannel(receiver)
|
function addPrivateChannel(receiver)
|
||||||
channels[receiver] = receiver
|
channels[receiver] = receiver
|
||||||
return addTab(receiver, true)
|
return addTab(receiver, false)
|
||||||
end
|
end
|
||||||
|
|
||||||
function addPrivateText(text, speaktype, name, isPrivateCommand, creatureName)
|
function addPrivateText(text, speaktype, name, isPrivateCommand, creatureName)
|
||||||
|
@ -833,7 +835,7 @@ function processViolation(name, text)
|
||||||
channels[tabname] = tabname
|
channels[tabname] = tabname
|
||||||
tab.violationChatName = name
|
tab.violationChatName = name
|
||||||
g_game.openRuleViolation(name)
|
g_game.openRuleViolation(name)
|
||||||
addTabText(text, SpeakTypesSettings.say, tab)
|
addTabText(text, SpeakTypesSettings.say, tab, name)
|
||||||
end
|
end
|
||||||
|
|
||||||
function onRuleViolationChannel(channelId)
|
function onRuleViolationChannel(channelId)
|
||||||
|
@ -1025,22 +1027,13 @@ function online()
|
||||||
if channelId ~= -1 and channelId < 100 then
|
if channelId ~= -1 and channelId < 100 then
|
||||||
if not table.find(channels, channelId) then
|
if not table.find(channels, channelId) then
|
||||||
g_game.joinChannel(channelId)
|
g_game.joinChannel(channelId)
|
||||||
|
table.insert(ignoredChannels, channelId)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
scheduleEvent(function() ignoredChannels = {} end, 3000)
|
||||||
local tab = defaultTab
|
|
||||||
if tab then
|
|
||||||
--[[
|
|
||||||
Known Issue: The server is calling to open channels after
|
|
||||||
onGameStart is executed causing it to focus the last tab opened.
|
|
||||||
|
|
||||||
Fix: Don't save channels to the settings that are opened by the server.
|
|
||||||
]]
|
|
||||||
addEvent(function() consoleTabBar:selectTab(tab) end, true)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function offline()
|
function offline()
|
||||||
|
|
|
@ -326,7 +326,14 @@ function onTradeWith(clickedWidget, mousePosition)
|
||||||
end
|
end
|
||||||
|
|
||||||
function startUseWith(thing)
|
function startUseWith(thing)
|
||||||
if g_ui.isMouseGrabbed() or not thing then return end
|
if not thing then return end
|
||||||
|
if g_ui.isMouseGrabbed() then
|
||||||
|
if selectedThing then
|
||||||
|
selectedThing = thing
|
||||||
|
selectedType = 'use'
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
selectedType = 'use'
|
selectedType = 'use'
|
||||||
selectedThing = thing
|
selectedThing = thing
|
||||||
mouseGrabberWidget:grabMouse()
|
mouseGrabberWidget:grabMouse()
|
||||||
|
@ -334,7 +341,14 @@ function startUseWith(thing)
|
||||||
end
|
end
|
||||||
|
|
||||||
function startTradeWith(thing)
|
function startTradeWith(thing)
|
||||||
if g_ui.isMouseGrabbed() or not thing then return end
|
if not thing then return end
|
||||||
|
if g_ui.isMouseGrabbed() then
|
||||||
|
if selectedThing then
|
||||||
|
selectedThing = thing
|
||||||
|
selectedType = 'trade'
|
||||||
|
end
|
||||||
|
return
|
||||||
|
end
|
||||||
selectedType = 'trade'
|
selectedType = 'trade'
|
||||||
selectedThing = thing
|
selectedThing = thing
|
||||||
mouseGrabberWidget:grabMouse()
|
mouseGrabberWidget:grabMouse()
|
||||||
|
|
Loading…
Reference in New Issue