Commit Graph

505 Commits

Author SHA1 Message Date
Dev
e15ed9b7eb Improved loot generator code comments 2024-10-19 11:21:02 +01:00
Dev
b6b527df2a Cleaned up createBarterBarterScheme() 2024-10-19 10:58:25 +01:00
Dev
9c58e2e0e5 Loosened bot name limit to 19 characters
Moved value into config
Added `botConfig.botRolesThatMustHaveUniqueName`

Refactored `getPmcNicknameOfMaxLength()`, removed all recursion + handles when no name is below desired length
Refactored `generateUniqueBotNickname()` to handle PMC names differently, use centralised pmc name function

Updated ragfair to utilise maxlength value from bot config
2024-10-18 11:39:51 +01:00
Dev
d1a167d78c Further changes to cloud and fog weights 2024-10-18 10:55:35 +01:00
Dev
ec825d990c Moved function to better location 2024-10-17 14:14:17 +01:00
Dev
953acb47a0 Updated getRaidTemperature() to take into account the current raid time when choosing temps 2024-10-17 13:19:35 +01:00
Dev
0b729fba11 Improvements to how weather temperature is calculated - takes into account current season
Centralised the season override into `getActiveWeatherSeason()`
Adjusted weather values based on client data
2024-10-17 13:05:01 +01:00
Dev
7330f6fb82 First pass at improving weather simulation logic 2024-10-17 00:57:33 +01:00
Dev
b36e0c2282 Fixed calculateGameTime() not correctly handling overrideSeason property 2024-10-16 18:30:04 +01:00
Dev
be20eff165 Updated replaceProfilePocketTpl() to take into account profiles with multiple pocket objects due to equipment stand 2024-10-12 22:57:24 +01:00
Dev
eb2afa81d5 Cleaned up method description 2024-10-09 10:49:22 +01:00
Dev
8b0eaad0c3 Blacklist required items from reward pool for repeatable 'completion' quests,
e.g. , fetch 5 kek tapes, get rewarded 3 kek tapes
2024-10-09 10:48:57 +01:00
Dev
ad95b227dd Added optional blacklist functionality to generateReward() 2024-10-09 10:40:32 +01:00
Dev
ed92c6802c Refactor oh how bot equipment items are generated.
Now uses blacklist data from bot.json when picking equipment mods
Equipment gen now passes same BotData object as weapon mod gen
Pass botEquipmentRole via request object instead of calculating it every item slot
Fixed `getFilteredDynamicModsForItem()` being hard coded to use first blacklist object  regardless of which one matched the bot level
2024-10-08 20:14:43 +01:00
Dev
92c64024eb Force rain off if clouds are below or equal to 2 2024-09-29 16:51:04 +01:00
Dev
057425b363 Improved bot generation system to allow PMCs to wear NVGs at night more than during day 2024-09-28 23:29:08 +01:00
Dev
f5360d0a92 Added ability to know if current raid is at nighttime 2024-09-28 23:00:24 +01:00
Dev
80762d6a00 Handle changes to airdrop endpoint
Reworked airdrop loot generation to incorporate 'radar' drops

Added `forced loot` system to LootGenerator service, can now explicitly define what items it contains

Fixed airdrop system sending incorrect icon to client
2024-09-27 14:30:35 +01:00
Dev
ab1422bc40 Updated interfaces to follow correct naming convention
Removed some interface duplication
2024-09-24 12:47:29 +01:00
Dev
5fd9271491 Updated various interfaces to use correct naming scheme
Added `IGroupPostion`
2024-09-24 11:26:45 +01:00
Dev
b4e78d14f2 Improved bot vest filtering to not filter down to 0 vests 2024-09-24 10:09:58 +01:00
Dev
cabd17d2c9 Added config option forceRigWhenNoVest
Wired up to bot generation

Updated Raiders to use true value
2024-09-23 12:16:47 +01:00
Dev
f52283f3b3 Removed server handling of PMC difficulty modification, is not handled natively
Inverted a few dependences
2024-09-18 10:41:03 +01:00
Dev
70ff066be4 Added reward item blacklist to fence assort generation 2024-09-14 15:05:17 +01:00
Dev
7bfa4f16e9 Added handling for bots without nicknames to setRandomisedGameVersionAndCategory() 2024-09-14 14:23:45 +01:00
Dev
64d4eb2cd6 Updated how map id is passed through to dynamic loot generation 2024-09-13 22:50:59 +01:00
Dev
6ffa9d1ba8 Fixed loot generation breaking due to map capitalisation 2024-09-13 22:39:22 +01:00
Dev
1d55075f99 Fixed location loot generator not creating unique IDs for weapons/armor child items 2024-09-13 20:51:22 +01:00
Dev
4f65442fe7 Added additional nullguard protection to getSealedContainerWeaponModRewards() 2024-09-10 18:16:21 +01:00
Dev
eaa16259ae Added service to ensure bot names are unique to a raid 2024-09-07 12:08:37 +01:00
Dev
6803ee6241 Cultist circle:
Added support for weapon/armor rewards
Added support for variable stack sizes (only ammo for now)
Added support for breaking out of reward item while loop if no item is found (5 attempts max)
Added helper function `itemHelper.getRandomisedAmmoStackSize()`
2024-08-26 11:17:10 +01:00
Dev
3ac4074434 Added handling of twitch 2024 gamble boxes
Improved random loot box system to support `rewardTypePool` instead of `rewardTplPool`
2024-08-24 20:32:18 +01:00
Dev
24cd94abd3 Expanded pmcConfig.maxBackpackLootTotalRub to work per PMC level
non-PMC backpack loot is no longer limited to 150,000 roubles
2024-08-22 20:42:47 +01:00
Alex McAuliffe
79f0949610 Updated bot tests 2024-08-19 16:55:11 +01:00
Dev
52d9fbaeb6 Improved weapon mod selection when a default mod is desired but is incompatible with weapon
Introduced a `Set` into request object that holds conflicting items instead of constantly recalculating them when needed
2024-08-16 23:19:07 +01:00
Dev
2e8e91385e Fixed bad variable use
(cherry picked from commit daf70ea67f)
2024-08-15 20:17:18 +01:00
Dev
37fb49bffa Fixed issue that would cause repeatable completion quests to get stuck in an infinite loop
Improved performance of completion quests picking items to return

