Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Commit

Permalink
Minecraft: British spelling of colour (#4272)
Browse files Browse the repository at this point in the history
* add british spelling for colour on minecraft guide

* add tests for color & colour on minecraft

* fix hard tab
  • Loading branch information
kirkins authored and mintsoft committed Jun 14, 2017
1 parent 9b7556f commit dc88760
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
12 changes: 6 additions & 6 deletions share/goodie/minecraft/crafting-guide.json
Expand Up @@ -183,7 +183,7 @@
},
{
"name": "Colored Hardened Clay",
"regex": "(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?(hard(ened)?|stained) ?clay)",
"regex": "(?:(colou?red|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?(hard(ened)?|stained) ?clay)",
"imageName": "colored-hardened-clay.png",
"ingredients": "8 Hardened Clay + 1 Dye",
"description": "Used as decoration or building material.",
Expand Down Expand Up @@ -838,7 +838,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": "(?:(colou?red|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?(stained)? ?glass(es)?)",
"imageName": "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."
Expand Down Expand Up @@ -992,7 +992,7 @@
},
{
"name": "Colored Wool",
"regex": "(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?wools?)",
"regex": "(?:(colou?red|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?wools?)",
"imageName": "colored-wool-incomplete.png",
"ingredients": "1 Wool + 1 Dye",
"description": "Used as decoration or building material.",
Expand Down Expand Up @@ -1096,7 +1096,7 @@
},
{
"name": "Banner",
"regex": "(?:(colored)? ?banners?)|(?:(colored)? ?flags?)",
"regex": "(?:(colou?red)? ?banners?)|(?:(colou?red)? ?flags?)",
"imageName": "banner-incomplete.png",
"ingredients": "1 stick + 6 Wool",
"description": "Tall decorative blocks, featuring a field that is highly customizable using dyes.",
Expand Down Expand Up @@ -1232,7 +1232,7 @@
},
{
"name": "Colored Shield",
"regex": "(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?shields?)",
"regex": "(?:(colou?red|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|purple|blue|brown|green|red|black) ?shields?)",
"imageName": "colored-shield-incomplete.gif",
"ingredients": "1 Shield + 1 Banner",
"description": "Personalized tool used for protecting the player against attacks. It cannot be repainted or washed in a cauldron.",
Expand All @@ -1256,7 +1256,7 @@
},
{
"name": "Colored Shulker Box",
"regex": "(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|blue|brown|green|red|black) ?Shulkers? ?Box(es)?)|(?:(colored|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|blue|brown|green|red|black) ?back ?packs?)",
"regex": "(?:(colou?red|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|blue|brown|green|red|black) ?Shulkers? ?Box(es)?)|(?:(colou?red|white|orange|magenta|light ?blue|yellow|lime|pink|gray|light ?gray|cyan|blue|brown|green|red|black) ?back ?packs?)",
"imageName": "colored-shulker-box-incomplete.gif",
"ingredients": "1 Shulker Box + 1 Dye",
"description": "Block that will store and transport items. It keeps the items when broken, which can be retrieved when placed again.",
Expand Down
29 changes: 27 additions & 2 deletions t/Minecraft.t
Expand Up @@ -125,6 +125,31 @@ ddg_goodie_test(
)
),

'minecraft make colored hard clay' =>
test_zci(
'Minecraft Colored Hardened Clay ingredients: 8 Hardened Clay + 1 Dye.'
,
make_structured_answer(
"Colored Hardened Clay",
"8 Hardened Clay + 1 Dye",
"Used as decoration or building material.",
"/share/goodie/minecraft/999/images/colored-hardened-clay.png",
)
),

# Same as last but with british spelling of colour
'minecraft make coloured hard clay' =>
test_zci(
'Minecraft Colored Hardened Clay ingredients: 8 Hardened Clay + 1 Dye.'
,
make_structured_answer(
"Colored Hardened Clay",
"8 Hardened Clay + 1 Dye",
"Used as decoration or building material.",
"/share/goodie/minecraft/999/images/colored-hardened-clay.png",
)
),

'diamond shovel' => undef,
'craft ladder' => undef,
'make tnt' => undef,
Expand All @@ -140,7 +165,7 @@ ddg_goodie_test(
sub make_structured_answer {
my ($name, $ingredients, $description, $image ) = @_;
my %recipe = (
name => $name,
name => $name,
ingredients => $ingredients,
description => $description,
image => $image,
Expand Down Expand Up @@ -168,4 +193,4 @@ sub make_structured_answer {
};
};

done_testing;
done_testing;

0 comments on commit dc88760

Please sign in to comment.