Archived
Complete Remake of the Modpack
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
[General]
|
||||
gameName=spt
|
||||
modid=0
|
||||
version=d2025.5.14.0
|
||||
newestVersion=
|
||||
category="-1,"
|
||||
nexusFileStatus=1
|
||||
installationFile=choccy-poseservcomp-1.0.1.zip
|
||||
repository=Nexus
|
||||
ignoredVersion=
|
||||
comments=
|
||||
notes=
|
||||
nexusDescription=
|
||||
url=
|
||||
hasCustomURL=true
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2025-05-14T13:45:05Z
|
||||
nexusCategory=0
|
||||
converted=false
|
||||
validated=false
|
||||
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
|
||||
tracked=0
|
||||
|
||||
[installedFiles]
|
||||
1\modid=0
|
||||
1\fileid=0
|
||||
size=1
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/modules.xml
|
||||
/.idea.Choccy-KSG12.iml
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "PoseServComp",
|
||||
"version": "1.0.1",
|
||||
"main": "src/mod.js",
|
||||
"license": "CC-BY 3.0",
|
||||
"author": "Choccy",
|
||||
"isBundleMod": false,
|
||||
"sptVersion": "~3.11",
|
||||
"scripts": {
|
||||
"setup": "npm i",
|
||||
"build": "node ./build.mjs",
|
||||
"buildinfo": "node ./build.mjs --verbose"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.11",
|
||||
"@typescript-eslint/eslint-plugin": "7.2",
|
||||
"@typescript-eslint/parser": "7.2",
|
||||
"archiver": "^6.0",
|
||||
"eslint": "8.57",
|
||||
"fs-extra": "11.2",
|
||||
"ignore": "^5.2",
|
||||
"tsyringe": "4.8.0",
|
||||
"typescript": "5.8",
|
||||
"winston": "3.12"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// This is a simple script used to build a mod package. The script will copy necessary files to the build directory
|
||||
// and compress the build directory into a zip file that can be easily shared.
|
||||
|
||||
const fs = require("fs-extra");
|
||||
const glob = require("glob");
|
||||
const zip = require('bestzip');
|
||||
const path = require("path");
|
||||
|
||||
// Load the package.json file to get some information about the package so we can name things appropriately. This is
|
||||
// atypical, and you would never do this in a production environment, but this script is only used for development so
|
||||
// it's fine in this case. Some of these values are stored in environment variables, but those differ between node
|
||||
// versions; the 'author' value is not available after node v14.
|
||||
const { author, name:packageName, version } = require("./package.json");
|
||||
|
||||
// Generate the name of the package, stripping out all non-alphanumeric characters in the 'author' and 'name'.
|
||||
const modName = `${author.replace(/[^a-z0-9]/gi, "")}-${packageName.replace(/[^a-z0-9]/gi, "")}-${version}`;
|
||||
console.log(`Generated package name: ${modName}`);
|
||||
|
||||
// Delete the old build directory and compressed package file.
|
||||
fs.rmSync(`${__dirname}/dist`, { force: true, recursive: true });
|
||||
console.log("Previous build files deleted.");
|
||||
|
||||
// Generate a list of files that should not be copied over into the distribution directory. This is a blacklist to ensure
|
||||
// we always copy over additional files and directories that authors may have added to their project. This may need to be
|
||||
// expanded upon by the mod author to allow for node modules that are used within the mod; example commented out below.
|
||||
const ignoreList = [
|
||||
"node_modules/",
|
||||
// "node_modules/!(weighted|glob)", // Instead of excluding the entire node_modules directory, allow two node modules.
|
||||
"src/**/*.js",
|
||||
"types/",
|
||||
".git/",
|
||||
".gitea/",
|
||||
".eslintignore",
|
||||
".eslintrc.json",
|
||||
".gitignore",
|
||||
".DS_Store",
|
||||
"packageBuild.ts",
|
||||
"mod.code-workspace",
|
||||
"package-lock.json",
|
||||
"tsconfig.json"
|
||||
];
|
||||
const exclude = glob.sync(`{${ignoreList.join(",")}}`, { realpath: true, dot: true });
|
||||
|
||||
// For some reason these basic-bitch functions won't allow us to copy a directory into itself, so we have to resort to
|
||||
// using a temporary directory, like an idiot. Excuse the normalize spam; some modules cross-platform, some don't...
|
||||
fs.copySync(__dirname, path.normalize(`${__dirname}/../~${modName}`), {filter:(filePath) =>
|
||||
{
|
||||
return !exclude.includes(filePath);
|
||||
}});
|
||||
fs.moveSync(path.normalize(`${__dirname}/../~${modName}`), path.normalize(`${__dirname}/${modName}`), { overwrite: true });
|
||||
fs.copySync(path.normalize(`${__dirname}/${modName}`), path.normalize(`${__dirname}/dist`));
|
||||
console.log("Build files copied.");
|
||||
|
||||
// Compress the files for easy distribution. The compressed file is saved into the dist directory. When uncompressed we
|
||||
// need to be sure that it includes a directory that the user can easily copy into their game mods directory.
|
||||
zip({
|
||||
source: modName,
|
||||
destination: `dist/${modName}.zip`,
|
||||
cwd: __dirname
|
||||
}).catch(function(err)
|
||||
{
|
||||
console.error("A bestzip error has occurred: ", err.stack);
|
||||
}).then(function()
|
||||
{
|
||||
console.log(`Compressed mod package to: /dist/${modName}.zip`);
|
||||
|
||||
// Now that we're done with the compression we can delete the temporary build directory.
|
||||
fs.rmSync(`${__dirname}/${modName}`, { force: true, recursive: true });
|
||||
console.log("Build successful! your zip file has been created and is ready to be uploaded to hub.sp-tarkov.com/files/");
|
||||
});
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
Generated
+7
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="RiderProjectSettingsUpdater">
|
||||
<option name="singleClickDiffPreview" value="1" />
|
||||
<option name="vcsConfiguration" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
+51
@@ -0,0 +1,51 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="c1397b47-20aa-4bc7-8a48-1f3487c66d29" name="Changes" comment="" />
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
<option name="HIGHLIGHT_CONFLICTS" value="true" />
|
||||
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
|
||||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="ProjectColorInfo"><![CDATA[{
|
||||
"associatedIndex": 3
|
||||
}]]></component>
|
||||
<component name="ProjectId" id="2siywQ39Z6eMY08KUczGtbN9uZd" />
|
||||
<component name="ProjectViewState">
|
||||
<option name="hideEmptyMiddlePackages" value="true" />
|
||||
<option name="showLibraryContents" value="true" />
|
||||
</component>
|
||||
<component name="PropertiesComponent"><![CDATA[{
|
||||
"keyToString": {
|
||||
"RunOnceActivity.ShowReadmeOnStart": "true",
|
||||
"nodejs_package_manager_path": "npm",
|
||||
"ts.external.directory.path": "F:\\JetBrains Rider 2024.3.5\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external",
|
||||
"vue.rearranger.settings.migration": "true"
|
||||
}
|
||||
}]]></component>
|
||||
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
|
||||
<component name="TaskManager">
|
||||
<task active="true" id="Default" summary="Default task">
|
||||
<changelist id="c1397b47-20aa-4bc7-8a48-1f3487c66d29" name="Changes" comment="" />
|
||||
<created>1738952931130</created>
|
||||
<option name="number" value="Default" />
|
||||
<option name="presentableId" value="Default" />
|
||||
<updated>1738952931130</updated>
|
||||
<workItem from="1738952934249" duration="128000" />
|
||||
</task>
|
||||
<servers />
|
||||
</component>
|
||||
<component name="TypeScriptGeneratedFilesManager">
|
||||
<option name="version" value="3" />
|
||||
<option name="exactExcludedFiles">
|
||||
<list>
|
||||
<option value="$PROJECT_DIR$/mod.js" />
|
||||
<option value="$PROJECT_DIR$/mod.js.map" />
|
||||
</list>
|
||||
</option>
|
||||
</component>
|
||||
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
|
||||
<component name="VcsManagerConfiguration">
|
||||
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
|
||||
</component>
|
||||
</project>
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
|
||||
<s:String x:Key="/Default/CodeInspection/PencilsConfiguration/ActualSeverity/@EntryValue">INFO</s:String></wpf:ResourceDictionary>
|
||||
@@ -0,0 +1,224 @@
|
||||
{
|
||||
"Poses": {
|
||||
"680139cbbd3f904e3052d991": {
|
||||
"_id": "680139cbbd3f904e3052d991",
|
||||
"_name": "RudeGestureMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "rude_gesture"
|
||||
}
|
||||
},
|
||||
"6803386215cc5c42ca560e6f": {
|
||||
"_id": "6803386215cc5c42ca560e6f",
|
||||
"_name": "CaramelDanceMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "california_gurls"
|
||||
}
|
||||
},
|
||||
"68036ec07472e65520db0ec4": {
|
||||
"_id": "68036ec07472e65520db0ec4",
|
||||
"_name": "AmimirMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "conked_out"
|
||||
}
|
||||
},
|
||||
"6803e2f748893182194dbf36": {
|
||||
"_id": "6803e2f748893182194dbf36",
|
||||
"_name": "4BoonsMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "4_boons"
|
||||
}
|
||||
},
|
||||
"680ca067ed8b7e5411271263": {
|
||||
"_id": "680ca067ed8b7e5411271263",
|
||||
"_name": "BeatdownMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "dragon_beatdown"
|
||||
}
|
||||
},
|
||||
"680ca0817d0acb0da8f9ff61": {
|
||||
"_id": "680ca0817d0acb0da8f9ff61",
|
||||
"_name": "YamchaMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "unfortunate_circumstances"
|
||||
}
|
||||
},
|
||||
"680ca0a10baa45bcde5c059b": {
|
||||
"_id": "680ca0a10baa45bcde5c059b",
|
||||
"_name": "TheWorldMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "the_world"
|
||||
}
|
||||
},
|
||||
"680ca0dcf4d1ee875a622bd3": {
|
||||
"_id": "680ca0dcf4d1ee875a622bd3",
|
||||
"_name": "JotaroMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "you_there"
|
||||
}
|
||||
},
|
||||
"6810ba82a11d0cd0c1dfce0d": {
|
||||
"_id": "6810ba82a11d0cd0c1dfce0d",
|
||||
"_name": "SpideyMannequinPose",
|
||||
"_parent": "675ff48ce8d2356707079617",
|
||||
"_type": "Item",
|
||||
"_props": {
|
||||
"AvailableAsDefault": true,
|
||||
"Description": "",
|
||||
"Name": "",
|
||||
"ProfileVersions": [],
|
||||
"ShortName": "",
|
||||
"Side": [
|
||||
"Usec",
|
||||
"Bear"
|
||||
],
|
||||
"MannequinPoseName": "web_hero"
|
||||
}
|
||||
}
|
||||
},
|
||||
"PoseUnlock": [
|
||||
{
|
||||
"id": "680139cbbd3f904e3052d991",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "6803386215cc5c42ca560e6f",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "68036ec07472e65520db0ec4",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "6803e2f748893182194dbf36",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "680ca067ed8b7e5411271263",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "680ca0817d0acb0da8f9ff61",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "680ca0a10baa45bcde5c059b",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "680ca0dcf4d1ee875a622bd3",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
},
|
||||
{
|
||||
"id": "6810ba82a11d0cd0c1dfce0d",
|
||||
"source": "unlockedInGame",
|
||||
"type": "mannequinPose"
|
||||
}
|
||||
],
|
||||
"Name": {
|
||||
"Hideout/Mannequin/Pose/rude_gesture": "Beating It",
|
||||
"Hideout/Mannequin/Pose/california_gurls": "White Girl Party",
|
||||
"Hideout/Mannequin/Pose/conked_out": "Amimir",
|
||||
"Hideout/Mannequin/Pose/4_boons": "4 Doubloons",
|
||||
"Hideout/Mannequin/Pose/dragon_beatdown": "Dragon Beatdown",
|
||||
"Hideout/Mannequin/Pose/the_world": "ZA WAAAARUUUDO",
|
||||
"Hideout/Mannequin/Pose/unfortunate_circumstances": "Yamcha'd",
|
||||
"Hideout/Mannequin/Pose/you_there": "You, Over there",
|
||||
"Hideout/Mannequin/Pose/web_hero": "Your Friendly Neighbour"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mod = void 0;
|
||||
const PoseList_json_1 = __importDefault(require("../src/PoseList.json"));
|
||||
class Mod {
|
||||
postDBLoad(container) {
|
||||
const customitem = container.resolve("CustomItemService");
|
||||
const databaseServer = container.resolve("DatabaseServer");
|
||||
const db = databaseServer.getTables();
|
||||
const globals = db.globals;
|
||||
const locales = db.locales.global;
|
||||
const poseName = PoseList_json_1.default.Name;
|
||||
for (const lcl in locales) {
|
||||
for (const names in poseName) {
|
||||
locales[lcl][names] = poseName[names];
|
||||
}
|
||||
}
|
||||
for (const gesture in PoseList_json_1.default.Poses) {
|
||||
db.templates.customization[gesture] = PoseList_json_1.default.Poses[gesture];
|
||||
}
|
||||
}
|
||||
preSptLoad(container) {
|
||||
const staticRouteService = container.resolve("StaticRouterModService");
|
||||
staticRouteService.registerStaticRouter("AddPoseToUser", [
|
||||
{
|
||||
url: "/client/game/start",
|
||||
action: async (url, info, sessionId, output) => {
|
||||
const profileHelper = container.resolve("ProfileHelper");
|
||||
const userList = profileHelper.getProfiles();
|
||||
const poseUnlock = PoseList_json_1.default.PoseUnlock;
|
||||
for (const user in userList) {
|
||||
for (const unlock of poseUnlock) {
|
||||
if (userList[user].customisationUnlocks) {
|
||||
const exist = userList[user].customisationUnlocks.some(x => x.id === unlock.id);
|
||||
if (!exist) {
|
||||
userList[user].customisationUnlocks.push(...poseUnlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return output;
|
||||
}
|
||||
}
|
||||
], "spt");
|
||||
}
|
||||
}
|
||||
exports.mod = new Mod();
|
||||
//# sourceMappingURL=mod.js.map
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"version": 3,
|
||||
"file": "mod.js",
|
||||
"sourceRoot": "",
|
||||
"sources": [
|
||||
"mod.ts"
|
||||
],
|
||||
"names": [],
|
||||
"mappings": ";;;;;;AAWA,yEAAyC;AAIzC,MAAM,GAAG;IAED,UAAU,CAAC,SAA8B;QAE/C,MAAM,UAAU,GAAG,SAAS,CAAC,OAAO,CAAoB,mBAAmB,CAAC,CAAC;QAC7E,MAAM,cAAc,GAAG,SAAS,CAAC,OAAO,CAAiB,gBAAgB,CAAC,CAAC;QAC3E,MAAM,EAAE,GAAG,cAAc,CAAC,SAAS,EAAE,CAAC;QACtC,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC;QAC3B,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;QAClC,MAAM,QAAQ,GAA2B,uBAAK,CAAC,IAAI,CAAA;QAEnD,KAAK,MAAM,GAAG,IAAI,OAAO,EACzB,CAAC;YACA,KAAK,MAAM,KAAK,IAAI,QAAQ,EAC5B,CAAC;gBACA,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAA;YACtC,CAAC;QACF,CAAC;QAED,KAAK,MAAM,OAAO,IAAI,uBAAK,CAAC,KAAK,EACjC,CAAC;YACA,EAAE,CAAC,SAAS,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,uBAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAA;QAC3D,CAAC;IAEF,CAAC;IAEM,UAAU,CAAC,SAA8B;QAE/C,MAAM,kBAAkB,GAAG,SAAS,CAAC,OAAO,CAAyB,wBAAwB,CAAC,CAAC;QAC/F,kBAAkB,CAAC,oBAAoB,CACtC,eAAe,EACf;YACC;gBACC,GAAG,EAAE,oBAAoB;gBACzB,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,EAAE;oBAE9C,MAAM,aAAa,GAAG,SAAS,CAAC,OAAO,CAAgB,eAAe,CAAC,CAAA;oBACvE,MAAM,QAAQ,GAAG,aAAa,CAAC,WAAW,EAAE,CAAC;oBAC7C,MAAM,UAAU,GAAG,uBAAK,CAAC,UAAU,CAAC;oBACpC,KAAK,MAAM,IAAI,IAAI,QAAQ,EAC3B,CAAC;wBACA,KAAK,MAAM,MAAM,IAAI,UAAU,EAC/B,CAAC;4BACA,IAAI,QAAQ,CAAC,IAAI,CAAC,CAAC,oBAAoB,EACvC,CAAC;gCACA,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;gCAChF,IAAI,CAAC,KAAK,EACV,CAAC;oCACA,QAAQ,CAAC,IAAI,CAAC,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAC;gCACzD,CAAC;4BACF,CAAC;wBACF,CAAC;oBACF,CAAC;oBACD,OAAO,MAAM,CAAA;gBACd,CAAC;aACD;SACD,EACD,KAAK,CACL,CAAA;IAEF,CAAC;CACD;AAEY,QAAA,GAAG,GAAG,IAAI,GAAG,EAAE,CAAC"
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
||||
/* eslint-disable @typescript-eslint/indent */
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||
import { CustomItemService } from "@spt/services/mod/CustomItemService";
|
||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||
import { CreateProfileService } from "@spt/services/CreateProfileService";
|
||||
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||
import { IPreSptLoadMod } from "@spt/models/external/IPreSptLoadMod"
|
||||
|
||||
import Poses from "../src/PoseList.json";
|
||||
import { ProfileHelper } from "@spt/helpers/ProfileHelper";
|
||||
import { StaticRouterModService } from "@spt/services/mod/staticRouter/StaticRouterModService";
|
||||
|
||||
class Mod implements IPostDBLoadMod, IPreSptLoadMod
|
||||
{
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
const customitem = container.resolve<CustomItemService>("CustomItemService");
|
||||
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
const db = databaseServer.getTables();
|
||||
const globals = db.globals;
|
||||
const locales = db.locales.global;
|
||||
const poseName: Record<string, string> = Poses.Name
|
||||
|
||||
for (const lcl in locales)
|
||||
{
|
||||
for (const names in poseName)
|
||||
{
|
||||
locales[lcl][names] = poseName[names]
|
||||
}
|
||||
}
|
||||
|
||||
for (const gesture in Poses.Poses)
|
||||
{
|
||||
db.templates.customization[gesture] = Poses.Poses[gesture]
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public preSptLoad(container: DependencyContainer): void
|
||||
{
|
||||
const staticRouteService = container.resolve<StaticRouterModService>("StaticRouterModService");
|
||||
staticRouteService.registerStaticRouter(
|
||||
"AddPoseToUser",
|
||||
[
|
||||
{
|
||||
url: "/client/game/start",
|
||||
action: async (url, info, sessionId, output) =>
|
||||
{
|
||||
const profileHelper = container.resolve<ProfileHelper>("ProfileHelper")
|
||||
const userList = profileHelper.getProfiles();
|
||||
const poseUnlock = Poses.PoseUnlock;
|
||||
for (const user in userList)
|
||||
{
|
||||
for (const unlock of poseUnlock)
|
||||
{
|
||||
if (userList[user].customisationUnlocks)
|
||||
{
|
||||
const exist = userList[user].customisationUnlocks.some(x => x.id === unlock.id);
|
||||
if (!exist)
|
||||
{
|
||||
userList[user].customisationUnlocks.push(...poseUnlock);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return output
|
||||
}
|
||||
}
|
||||
],
|
||||
"spt"
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
export const mod = new Mod();
|
||||
Reference in New Issue
Block a user