Skip to content

fix: AnnouncingScpTerminationEventArgs not denying the event when IsA…#806

Open
Mrhootyhoot1 wants to merge 4 commits intoExMod-Team:masterfrom
Mrhootyhoot1:master
Open

fix: AnnouncingScpTerminationEventArgs not denying the event when IsA…#806
Mrhootyhoot1 wants to merge 4 commits intoExMod-Team:masterfrom
Mrhootyhoot1:master

Conversation

@Mrhootyhoot1
Copy link
Copy Markdown

@Mrhootyhoot1 Mrhootyhoot1 commented Apr 12, 2026

Description

Describe the changes
Return from CassieScpTerminationAnnouncement:OnStartedPlaying if IsAllowed is set to false.

What is the current behavior? (You can also link to an open issue here)
It does not stop the SCP termination announcement.

What is the new behavior? (if this is a feature change)
It stops the SCP termination announcement.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No

Other information:
None


Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentations

Submission checklist

  • I have checked the project can be compiled
  • I have tested my changes and it worked as expected

Patches (if there are any changes related to Harmony patches)

  • I have checked no IL patching errors in the console

Other

  • Still requires more testing

…llowed is set to false.

Describe the changes
Return from CassieScpTerminationAnnouncement:ONStartedPlaying if IsAllowed is set to false.

What is the current behavior?
It does not stop the SCP termination announcement.

What is the new behavior?
It stops the SCP termination announcement.

Does this PR introduce a breaking change?
No
Copy link
Copy Markdown

@VALERA771 VALERA771 left a comment

Choose a reason for hiding this comment

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

IsAllowed logic should be changed. We don't need to remove the whole announcement if one of the events (ie one of the SCPs which's death shouldn't be announced) got cancelled

@Mrhootyhoot1
Copy link
Copy Markdown
Author

IsAllowed logic should be changed. We don't need to remove the whole announcement if one of the events (ie one of the SCPs which's death shouldn't be announced) got cancelled

Could you clarify what you mean by this? This event only handles the announcement of SCPs, not other announcements.

@VALERA771
Copy link
Copy Markdown

Okay so, lemme elaborate a bit. In event and game code we have a loop that adds all SCPs whose death should be announced. It's a loop and we call an event for each iteration. If we use return label, it'll not work as continue operator, but instead it'll end method execution

Example for better understanding:
We subscribe to AnnouncingScpTermination event and deny if terminated SCP is 079
Warhead goes boom and 079 as well as some other SCPs have died. They all gonna be announced in one CASSIE query
Event is fired for each SCP which death should be announced
We deny event on 079, code goes to ret label => method execution stops => no annouchment at all

TL;DR you need to replace ret label with another label that'll just skip current for-loop iteration

Copy link
Copy Markdown

@Someone-193 Someone-193 left a comment

Choose a reason for hiding this comment

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

I think @VALERA771 was thinking of something like this:

Comment thread EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs
Comment thread EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs
Comment thread EXILED/Exiled.Events/Patches/Events/Map/AnnouncingScpTermination.cs Outdated
Mrhootyhoot1 and others added 3 commits April 17, 2026 19:35
…on.cs

Co-authored-by: @Someone <45270312+Someone-193@users.noreply.github.com>
…on.cs

Co-authored-by: @Someone <45270312+Someone-193@users.noreply.github.com>
…on.cs

Co-authored-by: @Someone <45270312+Someone-193@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants