Open VorTechnix opened 3 years ago
Oooh, could be cool! Though the logic behind working out which block to replace with could quite easily be wildly complicated.
Why would the logic be complicated? isn't there a function to copy attributes from a node and apply them? (digtron does this with it's node placer).
Yeah, but if you're talking about specifying e.g. replace glass
with cobble
and replacing all variants, the naming scheme isn't completely uniform across all mods.
So if there is no variant of the replace node that matches the target node then that node should be skipped.
Also we could maybe add a function to register variants with mismatched naming schemes so users and mod devs can ensure compatibility.
Hrm. I think some more research is required here. Another example here is that some mods prefix node names with stair_
, and others postfix. Some omit the underscore, and others don't.
While providing an API to register variants would be a good idea, I'm not sure it's fair to put the burden on the authors of other mods to ensure compatibility with WorldEditAdditions. In all likelihood they may not have even used it before.
Perhaps a better way to do it would be to have offer a generic find-and-replace feature, where it operates on the names of the nodes in question.
I'm not sure it's fair to put the burden on the authors of other mods to ensure compatibility with WorldEditAdditions.
I've been modding since 2018 on another game and the responsibility is always on devs to ensure compatibility with other mods (unless otherwise coordinated with another dev).
That said it would be nice to be able to filter nodes by geometry to avoid having to use names for anything other that identifying what material the node belongs too.
Would replace all nodes made of material a with similar nodes made of materiel b. For example
//replacesimilar cobble glass
would replace cobble blocks with glass blocks, cobble stairs with glass stairs, cobble slabs with glass slabs etc. Rotation properties would be preserved and all that. Syntax://replacesimilar <search_material> <replace_material>
Alias://rplsim