-
Notifications
You must be signed in to change notification settings - Fork 170
Add missing horse hooks to RidableHorse2 #553
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
Conversation
|
@WheteThunger |
|
I see, thanks for pointing it out. That PR appears to focus on adding new hooks, while this PR focuses on solely establishing parity between
|
Regarding the changes in naming: |
|
Although the classes are deprecated, I'm not aware of an estimated removal date. If you know it, please share. FP has deprecated things before but has taken their time to remove them. For example, pooling methods, which FP claimed would be removed one month later, but they are still here many months later. I'm not suggesting that anyone develop new plugins or features with the old horses, but existing plugins should be taken into account. The point of deprecation is to give users time to adjust to the changes before feature removal. Existing pligins should not be broken at random by Oxide maintainers because of an upcoming removal. Assuming that every plugin can react immediately to backwards-incompatible changes suggests a misunderstanding of the plugin ecosystem. Many plugins are not maintained, some were merely authored in a forum post, some were written by Gen AI, etc. I understand that the prefab change for the old horses immediately broke all plugins that relied on knowledge of the prefab, but it was an easy fix (find/replace) even for non-coders, and some plugins did not even need code changes due to the prefab being a config option that the server owner could change. You're right that the old horses no longer spawn naturally in Rust, but some plugins still spawn them, and other plugins need to continue to work with them. The new horses work differently and some plugins have had to undergo significant changes to restore existing capabilities, so it will take time for the community to upgrade most plugins to support them. It's essential that the community be given sufficient time to make the necessary upgrades. While we are we are beholden to when FP actually removes the old horses, we should not make the problem worse by unnecessarily accelerating that timeline. Regarding Can vs On hooks, I agree that "new" hooks should follow the convention you described, but I argue this shouldn't be thought of as a new hook. This is backfilling a hook to another class, so it should match the conventions used in other classes. |
|
@WheteThunger #545 Judging by the time that has passed, incorrect hook conflicts have been around for many years and there are no visible signs of progress so far. That's why it's worth at least gradually moving towards solving this problem, starting with the names. For example, new hooks could be added while marking the incorrectly named ones as deprecated, giving developers 2-3 months to transition. That’s just my opinion, it may be wrong. |
|
Not all existing plugins stopped working. Hooks continue to be called for the old horses. Plugins still referencing the RidableHorse and BaseRidableAnimal will receive the hook calls. Plugins that explicitly reference the prefab path, such as plugins which spawn horses, were impacted, but as I explained in my previous post, it was a trivial update that even non-coders can do, and I have found that many server owners will take it upon themselves to figure out such changes (often guided by other users in various Discord servers). As I was also saying, some plugins exposed the prefab path as a config option, which allows server owners to correct the problem without a code change. The Oxide team has renamed hooks before, and what we found is that it's a collective waste of community time. Hundreds of server owners will react to the deprecation notices, resulting in hundreds of independent discussions across various forums (multiple websites, multiple discord servers, many DMs). It simply distracts server owners and developers from spending their time on making truly meaningful changes. The benefit of renaming hooks is very negligible as developers can simply read docs or read the assemblies to learn how to correctly use a hook (which they should do anyway if they are adopting a new hook). Renaming hooks also has a way of forcing old or unmaintained plugins to break, which shouldn't be necessary if those plugins work. Making backwards incompatible changes sometimes needs to be done to enable forward progress, but renaming hooks is simply NOT one of those cases. |
|
Everyone has their own opinion, but I don't think that I, you, or Oxide should be responsible for plugins that are no longer supported. The focus should be on ensuring that existing and future plugins work as intended. For example, when working with the TimedPermissions plugin, I was developing a plugin that needed to integrate with it, but I lacked a couple of API methods/hooks. I wanted to request their addition, but then I saw that the plugin had been abandoned for three years. As a result, I simply decided to create my own alternative with more features for both developers and server owners. You could say that I could have opened a support ticket or a patch request to add the missing hooks/methods. But I've already done that with 2-3 other plugins, and there's still no response for over a year... https://codefling.com/plugins/temporary-permissions What I want to say is that, no matter how much you worry about plugins abandoned by their authors, their relevance eventually fades. Some plugins simply stop working with such plugins because there is no support from their developers. Meanwhile, new alternatives emerge with active authors who continue to maintain and improve them. And with names, when if not now is the right time to switch to new appropriate names? For RidableHorse2, corrected names can be applied, because anyone updating their plugin to replace RidableHorse or BaseRidableAnimal with RidableHorse2 will be updating their plugin anyway, and at the same time, they can also rename the hooks. |
|
My 2c, Don't rename hooks. I don't want to have to waste time updating stuff when I don't have to. |
|
I see, it's sad that everyone thinks only of themselves... Don't misleadingly named hooks confuse you? For example, when I see a hook that starts with 'Can', I assume it's a boolean hook, but that's not always the case due to incorrect naming. As a result, for 'Can' hooks, I have to check the source code every time. |
|
You can't just rename hooks, you need to mark them as deprecated (src/RustHooks.cs) and give people time to adapt them. |
|
Thanks for the pr! |
BaseRidableAnimaltoRidableHorse2, includingOnHorseLead,CanLootEntity, andOnRidableAnimalClaim[ed]Animalcategory[BaseRidableAnimal]tag for clarity now that there are two versionsI tested all new hooks.