feat: Add public UcrEvents bus and CustomTeamId for external plugin integration#89
Open
AdzAhm wants to merge 1 commit into
Open
feat: Add public UcrEvents bus and CustomTeamId for external plugin integration#89AdzAhm wants to merge 1 commit into
AdzAhm wants to merge 1 commit into
Conversation
…on for plugin integration
Member
|
I'll take a look this evening |
Contributor
Author
|
check UncomplicatedCustomServer/EndConditionsExtension#1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
UcrEventspublic static event bus withCustomRoleAssigned,CustomRoleRemoved, andCustomRoleEscapedevents.CustomTeamIdstring property toICustomRole,CustomRole, andEventCustomRoleto allow multiple custom roles to share a "faction" identity (e.g., "SerpentHand").SummonedCustomRoleandPlayerEventHandlerto 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! 😅