#stupid remote tricks
1 messages · Page 1 of 1 (latest)
yeah the only actual use i ever came up with was that you can use it to communicate simple flags between mods before even init
because you can test if an interface function exists at any time, even before you're allowed to call them
https://github.com/justarandomgeek/factorio-simhelper/blob/master/modloader.lua so simhelper uses it to send flags to the "regular" load of a mod to tell it it's already loaded
and really, i didn't even need extend-after-add for that, i coudl have just added it later, but that would have required slightly uglier interaction from users of it
hmm, i guess you could iterate them 🤔
but as far as extend-after-add goes: the actual mechanism of remote is that it saves a reference to the whole table you passed in, so as long as you also saved one, you can add/remove things as much as you want! :D
i would strongly suggest not putting anything that isn't callable in there though