-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
82 lines (75 loc) · 2.21 KB
/
index.ts
File metadata and controls
82 lines (75 loc) · 2.21 KB
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
/*
* Vencord, a Discord client mod
* Copyright (c) 2024 Vendicated and contributors
* SPDX-License-Identifier: GPL-3.0-or-later
*/
import { definePluginSettings } from "@api/Settings";
import definePlugin, { OptionType } from "@utils/types";
import horse from "file://horse.js";
const settings = definePluginSettings({
speed: {
description: "Speed of the fatass horse",
type: OptionType.NUMBER,
default: 10,
isValid: (value: number) => value > 0 || "Speed must be bigger than 0",
onChange: load
},
fps: {
description: "Framerate of the fatass horse",
type: OptionType.NUMBER,
default: 24,
isValid: (value: number) => value > 0 || "Framerate must be bigger than 0",
onChange: load
},
size: {
description: "Size of the fatass horse",
type: OptionType.NUMBER,
default: 120,
isValid: (value: number) => value > 0 || "Size must be bigger than 0",
onChange: load
},
fade: {
description: "If the horse should fade when the cursor is near",
type: OptionType.BOOLEAN,
default: true,
onChange: load
},
freeroam: {
description: "If the horse should roam freely when idle",
type: OptionType.BOOLEAN,
default: true,
onChange: load
},
shake: {
description: "If the horse should shake the window when it's walking",
type: OptionType.BOOLEAN,
default: false,
onChange: load
}
});
function unload() {
document.getElementById("fathorse")?.remove()
}
function load() {
if (!Vencord.Plugins.isPluginEnabled("FatassHorse")) return;
unload();
(0, eval)(horse)({
speed: settings.store.speed,
fps: settings.store.fps,
size: settings.store.size,
fade: settings.store.fade,
freeroam: settings.store.freeroam,
shake: settings.store.shake
});
}
export default definePlugin({
name: "FatassHorse",
description: "What a fatass",
authors: [{
name: "Nexpid",
id: 853550207039832084n
}],
settings,
start: load,
stop: unload,
});