---------

Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
This commit is contained in:
cajun
2024-10-01 08:34:46 -05:00
committed by GitHub
parent d1b3bdac74
commit 5016c6efa2
32836 changed files with 65408 additions and 48862 deletions

View File

@@ -0,0 +1,17 @@
extra card field:
type: choice
name: foil layer
choice: foil layer
editable: false
save value: false
extra card style:
foil layer:
left: { face_coordinates_map(1).left }
top: { face_coordinates_map(1).top }
width: { face_coordinates_map(1).width }
height: { face_coordinates_map(1).height }
z index: 1050
visible: { styling.overlay != "none" and styling.overlay != "" }
render style: image
image: { if styling.overlay == "" or styling.overlay == "none" then "" else styling.overlay + "/overlay.png" }
mask: { foil_mask_blended_image(face:1) }

View File

@@ -0,0 +1,18 @@
include file: /magic-modules.mse-include/foils/card_fields
extra card field:
type: choice
name: foil layer 2
choice: foil layer
editable: false
save value: false
extra card style:
foil layer 2:
left: { face_coordinates_map(2).left }
top: { face_coordinates_map(2).top }
width: { face_coordinates_map(2).width }
height: { face_coordinates_map(2).height }
z index: 1050
visible: { styling.overlay_2 != "none" and styling.overlay_2 != "" }
render style: image
image: { if styling.overlay_2 == "" or styling.overlay_2 == "none" then "" else styling.overlay_2 + "/overlay.png" }
mask: { foil_mask_blended_image(face:2) }

View File

@@ -0,0 +1,18 @@
include file: /magic-modules.mse-include/foils/card_fields_dfc
extra card field:
type: choice
name: foil layer 3
choice: foil layer
editable: false
save value: false
extra card style:
foil layer 3:
left: { face_coordinates_map(3).left }
top: { face_coordinates_map(3).top }
width: { face_coordinates_map(3).width }
height: { face_coordinates_map(3).height }
z index: 1050
visible: { styling.overlay_3 != "none" and styling.overlay_3 != "" }
render style: image
image: { if styling.overlay_3 == "" or styling.overlay_3 == "none" then "" else styling.overlay_3 + "/overlay.png" }
mask: { foil_mask_blended_image(face:3) }

View File

@@ -0,0 +1,42 @@
#### To use this include in a template, add the following in the template headers:
depends on:
package: magic-modules.mse-include
version: 2024-10-01
#### Add the following line,unindented, in the styling field section:
include file: /magic-modules.mse-include/foils/styling_fields
#### Also add this, unindented, before the card style section:
include file: /magic-modules.mse-include/foils/card_fields
#### For DFC or TFC templates, instead override the faces_coordinates function, and use:
include file: /magic-modules.mse-include/foils/styling_fields_dfc
include file: /magic-modules.mse-include/foils/card_fields_dfc
include file: /magic-modules.mse-include/foils/styling_fields_tfc
include file: /magic-modules.mse-include/foils/card_fields_tfc
#### The template should either include foil_mask.png, or include this function overwrite
foil_mask_base_image := { "" }
#### foil_mask.png marks the area on the card where the foiling should be applied white
#### and marks where it shouldn't be applied black. It is the same size as the card.
#### you can also define added sections (like a PT box) and removed sections (like a stamp)
#### these will also have foil masks that are the full card size
#### but only the added shape in white or the removed shape in black, with the rest the other color
#### foil_mask_blended_image() will combine these together
#### by default, it expects foil_mask_pt, foil_mask_round, and foil_mask_triangle
#### you can change this by editing these functions
foil_mask_added_sections := {
output := []
pt_field := if face == 1 then card.pt else card["pt_" + face]
if pt_field != "" then output := output + ["foil_mask_pt.png"]
output
}@(face:1)
foil_mask_removed_sections := {
output := []
sh := stamp_shape(field:face)
if sh == "round" then output := output + ["foil_mask_round.png"]
else if sh == "triangle" then output := output + ["foil_mask_triangle.png"]
output
}@(face:1)

View File

@@ -0,0 +1,6 @@
styling field:
type: package choice
name: overlay
description: Should there be an overlay applied, such as foil?
match: magic-overlay-*.mse-include
required: false

View File

@@ -0,0 +1,7 @@
include file: /magic-modules.mse-include/foils/styling_fields
styling field:
type: package choice
name: overlay 2
description: Should there be an overlay applied, such as foil?
match: magic-overlay-*.mse-include
required: false

View File

@@ -0,0 +1,7 @@
include file: /magic-modules.mse-include/foils/styling_fields_dfc
styling field:
type: package choice
name: overlay 3
description: Should there be an overlay applied, such as foil?
match: magic-overlay-*.mse-include
required: false