Skip to content

Commit

Permalink
Add spaces to search string programmatically.
Browse files Browse the repository at this point in the history
  • Loading branch information
RosaryMala committed Feb 6, 2017
1 parent 1aef1d1 commit 5b83c6f
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions plugins/generated-creature-renamer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,32 +45,32 @@ DFhackCExport command_result plugin_enable(color_ostream &out, bool enable)
return CR_OK;
}

std::vector<std::string> descriptors = { " blob", " quadruped", " humanoid", " silverfish", " mayfly", " dragonfly",
" damselfly", " stonefly", " earwig", " grasshopper", " cricket", " stick insect", " cockroach", " termite",
" mantis", " louse", " thrips", " aphid", " cicada", " assassin bug", " wasp", " hornet", " tiger beetle",
" ladybug", " weevil", " darkling beetle", " click beetle", " firefly", " scarab beetle", " stag beetle",
" dung beetle", " rhinoceros beetle", " rove beetle", " snakefly", " lacewing", " antlion larva",
" mosquito", " flea", " scorpionfly", " caddisfly", " butterfly", " moth", " caterpillar", " maggot",
" spider", " tarantula", " scorpion", " tick", " mite", " shrimp", " lobster", " crab", " nematode",
" snail", " slug", " earthworm", " leech", " bristleworm", " ribbon worm", " flat worm", " toad", " frog",
" salamander", " newt", " alligator", " crocodile", " lizard", " chameleon", " iguana", " gecko", " skink",
" gila monster", " monitor", " serpent", " viper", " rattlesnake", " cobra", " python", " anaconda", " turtle",
" tortoise", " pterosaur", " dimetrodon", " sauropod", " theropod", " iguanodont", " hadrosaurid", " stegosaurid",
" ceratopsid", " ankylosaurid", " duck", " goose", " swan", " turkey", " grouse", " chicken", " quail", " pheasant",
" gull", " loon", " grebe", " albatross", " petrel", " penguin", " pelican", " stork", " vulture", " flamingo",
" falcon", " kestrel", " condor", " osprey", " buzzard", " eagle", " harrier", " kite", " crane", " dove",
" pigeon", " parrot", " cockatoo", " cuckoo", " nightjar", " swift", " hummingbird", " kingfisher",
" hornbill", " quetzal", " toucan", " woodpecker", " lyrebird", " thornbill", " honeyeater", " oriole",
" fantail", " shrike", " crow", " raven", " magpie", " kinglet", " lark", " swallow", " martin", " bushtit",
" warbler", " thrush", " oxpecker", " starling", " mockingbird", " wren", " nuthatch", " sparrow", " tanager",
" cardinal", " bunting", " finch", " titmouse", " chickadee", " waxwing", " flycatcher", " opossum", " koala",
" wombat", " kangaroo", " sloth", " anteater", " armadillo", " squirrel", " marmot", " beaver", " gopher",
" mouse", " porcupine", " chinchilla", " cavy", " capybara", " rabbit", " hare", " lemur", " loris", " monkey",
" hedgehog", " shrew", " mole", " fruit bat", " wolf", " coyote", " jackal", " raccoon", " coati",
" weasel", " otter", " badger", " skunk", " bear", " panda", " panther", " mongoose", " hyena", " civet",
" walrus", " pangolin", " elephant", " mammoth", " horse", " zebra", " tapir", " rhinoceros", " warthog",
" hippopotamus", " camel", " llama", " giraffe", " deer", " moose", " antelope", " sheep", " goat",
" bison", " buffalo", " bull", " ape", " ant", " bat", " owl", " pig", " bee" };
std::vector<std::string> descriptors = { "blob", "quadruped", "humanoid", "silverfish", "mayfly", "dragonfly",
"damselfly", "stonefly", "earwig", "grasshopper", "cricket", "stick insect", "cockroach", "termite",
"mantis", "louse", "thrips", "aphid", "cicada", "assassin bug", "wasp", "hornet", "tiger beetle",
"ladybug", "weevil", "darkling beetle", "click beetle", "firefly", "scarab beetle", "stag beetle",
"dung beetle", "rhinoceros beetle", "rove beetle", "snakefly", "lacewing", "antlion larva",
"mosquito", "flea", "scorpionfly", "caddisfly", "butterfly", "moth", "caterpillar", "maggot",
"spider", "tarantula", "scorpion", "tick", "mite", "shrimp", "lobster", "crab", "nematode",
"snail", "slug", "earthworm", "leech", "bristleworm", "ribbon worm", "flat worm", "toad", "frog",
"salamander", "newt", "alligator", "crocodile", "lizard", "chameleon", "iguana", "gecko", "skink",
"gila monster", "monitor", "serpent", "viper", "rattlesnake", "cobra", "python", "anaconda", "turtle",
"tortoise", "pterosaur", "dimetrodon", "sauropod", "theropod", "iguanodont", "hadrosaurid", "stegosaurid",
"ceratopsid", "ankylosaurid", "duck", "goose", "swan", "turkey", "grouse", "chicken", "quail", "pheasant",
"gull", "loon", "grebe", "albatross", "petrel", "penguin", "pelican", "stork", "vulture", "flamingo",
"falcon", "kestrel", "condor", "osprey", "buzzard", "eagle", "harrier", "kite", "crane", "dove",
"pigeon", "parrot", "cockatoo", "cuckoo", "nightjar", "swift", "hummingbird", "kingfisher",
"hornbill", "quetzal", "toucan", "woodpecker", "lyrebird", "thornbill", "honeyeater", "oriole",
"fantail", "shrike", "crow", "raven", "magpie", "kinglet", "lark", "swallow", "martin", "bushtit",
"warbler", "thrush", "oxpecker", "starling", "mockingbird", "wren", "nuthatch", "sparrow", "tanager",
"cardinal", "bunting", "finch", "titmouse", "chickadee", "waxwing", "flycatcher", "opossum", "koala",
"wombat", "kangaroo", "sloth", "anteater", "armadillo", "squirrel", "marmot", "beaver", "gopher",
"mouse", "porcupine", "chinchilla", "cavy", "capybara", "rabbit", "hare", "lemur", "loris", "monkey",
"hedgehog", "shrew", "mole", "fruit bat", "wolf", "coyote", "jackal", "raccoon", "coati",
"weasel", "otter", "badger", "skunk", "bear", "panda", "panther", "mongoose", "hyena", "civet",
"walrus", "pangolin", "elephant", "mammoth", "horse", "zebra", "tapir", "rhinoceros", "warthog",
"hippopotamus", "camel", "llama", "giraffe", "deer", "moose", "antelope", "sheep", "goat",
"bison", "buffalo", "bull", "ape", "ant", "bat", "owl", "pig", "bee"};


DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_change_event event)
Expand Down Expand Up @@ -100,7 +100,7 @@ DFhackCExport command_result plugin_onstatechange(color_ostream &out, state_chan

for (size_t j = 0; j < descriptors.size(); j++)
{
size_t pos = creatureRaw->caste[0]->description.find(descriptors[j]);
size_t pos = creatureRaw->caste[0]->description.find(" " + descriptors[j]);
if (pos < minPos)
{
minPos = pos;
Expand Down

0 comments on commit 5b83c6f

Please sign in to comment.