Skip to content

Player Personal Stash - #562

Open
DDrakov wants to merge 33 commits into
Triad-Sector:mainfrom
DDrakov:feat/tarkov-stash
Open

DDrakov wants to merge 33 commits into
Triad-Sector:mainfrom
DDrakov:feat/tarkov-stash

Conversation

@DDrakov

@DDrakov DDrakov commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

About the PR

Rework how personal stash work, instead of per ships it will be per character. Porting Monolith-Station/Monolith#4424 which is a port from new-frontiers-14/frontier-station-14#4636 (technical details in there as well).
To do :

  • Add current ship saving contraband tag to the box
  • Re-sprite boxes
  • Add one more box for ginormous
  • Reclaim system needed to be tested
  • Test data, make sure any written paper, chemical, and guns persist their data.
  • Function to remove box if unwanted
  • Make a limit, if player have equal or more than stash limit then they unable to purchase or deposit any.
  • Fix the contraband removal
  • Make container recursion checking for contraband

Technicalilty

  • Need to find a way to fix if there's no invalid prototype it should just close the box or remove it from database.
    runtime: Caught exception in "Async Queued Callback" Robust.Shared.GameObjects.EntityCreationException: Attempted to spawn an entity with an invalid prototype: SafetyDepositBoxSmall
    To-do test
  • Non serializeable item such as magazine, injectors and such should be tested.
  • When box are handed to other player, try to deposit the boxes see what happen
  • Player A input the box, player B press the deposit. See what happen

Why / Balance

Ship stashes are flawed, this aim to help player have different stash/vault for different characters so that they don't need to organize their own.

Media

image

Requirements

  • I have read the guidelines and documentation relevant to this PR.
  • I have added media to this PR or it does not require an ingame showcase.
  • I can confirm this PR contains either no AI-generated content, or AI-generated content that meets our guidelines.

How to test

Breaking changes

Changelog

🆑

  • add: Added safety deposit box for personal keepings

Co-authored-by: Jaeger <80431951+Kilmented@users.noreply.github.com>
Co-authored-by: starch <starchpersonal@gmail.com>
@github-actions github-actions Bot added S: Untriaged size/L C# YML Sprites FTL Changes to localization files Docs Improvements or additions to documentation/guidebooks UI labels Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

RSI Diff Bot; head commit 4254b82 merging into 1a04c8f
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/_WF/Objects/Economy/depositboxlarge.rsi

State Old New Status
icon-open Added
icon Added
inhand-left Added
inhand-right Added

Resources/Textures/_WF/Objects/Economy/depositboxmedium.rsi

State Old New Status
icon-open Added
icon Added
inhand-left Added
inhand-right Added

Resources/Textures/_WF/Objects/Economy/depositboxsmall.rsi

State Old New Status
icon-open Added
icon Added
inhand-left Added
inhand-right Added

Resources/Textures/_WF/Structures/Machines/atm/depositatm.rsi

State Old New Status
icon Added
printing Added
unshaded Added

Edit: diff updated after 4254b82

@Kilmented

Copy link
Copy Markdown

Wayfarer to Wicce's Den to Frontier to Monolith
GG WP

@DDrakov

DDrakov commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator Author

Wayfarer to Wicce's Den to Frontier to Monolith GG WP

Ironically Monolith got it from Frontier so it'll become longer!

Comment on lines +25 to +26
tags:
- SavingContraband

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to make a new system. Contraband items count as save contraband. But if you have a permit, that status is kept, even though it isn't removed on same.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah just realized that thanks for pointing out

Comment on lines +372 to +373
if (HasComp<SavingContrabandComponent>(item) && !HasComp<ContrabandPermitItemComponent>(item))
continue; // Triad : If item have contraband component and not contraband permit component then ship.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check who actually owns the permit and if the owner of the deposit actually matches with the permit owner. I'd recommend just making it so you can't put save contraband items into the box with a seperate component, like the limited storage whitelist. Then you just cancel the try insert event if it is not permitted and the permit owner (if any) isn't equal to the storage user

/// <summary>
/// The location of this item within the storage container's grid.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[DataField, ViewVariables(VVAccess.ReadWrite)]
[DataField]

DataField already implies VVAccess.ReadWrite

