DaCyclops / GDIW

Factorio Mod : GDIW - Gah!DarnItWater! A Factorio mod for those people who keep getting annoyed at water....
MIT License
3 stars 5 forks source link

Broken flipped recipe names #32

Open ST-DDT opened 4 years ago

ST-DDT commented 4 years ago

Some flipped recipes use the wrong translation (e.g. fluid/item name instead of localized_name).

Yesterday we discussed a related feature request on discord and @theRustyKnife ended up writing a lua code snippet (WIP) that can resolve the localized name of a recipe properly.

I tested the code with GDIW ( + all bobs mods) and it works very well without slowing the start down.

I replaced all of https://github.com/DaCyclops/GDIW/blob/6ecac517e06d7cc68d8459edde2591ebd8ec12e4/data-final-fixes.lua#L68-L104

with something similar to this:

local get_recipe_locale = require "recipe_locale"
[...]
vrn.localised_name = get_recipe_locale(vro)