Page 1 of 1

surface.parent, surface.chidlren

Posted: Tue Aug 30, 2016 12:35 pm
by aubergine18
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).

Re: surface.parent, surface.chidlren

Posted: Tue Aug 30, 2016 3:44 pm
by Rseding91
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.

Re: surface.parent, surface.chidlren

Posted: Tue Aug 30, 2016 4:09 pm
by aubergine18
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?