How to pass custom data-phase attribute to control-phase?
How to pass custom data-phase attribute to control-phase?
like,the only way I currently thought of is encode them into a json string as a name,then try to find it and decode it in control phase...
Re: How to pass custom data-phase attribute to control-phase?
The devs discourage this by limiting string length, removing unused strings, and expanding the official api.
If you are setting constant values, try defining them in a separate file. Then include that file in data.lua and control.lua.
If you are reacting to the existence of other entity prototypes, you can do that in control.lua too. See game.entity_prototypes.
If you are setting constant values, try defining them in a separate file. Then include that file in data.lua and control.lua.
If you are reacting to the existence of other entity prototypes, you can do that in control.lua too. See game.entity_prototypes.