I know it is already inside the engine, please expose it to lua so I can use it in data phase.
(Yes, not a usual request. This request is for the data phase, not control phase.)
See this for details about how I know that and why I need that: viewtopic.php?f=66&t=33732
TL;DR Based on "offshore-pump", I know recipe names can be generated based on the sequence: get the localised string of {"recipe-name.<recipe name>"}, if such key is not found -> {"item-name.<product's item name"}, if not found -> {"entity-name.<product place_result's entity-name>"}, if not found -> "unknown key: entity-name...."
I am making a mod which will do the same thing for determining recipe name. Now everything is ready, except I am stuck at "if such key is not found" so that some recipes have wrong names.
(I am doing it in reverse way, i.e. if no recipe.localised_name -> if product has place_result or placed_as_equipment_result, then use entity-name or equipment-name, otherwise, item-name or fluid-name. As the result, recipe.name is always ignored.)
Such API will help me to fix this problem. So, please?
[NotImplemented] Existence of localisation key
[NotImplemented] Existence of localisation key
Last edited by Mooncat on Wed Oct 05, 2016 4:03 pm, edited 2 times in total.
Re: API for checking existence of localisation key in data phase
Unfortunately that can't be used as it can lead to desyncs. The existence of a localized key is conditional on the locale you're currently using which is not deterministic across peers/game instances.
So, while on English you might have a given locale key but then in German when someone loads up they don't and you end up with different prototypes.
So, while on English you might have a given locale key but then in German when someone loads up they don't and you end up with different prototypes.
If you want to get ahold of me I'm almost always on Discord.
Re: API for checking existence of localisation key in data phase
awwwwwww.... you are right...Rseding91 wrote:Unfortunately that can't be used as it can lead to desyncs. The existence of a localized key is conditional on the locale you're currently using which is not deterministic across peers/game instances.
So, while on English you might have a given locale key but then in German when someone loads up they don't and you end up with different prototypes.
Nvm, I will make request for another thing. It would be doable I guess.
Edit: tada - viewtopic.php?f=28&t=33823