This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
50 lines (36 loc) · 1.71 KB
/
main.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
var colors = require('colors')
var console = require('./src/console')
var config = require('./config.json') // Importing config
var package = require('./package.json') // Importing package.json
var Updater = require('./src/Updater/updater')
// TempDB
var TempDBAddValueI = require('./src/TempDB/TempDBAddValue')
// var TempDBGetValueI = require('./src/TempDB/TempDBGetValue') Get Value doesn't work (external file issue)
var TempDBModifyValueI = require('./src/TempDB/TempDBModifyValue')
var TempDBRemoveValueI = require('./src/TempDB/TempDBRemoveValue')
var TDBStored = {}
// Check for update
Updater(package)
module.exports = class DPWS {
Console(Type, Desc, NoDescWarn) {
console(Type, Desc, NoDescWarn)
}
TempDBAddValue(Name, Value, DebugMode){
TempDBAddValueI(Name, Value, TDBStored, DebugMode)
}
TempDBGetValue(ValueName){
// Code from (./src/TempDB/TempDBGetValue)
// Script here due to external file issue (can't get values)
if (ValueName !== undefined && TDBStored[ValueName] !== undefined){ return TDBStored[ValueName]; }else if (ValueName == undefined){console("ERR", "Invalid ValueName.", true)}else{
Console("ERR", "Incorrect ValueName/Couldn't return your value.", true)
Console("ERR", "Check if you created a value with that name.", true)
Console("ERR", "If you created a value with that name, then it could be a bug. Report it : https://github.com/DinographicPixels/DPWShorts/issues", true)
}
}
TempDBModifyValue(ValueName, NewValue){
TempDBModifyValueI(ValueName, NewValue, TDBStored)
}
TempDBRemoveValue(ValueName){
TempDBRemoveValueI(ValueName, TDBStored)
}
}