Skip to content

Commit

Permalink
changed for publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
name committed Jun 23, 2024
1 parent 8ac869a commit aff788e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { App, Notice, Plugin, PluginSettingTab, Setting } from 'obsidian';

interface RPGSettings {
lastLoad: number;
level: number;
xp: number;
xpPerSecond: number;
Expand All @@ -11,7 +10,6 @@ interface RPGSettings {
}

const SETTINGS: RPGSettings = {
lastLoad: Date.now(),
level: 1,
xp: 0,
xpPerSecond: 1,
Expand All @@ -29,7 +27,6 @@ export default class RPG extends Plugin {

async onload() {
await this.loadSettings();
this.settings.lastLoad = Date.now();
this.settings.currentSessionDuration = 0;
this.statsStatusBar = this.addStatusBarItem();

Expand Down Expand Up @@ -93,7 +90,6 @@ class RPGSettingsTab extends PluginSettingTab {
display(): void {
let { containerEl } = this;
containerEl.empty();
containerEl.createEl('h3', { text: 'RPG settings' });

new Setting(containerEl)
.setName('XP gained per second')
Expand All @@ -118,18 +114,5 @@ class RPGSettingsTab extends PluginSettingTab {
this.plugin.saveSettings();
})
);

new Setting(containerEl)
.setName('Reset XP and level')
.setDesc('WARNING: Enabling or Disabling this option will reset your XP and level to 0.')
.addToggle((toggle) =>
toggle
.setValue(this.plugin.settings.displayStaringTimeAsHumanString)
.onChange((value) => {
this.plugin.settings.xp = 0;
this.plugin.settings.level = 1;
this.plugin.saveSettings();
})
);
}
}

0 comments on commit aff788e

Please sign in to comment.