Page 1 of 1

even more mod friendly.

Posted: Mon Feb 29, 2016 4:25 pm
by Hiul_Dragonfel
Hi,
There is one thing that I would like the most.

being able to unregister the remote interfaces. this little change would be so great. since it would enable you to create a programmable block to use directly inside the game and test code on the fly easily without having to care about the name of the interface.

after that the ability to load a lua file into the game while playing would be great too since it would allow for entire mods to be reloaded. of course it might be hard to deal with this one because it would also need to unload already existing prototypes to be able to have clean code.

Just a suggestion.

thx for your time.

Re: even more mod friendly.

Posted: Mon Feb 29, 2016 8:31 pm
by ssilk
I'm not 100% sure, if I understood "unregister the remote interface". Not very important but if you have time left please make the description a bit more detailed.

Re: even more mod friendly.

Posted: Tue Mar 01, 2016 12:40 pm
by Hiul_Dragonfel
what I was thinking was :

when you write that

Code: Select all

remote.add_interface("human interactor",
                     {hello = function() game.local_player.print("Hi!") end,
                      bye = function(name) game.local_player.print("Bye " .. name) end})
you should be able to do that

Code: Select all

remote.remove_interface("human interactor")
so you don't dirty the code by adding new interfaces when you only want to update a function in it.

the prototype of the method should be

Code: Select all

bool remote.remove_interface(string, ...)
so that even if we can't update a function we can still go around this limitation by replacing the interface entirely.

I don't know how much work this would take thought.

with the ability of loadong a lua file live it will be possible (as a temporary measure) to relaod mods live.
it would increase greatly the developpement quality, ease and speed.

Re: even more mod friendly.

Posted: Tue Mar 01, 2016 3:47 pm
by Hiul_Dragonfel
I might be a little confusing here.

what I want to do is a programmable block witch could be managed by the remote class having a "remove_inteface" method in it.

while creating a mod would be far easier if we could load live a lua file.

PS: sorry I didn't find the edit button

PPS: I wasn't logged in when I searched for it u_u ( I might be unsavable )

Re: even more mod friendly.

Posted: Tue Mar 01, 2016 5:18 pm
by ssilk
Much better now. Thanks.

Re: even more mod friendly.

Posted: Tue Mar 01, 2016 6:18 pm
by Hiul_Dragonfel
no problems.

thanks for pointing it out too.