Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions SMODS.DrawStep.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# API Documentation: `SMODS.DrawStep`
This class offers a standardized way of drawing sprites and shaders on cards instead of having to rely on patching `Card:draw()`.
- **Required parameters:**
- `key`
- `order`: Sets an order for this step. All draw steps are executed in order from lowest to highest. Refer to `src/card_draw.lua` in Steamodded's source code for the order values of base draw steps.
- `func(card, layer)`: Handles the drawing logic of this `DrawStep`.
- `card` is the card being drawn.
- `layer` is one of `'card'`, `'shadow'`, `'both'`.
- **Optional parameters** *(defaults)*:
- `layers = { both = true, card = true }`: Determines which values of the `layer` argument this `DrawStep` should be executed for. Unless you are defining custom types of layers and calling `Card:draw()` with them, you should only ever need to change this to `{ both = true, shadow = true }` when you are drawing a shadow.
- `conditions = {}`: Defines additonal conditions for when this draw step should or shouldn't run. This table accepts the following keys:
- `vortex = <bool>`: Checks for a `vortex` property of the drawn card. This is true only for splash cards on the game's splash screen.
- `facing`: Checks for the facing direction of the card. Valid values are `'front'` and `'back'`.
- `prefix_config, dependencies` [(reference)](https://github.com/Steamodded/smods/wiki/API-Documentation#common-parameters)
1 change: 1 addition & 0 deletions _Sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Game Objects
* [SMODS.Voucher](https://github.com/Steamodded/smods/wiki/SMODS.Voucher)
* [SMODS.Challenge](https://github.com/Steamodded/smods/wiki/SMODS.Challenge)
* [SMODS.DeckSkin](https://github.com/Steamodded/smods/wiki/SMODS.DeckSkin)
* [SMODS.DrawStep](https://github.com/Steamodded/smods/wiki/SMODS.DrawStep)
* [SMODS.https](https://github.com/Steamodded/smods/wiki/SMODS.https)
* [SMODS.Keybind](https://github.com/Steamodded/smods/wiki/SMODS.Keybind)
* [SMODS.Language](https://github.com/Steamodded/smods/wiki/SMODS.Language)
Expand Down