feat: Add public UcrEvents bus and CustomTeamId for external plugin integration#89
feat: Add public UcrEvents bus and CustomTeamId for external plugin integration#89AdzAhm wants to merge 1 commit into
Conversation
…on for plugin integration
|
I'll take a look this evening |
|
check UncomplicatedCustomServer/EndConditionsExtension#1 |
Any news? |
|
These features will be added next update (already on labapi-dev branch); the PR will be closed if the new version is out |
So you already made it or are you going to merge this ? |
|
CustomTeams still work in progress (it will be a CustomFlag); and I wrote the code |
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! 😅