Skip to content
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

Closed
wants to merge 31 commits into from

Conversation

Finket
Copy link
Contributor

@Finket Finket commented Jan 16, 2024

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

  • Fix Sandbox Violations
  • Redo UI
  • New cool sounds
  • Guidebook entries?
  • Map onto Arborum
  • UI can be kept up after leaving the pod, allowing the player to cryo anywhere. Fix it
  • Remove items button not yet working
  • Handle items when lost and found does not exist (currently they just go nowhere/get deleted)
  • UI should say Lost and Found storage unit instead of cryogenic sleep unit

Media

image
image
image


Changelog

🆑

  • add: Lost and Found Storage Unit
  • add: Original cryostasis and cryosleep pod sound effects

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: Sprite Changes any png or json in an rsi Changes: YML Changes any yml files labels Jan 16, 2024
Copy link
Contributor

github-actions bot commented Jan 16, 2024

RSI Diff Bot; head commit 936fc79 merging into 739d0bf
This PR makes changes to 1 or more RSIs. Here is a summary of all changes:

Resources/Textures/Structures/Storage/lost_and_found.rsi

State Old New Status
icon Added
screen Added

Edit: diff updated after 936fc79

@Finket Finket marked this pull request as ready for review January 16, 2024 16:14
@github-actions github-actions bot added the Status: Needs Review Someone please review this label Jan 16, 2024
@DEATHB4DEFEAT DEATHB4DEFEAT mentioned this pull request Jan 16, 2024
75 tasks
@OCOtheOmega
Copy link
Contributor

Can be this also used as command? Also what if locker "lost and found" not mapped (or it removed), what will be with items?

@DEATHB4DEFEAT
Copy link
Member

I need to see how space-wizards/space-station-14#24096 works, but we're probably keeping this one.

Also, should I close #29?

@DEATHB4DEFEAT DEATHB4DEFEAT changed the title Port cryosleep pod from CosmaticDrift Port Cryosleep Pod from CosmaticDrift Jan 18, 2024
@Finket Finket requested a review from DEATHB4DEFEAT January 19, 2024 19:48
@Finket
Copy link
Contributor Author

Finket commented Jan 19, 2024

Requested changes have been addressed

@github-actions github-actions bot removed the Changes: Localization Changes any ftl files label Feb 21, 2024
@Finket Finket changed the title Port Cryosleep Pod from CosmaticDrift Add Lost and Found Storage to Cryosleep Feb 21, 2024
@Finket Finket requested a review from DEATHB4DEFEAT February 21, 2024 12:47
@Finket
Copy link
Contributor Author

Finket commented Feb 21, 2024

Discussed changes are complete

@github-actions github-actions bot added the Changes: Localization Changes any ftl files label Feb 22, 2024
@Finket
Copy link
Contributor Author

Finket commented Feb 24, 2024

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.

@Finket
Copy link
Contributor Author

Finket commented Feb 26, 2024

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.

@Finket
Copy link
Contributor Author

Finket commented Feb 26, 2024

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?

@Finket Finket requested a review from DEATHB4DEFEAT March 18, 2024 15:07
@Finket Finket requested a review from DEATHB4DEFEAT April 27, 2024 09:36
Comment on lines +211 to +213
query.MoveNext(out var storage, out var lostAndFoundComponent);

if (TryComp<LostAndFoundComponent>(storage, out var lostAndFoundComp))
Copy link
Member

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

Comment on lines +210 to +211
var query = EntityQueryEnumerator<LostAndFoundComponent>();
query.MoveNext(out var storage, out var lostAndFoundComponent);
Copy link
Member

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

Comment on lines +268 to +276
// 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));
}
Copy link
Member

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

Comment on lines +161 to +164
// 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);
Copy link
Member

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.

@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Jun 3, 2024
Copy link
Contributor

github-actions bot commented Jun 3, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@DEATHB4DEFEAT DEATHB4DEFEAT added the Status: Derelict Has not been active for a while label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: Sprite Changes any png or json in an rsi Changes: YML Changes any yml files Status: Derelict Has not been active for a while Status: Merge Conflict FIX YOUR PR AAAGH Status: Needs Review Someone please review this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants