Compare commits

..

2 Commits

Author SHA1 Message Date
YouHaveTrouble d625fa7eee fix infinite loading screen on new save file 2025-06-03 07:43:31 +02:00
YouHaveTrouble 463fc90c9a make text in changelogs selectable 2025-06-03 00:07:30 +02:00
3 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "adventurers-guild", "name": "adventurers-guild",
"version": "0.15.2", "version": "0.15.3",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "vite", "dev": "vite",
+5 -3
View File
@@ -148,8 +148,10 @@ export default defineComponent({
if (deltaTime > 0) return; // not yet time for a new recruit if (deltaTime > 0) return; // not yet time for a new recruit
if (Object.keys(this.adventurers).length <= 0) { if (Object.keys(this.adventurers).length <= 0) {
const firstAdventurer = this.adventurersDatabase[0]; const firstAdventurer = this.adventurersDatabase["aldek"];
this.adventurersForHire[firstAdventurer.id] = firstAdventurer; this.adventurersForHire[firstAdventurer.id] = firstAdventurer;
this.setNextRecruitArrival(currentTimestamp, cooldownModifier)
return;
} }
const newAdventurerForHire = getNewAdventurerForHire(Object.values(this.adventurersDatabase), Object.values(this.adventurers)); const newAdventurerForHire = getNewAdventurerForHire(Object.values(this.adventurersDatabase), Object.values(this.adventurers));
@@ -338,11 +340,11 @@ export default defineComponent({
this.loadGame(); this.loadGame();
this.adventurersDatabase = removeAlreadyHiredAdventurers(this.adventurersDatabase, this.adventurers); this.adventurersDatabase = removeAlreadyHiredAdventurers(this.adventurersDatabase, this.adventurers);
if (Object.keys(this.adventurersForHire).length < this.guild.recruitmentCapacity.getRecruitmentCapacity()) { if (Object.keys(this.adventurers).length > 0 && Object.keys(this.adventurersForHire).length < this.guild.recruitmentCapacity.getRecruitmentCapacity()) {
// check if more time passed than next recruit arrival and simulate next recruit arrivals up to now // check if more time passed than next recruit arrival and simulate next recruit arrivals up to now
const now = new Date(); const now = new Date();
if (this.nextRecruitArrival.getTime() < now.getTime()) { if (this.nextRecruitArrival.getTime() < now.getTime()) {
const slotsLeft = 2 - Object.keys(this.adventurersForHire).length; const slotsLeft = this.guild.recruitmentCapacity.getRecruitmentCapacity() - Object.keys(this.adventurersForHire).length;
for (let i = 0; i < slotsLeft; i++) { for (let i = 0; i < slotsLeft; i++) {
await this.checkForNewRecruit(this.nextRecruitArrival.getTime()); await this.checkForNewRecruit(this.nextRecruitArrival.getTime());
} }
@@ -91,7 +91,7 @@ export default defineComponent({
align-items: center; align-items: center;
gap: 1rem; gap: 1rem;
width: 100%; width: 100%;
overflow-y: auto; user-select: text;
} }
.changelog-entry { .changelog-entry {