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)

