0
0
mirror of https://github.com/sp-tarkov/server.git synced 2025-02-13 09:50:43 -05:00

671 Commits

Author SHA1 Message Date
Chomp
20ec7f9858 Created new class QuestRewardHelper, migrated reward code from QuestHelper 2025-01-07 13:32:09 +00:00
ed2b90fa0a
Various fixes so biome is happy (#1032)
- Changes to import typing for ILogger and ICloner
- Targets es2022 in compilerOptions (Matching the target in .swcrc)
because otherwise Biome doesn't seem to find a proper target.
- Fixes up the seasonal event typing
- fixes run:debug to target the correct file
2025-01-06 17:09:33 +00:00
Chomp
b64c46c95d Remove redundant function that requires ragfair trader that was removed awhile ago 2025-01-06 15:21:35 +00:00
Chomp
733a23f994 Moved interfaces out of ISptProfile into their own files to reduce circular deps 2025-01-06 10:38:06 +00:00
Chomp
b5936286bd Moved Program statics into their own class to reduce circular dep errors from 19 to 2
Fixed various ILogger warnings
2025-01-06 10:34:21 +00:00
Chomp
1676ea0d2b updated forced event system to be more generic - Fixed issue with weatherConfig.overrideSeason check 2025-01-04 12:56:46 +00:00
Chomp
9138248954 Fixed forceSeasonalEvent not correctly flagging properties as enabled when forcing christmas/halloween 2025-01-04 12:41:10 +00:00
Chomp
f43666aff5 Adjusted startPostRaidInsuranceLostProcess to not throw on error - This allows the server to process insurance for non-broken traders 2025-01-04 11:58:55 +00:00
Chomp
47769f1532 Log warning when attempting to overwrite existing preset 2025-01-03 11:14:01 +00:00
Chomp
79718c311b Added ability to insert custom ItemPreset objects into globals.json on server load 2025-01-03 10:39:59 +00:00
Chomp
ad70c9a66e Expanded handleModEvent to make use of forceSeason, enableChristmasHideout, enableHalloweenHideout, addEventGearToBots and addEventLootToBots 2025-01-01 14:47:56 +00:00
Chomp
a0a9fcacb9 Improvemetns to seasonal event system
Extended christmas event to 7th of january

new years event has christmas event actions

Moved seasonal code into functions

Added more seasonal settings for events
2025-01-01 14:37:11 +00:00
Chomp
6628eb9bab Added system to allow adjustment of bot appearance by season
PMCs have higher weighting to wear winter clothing during Christmas
2025-01-01 11:21:50 +00:00
Chomp
b09f179d2a Cleaned up type errors 2024-12-31 18:00:06 +00:00
Chomp
1f6a2c8435 Add function to get active seasonal events 2024-12-31 17:57:33 +00:00
Chomp
545707d0bb Implemented system that purges Christmas containers when outside of relevant event 2024-12-31 17:56:23 +00:00
39b95ac2fa Adopt orphaned items sent with the mail service 2024-12-31 13:24:03 +01:00
Chomp
02082ef6f6 Send new years 2024 gift during NEW_YEARS event 2024-12-31 11:25:20 +00:00
dbed08a747
Static Program Properties & Simplified Entry Points (#1010)
Significant refactoring of globals and entry points. Oh my.

- The global variables previously accessible throughout the codebase
have been restructured as private static properties of the Program
class. Public static getter methods have been added to allow read access
to these properties throughout the codebase.
- Entry points, which were dispersed across multiple files, have been
consolidated and simplified into a static method on the Program class,
making the entry logic easier to follow.
- Removed unnecessary ~~globals~~ Program static properties.
- Adjusted imports and references across the codebase to reflect the new
structure.

Try not to focus on the `gulpfile.mjs` changes, as it won't be around
for much longer. *[winky face]*

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2024-12-31 10:11:08 +00:00
Chomp
539b505c61 Added null protection to updateGlobalEvents 2024-12-31 10:07:21 +00:00
Chomp
02832a1c53 Refactored seasonal and event date checking code into one function
Capitalised and localised `Event is active` text
2024-12-31 09:57:23 +00:00
Chomp
1e486c867b Updated cacheActiveEvents() to treat eventEndDate as inclusive
Moved enabled check to be earlier
2024-12-31 09:41:10 +00:00
Chomp
c46d97a65a Updated getActiveWeatherSeason() to treat eventEndDate as inclusive 2024-12-31 09:25:42 +00:00
Chomp
91a9cb8964 Expanded weather system to have per-season weather parameters
Adjusted winter weather to be less sunny and more snowy
2024-12-30 22:06:55 +00:00
Chomp
3b945b8b84
Set BotLocationModifier.KhorovodChance value during christmas 2024-12-27 20:45:04 -05:00
Chomp
cb68bf83c6
Added null guards 2024-12-27 20:43:08 -05:00
Chomp
4740fa8cf1
Enabled Khorovod tree during christmas 2024-12-27 20:43:00 -05:00
Chomp
d495acc0a5
Improved generateUniqueBotNickname debug logging 2024-12-27 20:39:52 -05:00
Chomp
98dbdbe003
Store exit taken on raid end and store in app context for future use 2024-12-27 20:39:28 -05:00
Chomp
04207555b9
Updated transit-related properties - TODO: check if request.transition is hydrated now
# Conflicts:
#	project/src/models/eft/match/IStartLocalRaidResponseData.ts
2024-12-27 20:38:59 -05:00
Chomp
5a15aa348d Reset existing event data when caching currently active seasonal events 2024-12-24 19:13:02 +00:00
Chomp
952544f5d3 Revert "Improved ability for modders to adjust active seasonal events - Active events can be set via pre-db load event"
This reverts commit 4cd868aeb302515b879ed204397b567c73d2fcd2.
2024-12-24 19:09:51 +00:00
Chomp
4cd868aeb3 Improved ability for modders to adjust active seasonal events - Active events can be set via pre-db load event 2024-12-24 18:54:12 +00:00
Chomp
bb6c4cae6a Made SeasonalEventService.cacheActiveEvents() public 2024-12-24 09:10:27 +00:00
DrakiaXYZ
49414b8805
Fix issue where insurance messages would appear as received if you only lost gear you were wearing (#993)
- Insurance messages each need a unique "stash" ID, properly handle this
as part of the processing side of insurance
- Remove handling of parent IDs from the insurance storing side of
insurance, as we don't need to do that processing twice
- Add a new step to the profileFixer service that resolves any already
broken trader messages with attached insurance items

---------

Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com>
Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
2024-12-23 13:26:10 +00:00
Chomp
45c3df682f Improved accuracy of comments 2024-12-22 21:53:44 +00:00
Chomp
da8c336519 Fixed various invalid nullguard checks + comments 2024-12-22 21:48:06 +00:00
Chomp
863738087f Moved deprioritisedContainers data into config as deprioritisedMoneyContainers 2024-12-22 21:30:21 +00:00
Chomp
572144c662 When purchasing items, server will try to prioritise non-sicc/docs cases when only money in containers can be found 2024-12-22 20:55:32 +00:00
Chomp
30d620d346 Improved simulation of AI player scavs, their 'pmc' name + game edtion is correctly passed to client
Pulled pscav code out of `generateUniqueBotNickname` and into its own function `simulatePlayerScavName`
2024-12-22 16:35:15 +00:00
Chomp
c40a4aa7cb Added system to allow overriding flea prices via config 2024-12-22 15:35:15 +00:00
Chomp
e5ab5c35a8 Added empty array check to FenceService.addItemAssorts 2024-12-20 23:10:06 +00:00
Chomp
423daf3ed0 made bonuses match 2024-12-20 19:27:10 +00:00
Chomp
1e7fd6232a Fixed max buy restriction bonus not applying for unheard edition 2024-12-20 19:26:18 +00:00
Chomp
7caec6efad Added system to insert items into bot storage areas during seasonal events - Used to add Christmas items to scavs 2024-12-18 23:51:25 +00:00
a38dac1e4e
Backup Service Profile Directory Error
This changes the backup service to log in debug instead of error when the profiles directory can't be found. The profiles directory will not exist on initial run, so this is actually expected to catch until it's created.
2024-12-15 23:29:18 -05:00
ef14ad27e1
Profile Backups (#983)
Here's a jumping off point for the profile backup feature. Included some
basic configuration options. Currently backup runs on server start-up
(before the profiles are loaded into memory) and on a configurable
interval.

I think it still needs work.
- [x] The folder name dates should be used to detect which old backups
should be removed
- [x] Not sure about the interval implementation...
- [x] Could make the clean method thinner
- [x] Remove VFS; I don't believe it's needed for copy operations
- [x] Save a list of active mods used by the backed up profiles

---------

Co-authored-by: Chomp <27521899+chompDev@users.noreply.github.com>
Co-authored-by: Chomp <dev@dev.sp-tarkov.com>
2024-12-14 10:20:45 +00:00
Chomp
ccc9a8ba5b Removed unused imports
(cherry picked from commit cdd1831f46005825913ca7a4d8ed89428b568528)
2024-12-13 17:06:53 +00:00
Chomp
be31f7248f Moved reward fitting code into its own function, moved logic around 2024-12-10 00:01:40 +00:00
Chomp
b4061b3e41 Better handle cultist rewards not fitting the container (#979)
Better handle rewards not fitting (they shouldn't just poof) by instead
trimming the rewards amount until they fit.

(cherry picked from commit 8d05bf0069b22968d7e4fcdc4901ae0babd948c3)
2024-12-09 23:30:57 +00:00