My item notetag:
<recipe> <image "soup.png"> <ingredient 21 3> <ingredient 22 5> <ingredient 23 2></recipe>Checking if it contains a recipe tag is easy:
#RECIPE_TAG = <recipe>class RPG::Item def is_recipe? return note =~ /#{Nap::RECIPE_TAG}/ endendBut I need to search the recipe-notetag contents somehow line by line (ignoring leading spaces) and get the image value as well as the 2 numbers per ingredient. I tried a couple of methods but I kept failing and I just suck at regex every single time. I don't necessarily need the full code but a few hints in the right direction would be nice.
<recipe> <image "soup.png"> <ingredient 21 3> <ingredient 22 5> <ingredient 23 2></recipe>Checking if it contains a recipe tag is easy:
#RECIPE_TAG = <recipe>class RPG::Item def is_recipe? return note =~ /#{Nap::RECIPE_TAG}/ endendBut I need to search the recipe-notetag contents somehow line by line (ignoring leading spaces) and get the image value as well as the 2 numbers per ingredient. I tried a couple of methods but I kept failing and I just suck at regex every single time. I don't necessarily need the full code but a few hints in the right direction would be nice.