-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #271 from RSamaium/v4.1.3
V4.1.3
- Loading branch information
Showing
24 changed files
with
391 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<template> | ||
<iframe :src="path" loading="lazy" scrolling="no" style="border:0;height:760px;max-width:800px;width:100%"> | ||
</iframe> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
props: ['id'], | ||
computed: { | ||
path() { | ||
return `https://playground.rpgjs.dev/sandbox/${this.id}` | ||
} | ||
} | ||
} | ||
</script> |
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
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,41 @@ | ||
import type { RpgPlayer } from "@rpgjs/server"; | ||
import type { Block } from "../types/block"; | ||
import { Group } from "../types/group"; | ||
|
||
export type ChangeGold = { | ||
id: 'gold' | ||
value: number | ||
} | ||
|
||
export default (formatMessage): Block => ({ | ||
id: 'gold', | ||
group: Group.Param, | ||
title: formatMessage({ | ||
defaultMessage: 'Show Choices', | ||
description: 'Choices block', | ||
id: 'block.choice' | ||
}), | ||
description: formatMessage({ | ||
defaultMessage: 'Display a choice', | ||
description: 'Choices block description', | ||
id: 'block.choice.description' | ||
}), | ||
display: ['gold'], | ||
schema: { | ||
type: 'object', | ||
properties: { | ||
value: { | ||
type: 'number', | ||
title: formatMessage({ | ||
defaultMessage: 'Value', | ||
description: 'Set Value', | ||
}), | ||
} | ||
}, | ||
required: ['value'] | ||
}, | ||
async execute(player: RpgPlayer, dataBlock: ChangeGold) { | ||
player.gold += dataBlock.value | ||
return undefined | ||
} | ||
}) |
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 |
---|---|---|
@@ -1,13 +1,16 @@ | ||
import choice from './choice' | ||
import text from './text' | ||
import gold from './gold' | ||
import type { Choice } from './choice' | ||
import type { Text } from './text' | ||
import type { ChangeGold } from './gold' | ||
|
||
export type Flow = { | ||
[blockId: string]: Choice | Text | ||
[blockId: string]: Choice | Text | ChangeGold | ||
} | ||
|
||
export default [ | ||
choice, | ||
text | ||
text, | ||
gold | ||
] |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export enum Group { | ||
UI = 'ui', | ||
Logic = 'logic', | ||
Param = 'param', | ||
} |
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.