Changes

Entry point module
local Ship = {}

local ShipData = require('Module:ShipData')

function Ship:get(stat, name, model)
return self:create(name, model)[stat]()
end

function Ship:create(name, model)
local ship_table = require(mw.ustring.format('Module:%s', name))
return ShipData:create(ship_table[model])
end

Ship.__call = Ship.create
setmetatable(Ship, Ship)

return Ship
Anonymous user