Page 2 of 2

Re: Log messages containing icons show both the icon and the icondescription

Posted: Thu Nov 18, 2021 11:59 pm
by mrvn
That's the difference between

Code: Select all

[item=iron-plate]
and

Code: Select all

[img=item/iron-plate]
and is something the game engine does and not LTN.

Use the Rich Text Helper mod to create the later form if you don't want to type it in by hand.

Re: Rich Text in LTN stops?

Posted: Fri Nov 19, 2021 6:34 pm
by Optera
merged into existing thread

Re: Rich Text in LTN stops?

Posted: Sat Nov 20, 2021 10:20 am
by SteveMacGyver
Optera wrote:
Sat Feb 13, 2021 4:48 pm
Since I cant find my post about converting tags in console anymore here it is again:

Code: Select all

/c
local stops = game.surfaces["nauvis"].find_entities_filtered{type="train-stop"}
for _, stop in pairs(stops) do
stop.backer_name = string.gsub(stop.backer_name, "item=", "img=item/")
stop.backer_name = string.gsub(stop.backer_name, "fluid=", "img=fluid/")
end
I assume stops are on nauvis, for other surfaces change script accordingly.
Thank you very, very much for this beautiful scriptlet