Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow API to bypass "Do you want to add these items to your character sheet?" prompts #1095

Closed
aaclayton opened this issue May 2, 2021 · 2 comments

Comments

@aaclayton
Copy link
Contributor

Originally in GitLab by @TheGiddyLimit

As a module developer, when I run this:

game.actors.get("<player actor ID>").createEmbeddedDocuments(
	"Item",
	[
		{
			name: "Barbarian",
			type: "class",
			data: {
				levels: 20,
			},
		},
	],
);

I do not want the user to be prompted to add class features. In general, a flag to disable "unexpected" side-effects such as this, would be a great improvement to the API.


Implemented with the following options on createEmbeddedDocuments:

{
  addFeatures?: boolean; // if set to `false` short circuts the whole feature application flow
  promptAddFeatures?: boolean; // if set to `false` skips the prompt and simply adds the features as 1.2.4 does today
}
@aaclayton
Copy link
Contributor Author

mentioned in commit b76b6d8

@aaclayton
Copy link
Contributor Author

Originally in GitLab by @akrigline

mentioned in commit 43dd9dd

@aaclayton aaclayton self-assigned this Jun 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant