Skip to content
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

Constdb revamp #1088

Merged
merged 4 commits into from
Jan 13, 2016
Merged

Constdb revamp #1088

merged 4 commits into from
Jan 13, 2016

Conversation

MishimaHaruna
Copy link
Member

This converts the constants db (const.txt) to libconfig format (constants.conf). The reason behind the conversion is that it allows implementing new features more easily.

This pull request also implements a new 'Deprecated' field in the converted database. This is useful for example for #908, so that the removed constants may be deprecated instead (and removed at a later time). A silent and immediate removal, as we know, would cause the script parser not to choke on them, and interpret them as a char-reg instead.

@MishimaHaruna MishimaHaruna added type:enhancement Issue describes an enhancement or feature that should be implemented component:core Affecting the Hercules core (i.e. not the game mechanics directly) component:databases Affecting the databases available in the db/ folder status:code-review Awaiting code review component:core:scriptengine Affecting the script engine or the script commands labels Jan 10, 2016
@MishimaHaruna
Copy link
Member Author

Asking @HerculesWS/developers for feedback (and review if possible)

@4144
Copy link
Contributor

4144 commented Jan 12, 2016

what about converter?

- This is necessary for upcoming improvements

Signed-off-by: Haru <haru@dotalux.com>
Use respectively Job_Alchemist and Job_Alchemist instead.

Signed-off-by: Haru <haru@dotalux.com>
Signed-off-by: Haru <haru@dotalux.com>
@MishimaHaruna
Copy link
Member Author

Updated to add a converter, addressing @4144 's concerns

4144 added a commit that referenced this pull request Jan 13, 2016
@4144 4144 merged commit 49081f4 into master Jan 13, 2016
@MishimaHaruna MishimaHaruna removed the status:code-review Awaiting code review label Jan 13, 2016
@MishimaHaruna MishimaHaruna deleted the constdb branch January 13, 2016 16:50
@AnnieRuru
Copy link
Contributor

Yay ~ 2 of my plugins broken ... well its kinda expected
erm, I was busy with something else ... oh well

anyway, why not having those value can parse with the source constant ?
so like ... the MAX_LEVEL for example
MAX_LEVEL: MAX_LEVEL
the left side is declare as script constant
and the right side is declare from the source
so there is no need to look up in the script.c file for those constants hidden there

there are still many members doesn't know OPTION_XMAS is actually a constant ...
because it is hidden in the source file

@MishimaHaruna
Copy link
Member Author

How about we generate (and automatically update through the HerculesWS API bot) a file with all the constant names, in the documentation folder? That way all the constants would be listed in a file, that doesn't need manual maintenance

@4144
Copy link
Contributor

4144 commented Jan 13, 2016

good idea

MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this pull request Oct 23, 2022
They were deprecated and replaced by Job_Alchemist and
Job_Baby_Alchemist respectively in PR HerculesWS#1088 and commit
3f56ffc in 2016-01-13.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this pull request Oct 23, 2022
They were deprecated and replaced by Job_Alchemist and
Job_Baby_Alchemist respectively in PR HerculesWS#1088 and commit
3f56ffc in 2016-01-13.

Signed-off-by: Haru <haru@dotalux.com>
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this pull request Oct 23, 2022
They were deprecated and replaced by Job_Alchemist and
Job_Baby_Alchemist respectively in PR HerculesWS#1088 and commit
3f56ffc in 2016-01-13.

Signed-off-by: Haru <haru@dotalux.com>
@MishimaHaruna MishimaHaruna mentioned this pull request Oct 23, 2022
3 tasks
MishimaHaruna added a commit to MishimaHaruna/Hercules that referenced this pull request Oct 27, 2022
They were deprecated and replaced by Job_Alchemist and
Job_Baby_Alchemist respectively in PR HerculesWS#1088 and commit
3f56ffc in 2016-01-13.

Signed-off-by: Haru <haru@dotalux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:core:scriptengine Affecting the script engine or the script commands component:core Affecting the Hercules core (i.e. not the game mechanics directly) component:databases Affecting the databases available in the db/ folder type:enhancement Issue describes an enhancement or feature that should be implemented
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants