mirror of
https://github.com/YouHaveTrouble/GuildMaster.git
synced 2026-05-11 22:16:59 +00:00
remove unnecessary logs, update upgrade cost after upgrading
This commit is contained in:
+3
-3
@@ -97,7 +97,6 @@ export default defineComponent({
|
||||
adventurer.busy = false;
|
||||
}
|
||||
missive.adventurers = [];
|
||||
console.log(missive.rank, missive.rank.toString(), missive.id)
|
||||
delete this.missives[missive.rank.toString() as QuestRank][missive.id];
|
||||
},
|
||||
getRandomQuest(rank: QuestRank): Quest | null {
|
||||
@@ -115,7 +114,7 @@ export default defineComponent({
|
||||
this.missives[rank][newId] = quest;
|
||||
},
|
||||
saveGame() {
|
||||
console.debug("Saving game...")
|
||||
console.debug("Saving game...");
|
||||
window.localStorage.setItem("savedGame", JSON.stringify({
|
||||
guild: this.guild,
|
||||
adventurers: this.adventurers,
|
||||
@@ -126,7 +125,8 @@ export default defineComponent({
|
||||
const rawData = window.localStorage.getItem("savedGame");
|
||||
if (!rawData) return;
|
||||
const saveData = JSON.parse(rawData);
|
||||
this.guild = saveData.guild;
|
||||
|
||||
this.guild = new Guild(saveData.guild.level, saveData.guild.gold);
|
||||
|
||||
const adventurers = {} as { [key: string]: Adventurer };
|
||||
|
||||
|
||||
@@ -17,6 +17,10 @@ export class Guild {
|
||||
this.level += 1;
|
||||
if (this.level > 7) {
|
||||
this.displayUpgradeCost = "Max level";
|
||||
} else {
|
||||
const newCost = this.getUpgradeCost();
|
||||
if (newCost === null) return;
|
||||
this.displayUpgradeCost = newCost;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ export default defineComponent({
|
||||
},
|
||||
allAdventurers: {
|
||||
type: Object as PropType<{[key: string]: Adventurer}>,
|
||||
}
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
print(a:string) {
|
||||
@@ -77,6 +77,7 @@ export default defineComponent({
|
||||
gap: 0.5rem;
|
||||
padding: 0.5rem;
|
||||
background-color: rgba(0,0,0, 0.2);
|
||||
z-index: 2;
|
||||
.slot {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
|
||||
Reference in New Issue
Block a user