Comment on lines +608 to +614
if (TryComp<ItemStorageLocationComponent>(itemEntity, out var locationComp))
{
if (_storage.InsertAt(storage, insertEnt, locationComp.ItemLocation, out _, playSound: false))
{
continue;
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (TryComp<ItemStorageLocationComponent>(itemEntity, out var locationComp))
{
if (_storage.InsertAt(storage, insertEnt, locationComp.ItemLocation, out _, playSound: false))
{
continue;
}
}
if (TryComp<ItemStorageLocationComponent>(itemEntity, out var locationComp)
&& _storage.InsertAt(storage, insertEnt, locationComp.ItemLocation, out _, playSound: false))
{
continue;
}

This should be cleaner

Comment on lines +377 to +380
if (!TryComp<ItemStorageLocationComponent>(item, out var locationComp))
{
locationComp = EnsureComp<ItemStorageLocationComponent>(item);
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (!TryComp<ItemStorageLocationComponent>(item, out var locationComp))
{
locationComp = EnsureComp<ItemStorageLocationComponent>(item);
}
var locationComp = EnsureComp<ItemStorageLocationComponent>(item);

EnsureComp ensures a component exists and gets it, if not it returns the component and adds it
So this try comp check is useless

@DDrakov DDrakov changed the title DRAFT : Rework Player Stash Rework Player Stash Sep 12, 2026
@DDrakov

DDrakov commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

Just need to finish the box sprite, everything should be ready for review

@DDrakov
DDrakov marked this pull request as ready for review September 13, 2026 01:55
@DDrakov DDrakov changed the title Rework Player Stash Player Personal Stash Sep 13, 2026
@TheRealMasterChief117

Copy link
Copy Markdown
Collaborator
   CLIENT: 2.261s [ERRO] Guidebook: Tag: GuideEntityEmbed 
 Arguments: Entity="SafetyDepositBoxSmall" /> Exception: 
  Stack Trace:
     at Robust.UnitTesting.Pool.TestPair`2.ReportErrorLogs() in /home/runner/work/Triad_Sector/Triad_Sector/RobustToolbox/Robust.UnitTesting/Pool/TestPair.Recycle.cs:line 28
   at Robust.UnitTesting.Pool.TestPair`2.OnCleanDispose() in /home/runner/work/Triad_Sector/Triad_Sector/RobustToolbox/Robust.UnitTesting/Pool/TestPair.Recycle.cs:line 99
   at Robust.UnitTesting.Pool.TestPair`2.OnCleanDispose() in /home/runner/work/Triad_Sector/Triad_Sector/RobustToolbox/Robust.UnitTesting/Pool/TestPair.Recycle.cs:line 107
   at Robust.UnitTesting.Pool.TestPair`2.CleanReturnAsync() in /home/runner/work/Triad_Sector/Triad_Sector/RobustToolbox/Robust.UnitTesting/Pool/TestPair.Recycle.cs:line 125
   at Content.IntegrationTests.Tests.Guidebook.GuideEntryPrototypeTests.ValidatePrototypeContents() in /home/runner/work/Triad_Sector/Triad_Sector/Content.IntegrationTests/Tests/Guidebook/GuideEntryPrototypeTests.cs:line 40

Comment thread Resources/ServerInfo/_NF/Guidebook/SafetyDepositBox.xml Outdated
@TheRealMasterChief117

TheRealMasterChief117 commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Did some changes:

  • Attempted to fix the storage arbitrage test fail
  • Contraband permit items are now initalized on deposit box init, so the permit item actually gets the correct mind and owner UIDs.
  • Code cleanup for your contraband permit system that you made in the safety deposit box so there's no copypaste, and made it check mind UIDs rather than the actual player's
  • Moved the safety deposit box YML files to our namespace. We don't need another folder with only one thing inside of it

@TheRealMasterChief117

Copy link
Copy Markdown
Collaborator
image

Works (trying to save permit with another character)

@DDrakov

DDrakov commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator Author

I'll finish up the sprites and some personal tweak then probably ready for quick review again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C# DB Migration Docs Improvements or additions to documentation/guidebooks FTL Changes to localization files S: Untriaged size/XL Sprites UI YML

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants