Keep Your Equipment

  • captainfoam added a new file:

    Quote

    Keep Your Equipment

    Description

    Originally forked from Never Lose Equipments by Revingly and bluwatch, code adapted for SPT 3.7.0 and refactored.

    • Retain all equipment you loaded in with post-death. (Default Behavior)
      • Opt to recover only starting gear post-death without keeping raid-found items by enabling "keepOriginalEquipment".
      • Configuration for secured container contents during this process is available via "keepSecuredContainer".
    • Items acquired during a raid (in pockets, rig, backpack, or container) can be kept post-death but lose the FIR status if "enableFoundInRaid" is set to true.
    • Keep map keys like Labs keycards upon successful raid exit
    • Insure and drop items during a raid for insurance fraud purposes.

    Installation instructions

    Download the archive from the releases page and extract into the user/mods folder.

    Configurable values

    • keepOriginalEquipment: true/false (Default: true)
      • Regain all original gear if you die during a raid.
    • keepSecuredContainer: true/false (Default: true, keepOriginalEquipment must also be set to true)
      • Decides if the secured container contents are reset post-death. Note: potential for item duplication exists if raid items are moved to the secured container.
    • enableFoundInRaid: true/false (Default: false)
      • Set to true to retain FIR status for raid-acquired items post-death.
    • keepMapKeys: true/false (Default: true)
      • Normally, the game will consume your Labs keycard on a successful raid. By default, this mod will keep your keycard, because you're already using this mod to keep your original equipment, so why not? ;)

    Encountered a bug or want a feature?

  • captainfoam added a new version:

    Quote

    For SPT 3.7.0


    Changelog:

    • Fix issue with setting inventory on successful raid
  • Mod is broken with SPT 3.7.3


    Following error in the server:



    The application had a critical error and failed to run

    Exception produced: Error: Cannot inject the dependency "onLoadComponents" at position #5 of "App" constructor. Reason:

    Cannot inject the dependency "httpServer" at position #0 of "HttpCallbacks" constructor. Reason:

    Cannot inject the dependency "httpListeners" at position #4 of "HttpServer" constructor. Reason:

    Cannot inject the dependency "httpRouter" at position #0 of "AkiHttpListener" constructor. Reason:

    Cannot inject the dependency "staticRouters" at position #0 of "HttpRouter" constructor. Reason:

    Cannot inject the dependency "inraidCallbacks" at position #0 of "InraidStaticRouter" constructor. Reason:

    Cannot inject the dependency "inraidController" at position #0 of "InraidCallbacks" constructor. Reason:

    Cannot inject the dependency "inRaidHelper" at position #14 of "KeepYourEquipment" constructor. Reason:

    Cannot read properties of undefined (reading 'getConfig')


    Stacktrace:

    Error: Cannot inject the dependency "onLoadComponents" at position #5 of "App" constructor. Reason:

    Cannot inject the dependency "httpServer" at position #0 of "HttpCallbacks" constructor. Reason:

    Cannot inject the dependency "httpListeners" at position #4 of "HttpServer" constructor. Reason:

    Cannot inject the dependency "httpRouter" at position #0 of "AkiHttpListener" constructor. Reason:

    Cannot inject the dependency "staticRouters" at position #0 of "HttpRouter" constructor. Reason:

    Cannot inject the dependency "inraidCallbacks" at position #0 of "InraidStaticRouter" constructor. Reason:

    Cannot inject the dependency "inraidController" at position #0 of "InraidCallbacks" constructor. Reason:

    Cannot inject the dependency "inRaidHelper" at position #14 of "KeepYourEquipment" constructor. Reason:

    Cannot read properties of undefined (reading 'getConfig')

    at C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:324:23

    at Array.map (<anonymous>)

    at C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:295:38

    at InternalDependencyContainer.construct (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:297:11)

    at InternalDependencyContainer.resolveRegistration (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:166:51)

    at InternalDependencyContainer.resolve (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:109:33)

    at C:\snapshot\project\src\Program.ts:32:32

    at processTicksAndRejections (node:internal/process/task_queues:95:5)

    at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:64:3)

    at Function.runMain (pkg/prelude/bootstrap.js:1980:13)

    ------------------------------

    Confirmed this mod is the issue as server launches normally once this mod is removed.

  • captainfoam added a new version:

    Quote

    For SPT 3.7.3


    This should work, I did some preliminary testing but needs more testing. Use at your own risk!


    Changelog:

    • 3.7.3 Compatibility
  • Seems broken with 3.7.5 and 6


    The application had a critical error and failed to run

    Exception produced: Error: Cannot inject the dependency "onLoadComponents" at position #5 of "App" constructor. Reason:

    Cannot inject the dependency "httpServer" at position #0 of "HttpCallbacks" constructor. Reason:

    Cannot inject the dependency "httpListeners" at position #4 of "HttpServer" constructor. Reason:

    Cannot inject the dependency "httpRouter" at position #0 of "AkiHttpListener" constructor. Reason:

    Cannot inject the dependency "staticRouters" at position #0 of "HttpRouter" constructor. Reason:

    Cannot inject the dependency "inraidCallbacks" at position #0 of "InraidStaticRouter" constructor. Reason:

    Cannot inject the dependency "inraidController" at position #0 of "InraidCallbacks" constructor. Reason:

    Cannot inject the dependency "inRaidHelper" at position #14 of "KeepYourEquipment" constructor. Reason:

    Cannot read properties of undefined (reading 'getConfig')


    Stacktrace:

    Error: Cannot inject the dependency "onLoadComponents" at position #5 of "App" constructor. Reason:

    Cannot inject the dependency "httpServer" at position #0 of "HttpCallbacks" constructor. Reason:

    Cannot inject the dependency "httpListeners" at position #4 of "HttpServer" constructor. Reason:

    Cannot inject the dependency "httpRouter" at position #0 of "AkiHttpListener" constructor. Reason:

    Cannot inject the dependency "staticRouters" at position #0 of "HttpRouter" constructor. Reason:

    Cannot inject the dependency "inraidCallbacks" at position #0 of "InraidStaticRouter" constructor. Reason:

    Cannot inject the dependency "inraidController" at position #0 of "InraidCallbacks" constructor. Reason:

    Cannot inject the dependency "inRaidHelper" at position #14 of "KeepYourEquipment" constructor. Reason:

    Cannot read properties of undefined (reading 'getConfig')

    at C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:324:23

    at Array.map (<anonymous>)

    at C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:295:38

    at InternalDependencyContainer.construct (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:297:11)

    at InternalDependencyContainer.resolveRegistration (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:166:51)

    at InternalDependencyContainer.resolve (C:\snapshot\project\node_modules\tsyringe\dist\cjs\dependency-container.js:109:33)

    at C:\snapshot\project\src\Program.ts:32:32

    at processTicksAndRejections (node:internal/process/task_queues:95:5)

    at process.runNextTicks [as _tickCallback] (node:internal/process/task_queues:64:3)

    at Function.runMain (pkg/prelude/bootstrap.js:1980:13)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!