ExMod-Team / EXILED

A high-level plugin framework for SCP: Secret Laboratory servers (scpsl). It offers an event system for developers to hook in order to manipulate or change game code, or implement their own functions.
https://exmod-team.github.io/EXILED/
Other
38 stars 21 forks source link

`[EXILED::Loader]` Allow port-binded plugin loading #89

Open FoxWorn3365 opened 1 week ago

FoxWorn3365 commented 1 week ago

Description

Describe the changes

With this pr I've made possible to allow EXILED users to load plugins both globally or only binded to a server port.

What is the current behavior?

EXILED loads every plugin found in EXILED/Plugins.

What is the new behavior?

EXILED will load every plugin found in EXILED/Plugins and also the ones in EXILED/Plugins/<server port> where <server port> is the current port.

Does this PR introduce a breaking change?

Nop

Other information:

Fully compatible with the current configuration - an empty folder named as the server port will be created inside the directory From suggestion: https://discord.com/channels/656673194693885975/663978314683252777/1267269585338372116


Types of changes

Submission checklist

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

Other

FoxWorn3365 commented 1 week ago

let's hope to not upset the auto checks

VALERA771 commented 1 week ago

Tbh I don't see point for this pr. We have IsEnabled property in port's config and both current and your system have own dis- and advantages

FoxWorn3365 commented 1 week ago

We don't have to remove the IsEnabled system while adding that system tho. I used to be a server owner ad you probably know how time-consuming is to enable and disable plugins in every config. Imagine if you have 3 servers: you'll have to edit 2 <port>-config.yml every time you want to add a plugin only to a specific server. This system will semplify the job of having different plugins for different servers without going crazy.

VladTheCow commented 2 days ago

Just use pterodactyl and host servers in different containers 😛

ALEXWARELLC commented 2 days ago

Just use pterodactyl and host servers in different containers 😛

This is actually the better approach when working with multiple ports, especially with a game such as SCP: SL Dedicated Server. Since most server hosts will only be running 1 server, and majority of hosting services will only allow for 1 instance of the dedicated server. So for most "live" use-cases, this feature is kind of redundant.

If you knew what you were doing, you could symlink to a networked location where the plugins are stored, for each port, but in pretty much all use-cases, that's never really been used, or even should be used, for obvious reasons. For environments like running the server on your computer, this might be helpful, for having specific setups for each port though.

FoxWorn3365 commented 1 day ago

Lots of small SCP:SL servers uses the same machine to host multiple servers. This feature does not remove anything and only adds something useful, really easy to use and compatible with the previous plugin loading strategy as every plugin that is not inside a folder will be considered global (as it is now). I don't really see any reason to deny this addition.