-
Notifications
You must be signed in to change notification settings - Fork 146
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
Traits V2 #1182
Traits V2 #1182
Conversation
Co-authored-by: gluesniffler <[email protected]> Signed-off-by: VMSolidus <[email protected]>
It's finally ready. |
[DataField] | ||
public List<string>? RemoveFactions { get; private set; } = default!; | ||
[DataField(serverOnly: true)] | ||
public TraitFunction[] Functions { get; private set; } = Array.Empty<TraitFunction>(); |
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.
Why an array?
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.
No idea to be honest, I had no idea what was entirely essential for this style of setup, so it's exactly how it was with the JobSpecial.
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.
Both can be used. Since it's fixed length (you will not change it via VVEdit or in code) array is fine to be used here.
Co-authored-by: DEATHB4DEFEAT <[email protected]> Signed-off-by: VMSolidus <[email protected]>
[DataField] | ||
public List<string>? RemoveFactions { get; private set; } = default!; | ||
[DataField(serverOnly: true)] | ||
public TraitFunction[] Functions { get; private set; } = Array.Empty<TraitFunction>(); |
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.
Both can be used. Since it's fixed length (you will not change it via VVEdit or in code) array is fine to be used here.
Description
Traits Version 2 implements a much needed overhaul of the Trait System, changing it so that it no longer uses hardcoded nullable lists of various entries required for the trait functions, and instead accepts a single Modular List of Functions, and then iterates through the list like a set of instructions on how to modify the character. This PR also features a few new Functions, such as AddImplant.
Anyway, rather than hardcoding a new codepath for every new function, new functions can simply be made separate from the codepath entirely, and will only be called if they are included in the trait itself.
TODO
BREAKING CHANGES
ALL DOWNSTREAM TRAITS WILL NEED TO BE MODIFIED TO USE THE NEW SYSTEM.
Changelog
🆑