feat: Add scripts for mob dependency management and server setup

- Implemented `findMobDependencies.ts` to identify foreign key constraints referencing the Mob table and log dependent rows.
- Created `fullServerSetup.ts` for idempotent server setup, including economy items, item recipes, game areas, mobs, and optional demo mob attacks.
- Developed `removeInvalidMobsWithDeps.ts` to delete invalid mobs and their dependencies, backing up affected scheduled mob attacks.
- Added unit tests in `testMobUnit.ts` and `mob.test.ts` for mob functionality, including stats computation and instance retrieval.
- Introduced reward modification tests in `testRewardMods.ts` and `rewardMods.unit.ts` to validate drop selection and coin multiplier behavior.
- Enhanced command handling for mob deletion in `mobDelete.ts` and setup examples in `setup.ts`, ensuring proper permissions and feedback.
- Created utility functions in `testHelpers.ts` for deterministic drop selection from mob definitions.
This commit is contained in:
Shni
2025-10-14 14:58:38 -05:00
parent f36fa24e46
commit 852b1d02a2
24 changed files with 2158 additions and 177 deletions

View File

@@ -0,0 +1,42 @@
[
{
"id": "cmgqyujes0014mofws1efy1p3",
"userId": "327207082203938818",
"guildId": "1316592320954630144",
"mobId": "cmgqyuj6r0011mofwii4i80qf",
"scheduleAt": "2025-10-14T19:39:44.844Z",
"processedAt": null,
"status": "scheduled",
"metadata": null
},
{
"id": "cmgqyujes0015mofwyrgzfv6s",
"userId": "327207082203938818",
"guildId": "1316592320954630144",
"mobId": "cmgqyuj6r0011mofwii4i80qf",
"scheduleAt": "2025-10-14T19:39:54.844Z",
"processedAt": null,
"status": "scheduled",
"metadata": null
},
{
"id": "cmgqyunn50024mofw3ae9ub5k",
"userId": "327207082203938818",
"guildId": "1316592320954630144",
"mobId": "cmgqyunde001zmofwyqw6oh49",
"scheduleAt": "2025-10-14T19:40:10.329Z",
"processedAt": null,
"status": "scheduled",
"metadata": null
},
{
"id": "cmgqyunn50025mofwnj7xmke5",
"userId": "327207082203938818",
"guildId": "1316592320954630144",
"mobId": "cmgqyunha0023mofwyhh34uye",
"scheduleAt": "2025-10-14T19:40:25.329Z",
"processedAt": null,
"status": "scheduled",
"metadata": null
}
]