Ability to define surface hierarchy.
Most surfaces will have a parent, and parents have children. (Asteroids, for example, would not have parent surface, but might have underground child surfaces).
A new set of entities for 'teleporting' resources from one surface to another could then be implemented, because they would be able to rely on the parent/child relationship to see if the connection is valid. These would replace the need for mods to manually remove and recreate items/fluids/electricity between surfaces in lua code, instead they'd use special entities designed for that task (move the logic to C for faster, more reliable/performant operation).
See also: this in hidden ores thread
EDIT: It would also mean destroying a parent surface would automatically destroy child surfaces (although mods like factorissimo could perhaps hook in to an event to retain information about the surfaces, placing an item in inventory that can be used to recreate them).
surface.parent, surface.chidlren
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
surface.parent, surface.chidlren
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
Re: surface.parent, surface.chidlren
The concepts you're referring to only apply to very specific mods. That's the mods responsibility to setup remote interfaces and systems to store and access that type of information.
In Factorio a surface is just that - it has no parent and it has no children.
This request is way to specific to actually warrant putting into the base game.
In Factorio a surface is just that - it has no parent and it has no children.
This request is way to specific to actually warrant putting into the base game.
If you want to get ahold of me I'm almost always on Discord.
- aubergine18
- Smart Inserter
- Posts: 1264
- Joined: Fri Jul 22, 2016 8:51 pm
- Contact:
Re: surface.parent, surface.chidlren
Can we get events when surfaces are created and destroyed to help with maintenance of the custom dictionaries we'll need to keep track of them?
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.