Lobby
This commit is contained in:
1 parent
73a2db8bb8
commit
44cf31ce6b
231 files changed
+3396887
-1109081
No files matched your search
@@ -0,0 +1,15 @@
|
||||
// Собирает Luau-файл для Studio: 4 модели арок порталов (bbmodel-to-luau.js) + tools/lobby-portals.lua.
|
||||
// node tools/lobby-portals.js <out.lua>
|
||||
const fs = require('fs'), path = require('path'), { execFileSync } = require('child_process');
|
||||
const ROOT = path.join(__dirname, '..');
|
||||
const out = process.argv[2] || path.join(ROOT, 'tools', 'lobby-portals-full.lua');
|
||||
const models = { lake: 'lobby_portal', tropics: 'lobby_portal_tropics', ice: 'lobby_portal_ice', volcano: 'lobby_portal_volcano' };
|
||||
let code = '-- СГЕНЕРИРОВАНО tools/lobby-portals.js\nlocal BUILD = {}\n';
|
||||
for (const [key, file] of Object.entries(models)) {
|
||||
const lua = path.join(ROOT, 'tools', 'lobby-models', file + '.lua');
|
||||
execFileSync('node', [path.join(__dirname, 'bbmodel-to-luau.js'), path.join(ROOT, 'assets', 'props', file + '.bbmodel'),
|
||||
path.join(ROOT, 'assets', 'props', file + '_palette.png'), lua, file], { stdio: 'inherit' });
|
||||
code += `BUILD.${key} = (function()\n${fs.readFileSync(lua, 'utf8')}\nend)()\n`;
|
||||
}
|
||||
fs.writeFileSync(out, code + fs.readFileSync(path.join(__dirname, 'lobby-portals.lua'), 'utf8'), 'utf8');
|
||||
console.log('->', out);
|
||||
Reference in new issue
Block a user