-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Lost and Found Storage to Cryosleep #31
base: master
Are you sure you want to change the base?
Conversation
Can be this also used as command? Also what if locker "lost and found" not mapped (or it removed), what will be with items? |
I need to see how space-wizards/space-station-14#24096 works, but we're probably keeping this one. Also, should I close #29? |
Resources/Prototypes/CosmaticDrift/Entities/Structures/Machines/cryo_sleep_pod.yml
Outdated
Show resolved
Hide resolved
Resources/Prototypes/CosmaticDrift/Entities/Structures/Storage/lockers.yml
Outdated
Show resolved
Hide resolved
Resources/Textures/CosmaticDrift/Structures/cryosleeppod.rsi/closed.png
Outdated
Show resolved
Hide resolved
Resources/Textures/CosmaticDrift/Structures/cryosleeppod.rsi/meta.json
Outdated
Show resolved
Hide resolved
Resources/Textures/Structures/Storage/closet.rsi/lostandfound.png
Outdated
Show resolved
Hide resolved
Requested changes have been addressed |
Resources/Prototypes/CosmaticDrift/Entities/Structures/Machines/cryo_sleep_pod.yml
Outdated
Show resolved
Hide resolved
Co-authored-by: DEATHB4DEFEAT <[email protected]>
The pod is the same, I forgot since everyone else has been using weird sprites. |
Discussed changes are complete |
Now, if there is no lost and found, going into cryo drops your items on the ground at the cryosleep pod. This PR is pretty much ready. |
Tested and working, cleaned into a modification of the original system. Note that wizden's component stuff is still moved to a new LostAndFoundComponent. I think this is necessary. |
Are the lost and found components and resources fine in the same namespace as cryosleep btw, or should I move them to a SimpleStation14 namespace? |
Resources/Textures/Structures/Storage/lost_and_found.rsi/meta.json
Outdated
Show resolved
Hide resolved
Co-authored-by: DEATHB4DEFEAT <[email protected]>
query.MoveNext(out var storage, out var lostAndFoundComponent); | ||
|
||
if (TryComp<LostAndFoundComponent>(storage, out var lostAndFoundComp)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You already got the lost and found comp, don't need to check again
var query = EntityQueryEnumerator<LostAndFoundComponent>(); | ||
query.MoveNext(out var storage, out var lostAndFoundComponent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should randomly pick one if multiple exist
// Try to get the lost and found and remove the player from it | ||
var query = EntityQueryEnumerator<LostAndFoundComponent>(); | ||
query.MoveNext(out var storage, out var lostAndFoundComponent); | ||
|
||
if (TryComp<LostAndFoundComponent>(storage, out var lostAndFoundComp)) | ||
{ | ||
lostAndFoundComp.StoredPlayers.Remove(uid); | ||
UpdateCryostorageUIState((storage, lostAndFoundComp)); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this would work right with multiple storages
// Try to get the lost and found and remove the player from it | ||
var query = EntityQueryEnumerator<LostAndFoundComponent>(); | ||
query.MoveNext(out var storage, out var lostAndFoundComponent); | ||
CompOrNull<LostAndFoundComponent>(storage)?.StoredPlayers.Remove(ent); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this would work with multiple storages either, find which storage the entity is in and remove itself.
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Description
Cryosleep pods currently have their own UI, so items are stored on the pods themselves with cryogenics access. This is a problem when the pods are mapped into arrivals, for example. Instead, we add a new lost and found storage unit with a sprite, and move the cryosleep pod UI there. This has Head of Personnel access and can be mapped to a secure location on the station.
As discussed in #29.
Also addresses #2.
Tasks
Media
Changelog
🆑