diff --git a/README.md b/README.md index 3ac5518..31a7660 100644 --- a/README.md +++ b/README.md @@ -9,17 +9,20 @@ - Press F5 to Debug ## Compiling to Windows EXE, Linux or MacOS -- Open GitBash +- Open VS Code Terminal or Open GitBash on Directory - Execute pkg . -- Wait until JustEmuTarkov-win.exe, JustEmuTarkov-linux, JustEmuTarkov-macos appear +- Wait until Server.exe appears / Process completes ## Distribution Zip the following folders & files - core (this is likely unwanted but pkg is not handling this correctly yet) - db -- docs +- dbViewer +- express - node_modules +- out +- public - res - src - user @@ -38,7 +41,30 @@ Zip the following folders & files - Run the Server - Provide your friends with your external IP address and port +## Features +- A modified Tarkov experience where you can host your own server and play alone or with others (working Client also required see [SIT.Tarkov.Launcher](https://github.com/paulov-t/SIT.Tarkov.Launcher) for details) +- A set of configurations to tailor your gameplay +- Airdrops (must have accompanying BepInEx plugin) +- AI PMCs +- Listens to extra Client Events +- JET Mod Support +- SPT-Aki Mod Support - *In Progress* +- Client sends more events to the Server - *In Progress* + ## Known working Server mods - [SIT M4](https://github.com/paulov-t/SIT-Mod-M4) - Makes the M4 actually useful and good mod to show how to make changes of your own. - [SIT AI](https://github.com/paulov-t/SIT.ServerMod.AI) - Makes all AI move around, be more aggressive and generally make the game much harder. +- [SamSwat Benelli M4-Super-90 (m1014) - New Weapon](https://hub.sp-tarkov.com/files/file/261-l85-sa80-a2-british-assault-rifle/) +- [SamSwat L85 SA80 AR - New Weapon](https://hub.sp-tarkov.com/files/file/181-benelli-m4-super-90-m1014/) +- [Nehax MagazineManiac](https://github.com/Nehaxfr/Nehax-MagazineManiac) + +## Documentation +*This is Work in Progress* +- Documentation can be auto generated using ``npm run generate-docs .`` +- You can run the server and discover the generated docs at https://localhost:443/out or https://localhost:443/docs + +## DB Viewer +*This is Work in Progress* +- You can find the DBViewer at https://localhost:443/db + \ No newline at end of file diff --git a/core/server/tarkovSend.js b/core/server/tarkovSend.js index c7e02c7..fa219e9 100644 --- a/core/server/tarkovSend.js +++ b/core/server/tarkovSend.js @@ -82,8 +82,10 @@ class TarkovSend { const _split = file.split("."); let type = TarkovSend.mimeTypes[_split[_split.length - 1]] || TarkovSend.mimeTypes["txt"]; + // console.log(process.cwd() + "/" + file); + // console.log(file); // Post 0.12.12.15.17975, it now gets stuff from files not res - if(file.indexOf("/files/") !== -1 && !fs.existsSync(process.cwd() + file)) + if(file.indexOf("/files/") !== -1 && !fs.existsSync(process.cwd() + "/" + file)) file = file.replace("/files/", "/res/"); let fileStream = fs.createReadStream(file); diff --git a/core/util/utility.js b/core/util/utility.js index df2c569..d39981c 100644 --- a/core/util/utility.js +++ b/core/util/utility.js @@ -472,4 +472,34 @@ exports.splitStack = (item) => { return stacks; } -exports.clamp = (value, min, max) => Math.min(Math.max(value, min), max); \ No newline at end of file +exports.clamp = (value, min, max) => Math.min(Math.max(value, min), max); + +/** +* This ES6(ECMAScript) function getQueryStringParameters takes url +* as parmater and returns +* parameters name and value in JSON key value format +* @parameter {String} url +* (if url is not passed it takes the current url +* from window.location.href) +* +**/ +exports.getQueryStringParameters = url => { + + var query = ""; + if (url){ + if(url.split("?").length>0){ + query = url.split("?")[1]; + } + }else{ + url = window.location.href; + query = window.location.search.substring(1); + } + return (/^[?#]/.test(query) ? query.slice(1) : query) + .split('&') + .reduce((params, param) => +{ + let [ key, value ] = param.split('='); + params[key] = value?decodeURIComponent(value.replace(/\+/g, ' ')):''; + return params; +}, { }); +}; \ No newline at end of file diff --git a/dbViewer/traders.html b/dbViewer/traders.html index b2afacb..5b96ebd 100644 --- a/dbViewer/traders.html +++ b/dbViewer/traders.html @@ -245,7 +245,7 @@