It possible, but in a long way around ( atleast that is whati can think of)slay_mithos wrote:Still talking about noise layers, is it possible to state layers that might not exist (like dytech's gems or sand)?
If so, what is the actual effect if that layer is not used (because that mod might not be installed), and how to get around the problem if there is one?
I mean that if we can take compatibility into account right from the start, it might make thing easier in the long run.
You create 2 resource files, 1 for the mod compatibility, and one without. In the data.luafile you make this:
Code: Select all
if data.raw.resource["gemstone-deposit"] then
Require (the file with compatibility)
Else -- this is done when gemstone-deposit is not found
Require (the file without compatibility)
End