Add extra stamps options (#60)
* add classicshifted stamps * improve custom stamp handling and add realm acorn examples * add split_custom_directory function so we don't have to keep copy pasting filename injection scripts * improve to_number_lax --------- Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
@@ -80,7 +80,7 @@ init script:
|
||||
shape := card_stamp_field(field)
|
||||
if shape == "default" then shape := set.default_stamp
|
||||
if shape == "custom" or shape == "flatstamped custom"
|
||||
then custom_stamp(flat:not is_foil_stamped(field:field))
|
||||
then custom_stamp(dimensions:dimensions, flat:not is_foil_stamped(field:field))
|
||||
else "/magic-modules.mse-include/stamps/" + dimensions + " " + shape + ".png"
|
||||
)
|
||||
)
|
||||
|
||||
|
Before Width: | Height: | Size: 993 B |
|
Before Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 955 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 709 B |
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 952 B |
|
After Width: | Height: | Size: 690 B |
|
After Width: | Height: | Size: 451 B |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 2.8 KiB |
|
After Width: | Height: | Size: 1.3 KiB |
|
After Width: | Height: | Size: 976 B |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 8.5 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.2 KiB |
|
After Width: | Height: | Size: 8.4 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 9.2 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
@@ -6,6 +6,19 @@ choice: universes beyond
|
||||
choice: alchemy
|
||||
choice: alchemy old
|
||||
choice: custom
|
||||
choice:
|
||||
name: iderp classicshifted
|
||||
choice: default
|
||||
choice: blue
|
||||
choice: gold
|
||||
choice: green
|
||||
choice: iblue
|
||||
choice: igreen
|
||||
choice: ired
|
||||
choice: iwhite
|
||||
choice: purple
|
||||
choice: red
|
||||
choice: teal
|
||||
choice:
|
||||
name: flatstamped
|
||||
choice: standard
|
||||
@@ -14,4 +27,5 @@ choice:
|
||||
choice: universes beyond
|
||||
choice: alchemy
|
||||
choice: alchemy old
|
||||
choice: custom
|
||||
choice: custom
|
||||
choice: iderp classicshifted
|
||||
@@ -5,4 +5,5 @@ choice: heart
|
||||
choice: universes beyond
|
||||
choice: alchemy
|
||||
choice: alchemy old
|
||||
choice: custom
|
||||
choice: iderp classicshifted
|
||||
choice: custom
|
||||
|
||||
@@ -90,12 +90,7 @@ clamp := {
|
||||
}
|
||||
round_up := {to_int(0.99999999999998+input)} #### 0.99999999999999 == 1, leave the 8
|
||||
round_near := {to_int(0.5+input)}
|
||||
to_number_lax :=
|
||||
{
|
||||
input := trim(input)
|
||||
if input == "" or input == "-" then input := 0
|
||||
to_number(input)
|
||||
}
|
||||
to_number_lax := { to_number(input) or else to_number(trim(input)) or else 0 }
|
||||
#### reads from a comma separated list like an array
|
||||
pull_comma_array := {
|
||||
array := split_text(input, match:divider)
|
||||
@@ -3888,6 +3883,7 @@ nameline_offset_height_3 := { 0 }
|
||||
### The stamp to use if the user hasn't overwritten it for this card
|
||||
card_stamp_default := {
|
||||
shape := styling.default_stamp or else set.default_stamp
|
||||
if shape == "iderp classicshifted" then shape := "iderp classicshifted default"
|
||||
stamp_behavior := styling.stamp_behavior or else set.stamp_behavior
|
||||
if stamp_behavior == "default" or stamp_behavior == "flatstamped default" then stamp_behavior := set.stamp_behavior
|
||||
|
||||
@@ -3909,8 +3905,13 @@ stamp_behavior_checks := [
|
||||
]
|
||||
### The image to use for custom stamp
|
||||
custom_stamp := {
|
||||
fs := split_custom_directory(set.custom_stamp_name)
|
||||
if set.custom_stamp_name != "" and has_png(set.custom_stamp_name)
|
||||
then "/magic-mainframe-extras.mse-include/" + un_png(set.custom_stamp_name) + (if flat then " flat" else "") + ".png"
|
||||
then "/magic-mainframe-extras.mse-include/"
|
||||
+ fs.directory
|
||||
+ dimensions + " "
|
||||
+ (if flat then "flatstamped " else "")
|
||||
+ fs.filename
|
||||
else "/magic-modules.mse-include/stamps/375x523 " + (if flat then "flatstamped " else "") + "heart.png"
|
||||
}@(flat:false)
|
||||
### The shape of the background stamp for templates
|
||||
@@ -3946,8 +3947,9 @@ card_stamp_image :=
|
||||
dimensions := card_stamp_possible_dimensions[dimensions] or else (if map.width > map.height then "1039x744" else "744x1039")
|
||||
shape := card_stamp_field(field)
|
||||
if shape == "default" then shape := set.default_stamp
|
||||
if shape == "iderp classicshifted" then shape := "iderp classicshifted default"
|
||||
if shape == "custom" or shape == "flatstamped custom"
|
||||
then custom_stamp(flat:not is_foil_stamped(field:field))
|
||||
then custom_stamp(dimensions: dimensions, flat:not is_foil_stamped(field:field))
|
||||
else if shape == "none"
|
||||
then ""
|
||||
else "/magic-modules.mse-include/stamps/" + dimensions + " " + shape + ".png"
|
||||
@@ -4584,6 +4586,11 @@ alt_symbol := {
|
||||
)
|
||||
}
|
||||
############################################################## Other customizable stuff
|
||||
split_custom_directory := {
|
||||
fn := filter_text(input, match:"[^./]+.png")
|
||||
dir := filter_text(input, match:"^([^.]+/)+")
|
||||
[directory:dir, filename:fn]
|
||||
}
|
||||
custom_border_image := {
|
||||
src := styling.custom_border_source or else ""
|
||||
ps := split_text(src, match:"-color-")
|
||||
|
||||
@@ -632,14 +632,15 @@ default set style:
|
||||
default stamp:
|
||||
render style: both
|
||||
choice images:
|
||||
standard: /magic.mse-game/stamps/oval.png
|
||||
none: /magic.mse-game/stamps/none.png
|
||||
acorn: /magic.mse-game/stamps/acorn.png
|
||||
heart: /magic.mse-game/stamps/heart.png
|
||||
universes beyond: /magic.mse-game/stamps/ub.png
|
||||
alchemy: /magic.mse-game/stamps/alchemy.png
|
||||
alchemy old: /magic.mse-game/stamps/alchemy_old.png
|
||||
custom: /magic.mse-game/stamps/heart.png
|
||||
standard: /magic.mse-game/stamps/oval.png
|
||||
none: /magic.mse-game/stamps/none.png
|
||||
acorn: /magic.mse-game/stamps/acorn.png
|
||||
heart: /magic.mse-game/stamps/heart.png
|
||||
universes beyond: /magic.mse-game/stamps/ub.png
|
||||
alchemy: /magic.mse-game/stamps/alchemy.png
|
||||
alchemy old: /magic.mse-game/stamps/alchemy_old.png
|
||||
custom: /magic.mse-game/stamps/heart.png
|
||||
iderp classicshifted: /magic.mse-game/stamps/iderp_classicshifted_default.png
|
||||
stamp behavior:
|
||||
render style: both
|
||||
choice images:
|
||||
|
||||
BIN
data/magic.mse-game/stamps/flat_iderp_classicshifted.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
BIN
data/magic.mse-game/stamps/flat_realms_acorn.png
Normal file
|
After Width: | Height: | Size: 722 B |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_blue.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_default.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_gold.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_green.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_iblue.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_igreen.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_ired.png
Normal file
|
After Width: | Height: | Size: 5.6 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_iwhite.png
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_purple.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_red.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
BIN
data/magic.mse-game/stamps/iderp_classicshifted_teal.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
@@ -1,16 +1,29 @@
|
||||
choice images:
|
||||
none: /magic.mse-game/stamps/none.png
|
||||
standard: /magic.mse-game/stamps/oval.png
|
||||
acorn: /magic.mse-game/stamps/acorn.png
|
||||
heart: /magic.mse-game/stamps/heart.png
|
||||
universes beyond: /magic.mse-game/stamps/ub.png
|
||||
alchemy: /magic.mse-game/stamps/alchemy.png
|
||||
alchemy old: /magic.mse-game/stamps/alchemy_old.png
|
||||
custom: { custom_stamp(flat:false) }
|
||||
flatstamped standard: /magic.mse-game/stamps/flat_oval.png
|
||||
flatstamped acorn: /magic.mse-game/stamps/flat_acorn.png
|
||||
flatstamped heart: /magic.mse-game/stamps/flat_heart.png
|
||||
flatstamped universes beyond: /magic.mse-game/stamps/flat_ub.png
|
||||
flatstamped alchemy: /magic.mse-game/stamps/flat_alchemy.png
|
||||
flatstamped alchemy old: /magic.mse-game/stamps/flat_alchemy_old.png
|
||||
flatstamped custom: { custom_stamp(flat:true) }
|
||||
none: /magic.mse-game/stamps/none.png
|
||||
standard: /magic.mse-game/stamps/oval.png
|
||||
acorn: /magic.mse-game/stamps/acorn.png
|
||||
heart: /magic.mse-game/stamps/heart.png
|
||||
universes beyond: /magic.mse-game/stamps/ub.png
|
||||
alchemy: /magic.mse-game/stamps/alchemy.png
|
||||
alchemy old: /magic.mse-game/stamps/alchemy_old.png
|
||||
iderp classicshifted: /magic.mse-game/stamps/iderp_classicshifted_default.png
|
||||
iderp classicshifted default: /magic.mse-game/stamps/iderp_classicshifted_default.png
|
||||
iderp classicshifted blue: /magic.mse-game/stamps/iderp_classicshifted_blue.png
|
||||
iderp classicshifted gold: /magic.mse-game/stamps/iderp_classicshifted_gold.png
|
||||
iderp classicshifted green: /magic.mse-game/stamps/iderp_classicshifted_green.png
|
||||
iderp classicshifted iblue: /magic.mse-game/stamps/iderp_classicshifted_iblue.png
|
||||
iderp classicshifted igreen: /magic.mse-game/stamps/iderp_classicshifted_igreen.png
|
||||
iderp classicshifted ired: /magic.mse-game/stamps/iderp_classicshifted_ired.png
|
||||
iderp classicshifted iwhite: /magic.mse-game/stamps/iderp_classicshifted_iwhite.png
|
||||
iderp classicshifted purple: /magic.mse-game/stamps/iderp_classicshifted_purple.png
|
||||
iderp classicshifted red: /magic.mse-game/stamps/iderp_classicshifted_red.png
|
||||
iderp classicshifted teal: /magic.mse-game/stamps/iderp_classicshifted_teal.png
|
||||
custom: { custom_stamp(dimensions:"375x523", flat:false) }
|
||||
flatstamped standard: /magic.mse-game/stamps/flat_oval.png
|
||||
flatstamped acorn: /magic.mse-game/stamps/flat_acorn.png
|
||||
flatstamped heart: /magic.mse-game/stamps/flat_heart.png
|
||||
flatstamped universes beyond: /magic.mse-game/stamps/flat_ub.png
|
||||
flatstamped alchemy: /magic.mse-game/stamps/flat_alchemy.png
|
||||
flatstamped alchemy old: /magic.mse-game/stamps/flat_alchemy_old.png
|
||||
flatstamped custom: { custom_stamp(dimensions:"375x523", flat:true) }
|
||||
flatstamped iderp classicshifted: /magic.mse-game/stamps/flat_iderp_classicshifted.png
|
||||
|
||||
BIN
data/magic.mse-game/stamps/realms_acorn.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |