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

Jukebox #208

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Jukebox #208

wants to merge 20 commits into from

Conversation

DEATHB4DEFEAT
Copy link
Member

@DEATHB4DEFEAT DEATHB4DEFEAT commented Sep 16, 2023

Description

Adds a functional Jukebox to the stations! Capable of playing music, being paused, queueing up songs, and a whole load of other stuff the engine doesn't actually allow for yet ' v ,


Tasks

  • Functional system
  • Fix the next song not playing automatically
  • Clean UI
  • [ ] Sync music over the network for new joins Will probably require a pretty heavy rewrite, this is fine for now.
  • More songs
  • Construction
  • Research Uses stock parts, that counts
  • Craftable boards
  • Larger control icons
  • Animate sprite

Media

Youtube Demonstration

JukeboxFonzie.mp4

Content Client_Er7gPqlj1S

Content Client_1fDBkySTlq


Changelog

🆑 Pspritechologist & DEATHB4DEFEAT

  • add: NanoTrasen have heard that employees function better when allowed to listen to music. They trapped some elves in a wooden box- And wouldn't you know it, it's more than just generated digital notes!*

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Sprite Changes any png or json in an rsi Changes: UI Changes any XAML files Changes: YML Changes any yml files labels Sep 16, 2023
@github-actions
Copy link

github-actions bot commented Sep 16, 2023

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

Resources/Textures/SimpleStation14/Structures/Machines/jukebox.rsi

State Old New Status
active Added
base Added
powered Added
powered_unlit Added

Edit: diff updated after 5618361

@github-actions github-actions bot added the Changes: Localization Changes any ftl files label Sep 16, 2023
@DEATHB4DEFEAT DEATHB4DEFEAT added Priority: 3-Medium Needs to be resolved at some point Size: Large For large issues/PRs labels Sep 17, 2023
Comment on lines 30 to 39
/// <summary>
/// Serialized as a string because TimeSpan is not serializable, and converted to a TimeSpan with <see cref="ToTimeSpan"/>.
/// </summary>
[DataField("duration")]
private string DurationString { get; } = default!;

/// <summary>
/// Actual duration as a TimeSpan.
/// </summary>
public TimeSpan Duration => ToTimeSpan(DurationString);
Copy link
Member

Choose a reason for hiding this comment

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

We should just learn how to make a serializer... I honestly don't think it'd be that hard.

@Pspritechologist
Copy link
Member

Also note; The system needs to react to the unpaused event so that the saved time is set correctly.

Apart from adding a whack ton of songs, just loads of general clean up and additions before release.
Also slightly cleaner, a fix or two
@Pspritechologist Pspritechologist marked this pull request as ready for review October 30, 2023 14:05
Danya Vodovoz is out, Dieter van der Westen is in. It was time for a change :)
Also adds a hand full new Jukebox tracks.
@Pspritechologist
Copy link
Member

@DEATHB4DEFEAT You gotta make nicer UI icons, and increase the size of the UI a bit. It needs a once over (is all of the text in it good to keep?), and then this is ready for prime time baybeeee


namespace Content.Shared.SimpleStation14.Jukebox;

public sealed class SharedJukeBoxSystem : EntitySystem
Copy link
Member

Choose a reason for hiding this comment

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

This is ClientSide, not Shared.

public const string PortSkip = "Skip";
public const string PortPause = "Pause";
public const string PortUnPause = "Unpause";
public const string PortTogglePuase = "TogglePause";
Copy link
Member

Choose a reason for hiding this comment

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

puase

/// If the Jukebox is already playing a song, it will be stopped and replaced with the new song.
/// To queue a song instead, see <see cref="TryQueueSong"/>.
/// </summary>
/// <param name="song">The JukeboxTrackPrototype representing the song to be played.</param>
Copy link
Member

Choose a reason for hiding this comment

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

Not a prototype

[Dependency] private readonly DeviceLinkSystem _link = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;

public const string PortSongPlayed = "Start";
Copy link
Member

Choose a reason for hiding this comment

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

These really shouldn't be hardcoded I don't think, but making them variables makes checking them a pain...

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: UI Changes any XAML files Changes: YML Changes any yml files Priority: 3-Medium Needs to be resolved at some point Size: Large For large issues/PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants