improve script caching (#77)

* cache card number
* optimize pull_comma_array
* decouple type from card number

---------

Co-authored-by: cajun <12363371+CajunAvenger@users.noreply.github.com>
This commit is contained in:
cajun
2024-09-26 15:44:41 -05:00
committed by GitHub
parent fb3e5092a6
commit 8abb9df8ea
6 changed files with 268 additions and 210 deletions

View File

@@ -427,7 +427,7 @@ set field:
type: text
name: custom creature races
description: Custom races for the stats page, separated by commas, or type "detect" for MSE to grab them. Type statistics_info() in the console for detailed help.
default: "detect"
default: "Type custom types here; or replace this text with 'detect' to scan"
script:
if value == "detect" then detect_custom_creature_subtypes_statistic() else value
set field:
@@ -440,7 +440,7 @@ set field:
description: Regex used to split the card notes in the Card Notes Clauses statistics category. Default is " *(\.|\n|;|,|(?=!)) *" which splits at each semicolon, each dot, each exclamation mark and each comma.
default: " *(\\.|\\n|;|,|(?=!)) *"
set field:
type: text
type: choice
name: global_variable_average_opening_hand
script: global_variable_average_opening_hand_statistic()