------------------------------------------------------------------------------
| 250 | |
| 251 | //------------------------------------------------------------------------------ |
| 252 | DefineConsoleMethod( CreatorTree, fileNameMatch, bool, (const char * world, const char * type, const char * filename), , "(string world, string type, string filename)") |
| 253 | { |
| 254 | // argv[2] - world short |
| 255 | // argv[3] - type short |
| 256 | // argv[4] - filename |
| 257 | |
| 258 | // interior filenames |
| 259 | // 0 - world short ('b', 'x', ...) |
| 260 | // 1-> - type short ('towr', 'bunk', ...) |
| 261 | U32 typeLen = dStrlen(type); |
| 262 | if(dStrlen(filename) < (typeLen + 1)) |
| 263 | return(false); |
| 264 | |
| 265 | // world |
| 266 | if(dToupper(filename[0]) != dToupper(world[0])) |
| 267 | return(false); |
| 268 | |
| 269 | return(!dStrnicmp(filename+1, type, typeLen)); |
| 270 | } |
| 271 | |
| 272 | DefineConsoleMethod( CreatorTree, getSelected, S32, (), , "Return a handle to the currently selected item.") |
| 273 | { |
no test coverage detected