Add spaces to search string programmatically.

develop
Japa Illo 2017-02-06 10:49:22 +05:30
parent 1aef1d1b98
commit 5b83c6fe68
1 changed files with 27 additions and 27 deletions

@ -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)
@ -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;