Skip to content

feat: Add public UcrEvents bus and CustomTeamId for external plugin integration#89

Open
AdzAhm wants to merge 1 commit into
UncomplicatedCustomServer:labapifrom
AdzAhm:labapi
Open

feat: Add public UcrEvents bus and CustomTeamId for external plugin integration#89
AdzAhm wants to merge 1 commit into
UncomplicatedCustomServer:labapifrom
AdzAhm:labapi

Conversation

@AdzAhm

@AdzAhm AdzAhm commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Hi everyone! 👋
I’m a uni CE stuendt while improving my GitHub profile I stumbled back onto this project from when I used to play/develop and modrate for SCP:SL servers.
I saw a recent feature request (not really recent a year ago lol) for custom winning conditions and noticed the plugin owner mentioned that updating the old EndConditionsExtension was the best way to handle it. I decided to take on the challenge and have updated the extension to make this possible!
Note: I have opened a PR on the extension's repo as well.
Because I am busy with university and deleted the game , I am not able to test these changes in a server. I would hugely appreciate it if the community or maintainers could test the updated plugin and extension to ensure everything is working correctly.

Here is a breakdown of the technical changes made in this PR:

Adds a new public API to allow external plugins (like EndConditionsExtension) to cleanly hook into custom role lifecycles without relying on internal Harmony patches.

Changes:

  • Added UcrEvents public static event bus with CustomRoleAssigned, CustomRoleRemoved, and CustomRoleEscaped events.
  • Added optional CustomTeamId string property to ICustomRole, CustomRole, and EventCustomRole to allow multiple custom roles to share a "faction" identity (e.g., "SerpentHand").
  • Updated SummonedCustomRole and PlayerEventHandler to fire these events during spawning, destruction, and natural/custom escaping.

Note: These changes are entirely additive and do not alter existing plugin behavior.

2nd note:It's been a long time since I coded SCP:SL plugins, so please excuse any messy code or silly errors! 😅

@AdzAhm AdzAhm left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

!!

@FoxWorn3365

Copy link
Copy Markdown
Member

I'll take a look this evening
Btw the custom team identifier should also be added to the ICustomRole interface

@AdzAhm

AdzAhm commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

check UncomplicatedCustomServer/EndConditionsExtension#1
this is why the change was made in the first place

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants