backwards compat for old rm_iron etc. tokens in save

This commit is contained in:
Enno Rehling 2017-03-26 17:46:55 +02:00
parent 588914bc36
commit 89a20824e3
1 changed files with 3 additions and 0 deletions

View File

@ -956,6 +956,9 @@ static region *readregion(struct gamedata *data, int x, int y)
break; break;
res = malloc(sizeof(rawmaterial)); res = malloc(sizeof(rawmaterial));
res->rtype = rt_find(name); res->rtype = rt_find(name);
if (!res->rtype && strncmp("rm_", name, 3) == 0) {
res->rtype = rt_find(name + 3);
}
if (!res->rtype || !res->rtype->raw) { if (!res->rtype || !res->rtype->raw) {
log_error("invalid resourcetype %s in data.", name); log_error("invalid resourcetype %s in data.", name);
} }