Skip to content

Commit 4dd9fdb

Browse files
authored
Remove the current implementation to block paintings (#6949)
The chat configuration needs to be bugfixed so that people cannot block their own paintings and so that the mute config doesn't save across sessions.
1 parent 3fb6b69 commit 4dd9fdb

File tree

5 files changed

+4
-22
lines changed

5 files changed

+4
-22
lines changed

loc/US/strings_db.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3737,7 +3737,7 @@ chat_0008="Chat Options"
37373737
chat_0009="Chat Font Size"
37383738
chat_0010="Window Fade Time"
37393739
chat_0011="Window Alpha"
3740-
chat_0012="Message/Painting Filters"
3740+
chat_0012="Message Filters"
37413741
chat_0013="Message Colors"
37423742
chat_0014='Show Feed Background'
37433743
chat_0015='Persist Feed Timeout'
@@ -5639,7 +5639,7 @@ tooltipui0398="Click here to send your message to all of your allies."
56395639
tooltipui0399="All Chat"
56405640
tooltipui0400="Click here to send your message to all players."
56415641
tooltipui0401="Chat Filters"
5642-
tooltipui0402="Show or hide messages and paintings from players"
5642+
tooltipui0402="Show or hide messages from players"
56435643
tooltipui0403="Chat Color"
56445644
tooltipui0404="Change the font color for various messages"
56455645
tooltipui0405="Font Size"

lua/ui/game/chat.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1441,7 +1441,7 @@ function CreateConfigWindow()
14411441
end
14421442
end
14431443

1444-
local filterTitle = UIUtil.CreateText(optionGroup, '<LOC chat_0012>Message/Painting Filters', 14, "Arial Bold")
1444+
local filterTitle = UIUtil.CreateText(optionGroup, '<LOC chat_0012>Message Filters', 14, "Arial Bold")
14451445
LayoutHelpers.AtLeftTopIn(filterTitle, optionGroup, 5, 5)
14461446
Tooltip.AddControlTooltip(filterTitle, 'chat_filter')
14471447
local index = 1

lua/ui/game/painting/Painting.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,13 @@ local DefaultPaintingDuration = 25
2828
---@class UIPainting : DebugComponent, Destroyable
2929
---@field BrushStrokes TrashBag # All brush strokes, including those shared by peers.
3030
---@field WorldView WorldView
31-
---@field BlockedAuthors table<string, boolean>
3231
Painting = Class(DebugComponent) {
3332

3433
DefaultPaintingDuration = 25,
3534

3635
---@param self UIPainting
3736
__init = function(self)
3837
self.BrushStrokes = TrashBag()
39-
self.BlockedAuthors = {}
4038
end,
4139

4240
---@param self UIPainting
@@ -53,11 +51,8 @@ Painting = Class(DebugComponent) {
5351
---@param delta number
5452
OnRender = function(self, delta)
5553
-- render allowed brush strokes
56-
local blockedAuthors = self.BlockedAuthors
5754
---@param brushStroke UIBrushStroke
5855
for k, brushStroke in self.BrushStrokes do
59-
if blockedAuthors[brushStroke.Author] then continue end
60-
6156
local ok, msg = pcall(brushStroke.OnRender, brushStroke, delta)
6257
if not ok and self.EnabledErrors then
6358
WARN(msg)

lua/ui/game/painting/PaintingCanvas.lua

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ local PaintingCanvasInstances = TrashBag()
3232

3333
local SyncIdentifier = "PaintingCanvas.lua"
3434

35-
local armyTable = GetArmiesTable()
36-
local numArmies = armyTable.numArmies
37-
local armiesTable = armyTable.armiesTable
38-
3935
---@alias UIPaintingCanvasActiveInteraction 'Create' | 'Delete' | 'Mute'
4036

4137
--- Responsible for glueing together the painting, the brush stroke and the painting network adapter.
@@ -62,15 +58,6 @@ PaintingCanvas = Class(Bitmap, DebugComponent) {
6258
-- register us to render
6359
self.WorldView:AddShape(self, tostring(self))
6460

65-
-- register us to read chat options
66-
import('/lua/ui/game/chat.lua').AddChatOptionSetCallback(function(chatOptions)
67-
local blockedAuthorsTable = self.Painting.BlockedAuthors
68-
for armyIndex = 1, numArmies do
69-
-- the chat option marks the checkbox status, true = view chat, false = hide chat
70-
blockedAuthorsTable[armiesTable[armyIndex].nickname] = chatOptions[armyIndex] == false
71-
end
72-
end)
73-
7461
self.InhibitionSet = {}
7562
end,
7663

lua/ui/help/tooltips.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ Tooltips = {
375375
},
376376
chat_filter = {
377377
title = "<LOC tooltipui0401>Chat Filters",
378-
description = "<LOC tooltipui0402>Show or hide messages and paintings from players",
378+
description = "<LOC tooltipui0402>Show or hide messages from players",
379379
},
380380
chat_color = {
381381
title = "<LOC tooltipui0403>Chat Color",

0 commit comments

Comments
 (0)