(cherry picked from commit f04382c9bb)
2024-08-15 20:17:10 +01:00
Dev
4582bb6fe2 Improved handling of bot stock generation.
Moved code into own function
Expanded force stock check to look for any child items instead of ones for slot `mod_stock`
Expanded check to include additional slot names
2024-08-12 17:43:42 +01:00
DrakiaXYZ
e295cda571 Fix issue in BotLevelGenerator when high level (!388)
Previously `highestValue` could be lower than `lowestValue`, resulting in an exception. These values are now generated in the same method and clamped

Add a catch to the botgen promise await so we get more useful errors if botgen fails

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/388
Co-authored-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
Co-committed-by: DrakiaXYZ <drakiaxyz@noreply.dev.sp-tarkov.com>
(cherry picked from commit ee1eb7d690)
2024-07-30 08:29:04 +01:00
Dev
852157aabf Fixed an issue where revolvers/rpd/ppsh would not properly filter out cartridges during ammo selection 2024-07-28 13:19:34 +01:00
Dev
2f412641b2 Further improvements to weapon mod generation 2024-07-28 11:42:45 +01:00
Dev
af33625a5c Improved pickWeaponModTplForSlotFromPool(), now pre-sorts mod pool prior to adding it to exhaustableModPool and processing 2024-07-28 00:12:04 +01:00
Dev
0cb179f8e1 Make use of SideType.SAVAGE enum 2024-07-25 19:12:26 +01:00
Dev
4a1a5d924c Added item reward pools for Unlocked supply create (x)
Added item reward pools for `Unlocked equipment create (x)`
Added support for weapon/armor presets inside `getRandomLootContainerLoot()`
Expanded pool for `Unlocked valuables crate (x)",` by 8 items
2024-07-25 12:17:40 +01:00
Dev
797d75fd4f Added a weighting bias to the level chosen for bots, favors the higher value 2024-07-25 10:34:54 +01:00
Dev
adcd0194bf Improved bot generation comments
(cherry picked from commit e7f56edf0c)
2024-07-25 09:38:59 +01:00
Dev
de53abf002 Rounded flea offers requirementsCost to nearest int 2024-07-24 09:26:08 +01:00
Dev
7be6b47e23 Fixed various Biome issues 2024-07-23 17:30:20 +01:00
Refringe
5740774a46
Apply Biome Formatting
This is the result of running `npm run format` which applies the Biome formatting rules. Rejoice!
2024-07-23 11:12:53 -04:00
Refringe
ed8dbbd195 Adds Biome - Removes ESLint & Prettier (!383)
Boogidy, boogidy, boogidy. Let's go racing! 🏎️

Removes the over-complicated and super-slow setup we had with ESLint & Prettier in favour of Biome. The largest change with the formatting is moving from Allman braces to 1TBS braces. Other than that, it's *pretty much* the same. Ah, and that Biome runs formatting and linting on the entire project about x10 faster than the old system ran formatting on one file. Seriously, the guy who came up with that last solution should be fired. :runs:

I've kept all of the formatting and linting commands the same as before, with the main mamma-jamma being: `npm run format`, which applies formatting and linting changes to the entire project.

Formatting-on-save works (quickly!) by (1) ensuring that you're working within the VSC workspace (as you should be), and (2) have the recommended Biome VSC extension installed. The link to the Biome extension is in the README.

This limits our options on code formatting going forward; Biome, like prettier, is very opinionated with very few formatting options available. But I see this as a good thing. I'd rather spend my time arguing about which gun in Tarkov is the best, rather than coding brace styles...

...It's the TOZ, and it always will be. Don't DM me.

Co-authored-by: chomp <chomp@noreply.dev.sp-tarkov.com>
Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/383
Co-authored-by: Refringe <me@refringe.com>
Co-committed-by: Refringe <me@refringe.com>
2024-07-22 21:15:57 +00:00