Richtext

Infinite Ores, Refining, Ore Processing ...

Moderator: Arch666Angel

Post Reply
cz_zlobr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Sep 15, 2019 8:30 am
Contact:

Richtext

Post by cz_zlobr »

Hallo, I am using a lot of richtext in names of train stops, but after hitting F5 i cant see name for fluids - for example sulfiric waste water, acids etc. Some of them I can recognize and find out the name (for ex. acetylene), but it is quite big fortune. Is there any list of rich texts of fluids and gases? :) thank you

btw, Angel mods are one of the best i played :) keep going with this oustanding job :)

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: Richtext

Post by eradicator »

This'll display a box with the names. Simply copy them (ctrl+a -> ctrl+c), and paste them into a text file or something.

Code: Select all

/c

local fluids = {}
for k,v in pairs(game.fluid_prototypes) do
  table.insert(fluids,'[fluid='..v.name..'] ')
  end
  
local c = game.player.gui.center
if c.fluidnames then c.fluidnames.destroy() end
local x = c.gui.center.add{
  name='fluidnames',type='text-box',text=table.concat(fluids,'\n')
  }
x.style.width = 400
x.style.height = 400
To get rid of the box you can either load a savegame or use:

Code: Select all

/c local c = game.player.gui.center if c.fluidnames then c.fluidnames.destroy() end
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.

cz_zlobr
Burner Inserter
Burner Inserter
Posts: 5
Joined: Sun Sep 15, 2019 8:30 am
Contact:

Re: Richtext

Post by cz_zlobr »

You are the best one man! thank you! :-)

Post Reply

Return to “Angels Mods”