From 8fd810b1d389206ee25dd673aecd358fe0e572b1 Mon Sep 17 00:00:00 2001 From: cajun <12363371+CajunAvenger@users.noreply.github.com> Date: Mon, 23 Sep 2024 10:12:58 -0500 Subject: [PATCH] fix type_name for localization type_name() returns a localized string, so type_name comparisions should compare against type_name() of a known quantity instead --- data/magic-blends.mse-include/new-blends | 6 +++--- data/magic-m15-altered.mse-style/style | 4 ++-- data/magic-m15-mainframe-dfc.mse-style/style | 4 ++-- data/magic-m15-saga.mse-style/style | 8 ++++---- data/magic-modules.mse-include/crowns/readme.txt | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/data/magic-blends.mse-include/new-blends b/data/magic-blends.mse-include/new-blends index c578d1460..a2d07d9f2 100644 --- a/data/magic-blends.mse-include/new-blends +++ b/data/magic-blends.mse-include/new-blends @@ -969,9 +969,9 @@ module_stamp := { color_background(type:"stamp", base_hybrid:stamp_hybrid, fol module_ubstamp := { color_background(type:"ubstamp", base_hybrid:stamp_hybrid, folder:template_prefix["ubstamp"], blend_type:"stamp") } module_nyx := { type := "nyx" - if has_png(set.alternate_nyx) and type_name(harder_script["alt_nyx" or else nil] or else nil) != "nothing" + if has_png(set.alternate_nyx) and type_name(harder_script["alt_nyx" or else nil] or else nil) != type_name(nil) then type := "alt_nyx" - else if set.alternate_nyx == "star" and type_name(harder_script["star" or else nil] or else template_prefix["star" or else nil] or else nil) != "nothing" + else if set.alternate_nyx == "star" and type_name(harder_script["star" or else nil] or else template_prefix["star" or else nil] or else nil) != type_name(nil) then type := "star" color_background( type: type, @@ -1092,7 +1092,7 @@ set_watermark_blend := { } spotlight_watermark_blend := { face := [1:card.card_color, 2:card.card_color_2, 3:card.card_color_3][face] - if type_name(input) == "string" and contains(input, match:".png,") then ( + if type_name(input) == type_name("string") and contains(input, match:".png,") then ( array := split_text(input+",,", match:",") input := array.0 l := min(to_number(array.1),500) diff --git a/data/magic-m15-altered.mse-style/style b/data/magic-m15-altered.mse-style/style index 0fc40ce12..0a4072e09 100644 --- a/data/magic-m15-altered.mse-style/style +++ b/data/magic-m15-altered.mse-style/style @@ -6,7 +6,7 @@ icon: card-sample.png installer group: magic/m15 style/normal cards position hint: 001 -version: 2024-09-04 +version: 2024-09-23 depends on: package: magic.mse-game version: 2020-04-25 @@ -274,7 +274,7 @@ init script: } is_beyond := { chosen(styling.frames, choice:"universes beyond") - or (chosen(styling.other_options, choice:"auto ub") and card.card_stamp == "universes beyond") + or (chosen(styling.other_options, choice:"auto ub") and (card.card_stamp == "universes beyond" or card.card_stamp == "flatstamped universes beyond")) } is_miracle := { chosen(styling.frames, choice:"miracle") diff --git a/data/magic-m15-mainframe-dfc.mse-style/style b/data/magic-m15-mainframe-dfc.mse-style/style index c62683f8d..1aee05942 100644 --- a/data/magic-m15-mainframe-dfc.mse-style/style +++ b/data/magic-m15-mainframe-dfc.mse-style/style @@ -190,12 +190,12 @@ init script: flag2: "flag.png", ] template := { - if type_name(harder_script[type] or else nil) != "nothing" + if type_name(harder_script[type] or else nil) != type_name(nil) then harder_script[type](input, land:false) else template_prefix[type] + input + template_suffix[type] } land_template := { - if type_name(harder_script[type] or else nil) != "nothing" + if type_name(harder_script[type] or else nil) != type_name(nil) then harder_script[type](input, land:true) else template_prefix[type] + input + (if landless(type) or input == "a" then "" else "l") + template_suffix[type] } diff --git a/data/magic-m15-saga.mse-style/style b/data/magic-m15-saga.mse-style/style index 2118a1f39..ae37d8437 100644 --- a/data/magic-m15-saga.mse-style/style +++ b/data/magic-m15-saga.mse-style/style @@ -6,7 +6,7 @@ installer group: magic/m15 style/sagas icon: card-sample.png position hint: 010 -version: 2024-09-01 +version: 2024-09-23 depends on: package: magic.mse-game version: 2014-06-25 @@ -55,12 +55,12 @@ init script: identity: "identity.png" ] template := { - if type_name(harder_script[type] or else nil) != "nothing" + if type_name(harder_script[type] or else nil) != type_name(nil) then harder_script[type](input, land:false) else template_prefix[type] + input + template_suffix[type] } land_template := { - if type_name(harder_script[type] or else nil) != "nothing" + if type_name(harder_script[type] or else nil) != type_name(nil) then harder_script[type](input, land:true) else template_prefix[type] + (if input == "a" then "c" else input) + (if landless(type) then "" else "l") + template_suffix[type] } @@ -235,7 +235,7 @@ init script: auto_snow := { contains(styling.auto_frames, match:"snow") and lang_setting("is_snow")(card.super_type) } is_beyond := { chosen(styling.other_options, choice:"universes beyond") - or (chosen(styling.auto_frames, choice:"universes beyond") and card.card_stamp == "universes beyond") + or (chosen(styling.auto_frames, choice:"universes beyond") and (card.card_stamp == "universes beyond" or card.card_stamp == "flatstamped universes beyond")) } nyx_background := { color_background(type:"nyx", base_hybrid:card_hybrid) } snow_background := { color_background(type:"snowtexture", base_hybrid:card_hybrid) } diff --git a/data/magic-modules.mse-include/crowns/readme.txt b/data/magic-modules.mse-include/crowns/readme.txt index 45589289d..8890b173b 100644 --- a/data/magic-modules.mse-include/crowns/readme.txt +++ b/data/magic-modules.mse-include/crowns/readme.txt @@ -16,12 +16,12 @@ include file: /magic-modules.mse-include/corners/card_fields_tfc #### Finally, the template script must be adjusted like so: template := { - if type_name(harder_script[type] or else nil) != "nothing" + if type_name(harder_script[type] or else nil) != type_name(nil) then harder_script[type](input, land:false) else template_prefix[type] + input + template_suffix[type] } land_template := { - if type_name(harder_script[type] or else nil) != "nothing" + if type_name(harder_script[type] or else nil) != type_name(nil) then harder_script[type](input, land:true) else template_prefix[type] + input + (if input == "a" then "" else "l") + template_suffix[type] }