-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.js
51 lines (47 loc) · 1.49 KB
/
init.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/**
*
* _____ _ _____ _ _
* / ____| | | / ____| (_) | |
* | (___ _ __ __ _ _ __| | _| (___ ___ _ __ _ _ __ | |_
* \___ \| '_ \ / _` | '__| |/ /\___ \ / __| '__| | '_ \| __|
* ____) | |_) | (_| | | | < ____) | (__| | | | |_) | |_
* |_____/| .__/ \__,_|_| |_|\_\_____/ \___|_| |_| .__/ \__|
* | | | |
* |_| |_|
*
*
* This file is part of SparkScript by SparkDevs.
*
* You may look at the code, you may change the code. But you MUST give us credit.
* Please try and keep the API more or less the same so we can have a universal
* modding API for Minecraft: Pocket Edition. Happy coding :)
*
* Website: https://sparkdevs.net/
* Twitter: https://twitter.com/SparkDevTeam/
*
* LICENSE: LGPL
*
* The first and only file loaded by the launcher itself.
*/
var global = this;
(function() {
/**
* Called from the launcher itself.
*
* _load() must be implemented in a JavaScript interface in the launcher.
* _eval() must be implemented in a JavaScript interface in the launcher.
*
* @param scriptManager
* @param logger
* @param directory
*/
__init = function(scriptManager, logger, directory) {
global.__dirname = directory;
var requireSetup = _load(__dirname + '/core/require.js');
global.require = requireSetup(
function(code) {
return _eval(code);
}
);
}
})();