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

Added PrimitiveSettings + 3 overloads to Primitive::Create method #2107

Merged
merged 7 commits into from
Sep 15, 2023
Merged

Added PrimitiveSettings + 3 overloads to Primitive::Create method #2107

merged 7 commits into from
Sep 15, 2023

Conversation

SmusiJarviss
Copy link
Contributor

No description provided.

Copy link
Contributor

@VALERA771 VALERA771 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really think that we need to put that method to obsolete and create another struct just for containing parameters. You don't use this struct anywhere except Create method

@NaoUnderscore
Copy link
Collaborator

I don't really think that we need to put that method to obsolete and create another struct just for containing parameters. You don't use this struct anywhere except Create method

I don't really get what's wrong using a struct to better organize parameters and objects initialization.
It's pretty much safe, consistent and readable instead of manually specifying which parameters to pass, especially in case you need to spawn primitives in multiple lines and you want to save a "configuration" which can be your PrimitiveSettings struct.
Method has been marked obsolete because Color? as parameter changes the signature, hence you're forced to mark it obsolete.

Copy link
Collaborator

@NaoUnderscore NaoUnderscore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add an overload to Light::Create as well.

Exiled.API/Features/Toys/Primitive.cs Outdated Show resolved Hide resolved
Exiled.API/Features/Toys/Primitive.cs Outdated Show resolved Hide resolved
Copy link
Member

@louis1706 louis1706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not 100% sure but default color is not white for nw but a specific color of gray

Exiled.API/Features/Toys/Light.cs Outdated Show resolved Hide resolved
Exiled.API/Features/Toys/Primitive.cs Show resolved Hide resolved
Exiled.API/Features/Toys/Primitive.cs Show resolved Hide resolved
Exiled.API/Features/Toys/Light.cs Outdated Show resolved Hide resolved
Exiled.API/Features/Toys/Primitive.cs Outdated Show resolved Hide resolved
Exiled.API/Features/Toys/Primitive.cs Outdated Show resolved Hide resolved
@louis1706 louis1706 added enhancement New feature or request regarding-api An issue or PR targeting the Exiled API project labels Sep 14, 2023
NaoUnderscore and others added 3 commits September 15, 2023 16:58
Co-authored-by: Thunder <thundermaker300@gmail.com>
Co-authored-by: Thunder <thundermaker300@gmail.com>
@NaoUnderscore NaoUnderscore merged commit e8c773f into Exiled-Team:dev Sep 15, 2023
@louis1706 louis1706 mentioned this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request regarding-api An issue or PR targeting the Exiled API project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants