mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
18e507315f
- Add ItemL10n struct that is similar to ItemImgs except it holds i18n description and not items. ItemDesc::l10n uses this struct to provide common_i18n::Content for both names and descriptions. So far it only used in voxygen, but it can be used by rtsim in dialogues. - Introduced new deprecation, ItemKind::Ingredient, because it uses item.name(). It's not deleted, because it's used in inventory sorting, and our inventory sorting is, for some reason, server-side. - Crafting UI also still uses deprecated item.name(), because again, sorting. It's probably will be easier to handle, because it's UI sorting and we can use localized names here, but still, it's a thing to discuss. - Moved Item::describe() to voxygen/hud/util. The most important thing to note is we don't want to completely delete deprecated .name() and .description() along with corresponding fields in ItemDef because ItemDef is now "public" API, exposed in plugins and I don't want to break plugins before we actually implement i18n for them. Otherwise, it would be basically impossible to use items in plugins. What's left is actually fully implementing ItemDesc::l10n, create item_l10n.ron and add fallback on current .name() and .description() implementation. |
||
---|---|---|
.. | ||
assets | ||
base | ||
benches | ||
dynlib | ||
ecs | ||
frontend | ||
i18n | ||
net | ||
src | ||
state | ||
systems | ||
build.rs | ||
Cargo.toml |