-
-
Notifications
You must be signed in to change notification settings - Fork 668
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
[Enhancement] rework for enable choosing of a custom datapack name #572
Merged
Conversation
This file contains 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
This modification allows us to choose the name of the folder "datapack", to work more easily with the global pack. If everything goes as planned, we can migrate the global repository here, without necessarily affecting the development of the custom. Who wants to use the global datapack, just change the name, who wants to use the usual "data", can also. Also removed the c++ store functions as it was not used. How to test: Take the global pack, rename it to "data-global", in the src/core.hpp file, in "DATAPACK_FOLDER_NAME" put the same folder you renamed, compile and test. Fix for not remove items with decay added from map
34e3831
to
a38386a
Compare
• Using FLAG_NOLIMIT when returning the hireling lamp to user's store inbox. • Ignoring the inbox available slots in this case avoids a crash in the hireling_lib file when the user losing the house has a full store inbox.
bce7a62
to
c693485
Compare
Move bitise flags to core/libs folder Move libs to the core folder
ad47915
to
281ddaf
Compare
6b08f48
to
924ba28
Compare
Kudos, SonarCloud Quality Gate passed! |
guispiller
approved these changes
Nov 18, 2022
majestyotbr
approved these changes
Nov 18, 2022
This was referenced Nov 19, 2022
5 tasks
luan
pushed a commit
that referenced
this pull request
Jul 11, 2023
) With this modification, we will be able to focus on just one repository (the canary), and archive otservbr-global repository. The intention is that we can have two datapacks in the same repository, being able to easily switch from one to the other, just change in config.lua the "dataPackDirectory" from "data-otservbr-global" to "data-canary" or vice versa. The main purpose is to facilitate our development, at the same time that the community will be able to contribute in a single repository, but keeping the choice of using a "clean" datapack. I made some more modifications, such as removing the unused C++ gamestore, I also removed the "allowPickupable" tag, which was duplicated, and I made some other adjustments. Folder structure changes Now we have the following structure: • data = this will be the "core" folder, it is where the files that are absolutely necessary for the executable to open correctly, such as libs, xmls, etc. Here we will have files that both the global and the canary datapack will share with each other • data-otservbr-global = here will be the global datapack files, some libs and folders that are only for the global server, such as scripts, monsters, npcs, world. • data-canary = a "clean" datapack as far as possible, with only the scripts and files necessary for the server to work. • NOTE: The "data" folder is actually the "core" of the server, we didn't rename it to avoid having to make changes to the sites and login.php, since they read the "data/xml". The other two folders, data-otservbr-global and data-canary can be changed in config.lua, which one you want the executable to read, by default we'll point to the global one, as that's what most use. If you want to start a custom server with "as few files and scripts as possible", then switch to "data-canary". We also added a boolean in config.lua that allows choosing another name for the datapack, by default we will also keep this disabled, since we will only maintain support for these two datapacks, it is up to each one to know what they are doing in case they want to change it. So, in the end, we have the reorganization in the folders:  Note that we made few real changes to the files, the abundance of modified files is due to moving from one folder to another and also adding the global datapack to this repository (with an abundance of files). If you want to migrate your datapack to the global one, you should know what you're doing, if you don't know, just pass your modifications to the "new files" or get in touch on our discord group so we can help you: https://discord.gg/X3mSnMH8jg
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.
With this modification, we will be able to focus on just one repository (the canary), and archive otservbr-global.
The intention is that we can have two datapacks in the same repository, being able to easily switch from one to the other, just change in config.lua the "dataPackDirectory" from "data-otservbr-global" to "data-canary" or vice versa.
The main purpose is to facilitate our development, at the same time that the community will be able to contribute in a single repository, but keeping the choice of using a "clean" datapack.
I made some more modifications, such as removing the unused C++ gamestore, I also removed the "allowPickupable" tag, which was duplicated, and I made some other adjustments.
Folder structure changes
Now we have the following structure
data = this will be the "core" folder, it is where the files that are absolutely necessary for the distro to open correctly, such as libs, xmls, etc. Here we will have files that both the global and the canary datapack will share with each other
data-otservbr-global = here will be the global datapack files, some libs and folders that are only for the global server, such as scripts, monsters, npcs, world.
data-canary = a "clean" datapack as far as possible, with only the scripts and files necessary for the server to work.
NOTE: The "data" folder is actually the "core" of the server, we didn't rename it to avoid having to make changes to the sites and login.php, since they read the "data/xml". The other two folders, data-otservbr-global and data-canary can be changed in config.lua, which one you want the executable to read, by default we'll point to the global one, as that's what most use. If you want to start a custom server with "as few files and scripts as possible", then switch to "data-canary".
We also added a boolean in config.lua that allows choosing another name for the datapack, by default we will also keep this disabled, since we will only maintain support for these two datapacks, it is up to each one to know what they are doing in case they want to change it.
So, in the end, we have the reorganization in the folders:

Note that we made few real changes to the files, the abundance of modified files is due to moving from one folder to another and also adding the global datapack to this repository (with an abundance of files). If you want to migrate your datapack to the global one, you should know what you're doing, if you don't know, just pass your modifications to the "new files" or get in touch on our discord group, so we can help you.