-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
48 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { LootCreator } from './loot-creator.js'; | ||
import { LootBuilder } from './loot-builder.js' | ||
import { LootChatCard } from './loot-chat-card.js'; | ||
import { StoryBuilder } from './story/story-builder.js'; | ||
import { StoryChatCard } from './story/story-chat-card.js'; | ||
|
||
export class BetterTables { | ||
async generateLoot(tableEntity) { | ||
const lootBuilder = new LootBuilder(tableEntity); | ||
const generatedLoot = await lootBuilder.generateLoot(); | ||
const lootCreator = new LootCreator(generatedLoot); | ||
await lootCreator.createActor(); | ||
await lootCreator.addCurrenciesToActor(); | ||
await lootCreator.addItemsToActor(); | ||
} | ||
|
||
async generateChatLoot(tableEntity) { | ||
const lootBuilder = new LootBuilder(tableEntity); | ||
const generatedLoot = await lootBuilder.generateLoot(); | ||
const lootChatCard = new LootChatCard(generatedLoot); | ||
await lootChatCard.createChatCard(tableEntity); | ||
} | ||
|
||
async generateChatStory(tableEntity) { | ||
const storyBuilder = new StoryBuilder(tableEntity); | ||
await storyBuilder.drawStory(); | ||
const storyHtml = storyBuilder.generatedStory(); | ||
const storyGMHtml = storyBuilder.generatedStoryGM(); | ||
const storyChat = new StoryChatCard(tableEntity); | ||
storyChat.createChatCard(storyHtml); | ||
storyChat.createChatCard(storyGMHtml, { gmOnly: true }); | ||
} | ||
} |
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