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

Move TriggerSystem trigger methods to shared #27970

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

Conversation

DrSmugleaf
Copy link
Member

About the PR

Media

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

Breaking changes

TriggerEvent has been moved from Content.Server.Explosion.EntitySystems to Content.Shared.Explosion

Copy link
Contributor

@AJCM-git AJCM-git left a comment

Choose a reason for hiding this comment

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

just these details and you have a personal self merge token

{
// Check if entity is bomb/mod. grenade/etc
if (_container.TryGetContainer(uid, "payload", out var container) &&
Copy link
Contributor

Choose a reason for hiding this comment

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

container id to const string

Comment on lines +48 to +56
chemicalPayloadComponent.BeakerSlotB.Item is not { } beakerB ||
!TryComp(beakerA, out SolutionContainerManagerComponent? containerA) ||
!TryComp(beakerB, out SolutionContainerManagerComponent? containerB) ||
!TryComp(beakerA, out FitsInDispenserComponent? fitsA) ||
!TryComp(beakerB, out FitsInDispenserComponent? fitsB) ||
!_solutions.TryGetSolution((beakerA, containerA), fitsA.Solution, out _, out var solutionA) ||
!_solutions.TryGetSolution((beakerB, containerB), fitsB.Solution, out _, out var solutionB))
return;
Copy link
Contributor

Choose a reason for hiding this comment

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

wtf is this (not a review since you didnt make... this, just a visceral reaction)

User = user;
}
}

/// <summary>
/// Raised when timer trigger becomes active.
/// </summary>
[ByRefEvent]
public readonly record struct ActiveTimerTriggerEvent(EntityUid Triggered, EntityUid? User);
Copy link
Contributor

Choose a reason for hiding this comment

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

shouldnt this be removed now?

[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
Copy link
Contributor

Choose a reason for hiding this comment

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

_container can be protected

/// <summary>
/// Raised when timer trigger becomes active.
/// </summary>
[ByRefEvent]
public readonly record struct ActiveTimerTriggerEvent(EntityUid Triggered, EntityUid? User);

[UsedImplicitly]
public sealed partial class TriggerSystem : EntitySystem
public sealed partial class TriggerSystem : SharedTriggerSystem
{
[Dependency] private readonly ExplosionSystem _explosions = default!;
[Dependency] private readonly FixtureSystem _fixtures = default!;
Copy link
Contributor

Choose a reason for hiding this comment

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

something tells me some of the deps below are unused now

@AJCM-git AJCM-git added the Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged. label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Awaiting Changes This PR needs its reviews addressed or changes to be made in order to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants