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

Fixed Cargo Bounties #1010

Closed
wants to merge 9 commits into from
Closed

Conversation

blueDev2
Copy link
Contributor

@blueDev2 blueDev2 commented Mar 26, 2024

About the PR

Fixed Cargo Bounties

Why / Balance

Players tend to want the bounties to work so that they don't have to depend on mail for funds.

Technical details

Made bounty label components also hold the station where it was printed, so that the main station's bounty DB is used instead of the automated trade station's bounty DB

Media

TODO

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

Fixes #955

🆑 blueDev2

  • fix: Cargo Bounties actually work. Cargo Rejoice!

@github-actions github-actions bot added the Changes: C# Changes any cs files label Mar 26, 2024
@FluffiestFloof
Copy link
Contributor

Should probably add markers to note what is being changed, and that those are deltav changes.
Also shouldn't this be directly fixed upstream if it's an overall issue?

@Adrian16199
Copy link
Contributor

Should probably add markers to note what is being changed, and that those are deltav changes. Also shouldn't this be directly fixed upstream if it's an overall issue?

To the first thing, yeah, I didnt said much as this is a draft and alot can change so I would wait till its functional.
Regarding the second thing, this is not an upstream issue as debug made automated trading station be different aka it spawning on a different universe compared to the station that you work on in here.

@deltanedas
Copy link
Member

this still would be nice for upstream so it would support multi station sharing a trade station but using each stations bounties

@Adrian16199
Copy link
Contributor

this still would be nice for upstream so it would support multi station sharing a trade station but using each stations bounties

You are not wrong.

blueDev2 and others added 4 commits March 26, 2024 17:17
Co-authored-by: Adrian16199 <144424013+Adrian16199@users.noreply.github.com>
Signed-off-by: blueDev2 <89804215+blueDev2@users.noreply.github.com>
@blueDev2
Copy link
Contributor Author

blueDev2 commented Mar 26, 2024

Should probably add markers to note what is being changed, and that those are deltav changes. Also shouldn't this be directly fixed upstream if it's an overall issue?

I'm not sure what markers you are talking about.

@blueDev2
Copy link
Contributor Author

Do you think I really should make this an upstream PR?

@Adrian16199
Copy link
Contributor

Should probably add markers to note what is being changed, and that those are deltav changes. Also shouldn't this be directly fixed upstream if it's an overall issue?

I'm not sure what markers you are talking about.

The markers are pretty much just notes that indicate that an upstream file was touched that usually goes like: # DELTA V-Fixes Cargo Bountys

@Adrian16199
Copy link
Contributor

Do you think I really should make this an upstream PR?

It would be a good attempt as deltanedas suggested, it would fix it and less upstream file touched that are different from wizden.
I would keep this in draft and just open it if they wont accept it upstream.
I dont think they would deny it as it basicly makes bountys not just go kapoot just because its not on the same galaxy and the code could be used aswell on any other thing for any future ideas.

@blueDev2
Copy link
Contributor Author

Should probably add markers to note what is being changed, and that those are deltav changes. Also shouldn't this be directly fixed upstream if it's an overall issue?

I'm not sure what markers you are talking about.

The markers are pretty much just notes that indicate that an upstream file was touched that usually goes like: # DELTA V-Fixes Cargo Bountys

Where am I supposed to mark that down?

@Adrian16199
Copy link
Contributor

Where am I supposed to mark that down?

So basicly

{
(Wizden code but changed on delta V) # Delta V- Fixes cargo bountys [aka the point of PR, helps with github blame]
(Wizden code)
(Wizden code but changed on delta V) # Delta V- Fixes cargo bountys
}
Second example
{
(Wizden code but changed on delta V) # Delta V- Start of Fixes cargo bountys
(Wizden code but changed on delta V)
(Wizden code but changed on delta V) # Delta V- End of Fixes cargo bountys
}

Copy link
Contributor

@NullWanderer NullWanderer left a comment

Choose a reason for hiding this comment

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

Here's just a few I had time for right now

@@ -17,4 +19,10 @@ public sealed partial class CargoBountyLabelComponent : Component
/// Used to prevent recursion in calculating the price.
/// </summary>
public bool Calculating;

/// <summary>
/// The Station System to check and remove bounties from
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// The Station System to check and remove bounties from
/// DeltaV - The Station System to check and remove bounties from

Content.Server/Cargo/Systems/CargoSystem.Bounty.cs Outdated Show resolved Hide resolved
@@ -65,16 +67,17 @@ private void OnPrintLabelMessage(EntityUid uid, CargoBountyConsoleComponent comp

var label = Spawn(component.BountyLabelId, Transform(uid).Coordinates);
component.NextPrintTime = _timing.CurTime + component.PrintDelay;
SetupBountyLabel(label, bounty.Value);
SetupBountyLabel(label, station, bounty.Value);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
SetupBountyLabel(label, station, bounty.Value);
SetupBountyLabel(label, station, bounty.Value); // DeltaV - Track owning station

Content.Server/Cargo/Systems/CargoSystem.Shuttle.cs Outdated Show resolved Hide resolved
@blueDev2
Copy link
Contributor Author

I'm gonna wait until a final decision is made on the upstream PR before adding code markers.
I do appreciate you giving me some examples though.

@stellar-novas
Copy link
Contributor

Do you think I really should make this an upstream PR?

Yes, this is a flaw with the bounty system that would also affect wizden, and their downstreams, if they put the station on a different map.

If they don't accept it for whatever reason, which I doubt, can just reopen this pr.

@blueDev2
Copy link
Contributor Author

Upstream PR merged: space-wizards/space-station-14#26469
I will close this PR and make a new PR by pulling the 3 applicable upstream files.

@blueDev2 blueDev2 closed this Mar 28, 2024
@blueDev2 blueDev2 deleted the Bounty-Fix branch March 28, 2024 14:50
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cargo bounties dont work
6 participants