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