-
-
Notifications
You must be signed in to change notification settings - Fork 173
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
Code refactor for better plugin development #500
base: master
Are you sure you want to change the base?
Conversation
I don't like having things named with an "s", For example naming Packet to Packets or others |
Why? Its more intuitive, because its a module with packets, not with single packet and inppementation for it |
nah, its not. Also now everything is inconsistent. You rename like 3 things into multiple and all other are still single. Just leave it as it is please |
Ok |
I revert it |
4baf243
to
73f5944
Compare
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] | ||
pub struct RawChatType { | ||
id: u32, | ||
components: ChatType, | ||
} | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] | ||
pub struct ChatType { | ||
chat: Decoration, | ||
narration: Decoration, | ||
} | ||
|
||
#[derive(Debug, Clone, Serialize, Deserialize)] | ||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Hash)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes no sense since its only used internally and is not exposed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its not internally. i use it in plugins
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like for example playsound
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything in there is only available at build time, All struct have to be parsed to the token stream to be included as final rust code
|
||
use crate::ident; | ||
|
||
#[derive(Deserialize)] | ||
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes no sense since its only used internally and is not exposed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anf this tok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this too
|
||
use crate::ident; | ||
|
||
#[derive(Deserialize)] | ||
#[derive(Debug, Clone, PartialEq, Eq, Deserialize, Serialize)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes no sense since its only used internally and is not exposed
BoundingBox changed and i left some comments @suprohub |
Description
This refactor includes:
Change bounding box floats to vector with floats, because its more intuitive and readable.
Remove oneshot dependency, because its not needed anymore.
Add more derives for data struct for plugin developers.
(Me needed it)
Rename files and remove typos.
Testing
clippy and fmt, also unit all unit tests
Please follow our Coding Guidelines