Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

//replacesimilar #63

Open
VorTechnix opened this issue Jun 27, 2021 · 7 comments
Open

//replacesimilar #63

VorTechnix opened this issue Jun 27, 2021 · 7 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@VorTechnix
Copy link
Collaborator

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

@sbrl
Copy link
Owner

sbrl commented Jun 27, 2021

Oooh, could be cool! Though the logic behind working out which block to replace with could quite easily be wildly complicated.

@sbrl sbrl added enhancement New feature or request help wanted Extra attention is needed labels Jun 27, 2021
@VorTechnix
Copy link
Collaborator Author

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).

@sbrl
Copy link
Owner

sbrl commented Jun 29, 2021

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.

@VorTechnix
Copy link
Collaborator Author

So if there is no variant of the replace node that matches the target node then that node should be skipped.

@VorTechnix
Copy link
Collaborator Author

Also we could maybe add a function to register variants with mismatched naming schemes so users and mod devs can ensure compatibility.

@sbrl
Copy link
Owner

sbrl commented Jul 1, 2021

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.

@VorTechnix
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants