Page 1 of 1

How can I filter this article

Posted: Sun Jun 12, 2022 12:01 pm
by sdgmlj
When I use "game.fluid_prototypes" to search all fluids, this item appears. I don't want it to be displayed. How do I filter it?

type=??
name=??

Re: How can I filter this article

Posted: Sun Jun 12, 2022 4:30 pm
by DaveMcW

Code: Select all

for _, fluid in pairs(game.fluid_prototypes) do
  if not fluid.hidden then
    game.print(fluid.name)
  end
end

Re: How can I filter this article

Posted: Sun Jun 12, 2022 11:26 pm
by sdgmlj
DaveMcW wrote: Sun Jun 12, 2022 4:30 pm

Code: Select all

for _, fluid in pairs(game.fluid_prototypes) do
  if not fluid.hidden then
    game.print(fluid.name)
  end
end
Thank you, that's right