I struggle to understand the point?
if you mean that RM offers built-in function? or we write our own function??
also remember that pluginCommand still has to be JsonParsed to work.
@Kaliya I think what they meant is to split a pluginCommand content in multiple function. so the register lambda is not 1000 lines long.
@Anyone yes you can split a lambda. they work as the same as ANY function they can receive/ transfert and EMIT information like ANY normal function so YES splitting a function is possible your way is justy counter intuitive. REMEMBER that your command is simply a function and the way you split it is just useless call.
that's how u would do it.
about reusing code of course you can it's all depends on your preferences.
but in the end......it's all depends on how you want to structure your codes.
if you mean that RM offers built-in function? or we write our own function??
also remember that pluginCommand still has to be JsonParsed to work.
@Kaliya I think what they meant is to split a pluginCommand content in multiple function. so the register lambda is not 1000 lines long.
@Anyone yes you can split a lambda. they work as the same as ANY function they can receive/ transfert and EMIT information like ANY normal function so YES splitting a function is possible your way is justy counter intuitive. REMEMBER that your command is simply a function and the way you split it is just useless call.
that's how u would do it.
Code:
PluginManager.registerPluginCommand("MyPlugin","MyCommand", args => {
var data = Json.parse(args);
drawActorWindow(200,400,20,15);
displayActorName(data.actors);
displayActorStats(data.actors);
displayActorFace(data.actors);
displayActorPortrait(data.actors);
} );
drawActorName(actorArray) = () => {
// blah blah you split stuff whatever you want
};
about reusing code of course you can it's all depends on your preferences.
but in the end......it's all depends on how you want to structure your codes.