Commit Graph

631 Commits

Author SHA1 Message Date
Dev
1cf63ad1ad Split pmc kill requirement for elimination into separate min/max counts from other bot types 2023-10-24 15:01:31 +01:00
Dev
c3777af231 Add guards to dynamic spawn point generation
Rename some variables for clarity
2023-10-24 11:15:23 +01:00
Refringe
8541e5f028 Refactor Currency Handling in PaymentService.payMoney() Method (!159)
This commit includes a series of changes aimed at improving the logic and readability of the `payMoney` method in the PaymentService class. The method is pivotal for handling in-game payments, specifically in cases involving multiple types of currencies and barter trades. The changes resolve an issue that prevented barter payments that included both a currency and another item.

## Changes:

- Replaced `barterPrice` variable with a `currencyAmounts` mapping that efficiently tracks each type of currency involved in the trade.
- Updated how the `costOfPurchaseInCurrency` variable is calculated to factor in multiple currencies.
- Introduced a new variable `totalCurrencyAmount` to sum up the total amount of all currencies, which is checked to determine whether any (non)currency payment is necessary.
- Added some inline comments for readability.

Resolves #176

Co-authored-by: Refringe <brownelltyler@gmail.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/159
Co-authored-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
Co-committed-by: Refringe <refringe@noreply.dev.sp-tarkov.com>
2023-10-24 09:27:46 +00:00
Dev
250b9dca3f Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server 2023-10-23 19:29:35 +01:00
Dev
7b0298cda2 Adjsut 2 bot gen errors to be warnings 2023-10-23 19:19:05 +01:00
TheSparta
7aee78eb49 Fixes Insured items on secured containers (!158)
This PR fixes both https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/174 and https://dev.sp-tarkov.com/SPT-AKI/Issues/issues/175.

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/158
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
2023-10-23 16:45:40 +00:00
Dev
69ee8983b2 Improve logging text 2023-10-22 13:14:38 +01:00
Dev
3c709311d8 Correctly save statusTimer values into profile 2023-10-21 21:24:14 +01:00
Dev
ec7d3e1699 Fix bad injection 2023-10-21 20:22:11 +01:00
Dev
54d47585f2 Show sessionid/profile id when profile data is saved 2023-10-21 20:19:45 +01:00
Dev
018b0a8f70 Fix profile creation error 2023-10-21 20:13:29 +01:00
Dev
573d91a9c2 Persist ConditionCounters data between pscav runs
Move values around to help with readability
2023-10-21 18:23:58 +01:00
Dev
de2f70fb79 Remove replaced repeatable quest from PMC and scav profile 2023-10-21 17:39:44 +01:00
Dev
0c31c0ab8f Add additional pmc responses 2023-10-20 14:06:39 +01:00
Dev
3f07fc1bfc Cleanup of async method names
Add method comments
Reduction of code complexity inside `executeModsAsync()`
Add error message when loaded mod has no `main` property
2023-10-20 12:23:19 +01:00
Dev
33d3e6ce05 move log to correct place 2023-10-19 22:55:53 +01:00
Dev
3f8c681e7d Add mising standingForKill values 2023-10-19 22:39:26 +01:00
Dev
88a24151ef Remove empty object 2023-10-19 22:29:53 +01:00
Dev
234cd0b833 Randomise standing loss for dailies 2023-10-19 21:49:38 +01:00
Dev
83590dcc25 Get id if not found in profile 2023-10-19 21:44:10 +01:00
Dev
20b9a39cda Add missing IDs to json and pass throughout code 2023-10-19 21:36:17 +01:00
Dev
fa2a8c6513 Add missing id property to accept quest client response 2023-10-19 21:06:09 +01:00
Dev
11ae41dcff Fix missing text 2023-10-19 20:59:06 +01:00
Dev
489189bd81 Add missing properties to templates 2023-10-19 20:51:16 +01:00
Dev
79dc3cca1b Correct mistake in sending repeatable data to client on quest accept 2023-10-19 20:43:42 +01:00
Dev
d97beda4b7 Rework how repeatable quests are replaced 2023-10-19 20:04:47 +01:00
Dev
57b1fe0733 Improve bad replacement quest error messaging 2023-10-19 19:30:23 +01:00
Dev
914d505adc Add fence scav quest image 2023-10-19 18:52:47 +01:00
TheSparta
418d9f2a8f Import path alias on the whole project (!157)
- Ability to use @spt-aki path alias on the whole project.
- Swapped all imports from relative paths, for imports using the path alias.

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/157
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
2023-10-19 17:21:17 +00:00
Dev
5af4abab91 Handle critical errors on mod load better - show player error in console instead of closing it on error 2023-10-19 15:25:52 +01:00
Dev
6589bcc0a2 Show human readable error when two mods have conflciting load order requirements
Improve cyclic error message text
2023-10-19 15:18:07 +01:00
Dev
2507837198 When launcher requests profiles and the exp is null, fall back to 0 - Fixes profile killing launcher listing ability
Use properties without quotes
Update nullguard to use Nullish coalescing
2023-10-19 11:37:07 +01:00
Dev
14c0b73482 Log build date on server start 2023-10-19 11:25:41 +01:00
Dev
1ee7ffe8b4 Blacklist mag_stanag_maopul_pmag_airsoft_6_30_fde from PMC equipment 2023-10-19 10:11:13 +01:00
Dev
e8d3fb805e updates to modLoadOrder 2023-10-18 17:36:36 +01:00
TheSparta
6231d73109 Implemented loadBefore and loadAfter (!156)
This PR adds the ability to set `loadBefore` and `loadAfter` on a mod's package.json, this allows for modders to define an array of mods their current mod needs to load before or after.

