-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable RuleElements to modify Actors or Items
Closes #22.
- Loading branch information
Showing
11 changed files
with
247 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/typescript/ruleEngine/messages/wrongSelectedTypeMessage.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { getGame } from "../../foundryHelpers.js"; | ||
import RuleElementMessage from "../ruleElementMessage.js"; | ||
|
||
/** A warning about a wrong selected property type on the target */ | ||
export default class WrongSelectedTypeMessage extends RuleElementMessage { | ||
constructor( | ||
/** The name of the target document */ | ||
public docName: string | null, | ||
|
||
/** The path to the property */ | ||
public propertyPath: string, | ||
|
||
/** The name of the type, the property should be */ | ||
public typeName: string | ||
) { | ||
super("wv.ruleEngine.errors.logical.wrongSelectedType", "error"); | ||
} | ||
|
||
override get message(): string { | ||
return getGame().i18n.format(this.messageKey, { | ||
name: this.docName, | ||
path: this.propertyPath, | ||
type: this.typeName | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.