-
Notifications
You must be signed in to change notification settings - Fork 27
DeckSkin Crediting documentation #36
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
base: master
Are you sure you want to change the base?
Conversation
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.
Great addition, although this being a separate page seems a bit odd.
More concerned about the API itself being inconsistent with other SMODS object functions, and might need changed before this can be merged (DeckSkin object is passed as 2nd var rather than passing as self
).
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.
This page should be linked somewhere, otherwise it cannot be accessed on the SMODS wiki.
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.
Also considering this not being a dedicated page, and instead all of the details on the functions are on the SMODS.DeckSkin
page. Probably better for organization.
- `has_ds_card_ui(card, deckskin, palette)` | ||
- Enable UI on cards in preview | ||
- Called for every currently displayed card in preview | ||
- `generate_ds_card_ui(card, deckskin, palette, info_queue, desc_nodes, specific_vars, full_UI_table)` |
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 these functions should mention (or link to) the DeckSkin crediting page for extra details.
## Enabling the UI (has_ds_card_ui) | ||
For every palette you define in your DeckSkin, there is the `display_ranks` list that defines which ranks will show in the preview, and in what order. When the preview is shown on screen, `has_ds_card_ui` is called for each card. If the return of the function is `true`, then the UI will be enabled for that card. | ||
|
||
Utilizing the `card`, `deckskin`, and `palette` args, you can filter out the enabled ui by checking the rank of the cards, checking the key of the current palette, and more. |
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.
Should probably mention what these args are specifically. Someone could be confused as to whether the deckskin
refers to the SMODS.DeckSkin
object this function is defined on or some other SMODS.DeckSkin
object.
``` | ||
|
||
## Defining the UI (generate_ds_card_ui) | ||
For every card that has its UI enabled by `has_ds_card_ui`, you can define the contents of it with `generate_ds_card_ui`, much like you would define the ui with `generate_ui` in Centers. |
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.
Should link to the generate_ui
function documentation.
No description provided.