moomodding 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/moo.js CHANGED
@@ -1,3 +1,3 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import "../dist/index.js";
3
+ import "../dist/cli.js";
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,111 @@
1
+ import { Command } from "commander";
2
+ import pc from "picocolors";
3
+ import { loginCommand } from "./commands/login.js";
4
+ import { whoamiCommand } from "./commands/whoami.js";
5
+ import { initCommand } from "./commands/init.js";
6
+ import { listCommand } from "./commands/list.js";
7
+ import { cloneCommand } from "./commands/clone.js";
8
+ import { pushCommand } from "./commands/push.js";
9
+ import { pullCommand } from "./commands/pull.js";
10
+ import { devCommand } from "./commands/dev.js";
11
+ import { clearAuth, loadConfig, saveConfig } from "./core/config.js";
12
+ const program = new Command();
13
+ program
14
+ .name("moo")
15
+ .description("MooModding Developer CLI — Build, test, and sync MooMoo.io mods with zero friction.")
16
+ .version("1.0.2");
17
+ // 1. Auth Commands
18
+ program
19
+ .command("login [token]")
20
+ .description("Log in to your MooModding account")
21
+ .action(async (token) => {
22
+ await loginCommand(token);
23
+ });
24
+ program
25
+ .command("logout")
26
+ .description("Log out and clear local credentials")
27
+ .action(() => {
28
+ clearAuth();
29
+ console.log(pc.green("[success] Logged out successfully."));
30
+ });
31
+ program
32
+ .command("whoami")
33
+ .description("Display current user and storage quota")
34
+ .action(async () => {
35
+ await whoamiCommand();
36
+ });
37
+ // 2. Project Lifecycle Commands
38
+ program
39
+ .command("init [dir]")
40
+ .description("Scaffold a new MooMoo mod project")
41
+ .option("-n, --name <name>", "Mod display name")
42
+ .option("-t, --type <type>", "Mod type ('hook' or 'bundle_replacement')", "hook")
43
+ .action(async (dir, options) => {
44
+ await initCommand(dir, options);
45
+ });
46
+ program
47
+ .command("list")
48
+ .alias("ls")
49
+ .description("List your cloud mods and storage usage")
50
+ .action(async () => {
51
+ await listCommand();
52
+ });
53
+ program
54
+ .command("clone <slug> [dir]")
55
+ .description("Clone a cloud mod into a local directory")
56
+ .action(async (slug, dir) => {
57
+ await cloneCommand(slug, dir);
58
+ });
59
+ program
60
+ .command("push")
61
+ .description("Scan directory and push mod files to cloud")
62
+ .action(async () => {
63
+ await pushCommand();
64
+ });
65
+ program
66
+ .command("pull")
67
+ .description("Pull latest mod files from cloud")
68
+ .action(async () => {
69
+ await pullCommand();
70
+ });
71
+ program
72
+ .command("dev")
73
+ .description("Start file watcher for live cloud sync on save")
74
+ .action(() => {
75
+ devCommand();
76
+ });
77
+ // 3. Configuration command
78
+ program
79
+ .command("config <action> [key] [value]")
80
+ .description("View or update CLI config (e.g. moo config set api https://moomodding.io)")
81
+ .action((action, key, value) => {
82
+ const config = loadConfig();
83
+ if (action === "get") {
84
+ if (key) {
85
+ console.log(config[key] || pc.gray("(undefined)"));
86
+ }
87
+ else {
88
+ console.log(JSON.stringify(config, null, 2));
89
+ }
90
+ }
91
+ else if (action === "set") {
92
+ if (!key || value === undefined) {
93
+ console.log(pc.red("Usage: moo config set <key> <value>"));
94
+ return;
95
+ }
96
+ if (key === "api" || key === "apiUrl") {
97
+ config.apiUrl = value;
98
+ saveConfig(config);
99
+ console.log(pc.green(`[success] API URL updated: ${value}`));
100
+ }
101
+ else {
102
+ config[key] = value;
103
+ saveConfig(config);
104
+ console.log(pc.green(`[success] '${key}' updated.`));
105
+ }
106
+ }
107
+ else {
108
+ console.log(pc.red("Invalid action. Usage: moo config get [key] | moo config set <key> <value>"));
109
+ }
110
+ });
111
+ program.parse(process.argv);
@@ -0,0 +1,2 @@
1
+ import type { Accessory } from "../types/index.js";
2
+ export declare const accessories: readonly Accessory[];
@@ -0,0 +1,169 @@
1
+ export const accessories = [
2
+ {
3
+ "id": 12,
4
+ "name": "Snowball",
5
+ "price": 1000,
6
+ "scale": 105,
7
+ "xOff": 18,
8
+ "desc": "no effect"
9
+ },
10
+ {
11
+ "id": 9,
12
+ "name": "Tree Cape",
13
+ "price": 1000,
14
+ "scale": 90,
15
+ "desc": "no effect"
16
+ },
17
+ {
18
+ "id": 10,
19
+ "name": "Stone Cape",
20
+ "price": 1000,
21
+ "scale": 90,
22
+ "desc": "no effect"
23
+ },
24
+ {
25
+ "id": 3,
26
+ "name": "Cookie Cape",
27
+ "price": 1500,
28
+ "scale": 90,
29
+ "desc": "no effect"
30
+ },
31
+ {
32
+ "id": 8,
33
+ "name": "Cow Cape",
34
+ "price": 2000,
35
+ "scale": 90,
36
+ "desc": "no effect"
37
+ },
38
+ {
39
+ "id": 11,
40
+ "name": "Monkey Tail",
41
+ "price": 2000,
42
+ "scale": 97,
43
+ "xOff": 25,
44
+ "desc": "Super speed but reduced damage",
45
+ "spdMult": 1.35,
46
+ "dmgMultO": 0.2
47
+ },
48
+ {
49
+ "id": 17,
50
+ "name": "Apple Basket",
51
+ "price": 3000,
52
+ "scale": 80,
53
+ "xOff": 12,
54
+ "desc": "slowly regenerates health over time",
55
+ "healthRegen": 1
56
+ },
57
+ {
58
+ "id": 6,
59
+ "name": "Winter Cape",
60
+ "price": 3000,
61
+ "scale": 90,
62
+ "desc": "no effect"
63
+ },
64
+ {
65
+ "id": 4,
66
+ "name": "Skull Cape",
67
+ "price": 4000,
68
+ "scale": 90,
69
+ "desc": "no effect"
70
+ },
71
+ {
72
+ "id": 5,
73
+ "name": "Dash Cape",
74
+ "price": 5000,
75
+ "scale": 90,
76
+ "desc": "no effect"
77
+ },
78
+ {
79
+ "id": 2,
80
+ "name": "Dragon Cape",
81
+ "price": 6000,
82
+ "scale": 90,
83
+ "desc": "no effect"
84
+ },
85
+ {
86
+ "id": 1,
87
+ "name": "Super Cape",
88
+ "price": 8000,
89
+ "scale": 90,
90
+ "desc": "no effect"
91
+ },
92
+ {
93
+ "id": 7,
94
+ "name": "Troll Cape",
95
+ "price": 8000,
96
+ "scale": 90,
97
+ "desc": "no effect"
98
+ },
99
+ {
100
+ "id": 14,
101
+ "name": "Thorns",
102
+ "price": 10000,
103
+ "scale": 115,
104
+ "xOff": 20,
105
+ "desc": "no effect"
106
+ },
107
+ {
108
+ "id": 15,
109
+ "name": "Blockades",
110
+ "price": 10000,
111
+ "scale": 95,
112
+ "xOff": 15,
113
+ "desc": "no effect"
114
+ },
115
+ {
116
+ "id": 20,
117
+ "name": "Devils Tail",
118
+ "price": 10000,
119
+ "scale": 95,
120
+ "xOff": 20,
121
+ "desc": "no effect"
122
+ },
123
+ {
124
+ "id": 16,
125
+ "name": "Sawblade",
126
+ "price": 12000,
127
+ "scale": 90,
128
+ "spin": true,
129
+ "xOff": 0,
130
+ "desc": "deal damage to players that damage you",
131
+ "dmg": 0.15
132
+ },
133
+ {
134
+ "id": 13,
135
+ "name": "Angel Wings",
136
+ "price": 15000,
137
+ "scale": 138,
138
+ "xOff": 22,
139
+ "desc": "slowly regenerates health over time",
140
+ "healthRegen": 3
141
+ },
142
+ {
143
+ "id": 19,
144
+ "name": "Shadow Wings",
145
+ "price": 15000,
146
+ "scale": 138,
147
+ "xOff": 22,
148
+ "desc": "increased movement speed",
149
+ "spdMult": 1.1
150
+ },
151
+ {
152
+ "id": 18,
153
+ "name": "Blood Wings",
154
+ "price": 20000,
155
+ "scale": 178,
156
+ "xOff": 26,
157
+ "desc": "restores health when you deal damage",
158
+ "healD": 0.2
159
+ },
160
+ {
161
+ "id": 21,
162
+ "name": "Corrupt X Wings",
163
+ "price": 20000,
164
+ "scale": 178,
165
+ "xOff": 26,
166
+ "desc": "deal damage to players that damage you",
167
+ "dmg": 0.25
168
+ }
169
+ ];
@@ -0,0 +1,2 @@
1
+ import type { AITypeDefinition } from "../types/index.js";
2
+ export declare const aiTypes: readonly AITypeDefinition[];
@@ -0,0 +1,176 @@
1
+ export const aiTypes = [
2
+ {
3
+ "id": 0,
4
+ "src": "cow_1",
5
+ "killScore": 150,
6
+ "health": 500,
7
+ "weightM": 0.8,
8
+ "speed": 0.00095,
9
+ "turnSpeed": 0.001,
10
+ "scale": 72,
11
+ "drop": [
12
+ "food",
13
+ 50
14
+ ]
15
+ },
16
+ {
17
+ "id": 1,
18
+ "src": "pig_1",
19
+ "killScore": 200,
20
+ "health": 800,
21
+ "weightM": 0.6,
22
+ "speed": 0.00085,
23
+ "turnSpeed": 0.001,
24
+ "scale": 72,
25
+ "drop": [
26
+ "food",
27
+ 80
28
+ ]
29
+ },
30
+ {
31
+ "id": 2,
32
+ "name": "Bull",
33
+ "src": "bull_2",
34
+ "hostile": true,
35
+ "dmg": 20,
36
+ "killScore": 1000,
37
+ "health": 1800,
38
+ "weightM": 0.5,
39
+ "speed": 0.00094,
40
+ "turnSpeed": 0.00074,
41
+ "scale": 78,
42
+ "viewRange": 800,
43
+ "chargePlayer": true,
44
+ "drop": [
45
+ "food",
46
+ 100
47
+ ]
48
+ },
49
+ {
50
+ "id": 3,
51
+ "name": "Bully",
52
+ "src": "bull_1",
53
+ "hostile": true,
54
+ "dmg": 20,
55
+ "killScore": 2000,
56
+ "health": 2800,
57
+ "weightM": 0.45,
58
+ "speed": 0.001,
59
+ "turnSpeed": 0.0008,
60
+ "scale": 90,
61
+ "viewRange": 900,
62
+ "chargePlayer": true,
63
+ "drop": [
64
+ "food",
65
+ 400
66
+ ]
67
+ },
68
+ {
69
+ "id": 4,
70
+ "name": "Wolf",
71
+ "src": "wolf_1",
72
+ "hostile": true,
73
+ "dmg": 8,
74
+ "killScore": 500,
75
+ "health": 300,
76
+ "weightM": 0.45,
77
+ "speed": 0.001,
78
+ "turnSpeed": 0.002,
79
+ "scale": 84,
80
+ "viewRange": 800,
81
+ "chargePlayer": true,
82
+ "drop": [
83
+ "food",
84
+ 200
85
+ ]
86
+ },
87
+ {
88
+ "id": 5,
89
+ "name": "Quack",
90
+ "src": "chicken_1",
91
+ "dmg": 8,
92
+ "killScore": 2000,
93
+ "noTrap": true,
94
+ "health": 300,
95
+ "weightM": 0.2,
96
+ "speed": 0.0018,
97
+ "turnSpeed": 0.006,
98
+ "scale": 70,
99
+ "drop": [
100
+ "food",
101
+ 100
102
+ ]
103
+ },
104
+ {
105
+ "id": 6,
106
+ "name": "MOOSTAFA",
107
+ "nameScale": 50,
108
+ "src": "enemy",
109
+ "hostile": true,
110
+ "dontRun": true,
111
+ "fixedSpawn": true,
112
+ "spawnDelay": 60000,
113
+ "noTrap": true,
114
+ "colDmg": 100,
115
+ "dmg": 40,
116
+ "killScore": 8000,
117
+ "health": 18000,
118
+ "weightM": 0.4,
119
+ "speed": 0.0007,
120
+ "turnSpeed": 0.01,
121
+ "scale": 80,
122
+ "spriteMlt": 1.8,
123
+ "leapForce": 0.9,
124
+ "viewRange": 1000,
125
+ "hitRange": 210,
126
+ "hitDelay": 1000,
127
+ "chargePlayer": true,
128
+ "drop": [
129
+ "food",
130
+ 100
131
+ ]
132
+ },
133
+ {
134
+ "id": 7,
135
+ "name": "Treasure",
136
+ "hostile": true,
137
+ "nameScale": 35,
138
+ "src": "crate_1",
139
+ "fixedSpawn": true,
140
+ "spawnDelay": 120000,
141
+ "colDmg": 200,
142
+ "killScore": 5000,
143
+ "health": 20000,
144
+ "weightM": 0.1,
145
+ "speed": 0,
146
+ "turnSpeed": 0,
147
+ "scale": 70,
148
+ "spriteMlt": 1
149
+ },
150
+ {
151
+ "id": 8,
152
+ "name": "MOOFIE",
153
+ "src": "wolf_2",
154
+ "hostile": true,
155
+ "fixedSpawn": true,
156
+ "dontRun": true,
157
+ "hitScare": 4,
158
+ "spawnDelay": 30000,
159
+ "noTrap": true,
160
+ "nameScale": 35,
161
+ "dmg": 10,
162
+ "colDmg": 100,
163
+ "killScore": 3000,
164
+ "health": 7000,
165
+ "weightM": 0.45,
166
+ "speed": 0.0015,
167
+ "turnSpeed": 0.002,
168
+ "scale": 90,
169
+ "viewRange": 800,
170
+ "chargePlayer": true,
171
+ "drop": [
172
+ "food",
173
+ 1000
174
+ ]
175
+ }
176
+ ];
@@ -0,0 +1,2 @@
1
+ import type { GameConfig } from "../types/index.js";
2
+ export declare const config: GameConfig;
@@ -0,0 +1,90 @@
1
+ export const config = {
2
+ "serverUpdateRate": 9,
3
+ "maxPlayers": 40,
4
+ "maxPlayersHard": 50,
5
+ "collisionDepth": 6,
6
+ "minimapRate": 3000,
7
+ "colGrid": 10,
8
+ "clientSendRate": 5,
9
+ "healthBarWidth": 50,
10
+ "healthBarPad": 4.5,
11
+ "iconPadding": 15,
12
+ "iconPad": 0.9,
13
+ "deathFadeout": 3000,
14
+ "crownIconScale": 60,
15
+ "crownPad": 35,
16
+ "chatCountdown": 3000,
17
+ "chatCooldown": 500,
18
+ "maxAge": 100,
19
+ "gatherAngle": 1.208304866765305,
20
+ "gatherWiggle": 10,
21
+ "hitReturnRatio": 0.25,
22
+ "hitAngle": 1.5707963267948966,
23
+ "playerScale": 35,
24
+ "playerSpeed": 0.0016,
25
+ "playerDecel": 0.993,
26
+ "nameY": 34,
27
+ "skinColors": [
28
+ "#bf8f54",
29
+ "#cbb091",
30
+ "#896c4b",
31
+ "#fad6ac",
32
+ "#fcdba3",
33
+ "#e3ac7b",
34
+ "#4a3c2f",
35
+ "#3e3226",
36
+ "#42280e"
37
+ ],
38
+ "animalCount": 7,
39
+ "aiTurnRandom": 0.06,
40
+ "cowNames": [
41
+ "Sid",
42
+ "Steph",
43
+ "Bmoe",
44
+ "Romn",
45
+ "Jononthecool",
46
+ "Fiona",
47
+ "Vince",
48
+ "Nathan",
49
+ "Nick",
50
+ "Flappy",
51
+ "Ronald",
52
+ "Otis",
53
+ "Pepe",
54
+ "Mc Donald",
55
+ "Theo",
56
+ "Fabz",
57
+ "Oliver",
58
+ "Jeff",
59
+ "Jimmy",
60
+ "Helena",
61
+ "Reaper"
62
+ ],
63
+ "shieldAngle": 1.0471975511965976,
64
+ "weaponVariants": [
65
+ {
66
+ "id": 0,
67
+ "src": "",
68
+ "xp": 0,
69
+ "val": 1
70
+ },
71
+ {
72
+ "id": 1,
73
+ "src": "_g",
74
+ "xp": 3000,
75
+ "val": 1.1
76
+ },
77
+ {
78
+ "id": 2,
79
+ "src": "_d",
80
+ "xp": 7000,
81
+ "val": 1.18
82
+ },
83
+ {
84
+ "id": 3,
85
+ "src": "_r",
86
+ "xp": 12000,
87
+ "val": 1.25
88
+ }
89
+ ]
90
+ };
@@ -0,0 +1,2 @@
1
+ import type { ItemGroup } from "../types/index.js";
2
+ export declare const groups: readonly ItemGroup[];
@@ -0,0 +1,98 @@
1
+ export const groups = [
2
+ {
3
+ "id": 0,
4
+ "name": "food",
5
+ "layer": 0
6
+ },
7
+ {
8
+ "id": 1,
9
+ "name": "walls",
10
+ "place": true,
11
+ "limit": 30,
12
+ "layer": 0
13
+ },
14
+ {
15
+ "id": 2,
16
+ "name": "spikes",
17
+ "place": true,
18
+ "limit": 15,
19
+ "layer": 0
20
+ },
21
+ {
22
+ "id": 3,
23
+ "name": "mill",
24
+ "place": true,
25
+ "limit": 7,
26
+ "layer": 1
27
+ },
28
+ {
29
+ "id": 4,
30
+ "name": "mine",
31
+ "place": true,
32
+ "limit": 1,
33
+ "layer": 0
34
+ },
35
+ {
36
+ "id": 5,
37
+ "name": "trap",
38
+ "place": true,
39
+ "limit": 6,
40
+ "layer": -1
41
+ },
42
+ {
43
+ "id": 6,
44
+ "name": "booster",
45
+ "place": true,
46
+ "limit": 12,
47
+ "layer": -1
48
+ },
49
+ {
50
+ "id": 7,
51
+ "name": "turret",
52
+ "place": true,
53
+ "limit": 2,
54
+ "layer": 1
55
+ },
56
+ {
57
+ "id": 8,
58
+ "name": "watchtower",
59
+ "place": true,
60
+ "limit": 12,
61
+ "layer": 1
62
+ },
63
+ {
64
+ "id": 9,
65
+ "name": "buff",
66
+ "place": true,
67
+ "limit": 4,
68
+ "layer": -1
69
+ },
70
+ {
71
+ "id": 10,
72
+ "name": "spawn",
73
+ "place": true,
74
+ "limit": 1,
75
+ "layer": -1
76
+ },
77
+ {
78
+ "id": 11,
79
+ "name": "sapling",
80
+ "place": true,
81
+ "limit": 2,
82
+ "layer": 0
83
+ },
84
+ {
85
+ "id": 12,
86
+ "name": "blocker",
87
+ "place": true,
88
+ "limit": 3,
89
+ "layer": -1
90
+ },
91
+ {
92
+ "id": 13,
93
+ "name": "teleporter",
94
+ "place": true,
95
+ "limit": 2,
96
+ "layer": -1
97
+ }
98
+ ];
@@ -0,0 +1,2 @@
1
+ import type { Hat } from "../types/index.js";
2
+ export declare const hats: readonly Hat[];