Module Helper - A very simple plugin for ModuleScripts

At the moment it’s not very helpful but maybe it could serve some use if you implemented fairly lengthy templates? For example, I work a lot with OOP and its pretty repetitive and boring to simply type in this code in each and every module i create:

local module = {};
module.__index = module;

function module.new()
    local self = setmetatable({

        _connections = {},
    }, module);

    return self;
end

function module:destroy()
    for _,c in ipairs(self._connections) do
        c:Disconnect();
    end
    table.clear(self._connections);
    table.clear(self);
end

return module;

So maybe my suggestion would be to add some lengthy boilerplate templates in the plugin to make it actually helpful rather than just changing like two words in the module which is not tedious at all.

2 Likes