DFC & Exporter Fixes
This commit is contained in:
@@ -899,7 +899,9 @@ script:
|
|||||||
#render image file
|
#render image file
|
||||||
write_image :=
|
write_image :=
|
||||||
{
|
{
|
||||||
if length(card.stylesheet.card_regions) > 0 then write_multi_image()
|
sts := card.stylesheet
|
||||||
|
if sts == nil then sts := set.stylesheet
|
||||||
|
if length(sts.card_regions) > 0 then write_multi_image()
|
||||||
else write_single_image()
|
else write_single_image()
|
||||||
}
|
}
|
||||||
format_file_name := {
|
format_file_name := {
|
||||||
|
|||||||
@@ -673,11 +673,13 @@ write_card_images := {
|
|||||||
height: image_export_height()
|
height: image_export_height()
|
||||||
)
|
)
|
||||||
|
|
||||||
len := length(card.stylesheet.card_regions)
|
sts := card.stylesheet
|
||||||
|
if sts == nil then sts := set.stylesheet
|
||||||
|
len := length(sts.card_regions)
|
||||||
if len > 0 then (
|
if len > 0 then (
|
||||||
card_image := to_card_image(card)
|
card_image := to_card_image(card)
|
||||||
for i from 0 to len-1 do (
|
for i from 0 to len-1 do (
|
||||||
region_info := card.stylesheet.card_regions[i]
|
region_info := sts.card_regions[i]
|
||||||
region := crop(
|
region := crop(
|
||||||
card_image,
|
card_image,
|
||||||
width: region_info.width,
|
width: region_info.width,
|
||||||
|
|||||||
@@ -742,7 +742,9 @@ script:
|
|||||||
+ ".jpg"
|
+ ".jpg"
|
||||||
}@(fillin:"")
|
}@(fillin:"")
|
||||||
write_card_image := {
|
write_card_image := {
|
||||||
if length(card.stylesheet.card_regions) > 0
|
sts := card.stylesheet
|
||||||
|
if sts == nil then sts := set.stylesheet
|
||||||
|
if length(sts.card_regions) > 0
|
||||||
then write_multi_images();
|
then write_multi_images();
|
||||||
write_image_file(
|
write_image_file(
|
||||||
card,
|
card,
|
||||||
@@ -753,9 +755,11 @@ script:
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
write_multi_images := {
|
write_multi_images := {
|
||||||
|
sts := card.stylesheet
|
||||||
|
if sts == nil then sts := set.stylesheet
|
||||||
card_image := to_card_image(card)
|
card_image := to_card_image(card)
|
||||||
for i from 0 to length(card.stylesheet.card_regions)-1 do (
|
for i from 0 to length(sts.card_regions)-1 do (
|
||||||
region_info := card.stylesheet.card_regions[i]
|
region_info := sts.card_regions[i]
|
||||||
region_name := region_info.name
|
region_name := region_info.name
|
||||||
fillin := if region_name == "front" or region_name == "minifront" or region_name == "meldpair"
|
fillin := if region_name == "front" or region_name == "minifront" or region_name == "meldpair"
|
||||||
then "a"
|
then "a"
|
||||||
|
|||||||
@@ -1027,11 +1027,12 @@ init script:
|
|||||||
styling_field := if instance <= 1 then styling.front_style else styling.back_style
|
styling_field := if instance <= 1 then styling.front_style else styling.back_style
|
||||||
if styling_field == "auto-sizing planeswalker" then (
|
if styling_field == "auto-sizing planeswalker" then (
|
||||||
counter := 1
|
counter := 1
|
||||||
|
bumper := 8 * (instance-1)
|
||||||
for x from 1 to 8 do (
|
for x from 1 to 8 do (
|
||||||
tf := card["level_" + (x*instance) + "_text"]
|
tf := card["level_" + (x+bumper) + "_text"]
|
||||||
if tf != "" and tf != zwsp then counter := x;
|
if tf != "" and tf != zwsp then counter := x;
|
||||||
)
|
)
|
||||||
tf := card["level_" + counter + "_text"]
|
tf := card["level_" + (counter+bumper) + "_text"]
|
||||||
if active then counter := counter - ( if tf == "" or tf == zwsp then 1 else 0)
|
if active then counter := counter - ( if tf == "" or tf == zwsp then 1 else 0)
|
||||||
else counter := counter + 1
|
else counter := counter + 1
|
||||||
styling_field := counter;
|
styling_field := counter;
|
||||||
@@ -1524,10 +1525,6 @@ init script:
|
|||||||
flavor_bar_disabled_1 := { mainframe_walker() or a_saga() or not set.use_flavor_bar }
|
flavor_bar_disabled_1 := { mainframe_walker() or a_saga() or not set.use_flavor_bar }
|
||||||
flavor_bar_disabled_2 := { mainframe_walkerb() or b_saga() or not set.use_flavor_bar }
|
flavor_bar_disabled_2 := { mainframe_walkerb() or b_saga() or not set.use_flavor_bar }
|
||||||
|
|
||||||
is_blank := {
|
|
||||||
input == "" or input == zwsp
|
|
||||||
}
|
|
||||||
|
|
||||||
watermark_include := "/magic-modules.mse-include/watermarks"
|
watermark_include := "/magic-modules.mse-include/watermarks"
|
||||||
############################################################## Set info fields
|
############################################################## Set info fields
|
||||||
set info style:
|
set info style:
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ include file: language
|
|||||||
include file: statistics_script
|
include file: statistics_script
|
||||||
include file: /magic-blends.mse-include/new-blends
|
include file: /magic-blends.mse-include/new-blends
|
||||||
############################################################## Versioning
|
############################################################## Versioning
|
||||||
version_date := {"2024-10-01 Template Pack 3.0.5: Magic Modules & Showcase Catchup - UBWalker fix"}
|
version_date := {"2024-10-01 Template Pack 3.0.5: Magic Modules & Showcase Catchup - DFC & Exporter Fixes"}
|
||||||
version := version_date
|
version := version_date
|
||||||
############################################################## Common filters
|
############################################################## Common filters
|
||||||
############################################################## Utility
|
############################################################## Utility
|
||||||
@@ -63,6 +63,7 @@ remove_zwsp := replace@(match:"", replace:"")
|
|||||||
#### Replace spaces by a spacer
|
#### Replace spaces by a spacer
|
||||||
separate_words := remove_tags + trim + replace@(match:" ", replace: {spacer})
|
separate_words := remove_tags + trim + replace@(match:" ", replace: {spacer})
|
||||||
zwsp := "" # this is a zero-width space not blank
|
zwsp := "" # this is a zero-width space not blank
|
||||||
|
is_blank := { input == "" or input == zwsp }
|
||||||
|
|
||||||
############################################################## Type
|
############################################################## Type
|
||||||
is_creature := lang_setting("is_creature")
|
is_creature := lang_setting("is_creature")
|
||||||
@@ -396,14 +397,16 @@ corrected_card_number := { if exporter_num_grabber(exporter_num_filter(card.note
|
|||||||
|
|
||||||
crop_multi_image := {
|
crop_multi_image := {
|
||||||
image_map := hash_new()
|
image_map := hash_new()
|
||||||
m3in1 := card.stylesheet.full_name == "M15 Style Meld cards (3-in-1)"
|
sts := card.stylesheet
|
||||||
|
if sts == nil then sts := set.stylesheet
|
||||||
|
m3in1 := sts.full_name == "M15 Style Meld cards (3-in-1)"
|
||||||
three_cards := false
|
three_cards := false
|
||||||
cs := get_card_styling(card)
|
cs := get_card_styling(card)
|
||||||
if m3in1 and cs.three_cards or else false then three_cards := true
|
if m3in1 and cs.three_cards or else false then three_cards := true
|
||||||
card_image := to_card_image(card)
|
card_image := to_card_image(card)
|
||||||
len := length(card.stylesheet.card_regions)
|
len := length(sts.card_regions)
|
||||||
for i from 0 to len-1 do (
|
for i from 0 to len-1 do (
|
||||||
region_info := card.stylesheet.card_regions[i]
|
region_info := sts.card_regions[i]
|
||||||
if m3in1 and three_cards and (region_info.name == "front" or region_info.name == "meldback")
|
if m3in1 and three_cards and (region_info.name == "front" or region_info.name == "meldback")
|
||||||
then ""
|
then ""
|
||||||
else if m3in1 and (not three_cards) and (region_info.name != "front" and region_info.name != "meldback")
|
else if m3in1 and (not three_cards) and (region_info.name != "front" and region_info.name != "meldback")
|
||||||
@@ -3559,16 +3562,20 @@ loyalty_level_is_active :=
|
|||||||
{
|
{
|
||||||
number := to_int(replace(input, match: "lv", replace: "")) or else 999
|
number := to_int(replace(input, match: "lv", replace: "")) or else 999
|
||||||
if number > 24 then false else (
|
if number > 24 then false else (
|
||||||
instance := if number < 9 then 1 else if number < 17 then 2 else 3
|
instance := if number < 9 then 1 else if number < 17 then 2 else 3
|
||||||
loyalty_abilities_count(active:true) >= (number mod 8))
|
mod_val := number mod 8
|
||||||
|
if mod_val == 0 then mod_val := 8
|
||||||
|
loyalty_abilities_count(active:true) >= mod_val
|
||||||
|
)
|
||||||
}
|
}
|
||||||
loyalty_abilities_count :=
|
loyalty_abilities_count :=
|
||||||
{
|
{
|
||||||
styling_field := if instance <= 1 then (styling.number_of_textboxes or else "0") else (styling["number_of_textboxes_" + instance] or else "0")
|
styling_field := if instance <= 1 then (styling.number_of_textboxes or else "0") else (styling["number_of_textboxes_" + instance] or else "0")
|
||||||
if styling_field == "automatic" then (
|
if styling_field == "automatic" then (
|
||||||
counter := 1
|
counter := 1
|
||||||
|
bumper := 8 * (instance-1)
|
||||||
for x from 1 to 8 do (
|
for x from 1 to 8 do (
|
||||||
tf := card["level_" + (x*instance) + "_text"]
|
tf := card["level_" + (x+bumper) + "_text"]
|
||||||
if tf != "" and tf != zwsp then counter := x;
|
if tf != "" and tf != zwsp then counter := x;
|
||||||
)
|
)
|
||||||
tf := card["level_" + counter + "_text"]
|
tf := card["level_" + counter + "_text"]
|
||||||
|
|||||||
Reference in New Issue
Block a user