#Wildcard for removing/replacing recipes?

13 messages · Page 1 of 1 (latest)

fierce ledge
#

Is there a way to remove/replace recipes that contain certain words? I know there's a way to remove by namespace or by input/output, but in this case I want to only remove specific ones.
For example, I want to remove/replace Create's own cutting recipes but only the ones that strip logs and wood. So in this case, recipes with the id of create:cutting/*_wood, create:cutting/*_log, etc.
AKA I want to prevent this. The recipe with the bark in the output doesn't work and the original one takes over.

pearl skiffBOT
#

Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!

terse sky
#

So you just use that in place of a string, like this for example:

e.somekindarecipe(/create:cutting\/[^/]+_log/) //Dont use quote marks, use slashes!
fierce ledge
#

As someone who isn't a coder that is horrifying to look at

#

but it works so I'm not complaining

terse sky
#

Yeah Regex is one of those things that is just horrific to look at, but works great

#

The site I linked is great for testing regex before using it

fierce ledge
#

Now how would I go about removing others all in one event, or does it need to be separate events? There is also wood, stem, and hyphae. It's no problem if I do need to separate them, but I'd rather have it all in one fell swoop for organization.

#

Right now I just have

event.remove({id: /create:cutting\/[^/]+_log/})
terse sky
#

Try this:

#
/create:cutting\/(.*?)(?:_log|_wood|_stem|_hyphae)/