Skip to content

Commit

Permalink
set things up for @Spappz
Browse files Browse the repository at this point in the history
  • Loading branch information
MrVauxs committed Jan 29, 2025
1 parent b9b932c commit 655bbbc
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
15 changes: 11 additions & 4 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ const settingsData = [
key: 'globalAnimations',
folder: 'PF2e Graphics',
options: {
name: 'pf2e-graphics.settings.globalAnimations.name',
hint: 'pf2e-graphics.settings.globalAnimations.hint',
scope: 'world',
config: false,
type: Array,
Expand All @@ -40,8 +38,6 @@ const settingsData = [
key: 'globalDisabledAnimations',
folder: 'PF2e Graphics',
options: {
name: 'pf2e-graphics.settings.globalDisabledAnimations.name',
hint: 'pf2e-graphics.settings.globalDisabledAnimations.hint',
scope: 'world',
config: false,
type: Array,
Expand Down Expand Up @@ -186,6 +182,17 @@ const settingsData = [
default: false,
},
},
{
namespace: 'pf2e-graphics',
key: 'tourNag',
folder: 'PF2e Graphics',
options: {
scope: 'client',
config: false,
type: Boolean,
default: true,
},
},
] as const;

function conditionalSettings() {
Expand Down
2 changes: 1 addition & 1 deletion src/tours.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export async function registerTours() {
}

// Post ~~nagging~~ welcome message if client has unstarted PF2e Graphics tours
if (unstartedTourConfigs.length) {
if (unstartedTourConfigs.length && game.settings.get('pf2e-graphics', 'tourNag')) {
ChatMessage.create({
style: CONST.CHAT_MESSAGE_STYLES.OOC,
speaker: {
Expand Down
14 changes: 10 additions & 4 deletions src/view/ChatMessage/TourNag.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,22 @@
export let message: ChatMessagePF2e;
const { unstartedTourConfigs } = message.flags['pf2e-graphics'] as { unstartedTourConfigs: TourConfig[] };
function close() {
window.game.settings.set('pf2e-graphics', 'tourNag', false);
message.delete();
}
</script>

<h2>Welcome to <i>PF2e Graphics</i>!</h2>
<h2>Welcome to <i>PF2e Graphics!</i></h2>

<p>Do you want a tour? :)</p>
<ul>
{#each unstartedTourConfigs as tour}
<li>Yes! I want to learn about: <code>{tour.id}</code></li>
{/each}
</ul>
<hr />
<ul>
<li><b>Never speak to me again >:(</b></li>
</ul>
<button class='' on:click={close}>
<b>Never speak to me again >:(</b>
</button>

0 comments on commit 655bbbc

Please sign in to comment.