forked from github/server
backwards compat for old rm_iron etc. tokens in save
This commit is contained in:
parent
588914bc36
commit
89a20824e3
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue