I've some surfaces that are strictly for mod-internal purposes, not intended to be visited by players. But the surfaces I've created are visible in the "Surfaces" GUI from Remote view. So, I want to hide my surfaces.
Luckily we now have the LuaSurfacePrototype, where we can set the properties 'hidden' and 'hidden_in_factoriopedia', so I've defined a surface prototype where these properties are set to "true". The new prototype shows up alright in the in-game prototype browser. But how do I use it?
I can't seem to find a way to apply my new surface prototype when I create a LuaSurface in the control stage. Does anybody have an idea how to do that?
How to base a surface on a LuaSurfacePrototype?
How to base a surface on a LuaSurfacePrototype?
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to base a surface on a LuaSurfacePrototype?
LuaSurfacePrototypes are only for use as space platforms. You want https://lua-api.factorio.com/stable/cla ... ace_hidden instead.Pi-C wrote: ↑Fri Oct 25, 2024 9:23 am I've some surfaces that are strictly for mod-internal purposes, not intended to be visited by players. But the surfaces I've created are visible in the "Surfaces" GUI from Remote view. So, I want to hide my surfaces.
Luckily we now have the LuaSurfacePrototype, where we can set the properties 'hidden' and 'hidden_in_factoriopedia', so I've defined a surface prototype where these properties are set to "true". The new prototype shows up alright in the in-game prototype browser. But how do I use it?
I can't seem to find a way to apply my new surface prototype when I create a LuaSurface in the control stage. Does anybody have an idea how to do that?
My mods
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Content: Lunar Landings | Freight Forwarding | Spidertron Patrols | Spidertron Enhancements | Power Overload
QoL: Factory Search | Module Inserter Simplified | Wire Shortcuts X | Ghost Warnings
Re: How to base a surface on a LuaSurfacePrototype?
Thank you, I'll try that! I didn't even think of looking for hiding surfaces in LuaForce …
A good mod deserves a good changelog. Here's a tutorial (WIP) about Factorio's way too strict changelog syntax!
Re: How to base a surface on a LuaSurfacePrototype?
"You want https://lua-api.factorio.com/stable/cla ... ace_hidden instead."
I am having difficulty understanding the syntax of the documentation for the LUA classes.
I see the '::' (double quote thing) all over. What does it mean?
I searched the internet and have only found reference to '::=' which appears to be something else.
I am having difficulty understanding the syntax of the documentation for the LUA classes.
I see the '::' (double quote thing) all over. What does it mean?
I searched the internet and have only found reference to '::=' which appears to be something else.
Re: How to base a surface on a LuaSurfacePrototype?
:: is just a separator between the name and type of the variable. This is a factorio.com convention, it is not a standard usage in any programming language.
Re: How to base a surface on a LuaSurfacePrototype?
Thanks. I would prefer to see it how I would actually code it. The documentation in Factorio is a bit confusing.
And I have been programming since 1976 (First year in college). And many years working at Microsoft.
I think the documentation needs a bit of work. Part of this may be the translation from whatever language the Developers use, to English.
And I have been programming since 1976 (First year in college). And many years working at Microsoft.
I think the documentation needs a bit of work. Part of this may be the translation from whatever language the Developers use, to English.