Examples:

if we have <u>__MOD1__</u> that has `loadAfter` = `[ "MOD2" ]` the loading order would be:

1 - MOD2
2 - MOD1

if we have <u>__MOD2__</u> that has `loadBefore` = `[ "MOD1" ]` the loading order would also be:
1 - MOD2
2 - MOD1

Begone zzzzzz, name your mods the way you want to.

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/156
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
2023-10-18 14:44:29 +00:00
Dev
1adeed29ef Transfer ConditionCounter and quest status changes incurred during scav raid into pmc profile
Only add quests to scav profile when its a pickup/exploration/elimination quest
2023-10-17 22:04:19 +01:00
Dev
480967ab9a Incldue m4a1 with gas block item in modIsFrontOrRearSight() check 2023-10-17 20:45:40 +01:00
Dev
99cb77d3cf Save scav quests into scav profile when accepting them 2023-10-17 16:31:21 +01:00
Dev
650a3173c8 Implement Pickup quests for scav
It seems like these are scav-only
2023-10-17 16:28:48 +01:00
Dev
e10b62a5b1 Reduce PMC nvg usage during daytime from 20% to 10% 2023-10-17 09:14:17 +01:00
Dev
9ef63a11a4 Remove killa from streets 2023-10-16 22:02:02 +01:00
Dev
f70cbcced7 Set quest side to scav when generated for fence 2023-10-16 18:33:09 +01:00
Dev
b8738474e5 Rename cz to cs 2023-10-16 18:30:55 +01:00
Dev
4b70bfb60d Improve sourcemap handling in modCompilerService 2023-10-16 18:25:14 +01:00
Dev
6d19452455 Merge branch 'master' of https://dev.sp-tarkov.com/SPT-AKI/Server 2023-10-16 15:12:38 +01:00
Dev
b6edf71fc3 Reduce our custom item spawn chances by an order of magnitude 2023-10-16 15:08:00 +01:00
TheSparta
fe6865b2f0 Added sourcemap generation for typescript mods (!155)
This PR makes it so typescript generates inline sourcemaps when transpiling mods to javascript.

This will make it so stacktraces originating in the mod source code point to the typescript files, lines and columns.

Reviewed-on: https://dev.sp-tarkov.com/SPT-AKI/Server/pulls/155
Co-authored-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
Co-committed-by: TheSparta <thesparta@noreply.dev.sp-tarkov.com>
2023-10-15 16:15:34 +00:00
Dev
04235ca024 Reward more items for daillies/weeklies
Cleanup of `generateReward` item reward pool generation into its own function + return an easier array to work with
2023-10-15 11:46:33 +01:00
Dev
dc7f568819 Add missing rouble values and remove extra 0 2023-10-15 11:19:06 +01:00