moo-man / WFRP4e-FoundryVTT

The premiere system for running grim and perilous games of Warhammer Fantasy Role-play in the Foundry VTT environment.
Apache License 2.0
92 stars 54 forks source link

Unofficial grimoire fix #2175

Open silentmark opened 3 months ago

silentmark commented 3 months ago

There was an issue with overcast not working due to data not being pasted from dialog to test and also calculation of user entries:

        for(let key in this.userEntry)
        {
            if (["string", "boolean"].includes(typeof this.userEntry[key]))
            {
                this.fields[key] = this.userEntry[key]
            }
            else if (Number.isNumeric(this.userEntry[key]))
            {
                this.fields[key] += this.userEntry[key];
            }
        }
        this.tooltips.finish(this, "User Entry")

since overcast value in cast dialog is a numeric field, instead of passing it to test, it was either incremented on every input change, or treated as NaN, due to null + number calculation.

Also, minor typo and translation in base dialog.

silentmark commented 1 month ago

@moo-man - this PR has been updated to latest changes.