diff options
author | Shmuale Mark <shm.mark@gmail.com> | 2014-05-25 12:12:19 -0400 |
---|---|---|
committer | Shmuale Mark <shm.mark@gmail.com> | 2014-05-26 18:08:41 -0400 |
commit | a59fa48e20348b2eb6ebfc48b8a2f997a48e9d08 (patch) | |
tree | db573dea93e4f0cf9c61786db2db6cd92137e969 /crawl-ref/source/tags.cc | |
parent | 946bf4815769fef29f30d8bbbc87150b17164ca3 (diff) | |
download | crawl-ref-a59fa48e20348b2eb6ebfc48b8a2f997a48e9d08.tar.gz crawl-ref-a59fa48e20348b2eb6ebfc48b8a2f997a48e9d08.zip |
Remove old food types from saves.
Should prevent spamming "buggy item" on startup.
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r-- | crawl-ref/source/tags.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc index e31fd7cbe0..c519a1c878 100644 --- a/crawl-ref/source/tags.cc +++ b/crawl-ref/source/tags.cc @@ -3728,6 +3728,33 @@ void unmarshallItem(reader &th, item_def &item) } } + if (th.getMinorVersion() < TAG_MINOR_FOOD_PURGE) + { + if (item.base_type == OBJ_FOOD) + { + if (item.sub_type == FOOD_SAUSAGE) + item.sub_type = FOOD_BEEF_JERKY; + if (item.sub_type == FOOD_CHEESE) + item.sub_type = FOOD_PIZZA; + if (item.sub_type == FOOD_PEAR + || item.sub_type == FOOD_APPLE + || item.sub_type == FOOD_CHOKO + || item.sub_type == FOOD_APRICOT + || item.sub_type == FOOD_ORANGE + || item.sub_type == FOOD_BANANA + || item.sub_type == FOOD_STRAWBERRY + || item.sub_type == FOOD_RAMBUTAN + || item.sub_type == FOOD_LEMON + || item.sub_type == FOOD_GRAPE + || item.sub_type == FOOD_SULTANA + || item.sub_type == FOOD_LYCHEE + || item.sub_type == FOOD_LEMON) + { + item.sub_type = FOOD_FRUIT; + } + } + } + #endif if (is_unrandom_artefact(item)) |