[Genhis][2.0.68] LuaRendering::draw_text shows up in fog of war with rich text

Bugs which we just recently fixed in our development version and will reach you in the next release.
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 136
Joined: Wed Jan 18, 2023 3:49 am
Contact:

[Genhis][2.0.68] LuaRendering::draw_text shows up in fog of war with rich text

Post by PennyJim »

I've gotten a bug report about my mod Biter Memoirs about our LuaRenderObjects showing up in fog of war. With a bit of investigating, I've found it's specifically the use_rich_text option that causes this.

Take this snippet of code, and then hover over an entity near the left edge of fog of war
You'll see Position Two show up in the fog of war
Now go to the command again, and change the argument to false
You'll see that there's now only Position One. Position Two will show up if you clear the fog of war

Code: Select all

/c
local function test(use_rich)
	local selected = game.player.selected
	local surface = selected.surface
	local position_one = selected.position
	local position_two = {position_one.x - 10, position_one.y}
	
	local render_args = { 
		text = "Position One",
		surface = surface,
		color = {1,1,1},
		target = position_one,
		use_rich_text = use_rich,
	}
	rendering.draw_text(render_args)
	
	render_args.text = "Position Two"
	render_args.target = position_two
	rendering.draw_text(render_args)
end

test(true)
09-27-2025, 10-16-16.png
09-27-2025, 10-16-16.png (648 KiB) Viewed 139 times
Genhis
Factorio Staff
Factorio Staff
Posts: 878
Joined: Wed Dec 24, 2014 8:19 am
Contact:

Re: [Genhis][2.0.68] LuaRendering::draw_text shows up in fog of war with rich text

Post by Genhis »

Thanks for the report, this is fixed for 2.0.69.
Post Reply

Return to “Resolved for the next release”