card_fields rewrite and magic-modules.mse-include (#21)

Overhauls the card_fields file to allow for template designers more freedom in manipulating data.

Adds magic-modules.mse-include, a large scale include file for building templates in a standardized way. Applying this to existing frames will be coming in future updates.
This commit is contained in:
GenevensiS
2024-05-25 00:57:47 +02:00
committed by GitHub
parent 44b059e2f7
commit fd4b8e4c89
1195 changed files with 13325 additions and 3633 deletions

View File

@@ -55,6 +55,7 @@ init script:
# styling stuff
card_shape := {"token"}
card_name_for_level := {if set.alias_as_cardname and card.alias != "" then card.alias else card.name}
shrink_name := {if styling.shrink_name_text != "" then to_int(styling.shrink_name_text) else 0 }
note_cleaner := replace@(match:"\\+", replace:"")
num_cleaner := replace@(match:"[0-9]", replace:"")
@@ -215,7 +216,7 @@ init script:
arrow_to_room := {
span := span_array(y)
span2 := span_array(y+1)
interface := sort_list(join_arrays(a1:span, a2:span2), remove_duplicates:true)
interface := sort_list((span+span2), remove_duplicates:true)
if x >= length(interface)
then 0
else (
@@ -266,7 +267,7 @@ init script:
[58, 138, 198, 278, -10]
]
arrow_x := {
arr := sort_list(join_arrays(a1:span_array(y), a2:span_array(y+1)), remove_duplicates:true)
arr := sort_list((span_array(y)+span_array(y+1)), remove_duplicates:true)
if y >= max_level() or x >= length(arr)
then 0
else if use_fast() then (
@@ -343,7 +344,7 @@ init script:
}
add_level_lanes := {
ml := max_level()
walls := sort_list(join_arrays(a1:span_array(line), a2:span_array(line+1)), remove_duplicates:true)
walls := sort_list((span_array(line)+span_array(line+1)), remove_duplicates:true)
len := length(walls)
y := 380-line_offset(line)
baseline := wall_crop("new_masks/"+s+"lane.png", offset:y)