School tag autocomplete fix on 20Q.
This commit is contained in:
@@ -43,7 +43,7 @@ Technique syntaxe "quick" explanation :
|
||||
- Or specific syntaxe "@`S`:`prop1`" or "@`T`:`prop1`|`max`" or "@`T`:`prop1`|`max`(`prop2`)" :
|
||||
- `@` fixed, trigger the parser
|
||||
- `T` or `S` : `T`arget or `S`elf, define the actor to get the value.
|
||||
- `prop1` / `prop2` : Can be any property in `actor` or `actor.data.data`. Limitations: currently no `size` or `distance` (range).
|
||||
- `prop1` / `prop2` : Can be any property in `actor` or `actor.data.data`. Limitations: currently no `size`, `distance` (range) or computation (a+b).
|
||||
- `|` separator, optional if no min/max.
|
||||
- `min` or `max` : Between the selected targets, search for the min/max of `prop2`. If no `prop2` provided, take `prop1` as `prop2` (irrelevant for `@S`).
|
||||
- `(prop2)` : define the property for the actor selection in multiple target, can be omitted if same as `prop1`.
|
||||
|
||||
@@ -357,6 +357,16 @@ export class TwentyQuestionsDialog extends FormApplication {
|
||||
* @override
|
||||
*/
|
||||
async _updateObject(event, formData) {
|
||||
// Clan tag trim if autocomplete in school name
|
||||
if (
|
||||
formData["autoCompleteListName"] === "step3.school" &&
|
||||
formData["autoCompleteListSelectedIndex"] >= 0 &&
|
||||
!!formData["step1.clan"] &&
|
||||
formData["step3.school"].indexOf(` [${formData["step1.clan"]}]`) !== -1
|
||||
) {
|
||||
formData["step3.school"] = formData["step3.school"].replace(` [${formData["step1.clan"]}]`, "");
|
||||
}
|
||||
|
||||
// Check "Or" conditions
|
||||
formData["step7.social_add_glory"] = formData["step7.skill"] === "none" ? 5 : 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user