fix regex and make source url different for every recipe

master
1122131 2016-07-12 12:38:52 +00:00
parent 140ea74672
commit 557fb3fcf0
2 changed files with 3 additions and 2 deletions

View File

@ -45,6 +45,7 @@ handle remainder => sub {
# Recipe found, let's return an answer.
my $plaintext = 'Minecraft ' . $recipe->{'name'} . ' ingredients: ' . $recipe->{'ingredients'} . '.';
return $plaintext,
structured_answer => {
@ -57,7 +58,7 @@ handle remainder => sub {
},
meta => {
sourceName => "Minecraft Wiki",
sourceUrl => "http://minecraft.gamepedia.com/Crafting#Complete_recipe_list"
sourceUrl => "http://minecraft.gamepedia.com/" . uri_esc( $recipe->{'name'} ) #testing
},
templates => {
group => 'info',

View File

@ -827,7 +827,7 @@
},
{
"name": "Stained Glass",
"regex": "(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?stained ?glass(es)?)",
"regex": "(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?(stained)? ?glass(es)?)",
"image": "http://www.minecraftxl.com/images/wiki/recipes/stained-glass-crafting.gif",
"ingredients": "8 Glass + 1 Dye",
"description": "Stained Glass is the dyed version of regular glass that can be used for decoration purposes."