Add space theorems as automator currency

This commit is contained in:
SpectralFlame 2023-06-30 23:09:12 -05:00 committed by cyip92
parent 5d7cb772ae
commit 1b7b835ef1
4 changed files with 25 additions and 4 deletions

View File

@ -304,6 +304,8 @@ export default {
<span v-if="!isDoomed">
You gain {{ formatInt(1) }} Space Theorem for each completion,
allowing you to purchase Time Studies which are normally locked.
<br>
Space Theorems can now also be used as a Currency in the Automator.
</span>
</div>
<br>

View File

@ -64,7 +64,7 @@ CodeMirror.defineSimpleMode("automato", {
{ regex: /blob\s\s/ui, token: "blob" },
{
// eslint-disable-next-line max-len
regex: /(auto|if|pause|studies|time[ \t]+theorems?|until|wait|while|black[ \t]+hole|stored?[ \t]+game[ \t]+time|notify)\s/ui,
regex: /(auto|if|pause|studies|time[ \t]+theorems?|space[ \t]+theorems?|until|wait|while|black[ \t]+hole|stored?[ \t]+game[ \t]+time|notify)\s/ui,
token: "keyword",
next: "commandArgs"
},
@ -156,12 +156,12 @@ CodeMirror.defineSimpleMode("automato", {
{ regex: /(light|dark)(\s|$|(?=,))/ui, token: "variable-2" },
{ regex: /x[\t ]+highest(\s|$)/ui, token: "variable-2" },
{ regex: /pending[\t ]+(completions|ip|ep|tp|rm|glyph[\t ]+level)(\s|$)/ui, token: "variable-2" },
{ regex: /total[\t ]+(completions|tt)(\s|$)/ui, token: "variable-2" },
{ regex: /total[\t ]+(completions|tt|space theorems)(\s|$)/ui, token: "variable-2" },
{ regex: /filter[ \t]+score/ui, token: "variable-2" },
{ regex: /ec(1[0-2]|[1-9])[\t ]+completions(\s|$)/ui, token: "variable-2" },
{ regex: /(am|ip|ep|all)(\s|$)/ui, token: "variable-2" },
{
regex: /(rm|rg|dt|tp|tt|(banked )?infinities|eternities|realities|rep(licanti)?)(\s|$)/ui,
regex: /(rm|rg|dt|tp|tt|space theorems|(banked )?infinities|eternities|realities|rep(licanti)?)(\s|$)/ui,
token: "variable-2",
},
{ regex: / sec(onds ?) ?| min(utes ?) ?| hours ?/ui, token: "variable-2" },

View File

@ -188,6 +188,20 @@ createInCategory(AutomatorCurrency, "FilterScore", /filter[ \t]+score/i, {
$unlocked: () => EffarigUnlock.glyphFilter.isUnlocked,
});
// Space theorems can't be abbreviated as "ST" in the actual script content because then the lexer becomes unable
// to match it due to the fact that "start" (ec/dilation) also begins with those characters. As a workaround, ST
// uses the full string "space theorems" as does the "total ST" variant (for consistency)
createInCategory(AutomatorCurrency, "ST", /space[ \t]+theorems/i, {
$autocomplete: "space theorems",
$getter: () => V.availableST,
$unlocked: () => V.spaceTheorems > 0,
});
createInCategory(AutomatorCurrency, "TotalST", /total[ \t]+space[ \t]+theorems/i, {
$autocomplete: "total space theorems",
$getter: () => V.spaceTheorems,
$unlocked: () => V.spaceTheorems > 0,
});
for (let i = 1; i <= 12; ++i) {
const id = i;
createInCategory(AutomatorCurrency, `EC${i}`, new RegExp(`ec${i} completions`, "i"), {

View File

@ -513,6 +513,10 @@ export const automator = {
const filterText = EffarigUnlock.glyphFilter.isUnlocked
? `<b>filter score</b> - Glyph filter score of the Glyph which your filter will select this Reality<br>`
: "";
const stText = V.spaceTheorems > 0
? `<b>space theorems</b> - Current unspent Space Theorem amount<br>
<b>total space theorems</b> - TOTAL Space Theorems, including ones spent on current Studies<br>`
: "";
return `This is a list of "currencies" or numbers that you can use within the Automator.<br>
Note that when used, most currencies will need to be in scientific notation.<br>
<b>am</b> - Current Antimatter amount <br>
@ -538,6 +542,7 @@ export const automator = {
<b>pending completions</b> - Total completions of current EC at Eternity <br>
<b>ec<u>X</u> completions</b> - Amount of EC completions for a certain EC (eg. "ec6 completions")<br>
${filterText}
${stText}
`;
}
},