| 318 | //----------------------------------------------------------------------------- |
| 319 | |
| 320 | StringTableEntry AssetBase::getAssetDependencyField(const char* pFieldName, S32 index) |
| 321 | { |
| 322 | SimFieldDictionary* fieldDictionary = getFieldDictionary(); |
| 323 | for (SimFieldDictionaryIterator itr(fieldDictionary); *itr; ++itr) |
| 324 | { |
| 325 | SimFieldDictionary::Entry* entry = *itr; |
| 326 | |
| 327 | String slotName = String(entry->slotName); |
| 328 | |
| 329 | if (slotName.startsWith(pFieldName)) |
| 330 | { |
| 331 | S32 trailingNum; |
| 332 | String::GetTrailingNumber(slotName.c_str(), trailingNum); |
| 333 | |
| 334 | if (trailingNum == index) |
| 335 | { |
| 336 | return StringTable->insert(String(entry->value).replace(ASSET_ID_FIELD_PREFIX, "").c_str()); |
| 337 | } |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | return StringTable->EmptyString(); |
| 342 | } |
| 343 | |
| 344 | //----------------------------------------------------------------------------- |
| 345 |
no test coverage detected