Commit Graph

115 Commits

Author SHA1 Message Date
Cohee 93137e3e2a [chore] Fix lint errors 2024-10-13 14:02:53 +03:00
Cohee 161fc7f0f0 STscript: don't parse boolean operands as 0 for strings containing just spaces 2024-10-11 21:01:32 +03:00
Cohee 8333f44e2b [chore] Reformat callback 2024-10-10 00:41:43 +03:00
Cal 7a598a439a switch to custom sort comparitor 2024-10-09 15:10:37 -06:00
InspectorCaracal 84140f4e4f add `/sort` slash command 2024-10-09 13:54:39 -06:00
Cohee 33222191be Remove confusing toast from listvar 2024-10-01 19:15:53 +03:00
Cohee d82dc4952b Merge branch 'staging' into send-commands-return-value 2024-10-01 01:52:33 +03:00
Wolfsblvt 7a1b43eb89 Refactor /classify-expressions, deprecating...
- Update /classify-expressions, deprecating the old "format"
- Fix some oversights
2024-10-01 00:37:21 +02:00
Wolfsblvt 697b3b2034 Refactor /listvar, deprecate its "format" arg
- Update /listvar
- Fix toasts not doing correct HMTL here
2024-10-01 00:23:00 +02:00
Cohee 3fd846fb5b Allow returning literal Infinity string from math operations 2024-09-30 23:52:01 +03:00
Wolfsblvt 2dc7b5ded1 Allow using JSON arrays for math commands
- applies to all that receive a list. /add, /sub, /min, /max etc
- Parsing is the same as the other commands where we already allow "LIST" as an argument.
2024-09-30 21:24:22 +02:00
Wolfsblvt 8ff2ef086b Update defs and enums for other math commands
- Now even the commands like `/div count charnumber` work well with auto complete
2024-09-30 20:59:42 +02:00
Wolfsblvt 224249a0d2 Fix /sub actually allowing more than two vals now
- Fix by subtracting all from the first value
- Update the definition too
2024-09-30 20:50:18 +02:00
Wolfsblvt 4855f25419 Update /mul, /max and /min definition
- Update command definition for /mul, /max and /min to fit the actual code behind, split them too
- Add numbersAndVariables enum provider, to centralize
2024-09-30 20:45:39 +02:00
Wolfsblvt 0d38e63471 Why join and then split again, eh?
- Refactor /add actually using the array provided as the array for the internal `parseNumericSeries` inside `performOperation`
2024-09-30 20:28:52 +02:00
Wolfsblvt 8c87a24e5d Throw when left operand not provided 2024-09-25 20:51:56 +02:00
Wolfsblvt 7abb1751b1 Merge branch 'staging' into if-command-default-arguments 2024-09-25 20:46:40 +02:00
Wolfsblvt 23286d186b Fix lint issues 2024-09-25 20:44:28 +02:00
Wolfsblvt dadfc4db98 Let in/nin fall through to string + docs update 2024-09-25 20:10:14 +02:00
Wolfsblvt a11a8fe956 Update eval logic to be more streamlined 2024-09-25 19:40:13 +02:00
Cohee b61344185c Add format and scope arguments to /listvar 2024-09-25 10:45:44 +00:00
Wolfsblvt 8ae7c2330a Adjust /while to fit new optional args 2024-09-22 08:09:19 +02:00
Wolfsblvt cfe08d3a53 Refactor evalBoolean code 2024-09-22 07:58:16 +02:00
Wolfsblvt aea95adf60 /if allow "rule" and "right" to be optional 2024-09-22 07:42:51 +02:00
Wolfsblvt a1af768b02 Refactor /if to fromProps 2024-09-22 02:32:43 +02:00
Cohee 20e5e9eeee Add example for /var with type 2024-09-01 23:07:49 +03:00
Cohee b9cd82180f Better setvar example 2024-09-01 23:05:51 +03:00
Cohee 873f25e330 Specify JSON in /var help 2024-09-01 23:04:51 +03:00
Cohee a993671873 Fix arg name in help string 2024-09-01 23:04:15 +03:00
Cohee 56ae9d25b0 Fix renamed argument reference 2024-09-01 23:02:01 +03:00
Cohee 6f85327078 Only convert variable if needed 2024-09-01 22:59:50 +03:00
Cohee 329e395077 cast => as 2024-09-01 11:50:16 +03:00
Cohee 5d798fafdd Rename type => cast 2024-09-01 11:49:32 +03:00
Cohee 9558e14081 Revert bad reformat 2024-08-29 13:04:46 +00:00
Cohee 3746f08590 Add type conversion for /setvar commands with index 2024-08-29 12:55:54 +00:00
LenAnderson 5dc7b4567d Merge branch 'staging' into parser-followup-2 2024-07-22 12:44:07 -04:00
Succubyss 455f9b7a3e add "chatvar" aliases and "length" alias 2024-07-21 16:17:57 -05:00
LenAnderson c06f422e76 restore closure vars 2024-07-20 14:03:10 -04:00
LenAnderson 4191e3fa09 fix /let key= not given priority 2024-07-20 12:00:22 -04:00
LenAnderson 4336253b2f fix whitespace variable to "0" 2024-07-20 11:59:52 -04:00
LenAnderson 6d003cf140 Merge branch 'staging' into parser-followup-2 2024-07-10 17:35:17 -04:00
Cohee a357654c10 Update /len command help 2024-07-10 08:11:16 +00:00
LenAnderson 32ec6aac1c Merge branch 'staging' into parser-followup-2 2024-07-04 11:37:35 -04:00
Cohee 32a04422e7 Add guard to /times command arguments hint 2024-06-30 23:00:36 +03:00
LenAnderson 1de96ce11f add /break support in /times and /while 2024-06-24 08:42:33 -04:00
LenAnderson 45eeb63a0d export parseBooleanOperands 2024-06-24 07:44:27 -04:00
LenAnderson 2a742db63e fix type checks for evalBoolean and export
- numeric comparison only when both types are numbers
- otherwise use case-insensitive string comparison and JSON-stringify and non-strings
2024-06-24 07:44:10 -04:00
LenAnderson 965c15fa44 add split count to /times, /let, and /var 2024-06-23 18:18:44 -04:00
LenAnderson a7f74f0387 add any var / any number to /add enumProvider 2024-06-23 12:07:45 -04:00
LenAnderson ab5a6b1c61 fix /add multi unnamed 2024-06-23 11:51:26 -04:00