This repository has been archived by the owner on Jun 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
start.js
103 lines (86 loc) · 3.35 KB
/
start.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
let _modPath;
// Let's set rs as the god, GetRootScope()
const rs = GetRootScope();
// This is for opening the mod link in-game.
// GetRootScope().OpenMod = () => Remote.app.openLink('http://steamcommunity.com/sharedfiles/filedetails/stats/1109753463');
// THis says the mod loaded in console.
Helpers.ConsoleInfo('[MOD] Sandbox: Helper loaded!');
exports.initialize = (modPath) => {
_modPath = modPath;
// Add new menu item
Modding.setMenuItem({
name: 'sandbox',
tooltip: "Sandbox Mod",
tooltipPosition: 'top',
faIcon: 'fa-terminal',
badgeCount: 0,
});
// Define custom view
exports.views = [{
name: 'sandbox',
viewPath: _modPath + 'view.html',
controller: function ($rootScope) {
this.giveMoney = (amount) => {
GetRootScope().confirm('Are you sure?', `Are you sure you want ${numeral(amount).format(Configuration.CURRENCY_FORMAT)}?`, () => {
$rootScope.settings.balance += amount
//$rootScope.addNotification("You 'borrowed' " + numeral(amount).format(Configuration.CURRENCY_FORMAT) + " !", 1)
});
}
this.giveXP = (amount) => {
$rootScope.confirm('Are you sure?', `Are you sure you want ${(amount)}XP ?`, () => {
$rootScope.settings.xp += amount
//$rootScope.addNotification("Added " + amount + " XP!", 1);
});
}
this.giveRP = (amount) => {
$rootScope.confirm('Are you sure?', `Are you sure you want ${(amount)}XP ?`, () => {
$rootScope.settings.researchPoints += amount
//$rootScope.addNotification("Added " + amount + " XP!", 1);
});
}
this.maxmood = () =>{
$rootScope.confirm('Are you sure?', `This will bring every employee's mood 100%`, () => {
Cheats.EveryoneHappy()
});
}
this.giveMaxTire = () => {
$rootScope.confirm('Are you sure?', `Are you sure you want get max tire (xp) ?`, () => {
Cheats.GetMaxTier()
//$rootScope.addNotification("Max tier given.", 1);
});
}
this.giveMoreUsers = (product_id, amount) => {
$rootScope.confirm('Are you sure?', `Are you sure you want give yourself ${(amount)} of users?`, () => {
for (var key in GetRootScope().settings.progress.products) {
console.log(key)
GetRootScope().settings.progress.products[key].users.total += amount;
GetRootScope().settings.progress.products[key].users.potentialUsers += amount;
}
//$rootScope.addNotification("Added " + amount + "users", 1);
});
}
this.NextDay = () => {
$rootScope.confirm('Are you sure?', `Are you sure you want to skip a day?`, () => {
Cheats.SkipADay()
//$rootScope.addNotification("You skipped one day.", 1);
});
}
this.InventoryGive = () => {
$rootScope.confirm('Are you sure?', `Are you sure you want to add 1000 items of every item.`, () => {
Components.forEach(t => {
// Check if the inventory item is researched and built once,
// solves the NaN problem
if(GetRootScope().settings.inventory[t.name] > 0)
GetRootScope().settings.inventory[t.name] += 1000
});
//$rootScope.addNotification("Added 500 of every item to your inventory.", 1);
});
}
}
}]
}
Helpers.ConsoleInfo('[MOD] Sandbox: Menu loaded!');
exports.onUnsubscribe = done => {
Helpers.ConsoleInfo(`[MOD] Sandbox: User has just unsubscribed from this mod... :( `);
done();
}