Skip to content
This repository was archived by the owner on Apr 18, 2022. It is now read-only.

Commit 24cb54e

Browse files
committed
Some updates
Some updates
1 parent 32b3d28 commit 24cb54e

9,436 files changed

Lines changed: 270586 additions & 747764 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*.bat
2+
node_modules
3+
.atomignore
4+
*.zip
5+
client/compile.js

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
1-
# mcscriptStudioCode
1+
# MCScriptStudioCode
2+
## Description
3+
MCScriptStudioCode is a editor for [mcscript](https://github.com/stevertus/mcscript). At the moment it is in **beta**, so there are missing features, and many bugs.
4+
5+
## Install
6+
Select the version that works for you [here](https://github.com/miniminelp/mcscriptStudioServer/download). If you just want the server use npm: `npm install mcscriptstudiocodehost`
7+
8+
## License
9+
MIT license, see [here](license)
10+
11+
## Issues
12+
Please report bugs with the github issue function.

client/app/assets/images/icon.png

828 Bytes
Loading
76.7 KB
Loading
19.4 KB
Loading
34.2 KB
Loading

client/app/client.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
// Modules to control application life and create native browser window
2+
const {app, BrowserWindow} = require('electron')
3+
const fs = require("fs")
4+
require('electron-debug')({showDevTools: false}); // Debugs
5+
require("./util.js")
6+
var icon = __dirname + '/assets/images/icon.png';
7+
8+
// Keep a global reference of the window object, if you don't, the window will
9+
// be closed automatically when the JavaScript object is garbage collected.
10+
let mainWindow
11+
12+
function createWindow () {
13+
// Create the browser window.
14+
mainWindow = new BrowserWindow({width: 800, height: 600, maximized: true, icon: icon})
15+
16+
// and load the index.html of the app.
17+
mainWindow.setMenu(null);
18+
mainWindow.maximize();
19+
mainWindow.loadURL(mcscriptStudioCode.util.address.toString());
20+
console.log(`Client listening on ${mcscriptStudioCode.util.address}`)
21+
22+
// Open the DevTools.
23+
// mainWindow.webContents.openDevTools()
24+
// Emitted when the window is closed.
25+
mainWindow.on('closed', function () {
26+
process.exit(0);
27+
})
28+
29+
mainWindow.on('close', function () {
30+
process.exit(0);
31+
})
32+
}
33+
34+
// This method will be called when Electron has finished
35+
// initialization and is ready to create browser windows.
36+
// Some APIs can only be used after this event occurs.
37+
app.on('ready', createWindow)
38+
39+
if(Math.floor(Math.random() * 10)==0) {
40+
let files = fs.readdirSync(__dirname + '/assets/images/special/');
41+
let index = Math.floor(Math.random()*(files.length));
42+
icon = __dirname + '/assets/images/special/' + files[index];
43+
}
44+
45+
// Quit when all windows are closed.
46+
app.on('window-all-closed', function () {
47+
// On OS X it is common for applications and their menu bar
48+
// to stay active until the user quits explicitly with Cmd + Q
49+
if (process.platform !== 'darwin') {
50+
app.quit()
51+
}
52+
})
53+
54+
app.on('activate', function () {
55+
// On OS X it's common to re-create a window in the app when the
56+
// dock icon is clicked and there are no other windows open.
57+
if (mainWindow === null) {
58+
createWindow()
59+
}
60+
})
61+
62+
// In this file you can include the rest of your app's specific main process
63+
// code. You can also put them in separate files and require them here.

client/app/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require("./client.js"); // Start client

0 commit comments

Comments
 (0)